From cc1329e85df1adc2040b03a7755b2222bc2af5c0 Mon Sep 17 00:00:00 2001 From: Jack Le Hamster Date: Tue, 14 May 2024 14:17:03 -0700 Subject: [PATCH] Revert "Fix bug in all JS files." This reverts commit 0ffec094a1f2b5aa59e1107a47fda2e1ccb42da6. --- dist/phaser-arcade-physics.js | 4 +- dist/phaser-ie9.js | 4 +- dist/phaser.esm.js | 2 +- dist/phaser.js | 4 +- plugins/spine/dist/SpineCanvasPlugin.js | 4 +- plugins/spine/dist/SpineCanvasPluginDebug.js | 4 +- .../spine/dist/SpineCanvasPluginDebug.js.map | 2 +- plugins/spine/dist/SpinePlugin.js | 4 +- plugins/spine/dist/SpinePluginDebug.js | 4 +- plugins/spine/dist/SpinePluginDebug.js.map | 2 +- plugins/spine/dist/SpineWebGLPlugin.js | 4 +- plugins/spine/dist/SpineWebGLPluginDebug.js | 4 +- .../spine/dist/SpineWebGLPluginDebug.js.map | 2 +- plugins/spine4.1/dist/SpineCanvasPlugin.js | 4 +- plugins/spine4.1/dist/SpinePluginDebug.js | 4 +- plugins/spine4.1/dist/SpinePluginDebug.js.map | 2 +- plugins/spine4.1/dist/SpineWebGLPlugin.js | 4 +- src/gameobjects/components/FX.js | 1456 ++++++++--------- 18 files changed, 729 insertions(+), 785 deletions(-) diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js index 4e0afecd5..968361562 100644 --- a/dist/phaser-arcade-physics.js +++ b/dist/phaser-arcade-physics.js @@ -42253,7 +42253,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } @@ -227943,4 +227943,4 @@ module.exports = { /******/ return __webpack_exports__; /******/ })() ; -}); +}); \ No newline at end of file diff --git a/dist/phaser-ie9.js b/dist/phaser-ie9.js index dcb305779..28685951a 100644 --- a/dist/phaser-ie9.js +++ b/dist/phaser-ie9.js @@ -42253,7 +42253,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } @@ -246438,4 +246438,4 @@ module.exports = { /******/ return __webpack_exports__; /******/ })() ; -}); +}); \ No newline at end of file diff --git a/dist/phaser.esm.js b/dist/phaser.esm.js index cfb94c0a6..e4150f62d 100644 --- a/dist/phaser.esm.js +++ b/dist/phaser.esm.js @@ -42241,7 +42241,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } diff --git a/dist/phaser.js b/dist/phaser.js index 51904424a..4290c6094 100644 --- a/dist/phaser.js +++ b/dist/phaser.js @@ -42253,7 +42253,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } @@ -245996,4 +245996,4 @@ module.exports = { /******/ return __webpack_exports__; /******/ })() ; -}); +}); \ No newline at end of file diff --git a/plugins/spine/dist/SpineCanvasPlugin.js b/plugins/spine/dist/SpineCanvasPlugin.js index 6be96501a..6dd5e3f65 100644 --- a/plugins/spine/dist/SpineCanvasPlugin.js +++ b/plugins/spine/dist/SpineCanvasPlugin.js @@ -21167,7 +21167,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } @@ -50775,4 +50775,4 @@ module.exports = Pad; /******/ window.SpinePlugin = __webpack_exports__; /******/ /******/ })() -; +; \ No newline at end of file diff --git a/plugins/spine/dist/SpineCanvasPluginDebug.js b/plugins/spine/dist/SpineCanvasPluginDebug.js index 0abb9d55c..aa88fbc3a 100644 --- a/plugins/spine/dist/SpineCanvasPluginDebug.js +++ b/plugins/spine/dist/SpineCanvasPluginDebug.js @@ -20856,7 +20856,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } @@ -50929,4 +50929,4 @@ module.exports = Pad; /******/ /******/ })() ; -//# sourceMappingURL=SpineCanvasPluginDebug.js.map +//# sourceMappingURL=SpineCanvasPluginDebug.js.map \ No newline at end of file diff --git a/plugins/spine/dist/SpineCanvasPluginDebug.js.map b/plugins/spine/dist/SpineCanvasPluginDebug.js.map index bb9265d95..afa4df033 100644 --- a/plugins/spine/dist/SpineCanvasPluginDebug.js.map +++ b/plugins/spine/dist/SpineCanvasPluginDebug.js.map @@ -1 +1 @@ -{"version":3,"file":"SpineCanvasPluginDebug.js","mappings":";;;;;;;;;;AAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0DAA0D,OAAO;AACjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,SAAS;AACnD;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA,gBAAgB,YAAY;AAC5B;;AAEA;AACA,4DAA4D;AAC5D,gEAAgE;AAChE,oEAAoE;AACpE,wEAAwE;AACxE;AACA,2DAA2D,SAAS;AACpE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,4DAA4D,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;;;AC/UA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,mBAAmB,mBAAO,CAAC,yFAAwC;AACnE,gBAAgB,mBAAO,CAAC,8FAA4C;AACpE,oBAAoB,mBAAO,CAAC,2FAAyC;AACrE,eAAe,mBAAO,CAAC,4FAA2C;AAClE,gBAAgB,mBAAO,CAAC,0EAAkC;AAC1D,eAAe,mBAAO,CAAC,4FAA2C;AAClE;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,kDAAkD;AAC7D,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,mBAAmB;AAC9B,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sFAAsF;AAC7H;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,yCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sGAAsG;AACrH,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC,eAAe,SAAS;AACxB,eAAe,uCAAuC;AACtD,eAAe,uCAAuC;AACtD,eAAe,QAAQ,yDAAyD;AAChF;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;;;;;;;;;;;AC9uCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oBAAoB,qBAAqB;AACzC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,KAAqB;AACzB,EAEC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC,8CAAe;AAClC,iBAAiB,mBAAO,CAAC,0DAAqB;AAC9C,WAAW,mBAAO,CAAC,8CAAe;;AAElC;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,8EAAoC;AAC/D,YAAY,mBAAO,CAAC,8DAA4B;AAChD,YAAY,mBAAO,CAAC,gEAA6B;AACjD,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,sBAAsB,mBAAO,CAAC,kGAA8C;AAC5E,qBAAqB,mBAAO,CAAC,gGAA6C;AAC1E,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oCAAoC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,mCAAmC;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,KAAqB;AACzB,EAGC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;AAC/B;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0DAA0D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtsBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;AACxC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ,qGAAqG;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,0BAA0B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,mBAAmB,+IAA+I;AACpN;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,GAAG,uBAAuB,OAAO;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,kBAAkB;AAChC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,0BAA0B;AACxC,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;AAC9C;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5qBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,wCAAwC;AACxC,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,2BAA2B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,oDAAoD;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAgE;AAC/E;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3OA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,6BAA6B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,4BAA4B;AAC9D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACpTA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC,0CAA0C;AAC1C,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B,+BAA+B;AAC/B,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,oCAAoC;AACpC,sCAAsC;AACtC,yCAAyC;AACzC,mCAAmC;AACnC,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,mCAAmC;AACnC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjKA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,sBAAsB,mBAAO,CAAC,mEAAwB;AACtD,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACrEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACpEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,2CAA2C;AAC3C,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,iCAAiC;AACjC,iCAAiC;AACjC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,mCAAmC;AACnC,qCAAqC;AACrC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,uCAAuC;AACvC,sCAAsC;AACtC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,oCAAoC;AACpC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,uCAAuC;AACvC,kCAAkC;AAClC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,2CAAU;AAC9B,gBAAgB,mBAAO,CAAC,mDAAc;AACtC,WAAW,mBAAO,CAAC,yCAAS;AAC5B,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,YAAY,mBAAO,CAAC,2CAAU;AAC9B,iBAAiB,mBAAO,CAAC,qDAAe;AACxC,kBAAkB,mBAAO,CAAC,uDAAgB;AAC1C,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,cAAc,mBAAO,CAAC,+CAAY;AAClC,cAAc,mBAAO,CAAC,+CAAY;AAClC,YAAY,mBAAO,CAAC,2CAAU;AAC9B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,cAAc,mBAAO,CAAC,+CAAY;AAClC,UAAU,mBAAO,CAAC,uCAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,+BAA+B;AAC1C,WAAW,2CAA2C;AACtD;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW,KAAK,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB,KAAK,gBAAgB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,KAAK,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAA0D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,oCAAoC;AACnD,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2DAA2D;AAC1E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACl5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mFAAmF;AACpG;AACA,eAAe,mFAAmF;AAClG;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC;AAClD;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,cAAc,mBAAO,CAAC,2CAAW;AACjC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC,eAAe,QAAQ;AACvB;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA,4GAA4G,sCAAsC;AAClJ,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/lBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA,eAAe,gCAAgC;AAC/C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChWA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAmE;AAClF;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,iBAAiB,gCAAgC;AACjD,oBAAoB,YAAY;AAChC;AACA,eAAe,gEAAgE;AAC/E,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,kCAAkC;AACjD,eAAe,uCAAuC;AACtD;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,6BAA6B;AAC9C,iBAAiB,0BAA0B;AAC3C,oBAAoB,OAAO;AAC3B;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wDAAwD;AACnF;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,wGAAwG;AACvH;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wGAAwG,UAAU;AACjI,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,SAAS,mBAAO,CAAC,mEAAkB;AACnC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uIAAuI;AACtJ,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,mGAAmG;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uDAAuD;AACtE;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAkC;AACjD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iDAAiD;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6FAA6F;AAC5G;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAoD;AAC5D;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,sBAAsB;AACtB,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3mBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,sDAAsD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,cAAc;AAC7B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,6DAAS;AAC5B,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,eAAe,mBAAO,CAAC,qEAAa;AACpC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,eAAe,mBAAO,CAAC,qEAAa;AACpC,qBAAqB,mBAAO,CAAC,iFAAmB;AAChD,aAAa,mBAAO,CAAC,iEAAW;AAChC;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,KAAK;AACzB;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC37CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;AACA;AACA,IAAI,KAAqB;AACzB,EAEC;AACD;AACA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;;AAEpD;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,sDAAY;AACnC,gBAAgB,mBAAO,CAAC,wDAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,aAAa,mBAAO,CAAC,kDAAU;AAC/B,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,mBAAmB;AAC9B;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,2DAAY;AACnC,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,WAAW,mBAAO,CAAC,oDAAc;AACjC,aAAa,mBAAO,CAAC,uDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjjBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,uCAAuC;AAClD;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3SA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,uCAAuC;AAClD;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,sCAAsC;AACtC,+BAA+B;AAC/B,8BAA8B;AAC9B,kCAAkC;AAClC,iCAAiC;AACjC,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,4BAA4B;AACvC,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,wDAAwD;AAClJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,oFAAoF,oDAAoD;AACxI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mBAAO,CAAC,4DAAa;AAC9B,cAAc,mBAAO,CAAC,sEAAkB;AACxC,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,uBAAuB,mBAAO,CAAC,wFAA2B;AAC1D,qBAAqB,mBAAO,CAAC,oFAAyB;AACtD,eAAe,mBAAO,CAAC,wEAAmB;AAC1C,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,kBAAkB,mBAAO,CAAC,8EAAsB;AAChD,cAAc,mBAAO,CAAC,sEAAkB;AACxC,WAAW,mBAAO,CAAC,gEAAe;AAClC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D,aAAa,mBAAO,CAAC,gDAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,wDAAwD;AACnE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,gDAAgD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wGAAwG;AACnH,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9VA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,mDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpRA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1vDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,gDAAgD;AAC3D;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AClxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/gCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACthBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,uCAAuC;AAClF;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,iCAAiC;AAC5E;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4CAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,yDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0CAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,0CAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;AACxC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;AAChC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iGAAoC;;;;;;;;;;;ACNpC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,oGAAqC;;;;;;;;;;;ACVrC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;AAClC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;AAC3B;AACA;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;AAC9E;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;AAC1B;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,oDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,8CAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;AACvD;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;AAC1C;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,kDAAkD;AAClD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wCAAwC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;AAC1B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,uCAAuC;AACnG;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,0CAA0C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,4CAA4C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1MA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,yCAAyC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8CAA8C;AACrF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,sDAAsD;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,uDAAuD;AACnI;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,YAAY,mBAAO,CAAC,iEAAgB;AACpC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,cAAc,mBAAO,CAAC,qEAAkB;AACxC,WAAW,mBAAO,CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;AAChC;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1NA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzPA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,oCAAoC;AACpC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,sDAAsD;AACtD,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE,qEAAqE;AACrE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,wBAAwB,mBAAO,CAAC,4EAA8B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,6BAA6B;AAC7B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA,6BAA6B,mBAAmB;AAChD;AACA,4BAA4B,SAAS;AACrC;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA,WAAW,KAAK;AAChB;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAc;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,0DAAU;AAC9B;AACA,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;AAC1B;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,iEAAa;AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;AAChD;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,8CAA8C,cAAc,oBAAoB;AAChF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UCrEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack:///../../../node_modules/eventemitter3/index.js","webpack:///./runtimes/spine-canvas.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///../../../src/const.js","webpack:///../../../src/data/DataManager.js","webpack:///../../../src/data/events/CHANGE_DATA_EVENT.js","webpack:///../../../src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///../../../src/data/events/DESTROY_EVENT.js","webpack:///../../../src/data/events/REMOVE_DATA_EVENT.js","webpack:///../../../src/data/events/SET_DATA_EVENT.js","webpack:///../../../src/data/events/index.js","webpack:///../../../src/device/Audio.js","webpack:///../../../src/device/Browser.js","webpack:///../../../src/device/CanvasFeatures.js","webpack:///../../../src/device/Features.js","webpack:///../../../src/device/Fullscreen.js","webpack:///../../../src/device/Input.js","webpack:///../../../src/device/OS.js","webpack:///../../../src/device/Video.js","webpack:///../../../src/device/index.js","webpack:///../../../src/display/ColorMatrix.js","webpack:///../../../src/display/canvas/CanvasPool.js","webpack:///../../../src/display/canvas/Smoothing.js","webpack:///../../../src/display/mask/BitmapMask.js","webpack:///../../../src/display/mask/GeometryMask.js","webpack:///../../../src/fx/Barrel.js","webpack:///../../../src/fx/Bloom.js","webpack:///../../../src/fx/Blur.js","webpack:///../../../src/fx/Bokeh.js","webpack:///../../../src/fx/Circle.js","webpack:///../../../src/fx/ColorMatrix.js","webpack:///../../../src/fx/Controller.js","webpack:///../../../src/fx/Displacement.js","webpack:///../../../src/fx/Glow.js","webpack:///../../../src/fx/Gradient.js","webpack:///../../../src/fx/Pixelate.js","webpack:///../../../src/fx/Shadow.js","webpack:///../../../src/fx/Shine.js","webpack:///../../../src/fx/Vignette.js","webpack:///../../../src/fx/Wipe.js","webpack:///../../../src/fx/const.js","webpack:///../../../src/fx/index.js","webpack:///../../../src/gameobjects/BuildGameObject.js","webpack:///../../../src/gameobjects/GameObject.js","webpack:///../../../src/gameobjects/GameObjectFactory.js","webpack:///../../../src/gameobjects/components/Alpha.js","webpack:///../../../src/gameobjects/components/AlphaSingle.js","webpack:///../../../src/gameobjects/components/BlendMode.js","webpack:///../../../src/gameobjects/components/ComputedSize.js","webpack:///../../../src/gameobjects/components/Crop.js","webpack:///../../../src/gameobjects/components/Depth.js","webpack:///../../../src/gameobjects/components/FX.js","webpack:///../../../src/gameobjects/components/Flip.js","webpack:///../../../src/gameobjects/components/GetBounds.js","webpack:///../../../src/gameobjects/components/Mask.js","webpack:///../../../src/gameobjects/components/Origin.js","webpack:///../../../src/gameobjects/components/PathFollower.js","webpack:///../../../src/gameobjects/components/Pipeline.js","webpack:///../../../src/gameobjects/components/PostPipeline.js","webpack:///../../../src/gameobjects/components/ScrollFactor.js","webpack:///../../../src/gameobjects/components/Size.js","webpack:///../../../src/gameobjects/components/Texture.js","webpack:///../../../src/gameobjects/components/TextureCrop.js","webpack:///../../../src/gameobjects/components/Tint.js","webpack:///../../../src/gameobjects/components/ToJSON.js","webpack:///../../../src/gameobjects/components/Transform.js","webpack:///../../../src/gameobjects/components/TransformMatrix.js","webpack:///../../../src/gameobjects/components/Visible.js","webpack:///../../../src/gameobjects/components/index.js","webpack:///../../../src/gameobjects/container/Container.js","webpack:///../../../src/gameobjects/container/ContainerCanvasRenderer.js","webpack:///../../../src/gameobjects/container/ContainerRender.js","webpack:///../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/DESTROY_EVENT.js","webpack:///../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/index.js","webpack:///../../../src/geom/const.js","webpack:///../../../src/geom/line/GetPoint.js","webpack:///../../../src/geom/line/GetPoints.js","webpack:///../../../src/geom/line/Length.js","webpack:///../../../src/geom/line/Line.js","webpack:///../../../src/geom/line/Random.js","webpack:///../../../src/geom/point/Point.js","webpack:///../../../src/geom/rectangle/Contains.js","webpack:///../../../src/geom/rectangle/GetPoint.js","webpack:///../../../src/geom/rectangle/GetPoints.js","webpack:///../../../src/geom/rectangle/Perimeter.js","webpack:///../../../src/geom/rectangle/Random.js","webpack:///../../../src/geom/rectangle/Rectangle.js","webpack:///../../../src/geom/rectangle/Union.js","webpack:///../../../src/loader/File.js","webpack:///../../../src/loader/FileTypesManager.js","webpack:///../../../src/loader/GetURL.js","webpack:///../../../src/loader/MergeXHRSettings.js","webpack:///../../../src/loader/MultiFile.js","webpack:///../../../src/loader/XHRLoader.js","webpack:///../../../src/loader/XHRSettings.js","webpack:///../../../src/loader/const.js","webpack:///../../../src/loader/events/ADD_EVENT.js","webpack:///../../../src/loader/events/COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_EVENT.js","webpack:///../../../src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///../../../src/loader/events/POST_PROCESS_EVENT.js","webpack:///../../../src/loader/events/PROGRESS_EVENT.js","webpack:///../../../src/loader/events/START_EVENT.js","webpack:///../../../src/loader/events/index.js","webpack:///../../../src/loader/filetypes/ImageFile.js","webpack:///../../../src/loader/filetypes/JSONFile.js","webpack:///../../../src/loader/filetypes/TextFile.js","webpack:///../../../src/math/Average.js","webpack:///../../../src/math/Bernstein.js","webpack:///../../../src/math/Between.js","webpack:///../../../src/math/CatmullRom.js","webpack:///../../../src/math/CeilTo.js","webpack:///../../../src/math/Clamp.js","webpack:///../../../src/math/DegToRad.js","webpack:///../../../src/math/Difference.js","webpack:///../../../src/math/Euler.js","webpack:///../../../src/math/Factorial.js","webpack:///../../../src/math/FloatBetween.js","webpack:///../../../src/math/FloorTo.js","webpack:///../../../src/math/FromPercent.js","webpack:///../../../src/math/GetSpeed.js","webpack:///../../../src/math/IsEven.js","webpack:///../../../src/math/IsEvenStrict.js","webpack:///../../../src/math/Linear.js","webpack:///../../../src/math/LinearXY.js","webpack:///../../../src/math/Matrix3.js","webpack:///../../../src/math/Matrix4.js","webpack:///../../../src/math/MaxAdd.js","webpack:///../../../src/math/Median.js","webpack:///../../../src/math/MinSub.js","webpack:///../../../src/math/Percent.js","webpack:///../../../src/math/Quaternion.js","webpack:///../../../src/math/RadToDeg.js","webpack:///../../../src/math/RandomXY.js","webpack:///../../../src/math/RandomXYZ.js","webpack:///../../../src/math/RandomXYZW.js","webpack:///../../../src/math/Rotate.js","webpack:///../../../src/math/RotateAround.js","webpack:///../../../src/math/RotateAroundDistance.js","webpack:///../../../src/math/RotateTo.js","webpack:///../../../src/math/RotateVec3.js","webpack:///../../../src/math/RoundAwayFromZero.js","webpack:///../../../src/math/RoundTo.js","webpack:///../../../src/math/SinCosTableGenerator.js","webpack:///../../../src/math/SmoothStep.js","webpack:///../../../src/math/SmootherStep.js","webpack:///../../../src/math/ToXY.js","webpack:///../../../src/math/TransformXY.js","webpack:///../../../src/math/Vector2.js","webpack:///../../../src/math/Vector3.js","webpack:///../../../src/math/Vector4.js","webpack:///../../../src/math/Within.js","webpack:///../../../src/math/Wrap.js","webpack:///../../../src/math/angle/Between.js","webpack:///../../../src/math/angle/BetweenPoints.js","webpack:///../../../src/math/angle/BetweenPointsY.js","webpack:///../../../src/math/angle/BetweenY.js","webpack:///../../../src/math/angle/CounterClockwise.js","webpack:///../../../src/math/angle/Normalize.js","webpack:///../../../src/math/angle/Random.js","webpack:///../../../src/math/angle/RandomDegrees.js","webpack:///../../../src/math/angle/Reverse.js","webpack:///../../../src/math/angle/RotateTo.js","webpack:///../../../src/math/angle/ShortestBetween.js","webpack:///../../../src/math/angle/Wrap.js","webpack:///../../../src/math/angle/WrapDegrees.js","webpack:///../../../src/math/angle/index.js","webpack:///../../../src/math/const.js","webpack:///../../../src/math/distance/DistanceBetween.js","webpack:///../../../src/math/distance/DistanceBetweenPoints.js","webpack:///../../../src/math/distance/DistanceBetweenPointsSquared.js","webpack:///../../../src/math/distance/DistanceChebyshev.js","webpack:///../../../src/math/distance/DistancePower.js","webpack:///../../../src/math/distance/DistanceSnake.js","webpack:///../../../src/math/distance/DistanceSquared.js","webpack:///../../../src/math/distance/index.js","webpack:///../../../src/math/easing/back/In.js","webpack:///../../../src/math/easing/back/InOut.js","webpack:///../../../src/math/easing/back/Out.js","webpack:///../../../src/math/easing/back/index.js","webpack:///../../../src/math/easing/bounce/In.js","webpack:///../../../src/math/easing/bounce/InOut.js","webpack:///../../../src/math/easing/bounce/Out.js","webpack:///../../../src/math/easing/bounce/index.js","webpack:///../../../src/math/easing/circular/In.js","webpack:///../../../src/math/easing/circular/InOut.js","webpack:///../../../src/math/easing/circular/Out.js","webpack:///../../../src/math/easing/circular/index.js","webpack:///../../../src/math/easing/cubic/In.js","webpack:///../../../src/math/easing/cubic/InOut.js","webpack:///../../../src/math/easing/cubic/Out.js","webpack:///../../../src/math/easing/cubic/index.js","webpack:///../../../src/math/easing/elastic/In.js","webpack:///../../../src/math/easing/elastic/InOut.js","webpack:///../../../src/math/easing/elastic/Out.js","webpack:///../../../src/math/easing/elastic/index.js","webpack:///../../../src/math/easing/expo/In.js","webpack:///../../../src/math/easing/expo/InOut.js","webpack:///../../../src/math/easing/expo/Out.js","webpack:///../../../src/math/easing/expo/index.js","webpack:///../../../src/math/easing/index.js","webpack:///../../../src/math/easing/linear/Linear.js","webpack:///../../../src/math/easing/linear/index.js","webpack:///../../../src/math/easing/quadratic/In.js","webpack:///../../../src/math/easing/quadratic/InOut.js","webpack:///../../../src/math/easing/quadratic/Out.js","webpack:///../../../src/math/easing/quadratic/index.js","webpack:///../../../src/math/easing/quartic/In.js","webpack:///../../../src/math/easing/quartic/InOut.js","webpack:///../../../src/math/easing/quartic/Out.js","webpack:///../../../src/math/easing/quartic/index.js","webpack:///../../../src/math/easing/quintic/In.js","webpack:///../../../src/math/easing/quintic/InOut.js","webpack:///../../../src/math/easing/quintic/Out.js","webpack:///../../../src/math/easing/quintic/index.js","webpack:///../../../src/math/easing/sine/In.js","webpack:///../../../src/math/easing/sine/InOut.js","webpack:///../../../src/math/easing/sine/Out.js","webpack:///../../../src/math/easing/sine/index.js","webpack:///../../../src/math/easing/stepped/Stepped.js","webpack:///../../../src/math/easing/stepped/index.js","webpack:///../../../src/math/fuzzy/Ceil.js","webpack:///../../../src/math/fuzzy/Equal.js","webpack:///../../../src/math/fuzzy/Floor.js","webpack:///../../../src/math/fuzzy/GreaterThan.js","webpack:///../../../src/math/fuzzy/LessThan.js","webpack:///../../../src/math/fuzzy/index.js","webpack:///../../../src/math/index.js","webpack:///../../../src/math/interpolation/BezierInterpolation.js","webpack:///../../../src/math/interpolation/CatmullRomInterpolation.js","webpack:///../../../src/math/interpolation/CubicBezierInterpolation.js","webpack:///../../../src/math/interpolation/LinearInterpolation.js","webpack:///../../../src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///../../../src/math/interpolation/SmoothStepInterpolation.js","webpack:///../../../src/math/interpolation/SmootherStepInterpolation.js","webpack:///../../../src/math/interpolation/index.js","webpack:///../../../src/math/pow2/GetPowerOfTwo.js","webpack:///../../../src/math/pow2/IsSizePowerOfTwo.js","webpack:///../../../src/math/pow2/IsValuePowerOfTwo.js","webpack:///../../../src/math/pow2/index.js","webpack:///../../../src/math/random-data-generator/RandomDataGenerator.js","webpack:///../../../src/math/snap/SnapCeil.js","webpack:///../../../src/math/snap/SnapFloor.js","webpack:///../../../src/math/snap/SnapTo.js","webpack:///../../../src/math/snap/index.js","webpack:///../../../src/plugins/BasePlugin.js","webpack:///../../../src/plugins/PluginCache.js","webpack:///../../../src/plugins/ScenePlugin.js","webpack:///../../../src/renderer/BlendModes.js","webpack:///../../../src/renderer/ScaleModes.js","webpack:///../../../src/scale/events/RESIZE_EVENT.js","webpack:///../../../src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/scene/events/BOOT_EVENT.js","webpack:///../../../src/scene/events/CREATE_EVENT.js","webpack:///../../../src/scene/events/DESTROY_EVENT.js","webpack:///../../../src/scene/events/PAUSE_EVENT.js","webpack:///../../../src/scene/events/POST_UPDATE_EVENT.js","webpack:///../../../src/scene/events/PRE_RENDER_EVENT.js","webpack:///../../../src/scene/events/PRE_UPDATE_EVENT.js","webpack:///../../../src/scene/events/READY_EVENT.js","webpack:///../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/scene/events/RENDER_EVENT.js","webpack:///../../../src/scene/events/RESUME_EVENT.js","webpack:///../../../src/scene/events/SHUTDOWN_EVENT.js","webpack:///../../../src/scene/events/SLEEP_EVENT.js","webpack:///../../../src/scene/events/START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///../../../src/scene/events/UPDATE_EVENT.js","webpack:///../../../src/scene/events/WAKE_EVENT.js","webpack:///../../../src/scene/events/index.js","webpack:///../../../src/textures/Frame.js","webpack:///../../../src/tweens/builders/GetBoolean.js","webpack:///../../../src/tweens/tween/const.js","webpack:///../../../src/utils/Class.js","webpack:///../../../src/utils/NOOP.js","webpack:///../../../src/utils/array/Add.js","webpack:///../../../src/utils/array/AddAt.js","webpack:///../../../src/utils/array/BringToTop.js","webpack:///../../../src/utils/array/CountAllMatching.js","webpack:///../../../src/utils/array/Each.js","webpack:///../../../src/utils/array/EachInRange.js","webpack:///../../../src/utils/array/FindClosestInSorted.js","webpack:///../../../src/utils/array/Flatten.js","webpack:///../../../src/utils/array/GetAll.js","webpack:///../../../src/utils/array/GetFirst.js","webpack:///../../../src/utils/array/GetRandom.js","webpack:///../../../src/utils/array/MoveAbove.js","webpack:///../../../src/utils/array/MoveBelow.js","webpack:///../../../src/utils/array/MoveDown.js","webpack:///../../../src/utils/array/MoveTo.js","webpack:///../../../src/utils/array/MoveUp.js","webpack:///../../../src/utils/array/NumberArray.js","webpack:///../../../src/utils/array/NumberArrayStep.js","webpack:///../../../src/utils/array/QuickSelect.js","webpack:///../../../src/utils/array/Range.js","webpack:///../../../src/utils/array/Remove.js","webpack:///../../../src/utils/array/RemoveAt.js","webpack:///../../../src/utils/array/RemoveBetween.js","webpack:///../../../src/utils/array/RemoveRandomElement.js","webpack:///../../../src/utils/array/Replace.js","webpack:///../../../src/utils/array/RotateLeft.js","webpack:///../../../src/utils/array/RotateRight.js","webpack:///../../../src/utils/array/SafeRange.js","webpack:///../../../src/utils/array/SendToBack.js","webpack:///../../../src/utils/array/SetAll.js","webpack:///../../../src/utils/array/Shuffle.js","webpack:///../../../src/utils/array/SortByDigits.js","webpack:///../../../src/utils/array/SpliceOne.js","webpack:///../../../src/utils/array/StableSort.js","webpack:///../../../src/utils/array/Swap.js","webpack:///../../../src/utils/array/index.js","webpack:///../../../src/utils/array/matrix/CheckMatrix.js","webpack:///../../../src/utils/array/matrix/MatrixToString.js","webpack:///../../../src/utils/array/matrix/ReverseColumns.js","webpack:///../../../src/utils/array/matrix/ReverseRows.js","webpack:///../../../src/utils/array/matrix/Rotate180.js","webpack:///../../../src/utils/array/matrix/RotateLeft.js","webpack:///../../../src/utils/array/matrix/RotateMatrix.js","webpack:///../../../src/utils/array/matrix/RotateRight.js","webpack:///../../../src/utils/array/matrix/TranslateMatrix.js","webpack:///../../../src/utils/array/matrix/TransposeMatrix.js","webpack:///../../../src/utils/array/matrix/index.js","webpack:///../../../src/utils/object/DeepCopy.js","webpack:///../../../src/utils/object/Extend.js","webpack:///../../../src/utils/object/GetAdvancedValue.js","webpack:///../../../src/utils/object/GetFastValue.js","webpack:///../../../src/utils/object/GetValue.js","webpack:///../../../src/utils/object/IsPlainObject.js","webpack:///../../../src/utils/string/Pad.js","webpack:///webpack/bootstrap","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["'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","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Animation = (function () {\r\n function Animation(name, timelines, duration) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (timelines == null)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n Animation.prototype.hasTimeline = function (id) {\r\n return this.timelineIds[id] == true;\r\n };\r\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n var timelines = this.timelines;\r\n for (var i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n };\r\n Animation.binarySearch = function (values, target, step) {\r\n if (step === void 0) { step = 1; }\r\n var low = 0;\r\n var high = values.length / step - 2;\r\n if (high == 0)\r\n return step;\r\n var current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high)\r\n return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n };\r\n Animation.linearSearch = function (values, target, step) {\r\n for (var i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target)\r\n return i;\r\n return -1;\r\n };\r\n return Animation;\r\n }());\r\n spine.Animation = Animation;\r\n var MixBlend;\r\n (function (MixBlend) {\r\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\r\n var MixDirection;\r\n (function (MixDirection) {\r\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n var TimelineType;\r\n (function (TimelineType) {\r\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n var CurveTimeline = (function () {\r\n function CurveTimeline(frameCount) {\r\n if (frameCount <= 0)\r\n throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n CurveTimeline.prototype.getFrameCount = function () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n };\r\n CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n };\r\n CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n };\r\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length)\r\n return CurveTimeline.LINEAR;\r\n var type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR)\r\n return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED)\r\n return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n };\r\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n var x = dfx, y = dfy;\r\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n };\r\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n percent = spine.MathUtils.clamp(percent, 0, 1);\r\n var curves = this.curves;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var type = curves[i];\r\n if (type == CurveTimeline.LINEAR)\r\n return percent;\r\n if (type == CurveTimeline.STEPPED)\r\n return 0;\r\n i++;\r\n var x = 0;\r\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n var prevX = void 0, prevY = void 0;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n }\r\n else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n var y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x);\r\n };\r\n CurveTimeline.LINEAR = 0;\r\n CurveTimeline.STEPPED = 1;\r\n CurveTimeline.BEZIER = 2;\r\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n return CurveTimeline;\r\n }());\r\n spine.CurveTimeline = CurveTimeline;\r\n var RotateTimeline = (function (_super) {\r\n __extends(RotateTimeline, _super);\r\n function RotateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n return _this;\r\n }\r\n RotateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n };\r\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n };\r\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n var r_1 = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r_2 * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r_2 += bone.data.rotation - bone.rotation;\r\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n case MixBlend.add:\r\n bone.rotation += r_2 * alpha;\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n };\r\n RotateTimeline.ENTRIES = 2;\r\n RotateTimeline.PREV_TIME = -2;\r\n RotateTimeline.PREV_ROTATION = -1;\r\n RotateTimeline.ROTATION = 1;\r\n return RotateTimeline;\r\n }(CurveTimeline));\r\n spine.RotateTimeline = RotateTimeline;\r\n var TranslateTimeline = (function (_super) {\r\n __extends(TranslateTimeline, _super);\r\n function TranslateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TranslateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n };\r\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n };\r\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n };\r\n TranslateTimeline.ENTRIES = 3;\r\n TranslateTimeline.PREV_TIME = -3;\r\n TranslateTimeline.PREV_X = -2;\r\n TranslateTimeline.PREV_Y = -1;\r\n TranslateTimeline.X = 1;\r\n TranslateTimeline.Y = 2;\r\n return TranslateTimeline;\r\n }(CurveTimeline));\r\n spine.TranslateTimeline = TranslateTimeline;\r\n var ScaleTimeline = (function (_super) {\r\n __extends(ScaleTimeline, _super);\r\n function ScaleTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ScaleTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n };\r\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n }\r\n else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n }\r\n else {\r\n var bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = spine.MathUtils.signum(x);\r\n by = spine.MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n };\r\n return ScaleTimeline;\r\n }(TranslateTimeline));\r\n spine.ScaleTimeline = ScaleTimeline;\r\n var ShearTimeline = (function (_super) {\r\n __extends(ShearTimeline, _super);\r\n function ShearTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ShearTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n };\r\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n };\r\n return ShearTimeline;\r\n }(TranslateTimeline));\r\n spine.ShearTimeline = ShearTimeline;\r\n var ColorTimeline = (function (_super) {\r\n __extends(ColorTimeline, _super);\r\n function ColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n ColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n };\r\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n };\r\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n var color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n var color = slot.color;\r\n if (blend == MixBlend.setup)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n };\r\n ColorTimeline.ENTRIES = 5;\r\n ColorTimeline.PREV_TIME = -5;\r\n ColorTimeline.PREV_R = -4;\r\n ColorTimeline.PREV_G = -3;\r\n ColorTimeline.PREV_B = -2;\r\n ColorTimeline.PREV_A = -1;\r\n ColorTimeline.R = 1;\r\n ColorTimeline.G = 2;\r\n ColorTimeline.B = 3;\r\n ColorTimeline.A = 4;\r\n return ColorTimeline;\r\n }(CurveTimeline));\r\n spine.ColorTimeline = ColorTimeline;\r\n var TwoColorTimeline = (function (_super) {\r\n __extends(TwoColorTimeline, _super);\r\n function TwoColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TwoColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n };\r\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n };\r\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n }\r\n else {\r\n var light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n };\r\n TwoColorTimeline.ENTRIES = 8;\r\n TwoColorTimeline.PREV_TIME = -8;\r\n TwoColorTimeline.PREV_R = -7;\r\n TwoColorTimeline.PREV_G = -6;\r\n TwoColorTimeline.PREV_B = -5;\r\n TwoColorTimeline.PREV_A = -4;\r\n TwoColorTimeline.PREV_R2 = -3;\r\n TwoColorTimeline.PREV_G2 = -2;\r\n TwoColorTimeline.PREV_B2 = -1;\r\n TwoColorTimeline.R = 1;\r\n TwoColorTimeline.G = 2;\r\n TwoColorTimeline.B = 3;\r\n TwoColorTimeline.A = 4;\r\n TwoColorTimeline.R2 = 5;\r\n TwoColorTimeline.G2 = 6;\r\n TwoColorTimeline.B2 = 7;\r\n return TwoColorTimeline;\r\n }(CurveTimeline));\r\n spine.TwoColorTimeline = TwoColorTimeline;\r\n var AttachmentTimeline = (function () {\r\n function AttachmentTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n AttachmentTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n };\r\n AttachmentTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n };\r\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frameIndex = 0;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n var attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n return AttachmentTimeline;\r\n }());\r\n spine.AttachmentTimeline = AttachmentTimeline;\r\n var zeros = null;\r\n var DeformTimeline = (function (_super) {\r\n __extends(DeformTimeline, _super);\r\n function DeformTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount);\r\n _this.frameVertices = new Array(frameCount);\r\n if (zeros == null)\r\n zeros = spine.Utils.newFloatArray(64);\r\n return _this;\r\n }\r\n DeformTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n };\r\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n };\r\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var slotAttachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\r\n return;\r\n var deformArray = slot.deform;\r\n if (deformArray.length == 0)\r\n blend = MixBlend.setup;\r\n var frameVertices = this.frameVertices;\r\n var vertexCount = frameVertices[0].length;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n var vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n }\r\n else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) {\r\n var lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n }\r\n }\r\n else {\r\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n deform[i_2] += lastVertices[i_2];\r\n }\r\n }\r\n else {\r\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_1 = slotAttachment;\r\n if (vertexAttachment_1.bones == null) {\r\n var setupVertices = vertexAttachment_1.vertices;\r\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n var setup = setupVertices[i_3];\r\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n deform[i_4] = lastVertices[i_4] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n deform[i_7] += lastVertices[i_7] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time);\r\n var prevVertices = frameVertices[frame - 1];\r\n var nextVertices = frameVertices[frame];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n var prev = prevVertices[i_8];\r\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n }\r\n }\r\n else {\r\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n var prev = prevVertices[i_9];\r\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n var prev = prevVertices[i_10];\r\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_2 = slotAttachment;\r\n if (vertexAttachment_2.bones == null) {\r\n var setupVertices = vertexAttachment_2.vertices;\r\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n var prev = prevVertices[i_12];\r\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n var prev = prevVertices[i_13];\r\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n var prev = prevVertices[i_14];\r\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n var prev = prevVertices[i_15];\r\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n return DeformTimeline;\r\n }(CurveTimeline));\r\n spine.DeformTimeline = DeformTimeline;\r\n var EventTimeline = (function () {\r\n function EventTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n EventTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.event << 24;\r\n };\r\n EventTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n };\r\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (firedEvents == null)\r\n return;\r\n var frames = this.frames;\r\n var frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n }\r\n else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n var frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n var frameTime = frames[frame];\r\n while (frame > 0) {\r\n if (frames[frame - 1] != frameTime)\r\n break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n };\r\n return EventTimeline;\r\n }());\r\n spine.EventTimeline = EventTimeline;\r\n var DrawOrderTimeline = (function () {\r\n function DrawOrderTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n DrawOrderTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.drawOrder << 24;\r\n };\r\n DrawOrderTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n };\r\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var drawOrder = skeleton.drawOrder;\r\n var slots = skeleton.slots;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frame = 0;\r\n if (time >= frames[frames.length - 1])\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n var drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n };\r\n return DrawOrderTimeline;\r\n }());\r\n spine.DrawOrderTimeline = DrawOrderTimeline;\r\n var IkConstraintTimeline = (function (_super) {\r\n __extends(IkConstraintTimeline, _super);\r\n function IkConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n IkConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n };\r\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n };\r\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n };\r\n IkConstraintTimeline.ENTRIES = 6;\r\n IkConstraintTimeline.PREV_TIME = -6;\r\n IkConstraintTimeline.PREV_MIX = -5;\r\n IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n IkConstraintTimeline.PREV_COMPRESS = -2;\r\n IkConstraintTimeline.PREV_STRETCH = -1;\r\n IkConstraintTimeline.MIX = 1;\r\n IkConstraintTimeline.SOFTNESS = 2;\r\n IkConstraintTimeline.BEND_DIRECTION = 3;\r\n IkConstraintTimeline.COMPRESS = 4;\r\n IkConstraintTimeline.STRETCH = 5;\r\n return IkConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.IkConstraintTimeline = IkConstraintTimeline;\r\n var TransformConstraintTimeline = (function (_super) {\r\n __extends(TransformConstraintTimeline, _super);\r\n function TransformConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n };\r\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n };\r\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n var data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n };\r\n TransformConstraintTimeline.ENTRIES = 5;\r\n TransformConstraintTimeline.PREV_TIME = -5;\r\n TransformConstraintTimeline.PREV_ROTATE = -4;\r\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n TransformConstraintTimeline.PREV_SCALE = -2;\r\n TransformConstraintTimeline.PREV_SHEAR = -1;\r\n TransformConstraintTimeline.ROTATE = 1;\r\n TransformConstraintTimeline.TRANSLATE = 2;\r\n TransformConstraintTimeline.SCALE = 3;\r\n TransformConstraintTimeline.SHEAR = 4;\r\n return TransformConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n var PathConstraintPositionTimeline = (function (_super) {\r\n __extends(PathConstraintPositionTimeline, _super);\r\n function PathConstraintPositionTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n };\r\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n var position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n };\r\n PathConstraintPositionTimeline.ENTRIES = 2;\r\n PathConstraintPositionTimeline.PREV_TIME = -2;\r\n PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n PathConstraintPositionTimeline.VALUE = 1;\r\n return PathConstraintPositionTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n var PathConstraintSpacingTimeline = (function (_super) {\r\n __extends(PathConstraintSpacingTimeline, _super);\r\n function PathConstraintSpacingTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n var spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n };\r\n return PathConstraintSpacingTimeline;\r\n }(PathConstraintPositionTimeline));\r\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n var PathConstraintMixTimeline = (function (_super) {\r\n __extends(PathConstraintMixTimeline, _super);\r\n function PathConstraintMixTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n };\r\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n };\r\n PathConstraintMixTimeline.ENTRIES = 3;\r\n PathConstraintMixTimeline.PREV_TIME = -3;\r\n PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n PathConstraintMixTimeline.ROTATE = 1;\r\n PathConstraintMixTimeline.TRANSLATE = 2;\r\n return PathConstraintMixTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationState = (function () {\r\n function AnimationState(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new spine.IntSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n this.data = data;\r\n }\r\n AnimationState.prototype.update = function (delta) {\r\n delta *= this.timeScale;\r\n var tracks = this.tracks;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n var currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n var next = current.next;\r\n if (next != null) {\r\n var nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n }\r\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n var from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null)\r\n from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n var from = to.mixingFrom;\r\n if (from == null)\r\n return true;\r\n var finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n };\r\n AnimationState.prototype.apply = function (skeleton) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n var events = this.events;\r\n var tracks = this.tracks;\r\n var applied = false;\r\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\r\n var current = tracks[i_16];\r\n if (current == null || current.delay > 0)\r\n continue;\r\n applied = true;\r\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\r\n var mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n var timelineCount = current.animation.timelines.length;\r\n var timelines = current.animation.timelines;\r\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n else {\r\n var timelineMode = current.timelineMode;\r\n var firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = current.timelinesRotation;\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n var timeline_1 = timelines[ii];\r\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\r\n if (timeline_1 instanceof spine.RotateTimeline) {\r\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n }\r\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\r\n }\r\n else {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n };\r\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n var from = to.mixingFrom;\r\n if (from.mixingFrom != null)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n var mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == spine.MixBlend.first)\r\n blend = spine.MixBlend.setup;\r\n }\r\n else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != spine.MixBlend.first)\r\n blend = from.mixBlend;\r\n }\r\n var events = mix < from.eventThreshold ? this.events : null;\r\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n var timelineCount = from.animation.timelines.length;\r\n var timelines = from.animation.timelines;\r\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == spine.MixBlend.add) {\r\n for (var i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\r\n }\r\n else {\r\n var timelineMode = from.timelineMode;\r\n var timelineHoldMix = from.timelineHoldMix;\r\n var firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = from.timelinesRotation;\r\n from.totalAlpha = 0;\r\n for (var i = 0; i < timelineCount; i++) {\r\n var timeline = timelines[i];\r\n var direction = spine.MixDirection.mixOut;\r\n var timelineBlend = void 0;\r\n var alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = spine.MixBlend.setup;\r\n var holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof spine.RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n spine.Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\r\n direction = spine.MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n };\r\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = timeline.frames;\r\n if (time < frames[0]) {\r\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n };\r\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n };\r\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\r\n return;\r\n }\r\n var rotateTimeline = timeline;\r\n var frames = rotateTimeline.frames;\r\n var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n var r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case spine.MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case spine.MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n }\r\n else {\r\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n else {\r\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n var total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n }\r\n else {\r\n var lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n }\r\n else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n var current = diff > 0, dir = lastTotal >= 0;\r\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * spine.MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n };\r\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n var duration = animationEnd - animationStart;\r\n var trackLastWrapped = entry.trackLast % duration;\r\n var events = this.events;\r\n var i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n var event_1 = events[i];\r\n if (event_1.time < trackLastWrapped)\r\n break;\r\n if (event_1.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event_1);\r\n }\r\n var complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n var event_2 = events[i];\r\n if (event_2.time < animationStart)\r\n continue;\r\n this.queue.event(entry, events[i]);\r\n }\r\n };\r\n AnimationState.prototype.clearTracks = function () {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.clearTrack = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n var current = this.tracks[trackIndex];\r\n if (current == null)\r\n return;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n var entry = current;\r\n while (true) {\r\n var from = entry.mixingFrom;\r\n if (from == null)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n var from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n if (from != null) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n };\r\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n };\r\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var interrupt = true;\r\n var current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n }\r\n else\r\n this.disposeNext(current);\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n };\r\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n };\r\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n }\r\n else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n var duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n }\r\n else\r\n delay = last.trackTime;\r\n }\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n if (delay <= 0)\r\n delay -= mixDuration;\r\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var current = this.tracks[i];\r\n if (current != null)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.expandToIndex = function (index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n };\r\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n var entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = spine.MixBlend.replace;\r\n return entry;\r\n };\r\n AnimationState.prototype.disposeNext = function (entry) {\r\n var next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n };\r\n AnimationState.prototype._animationsChanged = function () {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var entry = this.tracks[i];\r\n if (entry == null)\r\n continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null);\r\n }\r\n };\r\n AnimationState.prototype.computeHold = function (entry) {\r\n var to = entry.mixingTo;\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n var propertyIDs = this.propertyIDs;\r\n if (to != null && to.holdPrevious) {\r\n for (var i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n outer: for (var i = 0; i < timelinesCount; i++) {\r\n var timeline = timelines[i];\r\n var id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\r\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n }\r\n else {\r\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.getCurrent = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n };\r\n AnimationState.prototype.addListener = function (listener) {\r\n if (listener == null)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n };\r\n AnimationState.prototype.removeListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n };\r\n AnimationState.prototype.clearListeners = function () {\r\n this.listeners.length = 0;\r\n };\r\n AnimationState.prototype.clearListenerNotifications = function () {\r\n this.queue.clear();\r\n };\r\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n AnimationState.SUBSEQUENT = 0;\r\n AnimationState.FIRST = 1;\r\n AnimationState.HOLD_SUBSEQUENT = 2;\r\n AnimationState.HOLD_FIRST = 3;\r\n AnimationState.HOLD_MIX = 4;\r\n AnimationState.SETUP = 1;\r\n AnimationState.CURRENT = 2;\r\n return AnimationState;\r\n }());\r\n spine.AnimationState = AnimationState;\r\n var TrackEntry = (function () {\r\n function TrackEntry() {\r\n this.mixBlend = spine.MixBlend.replace;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n TrackEntry.prototype.reset = function () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n };\r\n TrackEntry.prototype.getAnimationTime = function () {\r\n if (this.loop) {\r\n var duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n };\r\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n };\r\n TrackEntry.prototype.isComplete = function () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n };\r\n TrackEntry.prototype.resetRotationDirections = function () {\r\n this.timelinesRotation.length = 0;\r\n };\r\n return TrackEntry;\r\n }());\r\n spine.TrackEntry = TrackEntry;\r\n var EventQueue = (function () {\r\n function EventQueue(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n EventQueue.prototype.start = function (entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.interrupt = function (entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.end = function (entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.dispose = function (entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.complete = function (entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.event = function (entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n };\r\n EventQueue.prototype.drain = function () {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n var objects = this.objects;\r\n var listeners = this.animState.listeners;\r\n for (var i = 0; i < objects.length; i += 2) {\r\n var type = objects[i];\r\n var entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start)\r\n listeners[ii].start(entry);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt)\r\n listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end)\r\n listeners[ii].end(entry);\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose)\r\n listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete)\r\n listeners[ii].complete(entry);\r\n break;\r\n case EventType.event:\r\n var event_3 = objects[i++ + 2];\r\n if (entry.listener != null && entry.listener.event)\r\n entry.listener.event(entry, event_3);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event)\r\n listeners[ii].event(entry, event_3);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n };\r\n EventQueue.prototype.clear = function () {\r\n this.objects.length = 0;\r\n };\r\n return EventQueue;\r\n }());\r\n spine.EventQueue = EventQueue;\r\n var EventType;\r\n (function (EventType) {\r\n EventType[EventType[\"start\"] = 0] = \"start\";\r\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType[EventType[\"end\"] = 2] = \"end\";\r\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n EventType[EventType[\"event\"] = 5] = \"event\";\r\n })(EventType = spine.EventType || (spine.EventType = {}));\r\n var AnimationStateAdapter = (function () {\r\n function AnimationStateAdapter() {\r\n }\r\n AnimationStateAdapter.prototype.start = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.end = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.dispose = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.complete = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.event = function (entry, event) {\r\n };\r\n return AnimationStateAdapter;\r\n }());\r\n spine.AnimationStateAdapter = AnimationStateAdapter;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationStateData = (function () {\r\n function AnimationStateData(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (skeletonData == null)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n var from = this.skeletonData.findAnimation(fromName);\r\n if (from == null)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n var to = this.skeletonData.findAnimation(toName);\r\n if (to == null)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n };\r\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n if (from == null)\r\n throw new Error(\"from cannot be null.\");\r\n if (to == null)\r\n throw new Error(\"to cannot be null.\");\r\n var key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n };\r\n AnimationStateData.prototype.getMix = function (from, to) {\r\n var key = from.name + \".\" + to.name;\r\n var value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n };\r\n return AnimationStateData;\r\n }());\r\n spine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AssetManager = (function () {\r\n function AssetManager(textureLoader, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.rawDataUris = {};\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n }\r\n AssetManager.prototype.downloadText = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(request.responseText);\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.downloadBinary = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(new Uint8Array(request.response));\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.setRawDataURI = function (path, data) {\r\n this.rawDataUris[this.pathPrefix + path] = data;\r\n };\r\n AssetManager.prototype.loadBinary = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadBinary(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadText = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadTexture = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n var storagePath = path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[storagePath] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \".concat(path));\r\n };\r\n if (this.rawDataUris[path])\r\n path = this.rawDataUris[path];\r\n img.src = path;\r\n };\r\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (atlasData) {\r\n var pagesLoaded = { count: 0 };\r\n var atlasPages = new Array();\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\r\n var image = document.createElement(\"img\");\r\n image.width = 16;\r\n image.height = 16;\r\n return new spine.FakeTexture(image);\r\n });\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n return;\r\n }\r\n var _loop_1 = function (atlasPage) {\r\n var pageLoadError = false;\r\n _this.loadTexture(atlasPage, function (imagePath, image) {\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n if (!pageLoadError) {\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\r\n });\r\n _this.assets[path] = atlas;\r\n if (success)\r\n success(path, atlas);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(path));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n }, function (imagePath, errorMessage) {\r\n pageLoadError = true;\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(path));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n });\r\n };\r\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n var atlasPage = atlasPages_1[_i];\r\n _loop_1(atlasPage);\r\n }\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.get = function (path) {\r\n path = this.pathPrefix + path;\r\n return this.assets[path];\r\n };\r\n AssetManager.prototype.remove = function (path) {\r\n path = this.pathPrefix + path;\r\n var asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n this.assets[path] = null;\r\n };\r\n AssetManager.prototype.removeAll = function () {\r\n for (var key in this.assets) {\r\n var asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n };\r\n AssetManager.prototype.isLoadingComplete = function () {\r\n return this.toLoad == 0;\r\n };\r\n AssetManager.prototype.getToLoad = function () {\r\n return this.toLoad;\r\n };\r\n AssetManager.prototype.getLoaded = function () {\r\n return this.loaded;\r\n };\r\n AssetManager.prototype.dispose = function () {\r\n this.removeAll();\r\n };\r\n AssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n AssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return AssetManager;\r\n }());\r\n spine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AtlasAttachmentLoader = (function () {\r\n function AtlasAttachmentLoader(atlas) {\r\n this.atlas = atlas;\r\n }\r\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.RegionAttachment(name);\r\n attachment.setRegion(region);\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n return new spine.BoundingBoxAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n return new spine.PathAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n return new spine.PointAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n return new spine.ClippingAttachment(name);\r\n };\r\n return AtlasAttachmentLoader;\r\n }());\r\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BlendMode;\r\n (function (BlendMode) {\r\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Bone = (function () {\r\n function Bone(data, skeleton, parent) {\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.appliedValid = false;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n Bone.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n Bone.prototype.update = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransform = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n var skeleton = this.skeleton;\r\n var rotationY = rotation + 90 + shearY;\r\n var sx = skeleton.scaleX;\r\n var sy = skeleton.scaleY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case spine.TransformMode.Normal: {\r\n var rotationY = rotation + 90 + shearY;\r\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case spine.TransformMode.OnlyTranslation: {\r\n var rotationY = rotation + 90 + shearY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case spine.TransformMode.NoRotationOrReflection: {\r\n var s = pa * pa + pc * pc;\r\n var prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n }\r\n var rx = rotation + shearX - prx;\r\n var ry = rotation + shearY - prx + 90;\r\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection: {\r\n var cos = spine.MathUtils.cosDeg(rotation);\r\n var sin = spine.MathUtils.sinDeg(rotation);\r\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n var s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == spine.TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n var r = Math.PI / 2 + Math.atan2(zc, za);\r\n var zb = Math.cos(r) * s;\r\n var zd = Math.sin(r) * s;\r\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n };\r\n Bone.prototype.setToSetupPose = function () {\r\n var data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n };\r\n Bone.prototype.getWorldRotationX = function () {\r\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldRotationY = function () {\r\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldScaleX = function () {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n };\r\n Bone.prototype.getWorldScaleY = function () {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n };\r\n Bone.prototype.updateAppliedTransform = function () {\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n this.ax = this.worldX;\r\n this.ay = this.worldY;\r\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n var pid = 1 / (pa * pd - pb * pc);\r\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = (dx * pd * pid - dy * pb * pid);\r\n this.ay = (dy * pa * pid - dx * pc * pid);\r\n var ia = pid * pd;\r\n var id = pid * pa;\r\n var ib = pid * pb;\r\n var ic = pid * pc;\r\n var ra = ia * this.a - ib * this.c;\r\n var rb = ia * this.b - ib * this.d;\r\n var rc = id * this.c - ic * this.a;\r\n var rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n var det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n }\r\n };\r\n Bone.prototype.worldToLocal = function (world) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var invDet = 1 / (a * d - b * c);\r\n var x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n };\r\n Bone.prototype.localToWorld = function (local) {\r\n var x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n };\r\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\r\n };\r\n Bone.prototype.localToWorldRotation = function (localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.rotateWorld = function (degrees) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n };\r\n return Bone;\r\n }());\r\n spine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoneData = (function () {\r\n function BoneData(index, name, parent) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new spine.Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n return BoneData;\r\n }());\r\n spine.BoneData = BoneData;\r\n var TransformMode;\r\n (function (TransformMode) {\r\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ConstraintData = (function () {\r\n function ConstraintData(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n return ConstraintData;\r\n }());\r\n spine.ConstraintData = ConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Event = (function () {\r\n function Event(time, data) {\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n return Event;\r\n }());\r\n spine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var EventData = (function () {\r\n function EventData(name) {\r\n this.name = name;\r\n }\r\n return EventData;\r\n }());\r\n spine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraint = (function () {\r\n function IkConstraint(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n IkConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n IkConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n IkConstraint.prototype.update = function () {\r\n var target = this.target;\r\n var bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n };\r\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var p = bone.parent;\r\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case spine.TransformMode.NoRotationOrReflection:\r\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n var sa = pa / bone.skeleton.scaleX;\r\n var sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\r\n default:\r\n var x = targetX - p.worldX, y = targetY - p.worldY;\r\n var d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n var sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n var s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n };\r\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid)\r\n parent.updateAppliedTransform();\r\n if (!child.appliedValid)\r\n child.updateAppliedTransform();\r\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n var os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n }\r\n else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n }\r\n else\r\n os2 = 0;\r\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n var u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n }\r\n else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n var pp = parent.parent;\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n var dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n var p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer: if (u) {\r\n l2 *= psx;\r\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch)\r\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n }\r\n else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n var c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n var q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) / 2;\r\n var r0 = q / c2, r1 = c / q;\r\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n }\r\n else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n var os = Math.atan2(cy, cx) * s2;\r\n var rotation = parent.arotation;\r\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n };\r\n return IkConstraint;\r\n }());\r\n spine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraintData = (function (_super) {\r\n __extends(IkConstraintData, _super);\r\n function IkConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.bendDirection = 1;\r\n _this.compress = false;\r\n _this.stretch = false;\r\n _this.uniform = false;\r\n _this.mix = 1;\r\n _this.softness = 0;\r\n return _this;\r\n }\r\n return IkConstraintData;\r\n }(spine.ConstraintData));\r\n spine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraint = (function () {\r\n function PathConstraint(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n PathConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n PathConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n PathConstraint.prototype.update = function () {\r\n var attachment = this.target.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n var translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate)\r\n return;\r\n var data = this.data;\r\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\r\n var rotateMode = data.rotateMode;\r\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n var bones = this.bones;\r\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n var spacing = this.spacing;\r\n if (scale || !percentSpacing) {\r\n if (scale)\r\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\r\n for (var i = 0, n = spacesCount - 1; i < n;) {\r\n var bone = bones[i];\r\n var setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = 0;\r\n }\r\n else if (percentSpacing) {\r\n if (scale) {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_1 = Math.sqrt(x * x + y * y);\r\n lengths[i] = length_1;\r\n }\r\n spaces[++i] = spacing;\r\n }\r\n else {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_2 = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length_2;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\r\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n var tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == spine.RotateMode.Chain;\r\n else {\r\n tip = false;\r\n var p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n }\r\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n var bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * translateMix;\r\n bone.worldY += (boneY - bone.worldY) * translateMix;\r\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n var length_3 = lengths[i];\r\n if (length_3 != 0) {\r\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n var length_4 = bone.data.length;\r\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\r\n }\r\n else {\r\n r += offsetRotation;\r\n }\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n };\r\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n var target = this.target;\r\n var position = this.position;\r\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n var closed = path.closed;\r\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n var lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n var pathLength_1 = lengths[curveCount];\r\n if (percentPosition)\r\n position *= pathLength_1;\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength_1;\r\n }\r\n world = spine.Utils.setArraySize(this.world, 8);\r\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength_1;\r\n if (p < 0)\r\n p += pathLength_1;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength_1) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_5 = lengths[curve];\r\n if (p > length_5)\r\n continue;\r\n if (curve == 0)\r\n p /= length_5;\r\n else {\r\n var prev = lengths[curve - 1];\r\n p = (p - prev) / (length_5 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n }\r\n else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n if (closed) {\r\n verticesLength += 2;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n }\r\n else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n var pathLength = 0;\r\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition)\r\n position *= pathLength;\r\n else\r\n position *= pathLength / path.lengths[curveCount - 1];\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n var segments = this.segments;\r\n var curveLength = 0;\r\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_6 = curves[curve];\r\n if (p > length_6)\r\n continue;\r\n if (curve == 0)\r\n p /= length_6;\r\n else {\r\n var prev = curves[curve - 1];\r\n p = (p - prev) / (length_6 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n var ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (;; segment++) {\r\n var length_7 = segments[segment];\r\n if (p > length_7)\r\n continue;\r\n if (segment == 0)\r\n p /= length_7;\r\n else {\r\n var prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length_7 - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n };\r\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 0.001)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n };\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 0.00001;\r\n return PathConstraint;\r\n }());\r\n spine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraintData = (function (_super) {\r\n __extends(PathConstraintData, _super);\r\n function PathConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n return _this;\r\n }\r\n return PathConstraintData;\r\n }(spine.ConstraintData));\r\n spine.PathConstraintData = PathConstraintData;\r\n var PositionMode;\r\n (function (PositionMode) {\r\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n var SpacingMode;\r\n (function (SpacingMode) {\r\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n var RotateMode;\r\n (function (RotateMode) {\r\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Assets = (function () {\r\n function Assets(clientId) {\r\n this.toLoad = new Array();\r\n this.assets = {};\r\n this.clientId = clientId;\r\n }\r\n Assets.prototype.loaded = function () {\r\n var i = 0;\r\n for (var v in this.assets)\r\n i++;\r\n return i;\r\n };\r\n return Assets;\r\n }());\r\n var SharedAssetManager = (function () {\r\n function SharedAssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.clientAssets = {};\r\n this.queuedAssets = {};\r\n this.rawAssets = {};\r\n this.errors = {};\r\n this.pathPrefix = pathPrefix;\r\n }\r\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined) {\r\n clientAssets = new Assets(clientId);\r\n this.clientAssets[clientId] = clientAssets;\r\n }\r\n if (textureLoader !== null)\r\n clientAssets.textureLoader = textureLoader;\r\n clientAssets.toLoad.push(path);\r\n if (this.queuedAssets[path] === path) {\r\n return false;\r\n }\r\n else {\r\n this.queuedAssets[path] = path;\r\n return true;\r\n }\r\n };\r\n SharedAssetManager.prototype.loadText = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = request.responseText;\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(request.status, \", \").concat(request.responseText);\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = JSON.parse(request.responseText);\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(request.status, \", \").concat(request.responseText);\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, textureLoader, path))\r\n return;\r\n var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n if (isWebWorker) {\r\n var options = { mode: \"cors\" };\r\n fetch(path, options).then(function (response) {\r\n if (!response.ok) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n }\r\n return response.blob();\r\n }).then(function (blob) {\r\n return createImageBitmap(blob, {\r\n premultiplyAlpha: 'none',\r\n colorSpaceConversion: 'none'\r\n });\r\n }).then(function (bitmap) {\r\n _this.rawAssets[path] = bitmap;\r\n });\r\n }\r\n else {\r\n var img_1 = new Image();\r\n img_1.crossOrigin = \"anonymous\";\r\n img_1.onload = function (ev) {\r\n _this.rawAssets[path] = img_1;\r\n };\r\n img_1.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n };\r\n img_1.src = path;\r\n }\r\n };\r\n SharedAssetManager.prototype.get = function (clientId, path) {\r\n path = this.pathPrefix + path;\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n return clientAssets.assets[path];\r\n };\r\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n var path = clientAssets.toLoad[i];\r\n var asset = clientAssets.assets[path];\r\n if (asset === null || asset === undefined) {\r\n var rawAsset = this.rawAssets[path];\r\n if (rawAsset === null || rawAsset === undefined)\r\n continue;\r\n if (isWebWorker) {\r\n if (rawAsset instanceof ImageBitmap) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n else {\r\n if (rawAsset instanceof HTMLImageElement) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n this.updateClientAssets(clientAssets);\r\n return clientAssets.toLoad.length == clientAssets.loaded();\r\n };\r\n SharedAssetManager.prototype.dispose = function () {\r\n };\r\n SharedAssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n SharedAssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return SharedAssetManager;\r\n }());\r\n spine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Skeleton = (function () {\r\n function Skeleton(data) {\r\n this._updateCache = new Array();\r\n this.updateCacheReset = new Array();\r\n this.time = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++) {\r\n var boneData = data.bones[i];\r\n var bone = void 0;\r\n if (boneData.parent == null)\r\n bone = new spine.Bone(boneData, this, null);\r\n else {\r\n var parent_1 = this.bones[boneData.parent.index];\r\n bone = new spine.Bone(boneData, this, parent_1);\r\n parent_1.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (var i = 0; i < data.slots.length; i++) {\r\n var slotData = data.slots[i];\r\n var bone = this.bones[slotData.boneData.index];\r\n var slot = new spine.Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (var i = 0; i < data.ikConstraints.length; i++) {\r\n var ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (var i = 0; i < data.transformConstraints.length; i++) {\r\n var transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (var i = 0; i < data.pathConstraints.length; i++) {\r\n var pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n Skeleton.prototype.updateCache = function () {\r\n var updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin != null) {\r\n var skinBones = this.skin.bones;\r\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n var bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n var ikConstraints = this.ikConstraints;\r\n var transformConstraints = this.transformConstraints;\r\n var pathConstraints = this.pathConstraints;\r\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n var constraintCount = ikCount + transformCount + pathCount;\r\n outer: for (var i = 0; i < constraintCount; i++) {\r\n for (var ii = 0; ii < ikCount; ii++) {\r\n var constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < transformCount; ii++) {\r\n var constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < pathCount; ii++) {\r\n var constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n };\r\n Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var target = constraint.target;\r\n this.sortBone(target);\r\n var constrained = constraint.bones;\r\n var parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length > 1) {\r\n var child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var slot = constraint.target;\r\n var slotIndex = slot.data.index;\r\n var slotBone = slot.bone;\r\n if (this.skin != null)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (var i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n };\r\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (var i = 0; i < boneCount; i++) {\r\n var child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n var attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (var key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var pathBones = attachment.bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n var bones = this.bones;\r\n var i = 0;\r\n while (i < pathBones.length) {\r\n var boneCount = pathBones[i++];\r\n for (var n = i + boneCount; i < n; i++) {\r\n var boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n };\r\n Skeleton.prototype.sortBone = function (bone) {\r\n if (bone.sorted)\r\n return;\r\n var parent = bone.parent;\r\n if (parent != null)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n };\r\n Skeleton.prototype.sortReset = function (bones) {\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n };\r\n Skeleton.prototype.updateWorldTransform = function () {\r\n var updateCacheReset = this.updateCacheReset;\r\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n var bone = updateCacheReset[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n var updateCache = this._updateCache;\r\n for (var i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n };\r\n Skeleton.prototype.setToSetupPose = function () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n };\r\n Skeleton.prototype.setBonesToSetupPose = function () {\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n var data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n };\r\n Skeleton.prototype.setSlotsToSetupPose = function () {\r\n var slots = this.slots;\r\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n };\r\n Skeleton.prototype.getRootBone = function () {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n };\r\n Skeleton.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.setSkinByName = function (skinName) {\r\n var skin = this.data.findSkin(skinName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n };\r\n Skeleton.prototype.setSkin = function (newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var name_1 = slot.data.attachmentName;\r\n if (name_1 != null) {\r\n var attachment = newSkin.getAttachment(i, name_1);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n };\r\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n };\r\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n if (attachmentName == null)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin != null)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n };\r\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n var attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n };\r\n Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n if (temp === void 0) { temp = new Array(2); }\r\n if (offset == null)\r\n throw new Error(\"offset cannot be null.\");\r\n if (size == null)\r\n throw new Error(\"size cannot be null.\");\r\n var drawOrder = this.drawOrder;\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var verticesLength = 0;\r\n var vertices = null;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n };\r\n Skeleton.prototype.update = function (delta) {\r\n this.time += delta;\r\n };\r\n return Skeleton;\r\n }());\r\n spine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBinary = (function () {\r\n function SkeletonBinary(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n skeletonData.name = \"\";\r\n var input = new BinaryInput(binary);\r\n skeletonData.hash = input.readString();\r\n skeletonData.version = input.readString();\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n var nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n var n = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n input.strings.push(input.readString());\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var name_2 = input.readString();\r\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n var data = new spine.BoneData(i, name_2, parent_2);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var slotName = input.readString();\r\n var boneData = skeletonData.bones[input.readInt(true)];\r\n var data = new spine.SlotData(i, slotName, boneData);\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n var darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.IkConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.TransformConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n data.scaleMix = input.readFloat();\r\n data.shearMix = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.PathConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin != null) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n var i = skeletonData.skins.length;\r\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++)\r\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n }\r\n n = this.linkedMeshes.length;\r\n for (var i = 0; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_3 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_3);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var data = new spine.EventData(input.readStringRef());\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath != null) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n return skeletonData;\r\n };\r\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n var skin = null;\r\n var slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new spine.Skin(\"default\");\r\n }\r\n else {\r\n skin = new spine.Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (var i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (var i = 0; i < slotCount; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var name_3 = input.readStringRef();\r\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\r\n if (attachment != null)\r\n skin.setAttachment(slotIndex, name_3, attachment);\r\n }\r\n }\r\n return skin;\r\n };\r\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n var scale = this.scale;\r\n var name = input.readStringRef();\r\n if (name == null)\r\n name = attachmentName;\r\n var typeIndex = input.readByte();\r\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n switch (type) {\r\n case spine.AttachmentType.Region: {\r\n var path = input.readStringRef();\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var scaleX = input.readFloat();\r\n var scaleY = input.readFloat();\r\n var width = input.readFloat();\r\n var height = input.readFloat();\r\n var color = input.readInt32();\r\n if (path == null)\r\n path = name;\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n spine.Color.rgba8888ToColor(region.color, color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case spine.AttachmentType.BoundingBox: {\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case spine.AttachmentType.Mesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var vertexCount = input.readInt(true);\r\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n var triangles = this.readShortArray(input);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var hullLength = input.readInt(true);\r\n var edges = null;\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.hullLength = hullLength << 1;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case spine.AttachmentType.LinkedMesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var skinName = input.readStringRef();\r\n var parent_4 = input.readStringRef();\r\n var inheritDeform = input.readBoolean();\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\r\n return mesh;\r\n }\r\n case spine.AttachmentType.Path: {\r\n var closed_1 = input.readBoolean();\r\n var constantSpeed = input.readBoolean();\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n var color = nonessential ? input.readInt32() : 0;\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = closed_1;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case spine.AttachmentType.Point: {\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var color = nonessential ? input.readInt32() : 0;\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case spine.AttachmentType.Clipping: {\r\n var endSlotIndex = input.readInt(true);\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n var verticesLength = vertexCount << 1;\r\n var vertices = new Vertices();\r\n var scale = this.scale;\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n var weights = new Array();\r\n var bonesArray = new Array();\r\n for (var i = 0; i < vertexCount; i++) {\r\n var boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (var ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = spine.Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n };\r\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n var array = new Array(n);\r\n if (scale == 1) {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n }\r\n else {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readShortArray = function (input) {\r\n var n = input.readInt(true);\r\n var array = new Array(n);\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n var timelines = new Array();\r\n var scale = this.scale;\r\n var duration = 0;\r\n var tempColor1 = new spine.Color();\r\n var tempColor2 = new spine.Color();\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.SLOT_ATTACHMENT: {\r\n var timeline = new spine.AttachmentTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_COLOR: {\r\n var timeline = new spine.ColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_TWO_COLOR: {\r\n var timeline = new spine.TwoColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var boneIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.BONE_ROTATE: {\r\n var timeline = new spine.RotateTimeline(frameCount);\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.BONE_TRANSLATE:\r\n case SkeletonBinary.BONE_SCALE:\r\n case SkeletonBinary.BONE_SHEAR: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.BONE_SCALE)\r\n timeline = new spine.ScaleTimeline(frameCount);\r\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n timeline = new spine.ShearTimeline(frameCount);\r\n else {\r\n timeline = new spine.TranslateTimeline(frameCount);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.IkConstraintTimeline(frameCount);\r\n timeline.ikConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.TransformConstraintTimeline(frameCount);\r\n timeline.transformConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.PATH_POSITION:\r\n case SkeletonBinary.PATH_SPACING: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.PATH_MIX: {\r\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var skin = skeletonData.skins[input.readInt(true)];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var slotIndex = input.readInt(true);\r\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.DeformTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n var deform = void 0;\r\n var end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n }\r\n else {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (var v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, time, deform);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n }\r\n }\r\n }\r\n var drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\r\n var slotCount = skeletonData.slots.length;\r\n for (var i = 0; i < drawOrderCount; i++) {\r\n var time = input.readFloat();\r\n var offsetCount = input.readInt(true);\r\n var drawOrder = spine.Utils.newArray(slotCount, 0);\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var ii = 0; ii < offsetCount; ii++) {\r\n var slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n }\r\n var eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n var timeline = new spine.EventTimeline(eventCount);\r\n for (var i = 0; i < eventCount; i++) {\r\n var time = input.readFloat();\r\n var eventData = skeletonData.events[input.readInt(true)];\r\n var event_4 = new spine.Event(time, eventData);\r\n event_4.intValue = input.readInt(false);\r\n event_4.floatValue = input.readFloat();\r\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event_4.data.audioPath != null) {\r\n event_4.volume = input.readFloat();\r\n event_4.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event_4);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n }\r\n return new spine.Animation(name, timelines, duration);\r\n };\r\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n switch (input.readByte()) {\r\n case SkeletonBinary.CURVE_STEPPED:\r\n timeline.setStepped(frameIndex);\r\n break;\r\n case SkeletonBinary.CURVE_BEZIER:\r\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n break;\r\n }\r\n };\r\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n };\r\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\r\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\r\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\r\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\r\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\r\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\r\n SkeletonBinary.BONE_ROTATE = 0;\r\n SkeletonBinary.BONE_TRANSLATE = 1;\r\n SkeletonBinary.BONE_SCALE = 2;\r\n SkeletonBinary.BONE_SHEAR = 3;\r\n SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n SkeletonBinary.SLOT_COLOR = 1;\r\n SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n SkeletonBinary.PATH_POSITION = 0;\r\n SkeletonBinary.PATH_SPACING = 1;\r\n SkeletonBinary.PATH_MIX = 2;\r\n SkeletonBinary.CURVE_LINEAR = 0;\r\n SkeletonBinary.CURVE_STEPPED = 1;\r\n SkeletonBinary.CURVE_BEZIER = 2;\r\n return SkeletonBinary;\r\n }());\r\n spine.SkeletonBinary = SkeletonBinary;\r\n var BinaryInput = (function () {\r\n function BinaryInput(data, strings, index, buffer) {\r\n if (strings === void 0) { strings = new Array(); }\r\n if (index === void 0) { index = 0; }\r\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n BinaryInput.prototype.readByte = function () {\r\n return this.buffer.getInt8(this.index++);\r\n };\r\n BinaryInput.prototype.readShort = function () {\r\n var value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt32 = function () {\r\n var value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt = function (optimizePositive) {\r\n var b = this.readByte();\r\n var result = b & 0x7F;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 7;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 14;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 21;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n };\r\n BinaryInput.prototype.readStringRef = function () {\r\n var index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n };\r\n BinaryInput.prototype.readString = function () {\r\n var byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n var chars = \"\";\r\n var charCount = 0;\r\n for (var i = 0; i < byteCount;) {\r\n var b = this.readByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n };\r\n BinaryInput.prototype.readFloat = function () {\r\n var value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readBoolean = function () {\r\n return this.readByte() != 0;\r\n };\r\n return BinaryInput;\r\n }());\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n var Vertices = (function () {\r\n function Vertices(bones, vertices) {\r\n if (bones === void 0) { bones = null; }\r\n if (vertices === void 0) { vertices = null; }\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n return Vertices;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBounds = (function () {\r\n function SkeletonBounds() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return spine.Utils.newFloatArray(16);\r\n });\r\n }\r\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n var boundingBoxes = this.boundingBoxes;\r\n var polygons = this.polygons;\r\n var polygonPool = this.polygonPool;\r\n var slots = skeleton.slots;\r\n var slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (var i = 0; i < slotCount; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.BoundingBoxAttachment) {\r\n var boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n var polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n }\r\n else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n };\r\n SkeletonBounds.prototype.aabbCompute = function () {\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n var vertices = polygon;\r\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n var x = vertices[ii];\r\n var y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n };\r\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n var minX = this.minX;\r\n var minY = this.minY;\r\n var maxX = this.maxX;\r\n var maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n var m = (y2 - y1) / (x2 - x1);\r\n var y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n var x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n };\r\n SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var prevIndex = nn - 2;\r\n var inside = false;\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var vertexY = vertices[ii + 1];\r\n var prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n var vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n };\r\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var width12 = x1 - x2, height12 = y1 - y2;\r\n var det1 = x1 * y2 - y1 * x2;\r\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n var det2 = x3 * y4 - y3 * x4;\r\n var width34 = x3 - x4, height34 = y3 - y4;\r\n var det3 = width12 * height34 - height12 * width34;\r\n var x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n var y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n };\r\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n if (boundingBox == null)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n var index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n };\r\n SkeletonBounds.prototype.getWidth = function () {\r\n return this.maxX - this.minX;\r\n };\r\n SkeletonBounds.prototype.getHeight = function () {\r\n return this.maxY - this.minY;\r\n };\r\n return SkeletonBounds;\r\n }());\r\n spine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonClipping = (function () {\r\n function SkeletonClipping() {\r\n this.triangulator = new spine.Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n }\r\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n if (this.clipAttachment != null)\r\n return 0;\r\n this.clipAttachment = clip;\r\n var n = clip.worldVerticesLength;\r\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n var clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\r\n var polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n };\r\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n };\r\n SkeletonClipping.prototype.clipEnd = function () {\r\n if (this.clipAttachment == null)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n };\r\n SkeletonClipping.prototype.isClipping = function () {\r\n return this.clipAttachment != null;\r\n };\r\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n var clippedTriangles = this.clippedTriangles;\r\n var polygons = this.clippingPolygons;\r\n var polygonsCount = this.clippingPolygons.length;\r\n var vertexSize = twoColor ? 12 : 8;\r\n var index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer: for (var i = 0; i < trianglesLength; i += 3) {\r\n var vertexOffset = triangles[i] << 1;\r\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (var p = 0; p < polygonsCount; p++) {\r\n var s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n var clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n var clipOutputCount = clipOutputLength >> 1;\r\n var clipOutputItems = this.clipOutput;\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n var c0 = x - x3, c1 = y - y3;\r\n var a = (d0 * c0 + d1 * c1) * d;\r\n var b = (d4 * c0 + d2 * c1) * d;\r\n var c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (var ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + ii);\r\n clippedTrianglesItems[s + 2] = (index + ii + 1);\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n }\r\n else {\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n }\r\n else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + 1);\r\n clippedTrianglesItems[s + 2] = (index + 2);\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n };\r\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n var originalOutput = output;\r\n var clipped = false;\r\n var input = null;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n }\r\n else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n var clippingVertices = clippingArea;\r\n var clippingVerticesLast = clippingArea.length - 4;\r\n for (var i = 0;; i += 2) {\r\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n var inputVertices = input;\r\n var inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n }\r\n else if (side2) {\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n var temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (var i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n }\r\n else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n };\r\n SkeletonClipping.makeClockwise = function (polygon) {\r\n var vertices = polygon;\r\n var verticeslength = polygon.length;\r\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n var x = vertices[i], y = vertices[i + 1];\r\n var other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n };\r\n return SkeletonClipping;\r\n }());\r\n spine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonData = (function () {\r\n function SkeletonData() {\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.fps = 0;\r\n }\r\n SkeletonData.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSkin = function (skinName) {\r\n if (skinName == null)\r\n throw new Error(\"skinName cannot be null.\");\r\n var skins = this.skins;\r\n for (var i = 0, n = skins.length; i < n; i++) {\r\n var skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findEvent = function (eventDataName) {\r\n if (eventDataName == null)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n var events = this.events;\r\n for (var i = 0, n = events.length; i < n; i++) {\r\n var event_5 = events[i];\r\n if (event_5.name == eventDataName)\r\n return event_5;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findAnimation = function (animationName) {\r\n if (animationName == null)\r\n throw new Error(\"animationName cannot be null.\");\r\n var animations = this.animations;\r\n for (var i = 0, n = animations.length; i < n; i++) {\r\n var animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n if (pathConstraintName == null)\r\n throw new Error(\"pathConstraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName)\r\n return i;\r\n return -1;\r\n };\r\n return SkeletonData;\r\n }());\r\n spine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonJson = (function () {\r\n function SkeletonJson(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonJson.prototype.readSkeletonData = function (json) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n var skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (var i = 0; i < root.bones.length; i++) {\r\n var boneMap = root.bones[i];\r\n var parent_5 = null;\r\n var parentName = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent_5 = skeletonData.findBone(parentName);\r\n if (parent_5 == null)\r\n throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (var i = 0; i < root.slots.length; i++) {\r\n var slotMap = root.slots[i];\r\n var slotName = slotMap.name;\r\n var boneName = slotMap.bone;\r\n var boneData = skeletonData.findBone(boneName);\r\n if (boneData == null)\r\n throw new Error(\"Slot bone not found: \" + boneName);\r\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n var color = this.getValue(slotMap, \"color\", null);\r\n if (color != null)\r\n data.color.setFromString(color);\r\n var dark = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new spine.Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (var i = 0; i < root.ik.length; i++) {\r\n var constraintMap = root.ik[i];\r\n var data = new spine.IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"IK target bone not found: \" + targetName);\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (var i = 0; i < root.transform.length; i++) {\r\n var constraintMap = root.transform[i];\r\n var data = new spine.TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (var i = 0; i < root.path.length; i++) {\r\n var constraintMap = root.path[i];\r\n var data = new spine.PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Path target slot not found: \" + targetName);\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (var i = 0; i < root.skins.length; i++) {\r\n var skinMap = root.skins[i];\r\n var skin = new spine.Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null)\r\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (var slotName in skinMap.attachments) {\r\n var slot = skeletonData.findSlot(slotName);\r\n if (slot == null)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n var slotMap = skinMap.attachments[slotName];\r\n for (var entryName in slotMap) {\r\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_6 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_6);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (var eventName in root.events) {\r\n var eventMap = root.events[eventName];\r\n var data = new spine.EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (var animationName in root.animations) {\r\n var animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n };\r\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n var scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n var type = this.getValue(map, \"type\", \"region\");\r\n switch (type) {\r\n case \"region\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n region.color.setFromString(color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n mesh.color.setFromString(color);\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n var parent_7 = this.getValue(map, \"parent\", null);\r\n if (parent_7 != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n var uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n var end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n var slot = skeletonData.findSlot(end);\r\n if (slot == null)\r\n throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n var scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n var vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n var scaledVertices = spine.Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (var i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n var weights = new Array();\r\n var bones = new Array();\r\n for (var i = 0, n = vertices.length; i < n;) {\r\n var boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = spine.Utils.toFloatArray(weights);\r\n };\r\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n var scale = this.scale;\r\n var timelines = new Array();\r\n var duration = 0;\r\n if (map.slots) {\r\n for (var slotName in map.slots) {\r\n var slotMap = map.slots[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n else if (timelineName == \"color\") {\r\n var timeline = new spine.ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var color = new spine.Color();\r\n color.setFromString(valueMap.color);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n }\r\n else if (timelineName == \"twoColor\") {\r\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var light = new spine.Color();\r\n var dark = new spine.Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (var boneName in map.bones) {\r\n var boneMap = map.bones[boneName];\r\n var boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n for (var timelineName in boneMap) {\r\n var timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n var timeline = new spine.RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n var timeline = null;\r\n var timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new spine.ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n }\r\n else if (timelineName === \"shear\")\r\n timeline = new spine.ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new spine.TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (var constraintName in map.ik) {\r\n var constraintMap = map.ik[constraintName];\r\n var constraint = skeletonData.findIkConstraint(constraintName);\r\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.transform) {\r\n for (var constraintName in map.transform) {\r\n var constraintMap = map.transform[constraintName];\r\n var constraint = skeletonData.findTransformConstraint(constraintName);\r\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.path) {\r\n for (var constraintName in map.path) {\r\n var constraintMap = map.path[constraintName];\r\n var index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var timelineName in constraintMap) {\r\n var timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n var timeline = null;\r\n var timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"mix\") {\r\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n if (map.deform) {\r\n for (var deformName in map.deform) {\r\n var deformMap = map.deform[deformName];\r\n var skin = skeletonData.findSkin(deformName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + deformName);\r\n for (var slotName in deformMap) {\r\n var slotMap = deformMap[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n var attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null)\r\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var timeline = new spine.DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n var frameIndex = 0;\r\n for (var j = 0; j < timelineMap.length; j++) {\r\n var valueMap = timelineMap[j];\r\n var deform = void 0;\r\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = this.getValue(valueMap, \"offset\", 0);\r\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (var i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n var drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null)\r\n drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n var slotCount = skeletonData.slots.length;\r\n var frameIndex = 0;\r\n for (var j = 0; j < drawOrderNode.length; j++) {\r\n var drawOrderMap = drawOrderNode[j];\r\n var drawOrder = null;\r\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = spine.Utils.newArray(slotCount, -1);\r\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var i = 0; i < offsets.length; i++) {\r\n var offsetMap = offsets[i];\r\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1)\r\n drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (map.events) {\r\n var timeline = new spine.EventTimeline(map.events.length);\r\n var frameIndex = 0;\r\n for (var i = 0; i < map.events.length; i++) {\r\n var eventMap = map.events[i];\r\n var eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event_6.data.audioPath != null) {\r\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\r\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event_6);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n };\r\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n if (!map.hasOwnProperty(\"curve\"))\r\n return;\r\n if (map.curve == \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n var curve = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n };\r\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n };\r\n SkeletonJson.blendModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.BlendMode.Normal;\r\n if (str == \"additive\")\r\n return spine.BlendMode.Additive;\r\n if (str == \"multiply\")\r\n return spine.BlendMode.Multiply;\r\n if (str == \"screen\")\r\n return spine.BlendMode.Screen;\r\n throw new Error(\"Unknown blend mode: \".concat(str));\r\n };\r\n SkeletonJson.positionModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\")\r\n return spine.PositionMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.PositionMode.Percent;\r\n throw new Error(\"Unknown position mode: \".concat(str));\r\n };\r\n SkeletonJson.spacingModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"length\")\r\n return spine.SpacingMode.Length;\r\n if (str == \"fixed\")\r\n return spine.SpacingMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.SpacingMode.Percent;\r\n throw new Error(\"Unknown position mode: \".concat(str));\r\n };\r\n SkeletonJson.rotateModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\")\r\n return spine.RotateMode.Tangent;\r\n if (str == \"chain\")\r\n return spine.RotateMode.Chain;\r\n if (str == \"chainscale\")\r\n return spine.RotateMode.ChainScale;\r\n throw new Error(\"Unknown rotate mode: \".concat(str));\r\n };\r\n SkeletonJson.transformModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.TransformMode.Normal;\r\n if (str == \"onlytranslation\")\r\n return spine.TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\")\r\n return spine.TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\")\r\n return spine.TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\")\r\n return spine.TransformMode.NoScaleOrReflection;\r\n throw new Error(\"Unknown transform mode: \".concat(str));\r\n };\r\n return SkeletonJson;\r\n }());\r\n spine.SkeletonJson = SkeletonJson;\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkinEntry = (function () {\r\n function SkinEntry(slotIndex, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n return SkinEntry;\r\n }());\r\n spine.SkinEntry = SkinEntry;\r\n var Skin = (function () {\r\n function Skin(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n if (attachment == null)\r\n throw new Error(\"attachment cannot be null.\");\r\n var attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n };\r\n Skin.prototype.addSkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n };\r\n Skin.prototype.copySkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null)\r\n continue;\r\n if (attachment.attachment instanceof spine.MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n };\r\n Skin.prototype.getAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n };\r\n Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n dictionary[name] = null;\r\n };\r\n Skin.prototype.getAttachments = function () {\r\n var entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n var slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (var name_4 in slotAttachments) {\r\n var attachment = slotAttachments[name_4];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name_4, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n };\r\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n var slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (var name_5 in slotAttachments) {\r\n var attachment = slotAttachments[name_5];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\r\n }\r\n }\r\n };\r\n Skin.prototype.clear = function () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n };\r\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n var slotIndex = 0;\r\n for (var i = 0; i < skeleton.slots.length; i++) {\r\n var slot = skeleton.slots[i];\r\n var slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n var dictionary = oldSkin.attachments[slotIndex];\r\n for (var key in dictionary) {\r\n var skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n var attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n };\r\n return Skin;\r\n }());\r\n spine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Slot = (function () {\r\n function Slot(data, bone) {\r\n this.deform = new Array();\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (bone == null)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new spine.Color();\r\n this.darkColor = data.darkColor == null ? null : new spine.Color();\r\n this.setToSetupPose();\r\n }\r\n Slot.prototype.getSkeleton = function () {\r\n return this.bone.skeleton;\r\n };\r\n Slot.prototype.getAttachment = function () {\r\n return this.attachment;\r\n };\r\n Slot.prototype.setAttachment = function (attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n };\r\n Slot.prototype.setAttachmentTime = function (time) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n };\r\n Slot.prototype.getAttachmentTime = function () {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n };\r\n Slot.prototype.setToSetupPose = function () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n };\r\n return Slot;\r\n }());\r\n spine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SlotData = (function () {\r\n function SlotData(index, name, boneData) {\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (boneData == null)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n return SlotData;\r\n }());\r\n spine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Texture = (function () {\r\n function Texture(image) {\r\n this._image = image;\r\n }\r\n Texture.prototype.getImage = function () {\r\n return this._image;\r\n };\r\n Texture.filterFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(\"Unknown texture filter \".concat(text));\r\n }\r\n };\r\n Texture.wrapFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(\"Unknown texture wrap \".concat(text));\r\n }\r\n };\r\n return Texture;\r\n }());\r\n spine.Texture = Texture;\r\n var TextureFilter;\r\n (function (TextureFilter) {\r\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n var TextureWrap;\r\n (function (TextureWrap) {\r\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n var TextureRegion = (function () {\r\n function TextureRegion() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.rotate = false;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n return TextureRegion;\r\n }());\r\n spine.TextureRegion = TextureRegion;\r\n var FakeTexture = (function (_super) {\r\n __extends(FakeTexture, _super);\r\n function FakeTexture() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n FakeTexture.prototype.dispose = function () { };\r\n return FakeTexture;\r\n }(Texture));\r\n spine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TextureAtlas = (function () {\r\n function TextureAtlas(atlasText, textureLoader) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n this.load(atlasText, textureLoader);\r\n }\r\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n var reader = new TextureAtlasReader(atlasText);\r\n var tuple = new Array(4);\r\n var page = null;\r\n while (true) {\r\n var line = reader.readLine();\r\n if (line == null)\r\n break;\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n if (reader.readTuple(tuple) == 2) {\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n reader.readTuple(tuple);\r\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n var direction = reader.readValue();\r\n page.uWrap = spine.TextureWrap.ClampToEdge;\r\n page.vWrap = spine.TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n page.texture = textureLoader(line);\r\n page.texture.setFilters(page.minFilter, page.magFilter);\r\n page.texture.setWraps(page.uWrap, page.vWrap);\r\n page.width = page.texture.getImage().width;\r\n page.height = page.texture.getImage().height;\r\n this.pages.push(page);\r\n }\r\n else {\r\n var region = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n var rotateValue = reader.readValue();\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n region.degrees = 90;\r\n }\r\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n region.degrees = 0;\r\n }\r\n else {\r\n region.degrees = parseFloat(rotateValue);\r\n }\r\n region.rotate = region.degrees == 90;\r\n reader.readTuple(tuple);\r\n var x = parseInt(tuple[0]);\r\n var y = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n var width = parseInt(tuple[0]);\r\n var height = parseInt(tuple[1]);\r\n region.u = x / page.width;\r\n region.v = y / page.height;\r\n if (region.rotate) {\r\n region.u2 = (x + height) / page.width;\r\n region.v2 = (y + width) / page.height;\r\n }\r\n else {\r\n region.u2 = (x + width) / page.width;\r\n region.v2 = (y + height) / page.height;\r\n }\r\n region.x = x;\r\n region.y = y;\r\n region.width = Math.abs(width);\r\n region.height = Math.abs(height);\r\n if (reader.readTuple(tuple) == 4) {\r\n if (reader.readTuple(tuple) == 4) {\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n region.originalWidth = parseInt(tuple[0]);\r\n region.originalHeight = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n region.offsetX = parseInt(tuple[0]);\r\n region.offsetY = parseInt(tuple[1]);\r\n region.index = parseInt(reader.readValue());\r\n region.texture = page.texture;\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n TextureAtlas.prototype.findRegion = function (name) {\r\n for (var i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n };\r\n TextureAtlas.prototype.dispose = function () {\r\n for (var i = 0; i < this.pages.length; i++) {\r\n this.pages[i].texture.dispose();\r\n }\r\n };\r\n return TextureAtlas;\r\n }());\r\n spine.TextureAtlas = TextureAtlas;\r\n var TextureAtlasReader = (function () {\r\n function TextureAtlasReader(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n TextureAtlasReader.prototype.readLine = function () {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n };\r\n TextureAtlasReader.prototype.readValue = function () {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n };\r\n TextureAtlasReader.prototype.readTuple = function (tuple) {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n var i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n var comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1)\r\n break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n };\r\n return TextureAtlasReader;\r\n }());\r\n var TextureAtlasPage = (function () {\r\n function TextureAtlasPage() {\r\n }\r\n return TextureAtlasPage;\r\n }());\r\n spine.TextureAtlasPage = TextureAtlasPage;\r\n var TextureAtlasRegion = (function (_super) {\r\n __extends(TextureAtlasRegion, _super);\r\n function TextureAtlasRegion() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return TextureAtlasRegion;\r\n }(spine.TextureRegion));\r\n spine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraint = (function () {\r\n function TransformConstraint(data, skeleton) {\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.scaleMix = 0;\r\n this.shearMix = 0;\r\n this.temp = new spine.Vector2();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n TransformConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n TransformConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n TransformConstraint.prototype.update = function () {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n }\r\n else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * translateMix;\r\n bone.worldY += (temp.y - bone.worldY) * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n var ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var b = bone.b, d = bone.d;\r\n var by = Math.atan2(d, b);\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * translateMix;\r\n bone.worldY += temp.y * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n var b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n var r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0) {\r\n var r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0)\r\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001)\r\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0)\r\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n return TransformConstraint;\r\n }());\r\n spine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraintData = (function (_super) {\r\n __extends(TransformConstraintData, _super);\r\n function TransformConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.rotateMix = 0;\r\n _this.translateMix = 0;\r\n _this.scaleMix = 0;\r\n _this.shearMix = 0;\r\n _this.offsetRotation = 0;\r\n _this.offsetX = 0;\r\n _this.offsetY = 0;\r\n _this.offsetScaleX = 0;\r\n _this.offsetScaleY = 0;\r\n _this.offsetShearY = 0;\r\n _this.relative = false;\r\n _this.local = false;\r\n return _this;\r\n }\r\n return TransformConstraintData;\r\n }(spine.ConstraintData));\r\n spine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Triangulator = (function () {\r\n function Triangulator() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n }\r\n Triangulator.prototype.triangulate = function (verticesArray) {\r\n var vertices = verticesArray;\r\n var vertexCount = verticesArray.length >> 1;\r\n var indices = this.indicesArray;\r\n indices.length = 0;\r\n for (var i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n var isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (var i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n var triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n var previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer: if (!isConcave[i]) {\r\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n var v = indices[ii] << 1;\r\n var vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n var previousIndex = (vertexCount + i - 1) % vertexCount;\r\n var nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n };\r\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\r\n var vertices = verticesArray;\r\n var convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n var convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n var polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n var polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n var fanBaseIndex = -1, lastWinding = 0;\r\n for (var i = 0, n = triangles.length; i < n; i += 3) {\r\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n var merged = false;\r\n if (fanBaseIndex == t1) {\r\n var o = polygon.length - 4;\r\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n var firstIndex = polygonIndices[0];\r\n var lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n var o = polygon.length - 4;\r\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n var firstX = polygon[0], firstY = polygon[1];\r\n var secondX = polygon[2], secondY = polygon[3];\r\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (var ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n var otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n var otherFirstIndex = otherIndices[0];\r\n var otherSecondIndex = otherIndices[1];\r\n var otherLastIndex = otherIndices[2];\r\n var otherPoly = convexPolygons[ii];\r\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n };\r\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n var current = indices[index] << 1;\r\n var next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n };\r\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n };\r\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n var px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n };\r\n return Triangulator;\r\n }());\r\n spine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IntSet = (function () {\r\n function IntSet() {\r\n this.array = new Array();\r\n }\r\n IntSet.prototype.add = function (value) {\r\n var contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n };\r\n IntSet.prototype.contains = function (value) {\r\n return this.array[value | 0] != undefined;\r\n };\r\n IntSet.prototype.remove = function (value) {\r\n this.array[value | 0] = undefined;\r\n };\r\n IntSet.prototype.clear = function () {\r\n this.array.length = 0;\r\n };\r\n return IntSet;\r\n }());\r\n spine.IntSet = IntSet;\r\n var Color = (function () {\r\n function Color(r, g, b, a) {\r\n if (r === void 0) { r = 0; }\r\n if (g === void 0) { g = 0; }\r\n if (b === void 0) { b = 0; }\r\n if (a === void 0) { a = 0; }\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n Color.prototype.set = function (r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.setFromColor = function (c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n };\r\n Color.prototype.setFromString = function (hex) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n };\r\n Color.prototype.add = function (r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.clamp = function () {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n };\r\n Color.rgba8888ToColor = function (color, value) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.rgb888ToColor = function (color, value) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.WHITE = new Color(1, 1, 1, 1);\r\n Color.RED = new Color(1, 0, 0, 1);\r\n Color.GREEN = new Color(0, 1, 0, 1);\r\n Color.BLUE = new Color(0, 0, 1, 1);\r\n Color.MAGENTA = new Color(1, 0, 1, 1);\r\n return Color;\r\n }());\r\n spine.Color = Color;\r\n var MathUtils = (function () {\r\n function MathUtils() {\r\n }\r\n MathUtils.clamp = function (value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n MathUtils.cosDeg = function (degrees) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.sinDeg = function (degrees) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.signum = function (value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n };\r\n MathUtils.toInt = function (x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n };\r\n MathUtils.cbrt = function (x) {\r\n var y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n };\r\n MathUtils.randomTriangular = function (min, max) {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n };\r\n MathUtils.randomTriangularWith = function (min, max, mode) {\r\n var u = Math.random();\r\n var d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n };\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n MathUtils.degRad = MathUtils.degreesToRadians;\r\n return MathUtils;\r\n }());\r\n spine.MathUtils = MathUtils;\r\n var Interpolation = (function () {\r\n function Interpolation() {\r\n }\r\n Interpolation.prototype.apply = function (start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n };\r\n return Interpolation;\r\n }());\r\n spine.Interpolation = Interpolation;\r\n var Pow = (function (_super) {\r\n __extends(Pow, _super);\r\n function Pow(power) {\r\n var _this = _super.call(this) || this;\r\n _this.power = 2;\r\n _this.power = power;\r\n return _this;\r\n }\r\n Pow.prototype.applyInternal = function (a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n };\r\n return Pow;\r\n }(Interpolation));\r\n spine.Pow = Pow;\r\n var PowOut = (function (_super) {\r\n __extends(PowOut, _super);\r\n function PowOut(power) {\r\n return _super.call(this, power) || this;\r\n }\r\n PowOut.prototype.applyInternal = function (a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n };\r\n return PowOut;\r\n }(Pow));\r\n spine.PowOut = PowOut;\r\n var Utils = (function () {\r\n function Utils() {\r\n }\r\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n };\r\n Utils.setArraySize = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n var oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (var i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n };\r\n Utils.ensureArrayCapacity = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n if (array.length >= size)\r\n return array;\r\n return Utils.setArraySize(array, size, value);\r\n };\r\n Utils.newArray = function (size, defaultValue) {\r\n var array = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n };\r\n Utils.newFloatArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.newShortArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.toFloatArray = function (array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n };\r\n Utils.toSinglePrecision = function (value) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n };\r\n Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n };\r\n Utils.contains = function (array, element, identity) {\r\n if (identity === void 0) { identity = true; }\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] == element)\r\n return true;\r\n }\r\n return false;\r\n };\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n return Utils;\r\n }());\r\n spine.Utils = Utils;\r\n var DebugUtils = (function () {\r\n function DebugUtils() {\r\n }\r\n DebugUtils.logBones = function (skeleton) {\r\n for (var i = 0; i < skeleton.bones.length; i++) {\r\n var bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n };\r\n return DebugUtils;\r\n }());\r\n spine.DebugUtils = DebugUtils;\r\n var Pool = (function () {\r\n function Pool(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n Pool.prototype.obtain = function () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n };\r\n Pool.prototype.free = function (item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n };\r\n Pool.prototype.freeAll = function (items) {\r\n for (var i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n };\r\n Pool.prototype.clear = function () {\r\n this.items.length = 0;\r\n };\r\n return Pool;\r\n }());\r\n spine.Pool = Pool;\r\n var Vector2 = (function () {\r\n function Vector2(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n }\r\n Vector2.prototype.set = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2.prototype.length = function () {\r\n var x = this.x;\r\n var y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n };\r\n Vector2.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n };\r\n return Vector2;\r\n }());\r\n spine.Vector2 = Vector2;\r\n var TimeKeeper = (function () {\r\n function TimeKeeper() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1000;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n TimeKeeper.prototype.update = function () {\r\n var now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n };\r\n return TimeKeeper;\r\n }());\r\n spine.TimeKeeper = TimeKeeper;\r\n var WindowedMean = (function () {\r\n function WindowedMean(windowSize) {\r\n if (windowSize === void 0) { windowSize = 32; }\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n WindowedMean.prototype.hasEnoughData = function () {\r\n return this.addedValues >= this.values.length;\r\n };\r\n WindowedMean.prototype.addValue = function (value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n };\r\n WindowedMean.prototype.getMean = function () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n var mean = 0;\r\n for (var i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n return WindowedMean;\r\n }());\r\n spine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n if (!Math.fround) {\r\n Math.fround = (function (array) {\r\n return function (x) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Attachment = (function () {\r\n function Attachment(name) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n return Attachment;\r\n }());\r\n spine.Attachment = Attachment;\r\n var VertexAttachment = (function (_super) {\r\n __extends(VertexAttachment, _super);\r\n function VertexAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n _this.worldVerticesLength = 0;\r\n _this.deformAttachment = _this;\r\n return _this;\r\n }\r\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n var skeleton = slot.bone.skeleton;\r\n var deformArray = slot.deform;\r\n var vertices = this.vertices;\r\n var bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n var bone = slot.bone;\r\n var x = bone.worldX;\r\n var y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n var v = 0, skip = 0;\r\n for (var i = 0; i < start; i += 2) {\r\n var n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n var skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n else {\r\n var deform = deformArray;\r\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n };\r\n VertexAttachment.prototype.copyTo = function (attachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n }\r\n else\r\n attachment.bones = null;\r\n if (this.vertices != null) {\r\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\r\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n else\r\n attachment.vertices = null;\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n };\r\n VertexAttachment.nextID = 0;\r\n return VertexAttachment;\r\n }(Attachment));\r\n spine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AttachmentType;\r\n (function (AttachmentType) {\r\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoundingBoxAttachment = (function (_super) {\r\n __extends(BoundingBoxAttachment, _super);\r\n function BoundingBoxAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n BoundingBoxAttachment.prototype.copy = function () {\r\n var copy = new BoundingBoxAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return BoundingBoxAttachment;\r\n }(spine.VertexAttachment));\r\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ClippingAttachment = (function (_super) {\r\n __extends(ClippingAttachment, _super);\r\n function ClippingAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n return _this;\r\n }\r\n ClippingAttachment.prototype.copy = function () {\r\n var copy = new ClippingAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return ClippingAttachment;\r\n }(spine.VertexAttachment));\r\n spine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var MeshAttachment = (function (_super) {\r\n __extends(MeshAttachment, _super);\r\n function MeshAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.tempColor = new spine.Color(0, 0, 0, 0);\r\n return _this;\r\n }\r\n MeshAttachment.prototype.updateUVs = function () {\r\n var regionUVs = this.regionUVs;\r\n if (this.uvs == null || this.uvs.length != regionUVs.length)\r\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n var uvs = this.uvs;\r\n var n = this.uvs.length;\r\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof spine.TextureAtlasRegion) {\r\n var region = this.region;\r\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n }\r\n else if (this.region == null) {\r\n u = v = 0;\r\n width = height = 1;\r\n }\r\n else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n };\r\n MeshAttachment.prototype.getParentMesh = function () {\r\n return this.parentMesh;\r\n };\r\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n };\r\n MeshAttachment.prototype.copy = function () {\r\n if (this.parentMesh != null)\r\n return this.newLinkedMesh();\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n };\r\n MeshAttachment.prototype.newLinkedMesh = function () {\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n copy.updateUVs();\r\n return copy;\r\n };\r\n return MeshAttachment;\r\n }(spine.VertexAttachment));\r\n spine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathAttachment = (function (_super) {\r\n __extends(PathAttachment, _super);\r\n function PathAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.closed = false;\r\n _this.constantSpeed = false;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n PathAttachment.prototype.copy = function () {\r\n var copy = new PathAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PathAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PointAttachment = (function (_super) {\r\n __extends(PointAttachment, _super);\r\n function PointAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n return _this;\r\n }\r\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n };\r\n PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n var x = cos * bone.a + sin * bone.b;\r\n var y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n };\r\n PointAttachment.prototype.copy = function () {\r\n var copy = new PointAttachment(this.name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PointAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var RegionAttachment = (function (_super) {\r\n __extends(RegionAttachment, _super);\r\n function RegionAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.scaleX = 1;\r\n _this.scaleY = 1;\r\n _this.rotation = 0;\r\n _this.width = 0;\r\n _this.height = 0;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.offset = spine.Utils.newFloatArray(8);\r\n _this.uvs = spine.Utils.newFloatArray(8);\r\n _this.tempColor = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n RegionAttachment.prototype.updateOffset = function () {\r\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n var localX2 = localX + this.region.width * regionScaleX;\r\n var localY2 = localY + this.region.height * regionScaleY;\r\n var radians = this.rotation * Math.PI / 180;\r\n var cos = Math.cos(radians);\r\n var sin = Math.sin(radians);\r\n var localXCos = localX * cos + this.x;\r\n var localXSin = localX * sin;\r\n var localYCos = localY * cos + this.y;\r\n var localYSin = localY * sin;\r\n var localX2Cos = localX2 * cos + this.x;\r\n var localX2Sin = localX2 * sin;\r\n var localY2Cos = localY2 * cos + this.y;\r\n var localY2Sin = localY2 * sin;\r\n var offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n };\r\n RegionAttachment.prototype.setRegion = function (region) {\r\n this.region = region;\r\n var uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n }\r\n else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n };\r\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n var vertexOffset = this.offset;\r\n var x = bone.worldX, y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n };\r\n RegionAttachment.prototype.copy = function () {\r\n var copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n RegionAttachment.OX1 = 0;\r\n RegionAttachment.OY1 = 1;\r\n RegionAttachment.OX2 = 2;\r\n RegionAttachment.OY2 = 3;\r\n RegionAttachment.OX3 = 4;\r\n RegionAttachment.OY3 = 5;\r\n RegionAttachment.OX4 = 6;\r\n RegionAttachment.OY4 = 7;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n return RegionAttachment;\r\n }(spine.Attachment));\r\n spine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var JitterEffect = (function () {\r\n function JitterEffect(jitterX, jitterY) {\r\n this.jitterX = 0;\r\n this.jitterY = 0;\r\n this.jitterX = jitterX;\r\n this.jitterY = jitterY;\r\n }\r\n JitterEffect.prototype.begin = function (skeleton) {\r\n };\r\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n };\r\n JitterEffect.prototype.end = function () {\r\n };\r\n return JitterEffect;\r\n }());\r\n spine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SwirlEffect = (function () {\r\n function SwirlEffect(radius) {\r\n this.centerX = 0;\r\n this.centerY = 0;\r\n this.radius = 0;\r\n this.angle = 0;\r\n this.worldX = 0;\r\n this.worldY = 0;\r\n this.radius = radius;\r\n }\r\n SwirlEffect.prototype.begin = function (skeleton) {\r\n this.worldX = skeleton.x + this.centerX;\r\n this.worldY = skeleton.y + this.centerY;\r\n };\r\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n var x = position.x - this.worldX;\r\n var y = position.y - this.worldY;\r\n var dist = Math.sqrt(x * x + y * y);\r\n if (dist < this.radius) {\r\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n var cos = Math.cos(theta);\r\n var sin = Math.sin(theta);\r\n position.x = cos * x - sin * y + this.worldX;\r\n position.y = sin * x + cos * y + this.worldY;\r\n }\r\n };\r\n SwirlEffect.prototype.end = function () {\r\n };\r\n SwirlEffect.interpolation = new spine.PowOut(2);\r\n return SwirlEffect;\r\n }());\r\n spine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n canvas.AssetManager = AssetManager;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var CanvasTexture = (function (_super) {\r\n __extends(CanvasTexture, _super);\r\n function CanvasTexture(image) {\r\n return _super.call(this, image) || this;\r\n }\r\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n CanvasTexture.prototype.dispose = function () { };\r\n return CanvasTexture;\r\n }(spine.Texture));\r\n canvas.CanvasTexture = CanvasTexture;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context) {\r\n this.triangleRendering = false;\r\n this.debugRendering = false;\r\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\r\n this.tempColor = new spine.Color();\r\n this.ctx = context;\r\n }\r\n SkeletonRenderer.prototype.draw = function (skeleton) {\r\n if (this.triangleRendering)\r\n this.drawTriangles(skeleton);\r\n else\r\n this.drawImages(skeleton);\r\n };\r\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\r\n var ctx = this.ctx;\r\n var drawOrder = skeleton.drawOrder;\r\n if (this.debugRendering)\r\n ctx.strokeStyle = \"green\";\r\n ctx.save();\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n var regionAttachment = null;\r\n var region = null;\r\n var image = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n regionAttachment = attachment;\r\n region = regionAttachment.region;\r\n image = region.texture.getImage();\r\n }\r\n else\r\n continue;\r\n var skeleton_1 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_1.color;\r\n var slotColor = slot.color;\r\n var regionColor = regionAttachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\r\n var att = attachment;\r\n var bone = slot.bone;\r\n var w = region.width;\r\n var h = region.height;\r\n ctx.save();\r\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n ctx.translate(attachment.offset[0], attachment.offset[1]);\r\n ctx.rotate(attachment.rotation * Math.PI / 180);\r\n var atlasScale = att.width / w;\r\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n ctx.translate(w / 2, h / 2);\r\n if (attachment.region.rotate) {\r\n var t = w;\r\n w = h;\r\n h = t;\r\n ctx.rotate(-Math.PI / 2);\r\n }\r\n ctx.scale(1, -1);\r\n ctx.translate(-w / 2, -h / 2);\r\n ctx.globalAlpha = color.a;\r\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n if (this.debugRendering)\r\n ctx.strokeRect(0, 0, w, h);\r\n ctx.restore();\r\n }\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\r\n var blendMode = null;\r\n var vertices = this.vertices;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n var region = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n region = regionAttachment.region;\r\n texture = region.texture.getImage();\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n vertices = this.computeMeshVertices(slot, mesh, false);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture.getImage();\r\n }\r\n else\r\n continue;\r\n if (texture != null) {\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n }\r\n var skeleton_2 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_2.color;\r\n var slotColor = slot.color;\r\n var attachmentColor = attachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\r\n var ctx = this.ctx;\r\n ctx.globalAlpha = color.a;\r\n for (var j = 0; j < triangles.length; j += 3) {\r\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n if (this.debugRendering) {\r\n ctx.strokeStyle = \"green\";\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x0, y0);\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n }\r\n this.ctx.globalAlpha = 1;\r\n };\r\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n var ctx = this.ctx;\r\n u0 *= img.width;\r\n v0 *= img.height;\r\n u1 *= img.width;\r\n v1 *= img.height;\r\n u2 *= img.width;\r\n v2 *= img.height;\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.closePath();\r\n x1 -= x0;\r\n y1 -= y0;\r\n x2 -= x0;\r\n y2 -= y0;\r\n u1 -= u0;\r\n v1 -= v0;\r\n u2 -= u0;\r\n v2 -= v0;\r\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n ctx.save();\r\n ctx.transform(a, b, c, d, e, f);\r\n ctx.clip();\r\n ctx.drawImage(img, 0, 0);\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = region.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var vertices = this.vertices;\r\n var uvs = region.uvs;\r\n vertices[spine.RegionAttachment.C1R] = color.r;\r\n vertices[spine.RegionAttachment.C1G] = color.g;\r\n vertices[spine.RegionAttachment.C1B] = color.b;\r\n vertices[spine.RegionAttachment.C1A] = color.a;\r\n vertices[spine.RegionAttachment.U1] = uvs[0];\r\n vertices[spine.RegionAttachment.V1] = uvs[1];\r\n vertices[spine.RegionAttachment.C2R] = color.r;\r\n vertices[spine.RegionAttachment.C2G] = color.g;\r\n vertices[spine.RegionAttachment.C2B] = color.b;\r\n vertices[spine.RegionAttachment.C2A] = color.a;\r\n vertices[spine.RegionAttachment.U2] = uvs[2];\r\n vertices[spine.RegionAttachment.V2] = uvs[3];\r\n vertices[spine.RegionAttachment.C3R] = color.r;\r\n vertices[spine.RegionAttachment.C3G] = color.g;\r\n vertices[spine.RegionAttachment.C3B] = color.b;\r\n vertices[spine.RegionAttachment.C3A] = color.a;\r\n vertices[spine.RegionAttachment.U3] = uvs[4];\r\n vertices[spine.RegionAttachment.V3] = uvs[5];\r\n vertices[spine.RegionAttachment.C4R] = color.r;\r\n vertices[spine.RegionAttachment.C4G] = color.g;\r\n vertices[spine.RegionAttachment.C4B] = color.b;\r\n vertices[spine.RegionAttachment.C4A] = color.a;\r\n vertices[spine.RegionAttachment.U4] = uvs[6];\r\n vertices[spine.RegionAttachment.V4] = uvs[7];\r\n return vertices;\r\n };\r\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = mesh.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n var numVertices = mesh.worldVerticesLength / 2;\r\n if (this.vertices.length < mesh.worldVerticesLength) {\r\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\r\n }\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var uvs = mesh.uvs;\r\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\r\n vertices[v++] = color.r;\r\n vertices[v++] = color.g;\r\n vertices[v++] = color.b;\r\n vertices[v++] = color.a;\r\n vertices[v++] = uvs[u++];\r\n vertices[v++] = uvs[u++];\r\n v += 2;\r\n }\r\n return vertices;\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n return SkeletonRenderer;\r\n }());\r\n canvas.SkeletonRenderer = SkeletonRenderer;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-canvas.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\r\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\r\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\r\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\r\nvar MultiFile = require('../../../src/loader/MultiFile.js');\r\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\r\n\r\n/**\r\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\r\n *\r\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Spine File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\r\n *\r\n * @class SpineFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar SpineFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\r\n {\r\n var i;\r\n var json;\r\n var atlas;\r\n var files = [];\r\n var cache = loader.cacheManager.custom.spine;\r\n\r\n // atlas can be an array of atlas files, not just a single one\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n json = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'jsonURL'),\r\n extension: GetFastValue(config, 'jsonExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\r\n });\r\n\r\n atlasURL = GetFastValue(config, 'atlasURL');\r\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, {\r\n key: key + '!' + i,\r\n url: atlasURL[i],\r\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n else\r\n {\r\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, key + '!' + i, atlasURL[i], atlasXhrSettings);\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n\r\n files.unshift(json);\r\n\r\n MultiFile.call(this, loader, 'spine', key, files);\r\n\r\n this.config.preMultipliedAlpha = preMultipliedAlpha;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'text')\r\n {\r\n // Inspect the data for the files to now load\r\n var content = file.data.split('\\n');\r\n\r\n // Extract the textures\r\n var textures = [];\r\n\r\n for (var t = 0; t < content.length; t++)\r\n {\r\n var line = content[t];\r\n\r\n if (line.trim() === '' && t < content.length - 1)\r\n {\r\n line = content[t + 1];\r\n\r\n textures.push(line);\r\n }\r\n }\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\r\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\r\n var prefix = GetFastValue(config, 'prefix', this.prefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n var textureURL = textures[i];\r\n\r\n var key = this.key + ':' + textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n if (!loader.keyExists(image))\r\n {\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\r\n * @since 3.19.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var atlasCache;\r\n var atlasKey = '';\r\n var combinedAtlasData = '';\r\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\r\n var textureManager = this.loader.textureManager;\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'text')\r\n {\r\n atlasKey = file.key.replace(/![\\d]$/, '');\r\n\r\n atlasCache = file.cache;\r\n\r\n combinedAtlasData = combinedAtlasData.concat(file.data);\r\n }\r\n else\r\n {\r\n var src = file.key.trim();\r\n var pos = src.indexOf('!');\r\n var key = src.substr(pos + 1);\r\n\r\n if (!textureManager.exists(key))\r\n {\r\n textureManager.addImage(key, file.data);\r\n }\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetValue = require('../../../src/utils/object/GetValue');\r\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\r\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\r\nvar Spine = require('Spine');\r\nvar SpineFile = require('./SpineFile');\r\nvar SpineGameObject = require('./gameobject/SpineGameObject');\r\nvar SpineContainer = require('./container/SpineContainer');\r\nvar NOOP = require('../../../src/utils/NOOP');\r\n\r\n/**\r\n * @classdesc\r\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\r\n *\r\n * Find more details about Spine itself at http://esotericsoftware.com/.\r\n *\r\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\r\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\r\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\r\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\r\n *\r\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\r\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\r\n *\r\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\r\n *\r\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\r\n *\r\n * ```javascript\r\n * import * as SpinePlugin from './SpinePlugin.js';\r\n * ```\r\n *\r\n * and then adding it to your Phaser Game configuration:\r\n *\r\n * ```javascript\r\n * plugins: {\r\n * scene: [\r\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\r\n * ]\r\n * }\r\n * ```\r\n *\r\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\r\n * Game Configuration object, like this:\r\n *\r\n * ```javascript\r\n * scene: {\r\n * preload: preload,\r\n * create: create,\r\n * pack: {\r\n * files: [\r\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\r\n * ]\r\n * }\r\n * }\r\n * ```\r\n *\r\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\r\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\r\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\r\n * subsequent Scenes.\r\n *\r\n * ## A note about inlined data:\r\n *\r\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\r\n * at all. Instead, call the functions directly as required:\r\n *\r\n * scene.cache.json.add\r\n * scene.cache.custom.spine.add\r\n * scene.textures.addBase64\r\n *\r\n * ## Using the plugin\r\n *\r\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\r\n *\r\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\r\n * Spine files directly, i.e.:\r\n *\r\n * ```javascript\r\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\r\n * ```\r\n *\r\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\r\n * and Spine Containers:\r\n *\r\n * ```javascript\r\n * const man = this.add.spine(512, 650, 'stretchyman');\r\n *\r\n * const container = this.add.spineContainer();\r\n *\r\n * container.add(man);\r\n * ```\r\n *\r\n * The first argument is the key which you used when importing the Spine data. There are lots of\r\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\r\n * see the respective documentation and examples for further details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\r\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\r\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\r\n * load arguments, or you may see black outlines around skeleton textures.\r\n *\r\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\r\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\r\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\r\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\r\n * game, regardless if the Scene loaded the Spine data or not.\r\n *\r\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\r\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\r\n *\r\n * ```javascript\r\n * this.plugins.removeScenePlugin('SpinePlugin');\r\n * ```\r\n *\r\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\r\n *\r\n * @class SpinePlugin\r\n * @extends Phaser.Plugins.ScenePlugin\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar SpinePlugin = new Class({\r\n\r\n Extends: ScenePlugin,\r\n\r\n initialize:\r\n\r\n function SpinePlugin (scene, pluginManager, pluginKey)\r\n {\r\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\r\n\r\n var game = pluginManager.game;\r\n\r\n /**\r\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\r\n *\r\n * @name SpinePlugin#isWebGL\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isWebGL = (game.config.renderType === 2);\r\n\r\n /**\r\n * A custom cache that stores the Spine atlas data.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.cache = game.cache.addCustom('spine');\r\n\r\n /**\r\n * A custom cache that stores the Spine Textures.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#spineTextures\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.spineTextures = game.cache.addCustom('spineTextures');\r\n\r\n /**\r\n * A reference to the global JSON Cache.\r\n *\r\n * @name SpinePlugin#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.json = game.cache.json;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name SpinePlugin#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.19.0\r\n */\r\n this.textures = game.textures;\r\n\r\n /**\r\n * A flag that sets if the Skeleton Renderers will render debug information over the top\r\n * of the skeleton or not.\r\n *\r\n * @name SpinePlugin#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The underlying WebGL context of the Phaser renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.19.0\r\n */\r\n this.gl;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name SpinePlugin#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.renderer;\r\n\r\n /**\r\n * An instance of the Spine WebGL Scene Renderer.\r\n *\r\n * There is only one instance of the Scene Renderer shared across the whole plugin.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#sceneRenderer\r\n * @type {spine.webgl.SceneRenderer}\r\n * @since 3.19.0\r\n */\r\n this.sceneRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Renderer.\r\n *\r\n * @name SpinePlugin#skeletonRenderer\r\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.skeletonRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Debug Renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#skeletonDebugRenderer\r\n * @type {spine.webgl.skeletonDebugRenderer}\r\n * @since 3.19.0\r\n */\r\n this.skeletonDebugRenderer;\r\n\r\n /**\r\n * A reference to the Spine runtime.\r\n * This is the runtime created by Esoteric Software.\r\n *\r\n * @name SpinePlugin#plugin\r\n * @type {spine}\r\n * @since 3.19.0\r\n */\r\n this.plugin = Spine;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp1\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp1;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp2\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp2;\r\n\r\n if (this.isWebGL)\r\n {\r\n this.runtime = Spine.webgl;\r\n\r\n this.renderer = game.renderer;\r\n this.gl = game.renderer.gl;\r\n\r\n this.getAtlas = this.getAtlasWebGL;\r\n }\r\n else\r\n {\r\n this.runtime = Spine.canvas;\r\n\r\n this.renderer = game.renderer;\r\n\r\n this.getAtlas = this.getAtlasCanvas;\r\n }\r\n\r\n // Headless mode?\r\n if (!this.renderer)\r\n {\r\n this.renderer = {\r\n width: game.scale.width,\r\n height: game.scale.height,\r\n preRender: NOOP,\r\n postRender: NOOP,\r\n render: NOOP,\r\n destroy: NOOP\r\n };\r\n }\r\n\r\n var isWebGL = this.isWebGL;\r\n\r\n var add = function (x, y, key, animationName, loop)\r\n {\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.clear();\r\n }\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, x, y, key, animationName, loop);\r\n\r\n this.displayList.add(spineGO);\r\n this.updateList.add(spineGO);\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.rebind();\r\n }\r\n\r\n return spineGO;\r\n };\r\n\r\n var make = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.clear();\r\n }\r\n\r\n var key = GetValue(config, 'key', null);\r\n var animationName = GetValue(config, 'animationName', null);\r\n var loop = GetValue(config, 'loop', false);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 0, 0, key, animationName, loop);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, spineGO, config);\r\n\r\n // Spine specific\r\n var skinName = GetValue(config, 'skinName', false);\r\n\r\n if (skinName)\r\n {\r\n spineGO.setSkinByName(skinName);\r\n }\r\n\r\n var slotName = GetValue(config, 'slotName', false);\r\n var attachmentName = GetValue(config, 'attachmentName', null);\r\n\r\n if (slotName)\r\n {\r\n spineGO.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.rebind();\r\n }\r\n\r\n return spineGO.refresh();\r\n };\r\n\r\n var addContainer = function (x, y, children)\r\n {\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n this.displayList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var makeContainer = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetValue(config, 'x', 0);\r\n var y = GetValue(config, 'y', 0);\r\n var children = GetValue(config, 'children', null);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var container = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n\r\n return container;\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\r\n },\r\n\r\n /**\r\n * Internal boot handler.\r\n *\r\n * @method SpinePlugin#boot\r\n * @private\r\n * @since 3.19.0\r\n */\r\n boot: function ()\r\n {\r\n if (this.isWebGL)\r\n {\r\n this.bootWebGL();\r\n this.onResize();\r\n this.game.scale.on(ResizeEvent, this.onResize, this);\r\n }\r\n else\r\n {\r\n this.bootCanvas();\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n eventEmitter.once('destroy', this.destroy, this);\r\n\r\n this.game.events.once('destroy', this.gameDestroy, this);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the Canvas Renderer.\r\n *\r\n * @method SpinePlugin#bootCanvas\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootCanvas: function ()\r\n {\r\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the WebGL Renderer.\r\n *\r\n * @method SpinePlugin#bootWebGL\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootWebGL: function ()\r\n {\r\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\r\n\r\n var setBlendMode = function (srcBlend, dstBlend)\r\n {\r\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\r\n {\r\n var gl = this.context.gl;\r\n\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n\r\n if (this.isDrawing)\r\n {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n }\r\n };\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (!sceneRenderer)\r\n {\r\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n sceneRenderer.batcher.setBlendMode = setBlendMode;\r\n sceneRenderer.shapes.setBlendMode = setBlendMode;\r\n\r\n this.renderer.spineSceneRenderer = sceneRenderer;\r\n }\r\n\r\n // All scene share the same instance\r\n this.sceneRenderer = sceneRenderer;\r\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer;\r\n\r\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\r\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasCanvas\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasCanvas: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage());\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasWebGL\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasWebGL: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n var gl = this.sceneRenderer.context.gl;\r\n\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage(), false);\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\r\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\r\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\r\n * outlines around skeleton textures.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\r\n * Loading a file using a key that is already taken will result in a warning.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.spine({\r\n * key: 'mainmenu',\r\n * jsonURL: 'boy.json',\r\n * atlasURL: 'boy.atlas',\r\n * preMultipliedAlpha: true\r\n * });\r\n * ```\r\n *\r\n * If you need to load multiple Spine atlas files, provide them as an array:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\r\n * }\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the data from the Spine plugin.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spine\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.19.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {object} [settings] - An external Settings configuration object { prefix: '' }\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\r\n {\r\n var multifile;\r\n settings = settings || {};\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new SpineFile(this, key[i]);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#worldToLocal\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The screen space x coordinate to convert.\r\n * @param {number} y - The screen space y coordinate to convert.\r\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\r\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\r\n *\r\n * @return {spine.Vector2} A Vector2 containing the translated point.\r\n */\r\n worldToLocal: function (x, y, skeleton, bone)\r\n {\r\n var temp1 = this.temp1;\r\n var temp2 = this.temp2;\r\n var camera = this.sceneRenderer.camera;\r\n\r\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\r\n\r\n var width = camera.viewportWidth;\r\n var height = camera.viewportHeight;\r\n\r\n camera.screenToWorld(temp1, width, height);\r\n\r\n if (bone && bone.parent !== null)\r\n {\r\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\r\n\r\n return new Spine.Vector2(temp2.x, temp2.y);\r\n }\r\n else if (bone)\r\n {\r\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\r\n }\r\n else\r\n {\r\n return new Spine.Vector2(temp1.x, temp1.y);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x and y values.\r\n *\r\n * @method SpinePlugin#getVector2\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector2: function (x, y)\r\n {\r\n return new Spine.Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x, y and z values.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#getVector3\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n * @param {number} z - The Vector z value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector3: function (x, y, z)\r\n {\r\n return new Spine.webgl.Vector3(x, y, z);\r\n },\r\n\r\n /**\r\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBones\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBones: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBones = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugRegionAttachments\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugRegionAttachments: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawRegionAttachments = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBoundingBoxes\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBoundingBoxes: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshHull\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshHull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshHull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshTriangles\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshTriangles: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshTriangles = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugPaths\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugPaths: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawPaths = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugSkeletonXY\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugSkeletonXY: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawSkeletonXY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugClipping\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugClipping: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawClipping = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the given vertex effect on the Spine Skeleton Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setEffect\r\n * @since 3.19.0\r\n *\r\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setEffect: function (effect)\r\n {\r\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\r\n *\r\n * The Skeleton data should have already been loaded before calling this method.\r\n *\r\n * @method SpinePlugin#createSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\r\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\r\n *\r\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\r\n */\r\n createSkeleton: function (key, skeletonJSON)\r\n {\r\n var atlasKey = key;\r\n var jsonKey = key;\r\n var split = (key.indexOf('.') !== -1);\r\n\r\n if (split)\r\n {\r\n var parts = key.split('.');\r\n\r\n atlasKey = parts.shift();\r\n jsonKey = parts.join('.');\r\n }\r\n\r\n var atlasData = this.cache.get(atlasKey);\r\n var atlas = this.getAtlas(atlasKey);\r\n\r\n if (!atlas)\r\n {\r\n return null;\r\n }\r\n\r\n if (!this.spineTextures.has(atlasKey))\r\n {\r\n this.spineTextures.add(atlasKey, atlas);\r\n }\r\n\r\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\r\n\r\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\r\n\r\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\r\n\r\n var data;\r\n\r\n if (skeletonJSON)\r\n {\r\n data = skeletonJSON;\r\n }\r\n else\r\n {\r\n var json = this.json.get(atlasKey);\r\n\r\n data = (split) ? GetValue(json, jsonKey) : json;\r\n }\r\n\r\n if (data)\r\n {\r\n var skeletonData = skeletonJson.readSkeletonData(data);\r\n\r\n var skeleton = new Spine.Skeleton(skeletonData);\r\n\r\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Animation State and Animation State Data for the given skeleton.\r\n *\r\n * The returned object contains two properties: `state` and `stateData` respectively.\r\n *\r\n * @method SpinePlugin#createAnimationState\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\r\n *\r\n * @return {any} An object containing the Animation State and Animation State Data instances.\r\n */\r\n createAnimationState: function (skeleton)\r\n {\r\n var stateData = new Spine.AnimationStateData(skeleton.data);\r\n\r\n var state = new Spine.AnimationState(stateData);\r\n\r\n return { stateData: stateData, state: state };\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpinePlugin#getBounds\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function (skeleton)\r\n {\r\n var offset = new Spine.Vector2();\r\n var size = new Spine.Vector2();\r\n\r\n skeleton.getBounds(offset, size, []);\r\n\r\n return { offset: offset, size: size };\r\n },\r\n\r\n /**\r\n * Internal handler for when the renderer resizes.\r\n *\r\n * Only called if running in WebGL.\r\n *\r\n * @method SpinePlugin#onResize\r\n * @since 3.19.0\r\n */\r\n onResize: function ()\r\n {\r\n var renderer = this.renderer;\r\n var sceneRenderer = this.sceneRenderer;\r\n\r\n var viewportWidth = renderer.width;\r\n var viewportHeight = renderer.height;\r\n\r\n sceneRenderer.camera.position.x = viewportWidth / 2;\r\n sceneRenderer.camera.position.y = viewportHeight / 2;\r\n\r\n sceneRenderer.camera.setViewport(viewportWidth, viewportHeight);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n *\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method SpinePlugin#shutdown\r\n * @private\r\n * @since 3.19.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n if (this.isWebGL)\r\n {\r\n this.game.scale.off(ResizeEvent, this.onResize, this);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n *\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method SpinePlugin#destroy\r\n * @private\r\n * @since 3.19.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.cache = null;\r\n this.spineTextures = null;\r\n this.json = null;\r\n this.textures = null;\r\n this.skeletonRenderer = null;\r\n this.gl = null;\r\n },\r\n\r\n /**\r\n * The Game that owns this plugin is being destroyed.\r\n *\r\n * Dispose of the Scene Renderer and remove the Game Objects.\r\n *\r\n * @method SpinePlugin#gameDestroy\r\n * @private\r\n * @since 3.50.0\r\n */\r\n gameDestroy: function ()\r\n {\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n this.pluginManager.removeGameObject('spineContainer', true, true);\r\n\r\n this.pluginManager = null;\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (sceneRenderer)\r\n {\r\n sceneRenderer.dispose();\r\n }\r\n\r\n this.renderer.spineSceneRenderer = null;\r\n this.sceneRenderer = null;\r\n }\r\n\r\n});\r\n\r\nSpinePlugin.SpineGameObject = SpineGameObject;\r\nSpinePlugin.SpineContainer = SpineContainer;\r\n\r\n/**\r\n * Creates a new Spine Game Object and adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\r\n *\r\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\r\n *\r\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\r\n * name, then use `SpinePlugin.make` instead.\r\n *\r\n * @method SpinePlugin#add\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\n/**\r\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 500, y: 500, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-idle', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * @method SpinePlugin#make\r\n * @since 3.19.0\r\n *\r\n * @param {any} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\nmodule.exports = SpinePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../../src/utils/Class');\r\nvar Container = require('../../../../src/gameobjects/container/Container');\r\nvar SpineContainerRender = require('./SpineContainerRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\r\n *\r\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\r\n * for Spine Game Objects. You must only add ever Spine Game Objects, or other Spine Containers, to this type of Container.\r\n * Although Phaser will not prevent you from adding other types, they will not render and are likely to throw runtime errors.\r\n *\r\n * To create one in a Scene, use the factory methods:\r\n *\r\n * ```javascript\r\n * this.add.spineContainer();\r\n * ```\r\n *\r\n * or\r\n *\r\n * ```javascript\r\n * this.make.spineContainer();\r\n * ```\r\n *\r\n * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\r\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\r\n * Spine Containers. In short, if you need masking, don't mix and match the types.\r\n *\r\n * See the Container documentation for further details about what Containers can do.\r\n *\r\n * @class SpineContainer\r\n * @extends Phaser.GameObjects.Container\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\r\n */\r\nvar SpineContainer = new Class({\r\n\r\n Extends: Container,\r\n\r\n Mixins: [\r\n SpineContainerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineContainer (scene, plugin, x, y, children)\r\n {\r\n Container.call(this, scene, x, y, children);\r\n\r\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\r\n this.type = 'Spine';\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineContainer#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.50.0\r\n */\r\n this.plugin = plugin;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineContainer#preDestroy\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineContainer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n camera.addToRenderList(container);\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = SpineContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AngleBetween = require('../../../../src/math/angle/Between');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar Class = require('../../../../src/utils/Class');\r\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\r\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\r\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\r\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\r\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\r\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar DegToRad = require('../../../../src/math/DegToRad');\r\nvar GameObject = require('../../../../src/gameobjects/GameObject');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar SpineEvents = require('../events/');\r\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\r\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\r\n * easily change the skin, slot attachment, bone positions and more.\r\n *\r\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\r\n * You can only create them if the Spine plugin has been loaded into Phaser.\r\n *\r\n * The quickest way is the Game Object Factory:\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\r\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\r\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\r\n * animation to loop. Look at the documentation for further details on each of these options.\r\n *\r\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\r\n * Configuration object:\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 512, y: 550, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-think', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\r\n * overall scale.\r\n *\r\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\r\n * update and render, it must be added to the display and update lists of your Scene:\r\n *\r\n * ```javascript\r\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\r\n * this.sys.displayList.add(jelly);\r\n * this.sys.updateList.add(jelly);\r\n * ```\r\n *\r\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\r\n * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup\r\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\r\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\r\n * input shape being created. If it's not suitable, provide your own shape to the `setInteractive` method.\r\n *\r\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\r\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\r\n * Object position with it. See the examples for further details.\r\n *\r\n * If your Spine Game Object has black outlines around the different parts of the texture when it\r\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\r\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\r\n *\r\n * @class SpineGameObject\r\n * @extends Phaser.GameObjects.GameObject\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n */\r\nvar SpineGameObject = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsComputedSize,\r\n ComponentsDepth,\r\n ComponentsFlip,\r\n ComponentsScrollFactor,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n SpineGameObjectRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\r\n {\r\n GameObject.call(this, scene, 'Spine');\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineGameObject#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.19.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The Spine Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeleton\r\n * @type {spine.Skeleton}\r\n * @since 3.19.0\r\n */\r\n this.skeleton = null;\r\n\r\n /**\r\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeletonData\r\n * @type {spine.SkeletonData}\r\n * @since 3.19.0\r\n */\r\n this.skeletonData = null;\r\n\r\n /**\r\n * The Spine Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#state\r\n * @type {spine.AnimationState}\r\n * @since 3.19.0\r\n */\r\n this.state = null;\r\n\r\n /**\r\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#stateData\r\n * @type {spine.AnimationStateData}\r\n * @since 3.19.0\r\n */\r\n this.stateData = null;\r\n\r\n /**\r\n * A reference to the root bone of the Skeleton.\r\n *\r\n * @name SpineGameObject#root\r\n * @type {spine.Bone}\r\n * @since 3.19.0\r\n */\r\n this.root = null;\r\n\r\n /**\r\n * This object holds the calculated bounds of the current\r\n * pose, as set when a new Skeleton is applied.\r\n *\r\n * @name SpineGameObject#bounds\r\n * @type {any}\r\n * @since 3.19.0\r\n */\r\n this.bounds = null;\r\n\r\n /**\r\n * A Game Object level flag that allows you to enable debug drawing\r\n * to the Skeleton Debug Renderer by toggling it.\r\n *\r\n * @name SpineGameObject#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The factor to scale the Animation update time by.\r\n *\r\n * @name SpineGameObject#timeScale\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginX\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginY\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * A flag that stores if the texture associated with the current\r\n * Skin being used by this Game Object, has its alpha pre-multiplied\r\n * into it, or not.\r\n *\r\n * @name SpineGameObject#preMultipliedAlpha\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.preMultipliedAlpha = false;\r\n\r\n /**\r\n * A default Blend Mode. You cannot change the blend mode of a\r\n * Spine Game Object.\r\n *\r\n * @name SpineGameObject#blendMode\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.blendMode = -1;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key)\r\n {\r\n this.setSkeleton(key, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Returns `true` if this Spine Game Object both has a skeleton and\r\n * also passes the render tests for the given Camera.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n *\r\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function (camera, container)\r\n {\r\n var GameObjectRenderMask = 15;\r\n\r\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\r\n\r\n if (!container && !result && this.parentContainer)\r\n {\r\n var plugin = this.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\r\n {\r\n sceneRenderer.end();\r\n\r\n plugin.renderer.pipelines.rebind();\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Set the Alpha level for the whole Skeleton of this Game Object.\r\n *\r\n * The alpha controls the opacity of the Game Object as it renders.\r\n *\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method SpineGameObject#setAlpha\r\n * @since 3.19.0\r\n *\r\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value, slotName)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n slot.color.a = Clamp(value, 0, 1);\r\n }\r\n }\r\n else\r\n {\r\n this.alpha = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#alpha\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.a = v;\r\n }\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~2;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 2;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of red used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#red\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.r = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of green used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#green\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.g = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of blue used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#blue\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.b = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\r\n *\r\n * @method SpineGameObject#setColor\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\r\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setColor: function (color, slotName)\r\n {\r\n if (color === undefined) { color = 0xffffff; }\r\n\r\n var red = (color >> 16 & 0xFF) / 255;\r\n var green = (color >> 8 & 0xFF) / 255;\r\n var blue = (color & 0xFF) / 255;\r\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\r\n\r\n var target = this.skeleton;\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n target = slot;\r\n }\r\n }\r\n\r\n target.color.r = red;\r\n target.color.g = green;\r\n target.color.b = blue;\r\n\r\n if (alpha !== null)\r\n {\r\n target.color.a = alpha;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\r\n * that contains the Skeleton data.\r\n *\r\n * @method SpineGameObject#setSkeletonFromJSON\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\r\n {\r\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on its cache key.\r\n *\r\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\r\n * or slot attachment, or any other property to adjust it.\r\n *\r\n * @method SpineGameObject#setSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\r\n\r\n this.skeletonData = data.skeletonData;\r\n\r\n this.preMultipliedAlpha = data.preMultipliedAlpha;\r\n\r\n var skeleton = data.skeleton;\r\n\r\n skeleton.setSkin();\r\n skeleton.setToSetupPose();\r\n\r\n this.skeleton = skeleton;\r\n\r\n // AnimationState\r\n data = this.plugin.createAnimationState(skeleton);\r\n\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.state = data.state;\r\n this.stateData = data.stateData;\r\n\r\n this.state.addListener({\r\n event: this.onEvent.bind(this),\r\n complete: this.onComplete.bind(this),\r\n start: this.onStart.bind(this),\r\n end: this.onEnd.bind(this),\r\n dispose: this.onDispose.bind(this),\r\n interrupted: this.onInterrupted.bind(this)\r\n });\r\n\r\n if (animationName)\r\n {\r\n this.setAnimation(0, animationName, loop);\r\n }\r\n\r\n this.root = this.getRootBone();\r\n\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.state.apply(skeleton);\r\n\r\n skeleton.updateCache();\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onComplete event via this Game Object.\r\n *\r\n * @method SpineGameObject#onComplete\r\n * @fires SpinePluginEvents#COMPLETE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onComplete: function (entry)\r\n {\r\n this.emit(SpineEvents.COMPLETE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onDispose event via this Game Object.\r\n *\r\n * @method SpineGameObject#onDispose\r\n * @fires SpinePluginEvents#DISPOSE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onDispose: function (entry)\r\n {\r\n this.emit(SpineEvents.DISPOSE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onEnd event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEnd\r\n * @fires SpinePluginEvents#END\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onEnd: function (entry)\r\n {\r\n this.emit(SpineEvents.END, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine Event event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEvent\r\n * @fires SpinePluginEvents#EVENT\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n * @param {spine.Event} event - The Spine event.\r\n */\r\n onEvent: function (entry, event)\r\n {\r\n this.emit(SpineEvents.EVENT, entry, event);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\r\n *\r\n * @method SpineGameObject#onInterrupted\r\n * @fires SpinePluginEvents#INTERRUPTED\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onInterrupted: function (entry)\r\n {\r\n this.emit(SpineEvents.INTERRUPTED, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onStart event via this Game Object.\r\n *\r\n * @method SpineGameObject#onStart\r\n * @fires SpinePluginEvents#START\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onStart: function (entry)\r\n {\r\n this.emit(SpineEvents.START, entry);\r\n },\r\n\r\n /**\r\n * Refreshes the data about the current Skeleton.\r\n *\r\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\r\n *\r\n * Call this method if you need to access the Skeleton data directly, and it may have changed\r\n * recently.\r\n *\r\n * @method SpineGameObject#refresh\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n refresh: function ()\r\n {\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.updateSize();\r\n\r\n this.skeleton.updateCache();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n *\r\n * If no arguments are given it uses the current skeleton data dimensions.\r\n *\r\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\r\n * when the skeleton data doesn't match what is required in-game.\r\n *\r\n * @method SpineGameObject#setSize\r\n * @since 3.19.0\r\n *\r\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\r\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSize: function (width, height, offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (width === undefined) { width = skeleton.data.width; }\r\n if (height === undefined) { height = skeleton.data.height; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of this Game Object from the Skeleton position.\r\n *\r\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\r\n *\r\n * @method SpineGameObject#setOffset\r\n * @since 3.19.0\r\n *\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setOffset: function (offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\r\n * It then syncs the skeleton bounds back to this Game Object.\r\n *\r\n * This method is called automatically as needed internally, however, it's also exposed should\r\n * you require overriding the size settings.\r\n *\r\n * @method SpineGameObject#updateSize\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n updateSize: function ()\r\n {\r\n var skeleton = this.skeleton;\r\n var renderer = this.plugin.renderer;\r\n\r\n var height = renderer.height;\r\n\r\n var oldScaleX = this.scaleX;\r\n var oldScaleY = this.scaleY;\r\n\r\n skeleton.x = this.x;\r\n skeleton.y = height - this.y;\r\n skeleton.scaleX = 1;\r\n skeleton.scaleY = 1;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n var bounds = this.getBounds();\r\n\r\n this.width = bounds.size.x;\r\n this.height = bounds.size.y;\r\n\r\n this.displayOriginX = this.x - bounds.offset.x;\r\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\r\n\r\n skeleton.scaleX = oldScaleX;\r\n skeleton.scaleY = oldScaleY;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the bones in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getBoneList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\r\n */\r\n getBoneList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.bones.length; i++)\r\n {\r\n output.push(skeletonData.bones[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the skins in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getSkinList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\r\n */\r\n getSkinList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.skins.length; i++)\r\n {\r\n output.push(skeletonData.skins[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the slots in the Skeleton.\r\n *\r\n * @method SpineGameObject#getSlotList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\r\n */\r\n getSlotList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeleton = this.skeleton;\r\n\r\n for (var i = 0; i < skeleton.slots.length; i++)\r\n {\r\n output.push(skeleton.slots[i].data.name);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the animations in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getAnimationList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\r\n */\r\n getAnimationList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.animations.length; i++)\r\n {\r\n output.push(skeletonData.animations[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the current animation being played on the given track, if any.\r\n *\r\n * @method SpineGameObject#getCurrentAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\r\n *\r\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\r\n */\r\n getCurrentAnimation: function (trackIndex)\r\n {\r\n if (trackIndex === undefined) { trackIndex = 0; }\r\n\r\n var current = this.state.getCurrent(trackIndex);\r\n\r\n if (current)\r\n {\r\n return current.animation;\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#play\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\r\n */\r\n play: function (animationName, loop, ignoreIfPlaying)\r\n {\r\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#setAnimation\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to play the animation on.\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n\r\n if (ignoreIfPlaying && this.state)\r\n {\r\n var currentTrack = this.state.getCurrent(trackIndex);\r\n\r\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (this.findAnimation(animationName))\r\n {\r\n return this.state.setAnimation(trackIndex, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an animation to be played after the current or last queued animation for a track.\r\n * If the track is empty, it is equivalent to calling setAnimation.\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\r\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\r\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\r\n * If the previous entry is looping, its next loop completion is used instead of its duration.\r\n *\r\n * @method SpineGameObject#addAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {string} animationName - The string-based key of the animation to add.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n addAnimation: function (trackIndex, animationName, loop, delay)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (delay === undefined) { delay = 0; }\r\n\r\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\r\n },\r\n\r\n /**\r\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\r\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n *\r\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\r\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\r\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\r\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\r\n * A mix duration of 0 still mixes out over one frame.\r\n *\r\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\r\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\r\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\r\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\r\n * property to the value keyed in the new animation.\r\n *\r\n * @method SpineGameObject#setEmptyAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {spine.TrackEntry} The returned Track Entry.\r\n */\r\n setEmptyAnimation: function (trackIndex, mixDuration)\r\n {\r\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\r\n },\r\n\r\n /**\r\n * Removes all animations from the track, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTrack\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTrack: function (trackIndex)\r\n {\r\n this.state.clearTrack(trackIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all animations from all tracks, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTracks\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTracks: function ()\r\n {\r\n this.state.clearTracks();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkinByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to set.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkinByName: function (skinName)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkinByName(skinName);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkin\r\n * @since 3.19.0\r\n *\r\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkin: function (newSkin)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkin(newSkin);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mix duration when changing from the specified animation to the other.\r\n *\r\n * @method SpineGameObject#setMix\r\n * @since 3.19.0\r\n *\r\n * @param {string} fromName - The animation to mix from.\r\n * @param {string} toName - The animation to mix to.\r\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMix: function (fromName, toName, duration)\r\n {\r\n this.stateData.setMix(fromName, toName, duration);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot\r\n * index and attachment name. First the skin is checked and if the attachment was not found,\r\n * the default skin is checked.\r\n *\r\n * @method SpineGameObject#getAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {integer} slotIndex - The slot index to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachment: function (slotIndex, attachmentName)\r\n {\r\n return this.skeleton.getAttachment(slotIndex, attachmentName);\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\r\n *\r\n * @method SpineGameObject#getAttachmentByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachmentByName: function (slotName, attachmentName)\r\n {\r\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n },\r\n\r\n /**\r\n * A convenience method to set an attachment by finding the slot with findSlot,\r\n * finding the attachment with getAttachment, then setting the slot's attachment.\r\n *\r\n * @method SpineGameObject#setAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to add the attachment to.\r\n * @param {string} attachmentName - The attachment name to add.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAttachment: function (slotName, attachmentName)\r\n {\r\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\r\n {\r\n for (var i = 0; i < slotName.length; i++)\r\n {\r\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\r\n }\r\n }\r\n else\r\n {\r\n this.skeleton.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setToSetupPose: function ()\r\n {\r\n this.skeleton.setToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the slots and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setSlotsToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSlotsToSetupPose: function ()\r\n {\r\n this.skeleton.setSlotsToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones and constraints to their setup pose values.\r\n *\r\n * @method SpineGameObject#setBonesToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBonesToSetupPose: function ()\r\n {\r\n this.skeleton.setBonesToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the root bone, or null.\r\n *\r\n * @method SpineGameObject#getRootBone\r\n * @since 3.19.0\r\n *\r\n * @return {spine.Bone} The root bone, or null.\r\n */\r\n getRootBone: function ()\r\n {\r\n return this.skeleton.getRootBone();\r\n },\r\n\r\n /**\r\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\r\n * towards the given position. You can set an optional angle offset, should the bone be\r\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\r\n *\r\n * @method SpineGameObject#angleBoneToXY\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\r\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\r\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\r\n * @param {number} [offset=0] - An offset to add to the rotation angle.\r\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\r\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n if (minAngle === undefined) { minAngle = 0; }\r\n if (maxAngle === undefined) { maxAngle = 360; }\r\n\r\n var renderer = this.plugin.renderer;\r\n var height = renderer.height;\r\n\r\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\r\n\r\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBone\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {spine.Bone} The bone, or null.\r\n */\r\n findBone: function (boneName)\r\n {\r\n return this.skeleton.findBone(boneName);\r\n },\r\n\r\n /**\r\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBoneIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {integer} The bone index. Or -1 if the bone was not found.\r\n */\r\n findBoneIndex: function (boneName)\r\n {\r\n return this.skeleton.findBoneIndex(boneName);\r\n },\r\n\r\n /**\r\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlot\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {spine.Slot} The Slot. May be null.\r\n */\r\n findSlot: function (slotName)\r\n {\r\n return this.skeleton.findSlot(slotName);\r\n },\r\n\r\n /**\r\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlotIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {integer} The slot index. Or -1 if the Slot was not found.\r\n */\r\n findSlotIndex: function (slotName)\r\n {\r\n return this.skeleton.findSlotIndex(slotName);\r\n },\r\n\r\n /**\r\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\r\n * this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSkin\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to find.\r\n *\r\n * @return {spine.Skin} The Skin. May be null.\r\n */\r\n findSkin: function (skinName)\r\n {\r\n return this.skeletonData.findSkin(skinName);\r\n },\r\n\r\n /**\r\n * Finds an event by comparing each events's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findEvent\r\n * @since 3.19.0\r\n *\r\n * @param {string} eventDataName - The name of the event to find.\r\n *\r\n * @return {spine.EventData} The Event Data. May be null.\r\n */\r\n findEvent: function (eventDataName)\r\n {\r\n return this.skeletonData.findEvent(eventDataName);\r\n },\r\n\r\n /**\r\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The name of the animation to find.\r\n *\r\n * @return {spine.Animation} The Animation. May be null.\r\n */\r\n findAnimation: function (animationName)\r\n {\r\n return this.skeletonData.findAnimation(animationName);\r\n },\r\n\r\n /**\r\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findIkConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.IkConstraintData} The IK constraint. May be null.\r\n */\r\n findIkConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findIkConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds an transform constraint by comparing each transform constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findTransformConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\r\n */\r\n findTransformConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findTransformConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.PathConstraintData} The path constraint. May be null.\r\n */\r\n findPathConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds the index of a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraintIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\r\n */\r\n findPathConstraintIndex: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraintIndex(constraintName);\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpineGameObject#getBounds\r\n * @since 3.19.0\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function ()\r\n {\r\n return this.plugin.getBounds(this.skeleton);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method SpineGameObject#preUpdate\r\n * @protected\r\n * @since 3.19.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n this.state.update((delta / 1000) * this.timeScale);\r\n\r\n this.state.apply(skeleton);\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineGameObject#preDestroy\r\n * @protected\r\n * @since 3.19.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.plugin = null;\r\n\r\n this.skeleton = null;\r\n this.skeletonData = null;\r\n\r\n this.state = null;\r\n this.stateData = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderCanvas\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatrix)\r\n{\r\n var context = renderer.currentContext;\r\n\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var skeletonRenderer = plugin.skeletonRenderer;\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n camera.addToRenderList(src);\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n\r\n // Inverse or we get upside-down skeletons\r\n skeleton.scaleY = calcMatrix.scaleY * -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n if (camera.renderToTexture)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n skeletonRenderer.ctx = context;\r\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\r\n\r\n context.save();\r\n\r\n skeletonRenderer.draw(skeleton);\r\n\r\n context.restore();\r\n};\r\n\r\nmodule.exports = SpineGameObjectCanvasRenderer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Global constants.\r\n *\r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Phaser Release Version\r\n *\r\n * @name Phaser.VERSION\r\n * @const\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n VERSION: '3.60.0-beta.20',\r\n\r\n BlendModes: require('./renderer/BlendModes'),\r\n\r\n ScaleModes: require('./renderer/ScaleModes'),\r\n\r\n /**\r\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\r\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\r\n *\r\n * @name Phaser.AUTO\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n AUTO: 0,\r\n\r\n /**\r\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\r\n * WebGL or not.\r\n *\r\n * @name Phaser.CANVAS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n CANVAS: 1,\r\n\r\n /**\r\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\r\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\r\n * message to the user.\r\n *\r\n * @name Phaser.WEBGL\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n WEBGL: 2,\r\n\r\n /**\r\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\r\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\r\n * not for running Phaser on the server, which is something you really shouldn't do.\r\n *\r\n * @name Phaser.HEADLESS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n HEADLESS: 3,\r\n\r\n /**\r\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\r\n * to help you remember what the value is doing in your code.\r\n *\r\n * @name Phaser.FOREVER\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FOREVER: -1,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.NONE\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n NONE: 4,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.UP\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n UP: 5,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.DOWN\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DOWN: 6,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.LEFT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LEFT: 7,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.RIGHT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 8\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n *\r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once(Events.DESTROY, this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n *\r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {number} [data=1] - The amount to increase the given key by. Pass a negative value to decrease the key.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n\r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n *\r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n *\r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n *\r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.on('changedata', listener)`.\r\n *\r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Data Manager Destroy Event.\r\n *\r\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\r\n *\r\n * @event Phaser.Data.Events#DESTROY\r\n * @type {string}\r\n * @since 3.50.0\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.audio` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Audio\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} audioData - Can this device play HTML Audio tags?\r\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\r\n * @property {boolean} m4a - Can this device can play m4a files.\r\n * @property {boolean} aac - Can this device can play aac files.\r\n * @property {boolean} flac - Can this device can play flac files.\r\n * @property {boolean} mp3 - Can this device play mp3 files?\r\n * @property {boolean} ogg - Can this device play ogg files?\r\n * @property {boolean} opus - Can this device play opus files?\r\n * @property {boolean} wav - Can this device play wav files?\r\n * @property {boolean} webAudio - Does this device have the Web Audio API?\r\n * @property {boolean} webm - Can this device play webm files?\r\n */\r\nvar Audio = {\r\n\r\n flac: false,\r\n aac: false,\r\n audioData: false,\r\n dolby: false,\r\n m4a: false,\r\n mp3: false,\r\n ogg: false,\r\n opus: false,\r\n wav: false,\r\n webAudio: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Audio;\r\n }\r\n\r\n Audio.audioData = !!(window['Audio']);\r\n\r\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\r\n\r\n var audioElement = document.createElement('audio');\r\n var result = !!audioElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n var CanPlay = function (type1, type2)\r\n {\r\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\r\n\r\n if (type2)\r\n {\r\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\r\n }\r\n else\r\n {\r\n return Boolean(canPlayType1);\r\n }\r\n };\r\n\r\n // wav Mimetypes accepted:\r\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\r\n\r\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\r\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\r\n Audio.mp3 = CanPlay('mpeg');\r\n Audio.wav = CanPlay('wav');\r\n Audio.m4a = CanPlay('x-m4a');\r\n Audio.aac = CanPlay('aac');\r\n Audio.flac = CanPlay('flac', 'x-flac');\r\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\r\n\r\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\r\n {\r\n if (Browser.edge)\r\n {\r\n Audio.dolby = true;\r\n }\r\n else if (Browser.safari && Browser.safariVersion >= 9)\r\n {\r\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\r\n {\r\n var major = parseInt(RegExp.$1, 10);\r\n var minor = parseInt(RegExp.$2, 10);\r\n\r\n if ((major === 10 && minor >= 11) || major > 10)\r\n {\r\n Audio.dolby = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do here\r\n }\r\n\r\n return Audio;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\n\r\n/**\r\n * Determines the browser type and version running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.browser` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Browser\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} chrome - Set to true if running in Chrome.\r\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\r\n * @property {boolean} firefox - Set to true if running in Firefox.\r\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\r\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\r\n * @property {boolean} opera - Set to true if running in Opera.\r\n * @property {boolean} safari - Set to true if running in Safari.\r\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\r\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\r\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\r\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\r\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\r\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\r\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\r\n */\r\nvar Browser = {\r\n\r\n chrome: false,\r\n chromeVersion: 0,\r\n edge: false,\r\n firefox: false,\r\n firefoxVersion: 0,\r\n ie: false,\r\n ieVersion: 0,\r\n mobileSafari: false,\r\n opera: false,\r\n safari: false,\r\n safariVersion: 0,\r\n silk: false,\r\n trident: false,\r\n tridentVersion: 0,\r\n es2019: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Edg\\/\\d+/).test(ua))\r\n {\r\n Browser.edge = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/OPR/).test(ua))\r\n {\r\n Browser.opera = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.chrome = true;\r\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.chromeVersion > 69);\r\n }\r\n else if ((/Firefox\\D+(\\d+)/).test(ua))\r\n {\r\n Browser.firefox = true;\r\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.firefoxVersion > 10);\r\n }\r\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\r\n {\r\n Browser.mobileSafari = true;\r\n }\r\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.ieVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.safari = true;\r\n Browser.safariVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.safariVersion > 10);\r\n }\r\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.trident = true;\r\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\r\n Browser.ieVersion = parseInt(RegExp.$3, 10);\r\n }\r\n\r\n // Silk gets its own if clause because its ua also contains 'Safari'\r\n if ((/Silk/).test(ua))\r\n {\r\n Browser.silk = true;\r\n }\r\n\r\n return Browser;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the canvas features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.CanvasFeatures\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\r\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\r\n */\r\nvar CanvasFeatures = {\r\n\r\n supportInverseAlpha: false,\r\n supportNewBlendModes: false\r\n\r\n};\r\n\r\nfunction checkBlendMode ()\r\n{\r\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\r\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\r\n\r\n var magenta = new Image();\r\n\r\n magenta.onload = function ()\r\n {\r\n var yellow = new Image();\r\n\r\n yellow.onload = function ()\r\n {\r\n var canvas = CanvasPool.create2D(yellow, 6);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.globalCompositeOperation = 'multiply';\r\n\r\n context.drawImage(magenta, 0, 0);\r\n context.drawImage(yellow, 2, 0);\r\n\r\n if (!context.getImageData(2, 0, 1, 1))\r\n {\r\n return false;\r\n }\r\n\r\n var data = context.getImageData(2, 0, 1, 1).data;\r\n\r\n CanvasPool.remove(yellow);\r\n\r\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\r\n };\r\n\r\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\r\n };\r\n\r\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\r\n\r\n return false;\r\n}\r\n\r\nfunction checkInverseAlpha ()\r\n{\r\n var canvas = CanvasPool.create2D(this, 2);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\r\n\r\n // Draw a single pixel\r\n context.fillRect(0, 0, 1, 1);\r\n\r\n // Get the color values\r\n var s1 = context.getImageData(0, 0, 1, 1);\r\n\r\n if (s1 === null)\r\n {\r\n return false;\r\n }\r\n\r\n // Plot them to x2\r\n context.putImageData(s1, 1, 0);\r\n\r\n // Get those values\r\n var s2 = context.getImageData(1, 0, 1, 1);\r\n\r\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\r\n\r\n CanvasPool.remove(this);\r\n\r\n // Compare and return\r\n return result;\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts !== 'function' && document !== undefined)\r\n {\r\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\r\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\r\n }\r\n\r\n return CanvasFeatures;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\nvar Browser = require('./Browser');\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.features` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Features\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} canvas - Is canvas available?\r\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\r\n * @property {boolean} file - Is file available?\r\n * @property {boolean} fileSystem - Is fileSystem available?\r\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\r\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\r\n * @property {boolean} localStorage - Is localStorage available?\r\n * @property {boolean} pointerLock - Is Pointer Lock available?\r\n * @property {boolean} stableSort - Is Array.sort stable?\r\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\r\n * @property {boolean} vibration - Does the device support the Vibration API?\r\n * @property {boolean} webGL - Is webGL available?\r\n * @property {boolean} worker - Is worker available?\r\n */\r\nvar Features = {\r\n\r\n canvas: false,\r\n canvasBitBltShift: null,\r\n file: false,\r\n fileSystem: false,\r\n getUserMedia: true,\r\n littleEndian: false,\r\n localStorage: false,\r\n pointerLock: false,\r\n stableSort: false,\r\n support32bit: false,\r\n vibration: false,\r\n webGL: false,\r\n worker: false\r\n\r\n};\r\n\r\n// Check Little or Big Endian system.\r\n// @author Matt DesLauriers (@mattdesl)\r\nfunction checkIsLittleEndian ()\r\n{\r\n var a = new ArrayBuffer(4);\r\n var b = new Uint8Array(a);\r\n var c = new Uint32Array(a);\r\n\r\n b[0] = 0xa1;\r\n b[1] = 0xb2;\r\n b[2] = 0xc3;\r\n b[3] = 0xd4;\r\n\r\n if (c[0] === 0xd4c3b2a1)\r\n {\r\n return true;\r\n }\r\n\r\n if (c[0] === 0xa1b2c3d4)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n // Could not determine endianness\r\n return null;\r\n }\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Features;\r\n }\r\n\r\n Features.canvas = !!window['CanvasRenderingContext2D'];\r\n\r\n try\r\n {\r\n Features.localStorage = !!localStorage.getItem;\r\n }\r\n catch (error)\r\n {\r\n Features.localStorage = false;\r\n }\r\n\r\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\r\n Features.fileSystem = !!window['requestFileSystem'];\r\n\r\n var isUint8 = false;\r\n\r\n var testWebGL = function ()\r\n {\r\n if (window['WebGLRenderingContext'])\r\n {\r\n try\r\n {\r\n var canvas = CanvasPool.createWebGL(this);\r\n\r\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\r\n\r\n var canvas2D = CanvasPool.create2D(this);\r\n\r\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\r\n\r\n // Can't be done on a webgl context\r\n var image = ctx2D.createImageData(1, 1);\r\n\r\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\r\n // @author Matt DesLauriers (@mattdesl)\r\n isUint8 = image.data instanceof Uint8ClampedArray;\r\n\r\n CanvasPool.remove(canvas);\r\n CanvasPool.remove(canvas2D);\r\n\r\n return !!ctx;\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n Features.webGL = testWebGL();\r\n\r\n Features.worker = !!window['Worker'];\r\n\r\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\r\n\r\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\r\n\r\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\r\n\r\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\r\n\r\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\r\n if (Browser.firefox && Browser.firefoxVersion < 21)\r\n {\r\n Features.getUserMedia = false;\r\n }\r\n\r\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\r\n // is safer to not try and use the fast copy-over method.\r\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\r\n {\r\n Features.canvasBitBltShift = true;\r\n }\r\n\r\n // Known not to work\r\n if (Browser.safari || Browser.mobileSafari)\r\n {\r\n Features.canvasBitBltShift = false;\r\n }\r\n\r\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\r\n\r\n if (navigator.vibrate)\r\n {\r\n Features.vibration = true;\r\n }\r\n\r\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\r\n {\r\n Features.littleEndian = checkIsLittleEndian();\r\n }\r\n\r\n Features.support32bit = (\r\n typeof ArrayBuffer !== 'undefined' &&\r\n typeof Uint8ClampedArray !== 'undefined' &&\r\n typeof Int32Array !== 'undefined' &&\r\n Features.littleEndian !== null &&\r\n isUint8\r\n );\r\n\r\n return Features;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the full screen support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.fullscreen` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Fullscreen\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} available - Does the browser support the Full Screen API?\r\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\r\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\r\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\r\n */\r\nvar Fullscreen = {\r\n\r\n available: false,\r\n cancel: '',\r\n keyboard: false,\r\n request: ''\r\n\r\n};\r\n\r\n/**\r\n* Checks for support of the Full Screen API.\r\n*\r\n* @ignore\r\n*/\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Fullscreen;\r\n }\r\n\r\n var i;\r\n\r\n var suffix1 = 'Fullscreen';\r\n var suffix2 = 'FullScreen';\r\n\r\n var fs = [\r\n 'request' + suffix1,\r\n 'request' + suffix2,\r\n 'webkitRequest' + suffix1,\r\n 'webkitRequest' + suffix2,\r\n 'msRequest' + suffix1,\r\n 'msRequest' + suffix2,\r\n 'mozRequest' + suffix2,\r\n 'mozRequest' + suffix1\r\n ];\r\n\r\n for (i = 0; i < fs.length; i++)\r\n {\r\n if (document.documentElement[fs[i]])\r\n {\r\n Fullscreen.available = true;\r\n Fullscreen.request = fs[i];\r\n break;\r\n }\r\n }\r\n\r\n var cfs = [\r\n 'cancel' + suffix2,\r\n 'exit' + suffix1,\r\n 'webkitCancel' + suffix2,\r\n 'webkitExit' + suffix1,\r\n 'msCancel' + suffix2,\r\n 'msExit' + suffix1,\r\n 'mozCancel' + suffix2,\r\n 'mozExit' + suffix1\r\n ];\r\n\r\n if (Fullscreen.available)\r\n {\r\n for (i = 0; i < cfs.length; i++)\r\n {\r\n if (document[cfs[i]])\r\n {\r\n Fullscreen.cancel = cfs[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Keyboard Input?\r\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\r\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\r\n {\r\n Fullscreen.keyboard = true;\r\n }\r\n\r\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\r\n\r\n return Fullscreen;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the input support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.input` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Input\r\n * @since 3.0.0\r\n *\r\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\r\n * @property {boolean} gamepads - Is navigator.getGamepads available?\r\n * @property {boolean} mspointer - Is mspointer available?\r\n * @property {boolean} touch - Is touch available?\r\n */\r\nvar Input = {\r\n\r\n gamepads: false,\r\n mspointer: false,\r\n touch: false,\r\n wheelEvent: null\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Input;\r\n }\r\n\r\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\r\n {\r\n Input.touch = true;\r\n }\r\n\r\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\r\n {\r\n Input.mspointer = true;\r\n }\r\n\r\n if (navigator.getGamepads)\r\n {\r\n Input.gamepads = true;\r\n }\r\n\r\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\r\n {\r\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\r\n Input.wheelEvent = 'wheel';\r\n }\r\n else if ('onmousewheel' in window)\r\n {\r\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\r\n Input.wheelEvent = 'mousewheel';\r\n }\r\n else if (Browser.firefox && 'MouseScrollEvent' in window)\r\n {\r\n // FF prior to 17. This should probably be scrubbed.\r\n Input.wheelEvent = 'DOMMouseScroll';\r\n }\r\n\r\n return Input;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the operating system of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.os` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.OS\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} android - Is running on android?\r\n * @property {boolean} chromeOS - Is running on chromeOS?\r\n * @property {boolean} cordova - Is the game running under Apache Cordova?\r\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\r\n * @property {boolean} desktop - Is running on a desktop?\r\n * @property {boolean} ejecta - Is the game running under Ejecta?\r\n * @property {boolean} electron - Is the game running under GitHub Electron?\r\n * @property {boolean} iOS - Is running on iOS?\r\n * @property {boolean} iPad - Is running on iPad?\r\n * @property {boolean} iPhone - Is running on iPhone?\r\n * @property {boolean} kindle - Is running on an Amazon Kindle?\r\n * @property {boolean} linux - Is running on linux?\r\n * @property {boolean} macOS - Is running on macOS?\r\n * @property {boolean} node - Is the game running under Node.js?\r\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\r\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\r\n * @property {boolean} windows - Is running on windows?\r\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\r\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\r\n * @property {number} pixelRatio - PixelRatio of the host device?\r\n */\r\nvar OS = {\r\n\r\n android: false,\r\n chromeOS: false,\r\n cordova: false,\r\n crosswalk: false,\r\n desktop: false,\r\n ejecta: false,\r\n electron: false,\r\n iOS: false,\r\n iOSVersion: 0,\r\n iPad: false,\r\n iPhone: false,\r\n kindle: false,\r\n linux: false,\r\n macOS: false,\r\n node: false,\r\n nodeWebkit: false,\r\n pixelRatio: 1,\r\n webApp: false,\r\n windows: false,\r\n windowsPhone: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return OS;\r\n }\r\n\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Windows/).test(ua))\r\n {\r\n OS.windows = true;\r\n }\r\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\r\n {\r\n // Because iOS 13 identifies as Mac OS:\r\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\r\n {\r\n OS.iOS = true;\r\n OS.iPad = true;\r\n\r\n (navigator.appVersion).match(/Version\\/(\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else\r\n {\r\n OS.macOS = true;\r\n }\r\n }\r\n else if ((/Android/).test(ua))\r\n {\r\n OS.android = true;\r\n }\r\n else if ((/Linux/).test(ua))\r\n {\r\n OS.linux = true;\r\n }\r\n else if ((/iP[ao]d|iPhone/i).test(ua))\r\n {\r\n OS.iOS = true;\r\n\r\n (navigator.appVersion).match(/OS (\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n\r\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\r\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\r\n }\r\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\r\n {\r\n OS.kindle = true;\r\n\r\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\r\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\r\n }\r\n else if ((/CrOS/).test(ua))\r\n {\r\n OS.chromeOS = true;\r\n }\r\n\r\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\r\n {\r\n OS.android = false;\r\n OS.iOS = false;\r\n OS.macOS = false;\r\n OS.windows = true;\r\n OS.windowsPhone = true;\r\n }\r\n\r\n var silk = (/Silk/).test(ua);\r\n\r\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\r\n {\r\n OS.desktop = true;\r\n }\r\n\r\n // Windows Phone / Table reset\r\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\r\n {\r\n OS.desktop = false;\r\n }\r\n\r\n // WebApp mode in iOS\r\n if (navigator.standalone)\r\n {\r\n OS.webApp = true;\r\n }\r\n\r\n if (typeof importScripts !== 'function')\r\n {\r\n if (window.cordova !== undefined)\r\n {\r\n OS.cordova = true;\r\n }\r\n\r\n if (window.ejecta !== undefined)\r\n {\r\n OS.ejecta = true;\r\n }\r\n }\r\n\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\r\n {\r\n OS.node = true;\r\n }\r\n\r\n if (OS.node && typeof process.versions === 'object')\r\n {\r\n OS.nodeWebkit = !!process.versions['node-webkit'];\r\n\r\n OS.electron = !!process.versions.electron;\r\n }\r\n\r\n if ((/Crosswalk/).test(ua))\r\n {\r\n OS.crosswalk = true;\r\n }\r\n\r\n OS.pixelRatio = window['devicePixelRatio'] || 1;\r\n\r\n return OS;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the video support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.video` from within any Scene.\r\n *\r\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\r\n *\r\n * @typedef {object} Phaser.Device.Video\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\r\n * @property {boolean} hls - Can this device play hls video files?\r\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\r\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\r\n * @property {boolean} ogg - Can this device play ogg video files?\r\n * @property {boolean} vp9 - Can this device play vp9 video files?\r\n * @property {boolean} webm - Can this device play webm video files?\r\n */\r\nvar Video = {\r\n\r\n h264: false,\r\n hls: false,\r\n mp4: false,\r\n m4v: false,\r\n ogg: false,\r\n vp9: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Video;\r\n }\r\n\r\n var videoElement = document.createElement('video');\r\n var result = !!videoElement.canPlayType;\r\n var no = /^no$/;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\r\n {\r\n Video.ogg = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\r\n Video.h264 = true;\r\n Video.mp4 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\r\n {\r\n Video.m4v = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\r\n {\r\n Video.webm = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\r\n {\r\n Video.vp9 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n Video.hls = true;\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do\r\n }\r\n\r\n return Video;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// This singleton is instantiated as soon as Phaser loads,\r\n// before a Phaser.Game instance has even been created.\r\n// Which means all instances of Phaser Games can share it,\r\n// without having to re-poll the device all over again\r\n\r\n/**\r\n * @namespace Phaser.Device\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.DeviceConf\r\n *\r\n * @property {Phaser.Device.OS} os - The OS Device functions.\r\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\r\n * @property {Phaser.Device.Features} features - The Features Device functions.\r\n * @property {Phaser.Device.Input} input - The Input Device functions.\r\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\r\n * @property {Phaser.Device.Video} video - The Video Device functions.\r\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\r\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\r\n */\r\n\r\nmodule.exports = {\r\n\r\n os: require('./OS'),\r\n browser: require('./Browser'),\r\n features: require('./Features'),\r\n input: require('./Input'),\r\n audio: require('./Audio'),\r\n video: require('./Video'),\r\n fullscreen: require('./Fullscreen'),\r\n canvasFeatures: require('./CanvasFeatures')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar tempMatrix = new Float32Array(20);\r\n\r\n/**\r\n * @classdesc\r\n * The ColorMatrix class creates a 5x4 matrix that can be used in shaders and graphics\r\n * operations. It provides methods required to modify the color values, such as adjusting\r\n * the brightness, setting a sepia tone, hue rotation and more.\r\n *\r\n * Use the method `getData` to return a Float32Array containing the current color values.\r\n *\r\n * @class ColorMatrix\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.50.0\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function ColorMatrix ()\r\n {\r\n /**\r\n * Internal ColorMatrix array.\r\n *\r\n * @name Phaser.Display.ColorMatrix#_matrix\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._matrix = new Float32Array(20);\r\n\r\n /**\r\n * The value that determines how much of the original color is used\r\n * when mixing the colors. A value between 0 (all original) and 1 (all final)\r\n *\r\n * @name Phaser.Display.ColorMatrix#alpha\r\n * @type {number}\r\n * @since 3.50.0\r\n */\r\n this.alpha = 1;\r\n\r\n /**\r\n * Is the ColorMatrix array dirty?\r\n *\r\n * @name Phaser.Display.ColorMatrix#_dirty\r\n * @type {boolean}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._dirty = true;\r\n\r\n /**\r\n * The matrix data as a Float32Array.\r\n *\r\n * Returned by the `getData` method.\r\n *\r\n * @name Phaser.Display.ColorMatrix#data\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._data = new Float32Array(20);\r\n\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix from the given array of color values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#set\r\n * @since 3.50.0\r\n *\r\n * @param {(number[]|Float32Array)} value - The ColorMatrix values to set. Must have 20 elements.\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n set: function (value)\r\n {\r\n this._matrix.set(value);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the ColorMatrix to default values and also resets\r\n * the `alpha` property back to 1.\r\n *\r\n * @method Phaser.Display.ColorMatrix#reset\r\n * @since 3.50.0\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n reset: function ()\r\n {\r\n var m = this._matrix;\r\n\r\n m.fill(0);\r\n\r\n m[0] = 1;\r\n m[6] = 1;\r\n m[12] = 1;\r\n m[18] = 1;\r\n\r\n this.alpha = 1;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the ColorMatrix as a Float32Array.\r\n *\r\n * Can be used directly as a 1fv shader uniform value.\r\n *\r\n * @method Phaser.Display.ColorMatrix#getData\r\n * @since 3.50.0\r\n *\r\n * @return {Float32Array} The ColorMatrix as a Float32Array.\r\n */\r\n getData: function ()\r\n {\r\n var data = this._data;\r\n\r\n if (this._dirty)\r\n {\r\n data.set(this._matrix);\r\n\r\n data[4] /= 255;\r\n data[9] /= 255;\r\n data[14] /= 255;\r\n data[19] /= 255;\r\n\r\n this._dirty = false;\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Changes the brightness of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brightness\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of brightness to apply to this ColorMatrix. Between 0 (black) and 1.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brightness: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var b = value;\r\n\r\n return this.multiply([\r\n b, 0, 0, 0, 0,\r\n 0, b, 0, 0, 0,\r\n 0, 0, b, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Changes the saturation of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturate\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of saturation to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n saturate: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var x = (value * 2 / 3) + 1;\r\n var y = ((x - 1) * -0.5);\r\n\r\n return this.multiply([\r\n x, y, y, 0, 0,\r\n y, x, y, 0, 0,\r\n y, y, x, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Desaturates this ColorMatrix (removes color from it).\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturation\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturate: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-1, multiply);\r\n },\r\n\r\n /**\r\n * Rotates the hues of this ColorMatrix by the value given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#hue\r\n * @since 3.50.0\r\n *\r\n * @param {number} [rotation=0] - The amount of hue rotation to apply to this ColorMatrix, in degrees.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n hue: function (rotation, multiply)\r\n {\r\n if (rotation === undefined) { rotation = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n rotation = rotation / 180 * Math.PI;\r\n\r\n var cos = Math.cos(rotation);\r\n var sin = Math.sin(rotation);\r\n var lumR = 0.213;\r\n var lumG = 0.715;\r\n var lumB = 0.072;\r\n\r\n return this.multiply([\r\n lumR + cos * (1 - lumR) + sin * (-lumR),lumG + cos * (-lumG) + sin * (-lumG),lumB + cos * (-lumB) + sin * (1 - lumB), 0, 0,\r\n lumR + cos * (-lumR) + sin * (0.143),lumG + cos * (1 - lumG) + sin * (0.140),lumB + cos * (-lumB) + sin * (-0.283), 0, 0,\r\n lumR + cos * (-lumR) + sin * (-(1 - lumR)),lumG + cos * (-lumG) + sin * (lumG),lumB + cos * (1 - lumB) + sin * (lumB), 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be grayscale.\r\n *\r\n * @method Phaser.Display.ColorMatrix#grayscale\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=1] - The grayscale scale (0 is black).\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n grayscale: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-value, multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be black and white.\r\n *\r\n * @method Phaser.Display.ColorMatrix#blackWhite\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n blackWhite: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BLACK_WHITE, multiply);\r\n },\r\n\r\n /**\r\n * Change the contrast of this ColorMatrix by the amount given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#contrast\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of contrast to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n contrast: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var v = value + 1;\r\n var o = -0.5 * (v - 1);\r\n\r\n return this.multiply([\r\n v, 0, 0, 0, o,\r\n 0, v, 0, 0, o,\r\n 0, 0, v, 0, o,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Converts this ColorMatrix to have negative values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#negative\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n negative: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.NEGATIVE, multiply);\r\n },\r\n\r\n /**\r\n * Apply a desaturated luminance to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#desaturateLuminance\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturateLuminance: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.DESATURATE_LUMINANCE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a sepia tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#sepia\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n sepia: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SEPIA, multiply);\r\n },\r\n\r\n /**\r\n * Applies a night vision tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#night\r\n * @since 3.50.0\r\n *\r\n * @param {number} [intensity=0.1] - The intensity of this effect.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n night: function (intensity, multiply)\r\n {\r\n if (intensity === undefined) { intensity = 0.1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply([\r\n intensity * (-2.0), -intensity, 0, 0, 0,\r\n -intensity, 0, intensity, 0, 0,\r\n 0, intensity, intensity * 2.0, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Applies a trippy color tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#lsd\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n lsd: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.LSD, multiply);\r\n },\r\n\r\n /**\r\n * Applies a brown tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brown\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brown: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BROWN, multiply);\r\n },\r\n\r\n /**\r\n * Applies a vintage pinhole color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#vintagePinhole\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n vintagePinhole: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.VINTAGE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a kodachrome color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#kodachrome\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n kodachrome: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.KODACHROME, multiply);\r\n },\r\n\r\n /**\r\n * Applies a technicolor color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#technicolor\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n technicolor: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.TECHNICOLOR, multiply);\r\n },\r\n\r\n /**\r\n * Applies a polaroid color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#polaroid\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n polaroid: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.POLAROID, multiply);\r\n },\r\n\r\n /**\r\n * Shifts the values of this ColorMatrix into BGR order.\r\n *\r\n * @method Phaser.Display.ColorMatrix#shiftToBGR\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n shiftToBGR: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SHIFT_BGR, multiply);\r\n },\r\n\r\n /**\r\n * Multiplies the two given matrices.\r\n *\r\n * @method Phaser.Display.ColorMatrix#multiply\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} a - The 5x4 array to multiply with ColorMatrix._matrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n multiply: function (a, multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n // Duplicate _matrix into c\r\n\r\n if (!multiply)\r\n {\r\n this.reset();\r\n }\r\n\r\n var m = this._matrix;\r\n var c = tempMatrix;\r\n\r\n // copy _matrix to tempMatrox\r\n c.set(m);\r\n\r\n m.set([\r\n // R\r\n (c[0] * a[0]) + (c[1] * a[5]) + (c[2] * a[10]) + (c[3] * a[15]),\r\n (c[0] * a[1]) + (c[1] * a[6]) + (c[2] * a[11]) + (c[3] * a[16]),\r\n (c[0] * a[2]) + (c[1] * a[7]) + (c[2] * a[12]) + (c[3] * a[17]),\r\n (c[0] * a[3]) + (c[1] * a[8]) + (c[2] * a[13]) + (c[3] * a[18]),\r\n (c[0] * a[4]) + (c[1] * a[9]) + (c[2] * a[14]) + (c[3] * a[19]) + c[4],\r\n\r\n // G\r\n (c[5] * a[0]) + (c[6] * a[5]) + (c[7] * a[10]) + (c[8] * a[15]),\r\n (c[5] * a[1]) + (c[6] * a[6]) + (c[7] * a[11]) + (c[8] * a[16]),\r\n (c[5] * a[2]) + (c[6] * a[7]) + (c[7] * a[12]) + (c[8] * a[17]),\r\n (c[5] * a[3]) + (c[6] * a[8]) + (c[7] * a[13]) + (c[8] * a[18]),\r\n (c[5] * a[4]) + (c[6] * a[9]) + (c[7] * a[14]) + (c[8] * a[19]) + c[9],\r\n\r\n // B\r\n (c[10] * a[0]) + (c[11] * a[5]) + (c[12] * a[10]) + (c[13] * a[15]),\r\n (c[10] * a[1]) + (c[11] * a[6]) + (c[12] * a[11]) + (c[13] * a[16]),\r\n (c[10] * a[2]) + (c[11] * a[7]) + (c[12] * a[12]) + (c[13] * a[17]),\r\n (c[10] * a[3]) + (c[11] * a[8]) + (c[12] * a[13]) + (c[13] * a[18]),\r\n (c[10] * a[4]) + (c[11] * a[9]) + (c[12] * a[14]) + (c[13] * a[19]) + c[14],\r\n\r\n // A\r\n (c[15] * a[0]) + (c[16] * a[5]) + (c[17] * a[10]) + (c[18] * a[15]),\r\n (c[15] * a[1]) + (c[16] * a[6]) + (c[17] * a[11]) + (c[18] * a[16]),\r\n (c[15] * a[2]) + (c[16] * a[7]) + (c[17] * a[12]) + (c[18] * a[17]),\r\n (c[15] * a[3]) + (c[16] * a[8]) + (c[17] * a[13]) + (c[18] * a[18]),\r\n (c[15] * a[4]) + (c[16] * a[9]) + (c[17] * a[14]) + (c[18] * a[19]) + c[19]\r\n\r\n ]);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for black_white operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BLACK_WHITE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BLACK_WHITE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for negative operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.NEGATIVE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.NEGATIVE = [ -1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for desatured luminance operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.DESATURATE_LUMINANCE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.DESATURATE_LUMINANCE = [ 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for sepia operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SEPIA\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SEPIA = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for lsd operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.LSD\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.LSD = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for brown operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BROWN\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BROWN = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for vintage pinhole operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.VINTAGE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.VINTAGE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for kodachrome operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.KODACHROME\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.KODACHROME = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for technicolor operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.TECHNICOLOR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.TECHNICOLOR = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for polaroid shift operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.POLAROID\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.POLAROID = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for shift BGR operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SHIFT_BGR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SHIFT_BGR = [ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0 ];\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../../const');\r\nvar Smoothing = require('./Smoothing');\r\n\r\n// The pool into which the canvas elements are placed.\r\nvar pool = [];\r\n\r\n// Automatically apply smoothing(false) to created Canvas elements\r\nvar _disableContextSmoothing = false;\r\n\r\n/**\r\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\r\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\r\n * which is useless for some of the Phaser pipelines / renderer.\r\n *\r\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\r\n * Which means all instances of Phaser Games on the same page can share the one single pool.\r\n *\r\n * @namespace Phaser.Display.Canvas.CanvasPool\r\n * @since 3.0.0\r\n */\r\nvar CanvasPool = function ()\r\n{\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\r\n *\r\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\r\n */\r\n var create = function (parent, width, height, canvasType, selfParent)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = 1; }\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n if (selfParent === undefined) { selfParent = false; }\r\n\r\n var canvas;\r\n var container = first(canvasType);\r\n\r\n if (container === null)\r\n {\r\n container = {\r\n parent: parent,\r\n canvas: document.createElement('canvas'),\r\n type: canvasType\r\n };\r\n\r\n if (canvasType === CONST.CANVAS)\r\n {\r\n pool.push(container);\r\n }\r\n\r\n canvas = container.canvas;\r\n }\r\n else\r\n {\r\n container.parent = parent;\r\n\r\n canvas = container.canvas;\r\n }\r\n\r\n if (selfParent)\r\n {\r\n container.parent = canvas;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\r\n {\r\n Smoothing.disable(canvas.getContext('2d', { willReadFrequently: false }));\r\n }\r\n\r\n return canvas;\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create2D\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created canvas.\r\n */\r\n var create2D = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.CANVAS);\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created WebGL canvas.\r\n */\r\n var createWebGL = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.WEBGL);\r\n };\r\n\r\n /**\r\n * Gets the first free canvas index from the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.first\r\n * @since 3.0.0\r\n *\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n *\r\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\r\n */\r\n var first = function (canvasType)\r\n {\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n\r\n if (canvasType === CONST.WEBGL)\r\n {\r\n return null;\r\n }\r\n\r\n for (var i = 0; i < pool.length; i++)\r\n {\r\n var container = pool[i];\r\n\r\n if (!container.parent && container.type === canvasType)\r\n {\r\n return container;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\r\n * The canvas has its width and height set to 1, and its parent attribute nulled.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.remove\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The canvas or the parent of the canvas to free.\r\n */\r\n var remove = function (parent)\r\n {\r\n // Check to see if the parent is a canvas object\r\n var isCanvas = parent instanceof HTMLCanvasElement;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\r\n {\r\n container.parent = null;\r\n container.canvas.width = 1;\r\n container.canvas.height = 1;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the total number of used canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.total\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of used canvases.\r\n */\r\n var total = function ()\r\n {\r\n var c = 0;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if (container.parent)\r\n {\r\n c++;\r\n }\r\n });\r\n\r\n return c;\r\n };\r\n\r\n /**\r\n * Gets the total number of free canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.free\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of free canvases.\r\n */\r\n var free = function ()\r\n {\r\n return pool.length - total();\r\n };\r\n\r\n /**\r\n * Disable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\r\n * @since 3.0.0\r\n */\r\n var disableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = true;\r\n };\r\n\r\n /**\r\n * Enable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\r\n * @since 3.0.0\r\n */\r\n var enableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = false;\r\n };\r\n\r\n return {\r\n create2D: create2D,\r\n create: create,\r\n createWebGL: createWebGL,\r\n disableSmoothing: disableSmoothing,\r\n enableSmoothing: enableSmoothing,\r\n first: first,\r\n free: free,\r\n pool: pool,\r\n remove: remove,\r\n total: total\r\n };\r\n};\r\n\r\n// If we export the called function here, it'll only be invoked once (not every time it's required).\r\nmodule.exports = CanvasPool();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Browser specific prefix, so not going to change between contexts, only between browsers\r\nvar prefix = '';\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.Smoothing\r\n * @since 3.0.0\r\n */\r\nvar Smoothing = function ()\r\n{\r\n /**\r\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\r\n *\r\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\r\n */\r\n var getPrefix = function (context)\r\n {\r\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\r\n\r\n for (var i = 0; i < vendors.length; i++)\r\n {\r\n var s = vendors[i] + 'mageSmoothingEnabled';\r\n\r\n if (s in context)\r\n {\r\n return s;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.enable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var enable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = true;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.disable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var disable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = false;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\r\n * Returns null if no smoothing prefix is available.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\r\n *\r\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\r\n */\r\n var isEnabled = function (context)\r\n {\r\n return (prefix !== null) ? context[prefix] : null;\r\n };\r\n\r\n return {\r\n disable: disable,\r\n enable: enable,\r\n getPrefix: getPrefix,\r\n isEnabled: isEnabled\r\n };\r\n\r\n};\r\n\r\nmodule.exports = Smoothing();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object or Dynamic Texture to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this mask is being added.\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, maskObject, x, y, texture, frame)\r\n {\r\n if (!maskObject)\r\n {\r\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\r\n }\r\n\r\n /**\r\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = maskObject;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel.\r\n *\r\n * Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask? This is false by default and should not be changed.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n },\r\n\r\n /**\r\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\r\n *\r\n * If a Game Object it must have a texture, such as a Sprite.\r\n *\r\n * You can update the source of the mask as often as you like.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\r\n */\r\n setBitmap: function (maskObject)\r\n {\r\n this.bitmapMask = maskObject;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\r\n */\r\n postRenderWebGL: function (renderer, camera, renderTarget)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object, or Dynamic Texture, to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\r\n * @since 3.60.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\r\n */\r\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\r\n{\r\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level. This can change dynamically at runtime\r\n * and is set in the applyStencil method.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n *\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n var mask = 0xff;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n\r\n // Do this _after_ we set the stencilFunc\r\n level++;\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n this.level = level;\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, mask);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var current = renderer.currentMask;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n current.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n current.mask = prev.mask;\r\n current.camera = prev.camera;\r\n }\r\n else\r\n {\r\n current.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Barrel FX Controller.\r\n *\r\n * This FX controller manages the barrel distortion effect for a Game Object.\r\n *\r\n * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to\r\n * a Game Object. The amount of the effect can be modified in real-time.\r\n *\r\n * A Barrel effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBarrel();\r\n * sprite.postFX.addBarrel();\r\n * ```\r\n *\r\n * @class Barrel\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n */\r\nvar Barrel = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Barrel (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.BARREL, gameObject);\r\n\r\n /**\r\n * The amount of distortion applied to the barrel effect.\r\n *\r\n * Typically keep this within the range 1 (no distortion) to +- 1.\r\n *\r\n * @name Phaser.FX.Barrel#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Barrel;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Bloom\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n */\r\nvar Bloom = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bloom (gameObject, color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n if (offsetX === undefined) { offsetX = 1; }\r\n if (offsetY === undefined) { offsetY = 1; }\r\n if (blurStrength === undefined) { blurStrength = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLOOM, gameObject);\r\n\r\n /**\r\n * The number of steps to run the Bloom effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the Bloom,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Bloom#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The horizontal offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetX = offsetX;\r\n\r\n /**\r\n * The vertical offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetY = offsetY;\r\n\r\n /**\r\n * The strength of the blur process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#blurStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurStrength = blurStrength;\r\n\r\n /**\r\n * The strength of the blend process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Bloom#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the bloom as a number value.\r\n *\r\n * @name Phaser.FX.Bloom#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bloom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Blur\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n */\r\nvar Blur = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Blur (gameObject, quality, x, y, strength, color, steps)\r\n {\r\n if (quality === undefined) { quality = 0; }\r\n if (x === undefined) { x = 2; }\r\n if (y === undefined) { y = 2; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLUR, gameObject);\r\n\r\n /**\r\n * The quality of the blur effect.\r\n *\r\n * This can be:\r\n *\r\n * 0 for Low Quality\r\n * 1 for Medium Quality\r\n * 2 for High Quality\r\n *\r\n * The higher the quality, the more complex shader is used\r\n * and the more processing time is spent on the GPU calculating\r\n * the final blur. This value is used in conjunction with the\r\n * `steps` value, as one has a direct impact on the other.\r\n *\r\n * Keep this value as low as you can, while still achieving the\r\n * desired effect you need for your game.\r\n *\r\n * @name Phaser.FX.Blur#quality\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.quality = 0;\r\n\r\n /**\r\n * The horizontal offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The number of steps to run the Blur effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the blur,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Blur#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The strength of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Blur#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the blur as a number value.\r\n *\r\n * @name Phaser.FX.Blur#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Blur;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Bokeh\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {boolean} [isTiltShift=false] - Is this a bokeh or Tile Shift effect?\r\n * @param {number} [blurX=1] - If Tilt Shift, the amount of horizontal blur.\r\n * @param {number} [blurY=1] - If Tilt Shift, the amount of vertical blur.\r\n * @param {number} [strength=1] - If Tilt Shift, the strength of the blur.\r\n */\r\nvar Bokeh = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bokeh (gameObject, radius, amount, contrast, isTiltShift, blurX, blurY, strength)\r\n {\r\n if (radius === undefined) { radius = 0.5; }\r\n if (amount === undefined) { amount = 1; }\r\n if (contrast === undefined) { contrast = 0.2; }\r\n if (isTiltShift === undefined) { isTiltShift = false; }\r\n if (blurX === undefined) { blurX = 1; }\r\n if (blurY === undefined) { blurY = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n\r\n Controller.call(this, FX_CONST.BOKEH, gameObject);\r\n\r\n this.radius = radius;\r\n this.amount = amount;\r\n this.contrast = contrast;\r\n\r\n this.isTiltShift = isTiltShift;\r\n this.strength = strength;\r\n this.blurX = blurX;\r\n this.blurY = blurY;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bokeh;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Circle\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=16724914] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n */\r\nvar Circle = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Circle (gameObject, thickness, color, backgroundColor, scale, feather)\r\n {\r\n if (thickness === undefined) { thickness = 8; }\r\n if (scale === undefined) { scale = 1; }\r\n if (feather === undefined) { feather = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.CIRCLE, gameObject);\r\n\r\n /**\r\n * The scale of the circle. The default scale is 1, which is a circle\r\n * the full size of the underlying texture. Reduce this value to create\r\n * a smaller circle, or increase it to create a circle that extends off\r\n * the edges of the texture.\r\n *\r\n * @name Phaser.FX.Circle#scale\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.scale = scale;\r\n\r\n /**\r\n * The amount of feathering to apply to the circle from the ring,\r\n * extending into the middle of the circle. The default is 0.005,\r\n * which is a very low amount of feathering just making sure the ring\r\n * has a smooth edge. Increase this amount to a value such as 0.5\r\n * or 0.025 for larger amounts of feathering.\r\n *\r\n * @name Phaser.FX.Circle#feather\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.feather = feather;\r\n\r\n /**\r\n * The width of the circle around the texture, in pixels. This value\r\n * doesn't factor in the feather, which can extend the thickness\r\n * internally depending on its value.\r\n *\r\n * @name Phaser.FX.Circle#thickness\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.thickness = thickness;\r\n\r\n /**\r\n * The internal gl color array for the ring color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 0.2, 0.7 ];\r\n\r\n /**\r\n * The internal gl color array for the background color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 1, 0, 0, 0.4 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n\r\n if (backgroundColor !== undefined && backgroundColor !== null)\r\n {\r\n this.backgroundColor = backgroundColor;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the circular ring, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of the background, behind the texture, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#backgroundColor\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n backgroundColor: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Circle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar BaseColorMatrix = require('../display/ColorMatrix');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class ColorMatrix\r\n * @extends Phaser.Display.ColorMatrix\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n Extends: BaseColorMatrix,\r\n\r\n initialize:\r\n\r\n function ColorMatrix (gameObject)\r\n {\r\n BaseColorMatrix.call(this);\r\n\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = FX_CONST.COLOR_MATRIX;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * @name Phaser.FX.ColorMatrix#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this._matrix = null;\r\n this._data = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {number} type - The FX Type constant.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar Controller = new Class({\r\n\r\n initialize:\r\n\r\n function Controller (type, gameObject)\r\n {\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.Controller#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.Controller#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * @name Phaser.FX.Controller#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n /**\r\n * Destroys this FX Controller.\r\n *\r\n * @method Phaser.FX.Controller#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this.active = false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Controller;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Displacement\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {string} [key='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply.\r\n */\r\nvar Displacement = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Displacement (gameObject, displacementTexture, x, y)\r\n {\r\n if (displacementTexture === undefined) { displacementTexture = '__WHITE'; }\r\n if (x === undefined) { x = 0.005; }\r\n if (y === undefined) { y = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.DISPLACEMENT, gameObject);\r\n\r\n /**\r\n * The amount of horizontal displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The amount of vertical displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The underlying WebGLTexture used for displacement.\r\n *\r\n * @name Phaser.FX.Displacement#glTexture\r\n * @type {WebGLTexture}\r\n * @since 3.60.0\r\n */\r\n this.glTexture;\r\n\r\n this.setTexture(displacementTexture);\r\n },\r\n\r\n setTexture: function (texture)\r\n {\r\n var phaserTexture = this.gameObject.scene.sys.textures.getFrame(texture);\r\n\r\n if (phaserTexture)\r\n {\r\n this.glTexture = phaserTexture.glTexture;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Displacement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Glow FX Controller.\r\n *\r\n * This FX controller manages the glow effect for a Game Object.\r\n *\r\n * A glow effect allows you to apply a soft, blurred 'glow' around either the outside,\r\n * inside, or both of a Game Object. The color and strength of the glow can be modified.\r\n *\r\n * You can modify most of its properties in real-time to adjust the visual effect.\r\n *\r\n * A Glow effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addGlow();\r\n * sprite.postFX.addGlow();\r\n * ```\r\n *\r\n * @class Glow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n */\r\nvar Glow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Glow (gameObject, color, outerStrength, innerStrength, knockout)\r\n {\r\n if (outerStrength === undefined) { outerStrength = 4; }\r\n if (innerStrength === undefined) { innerStrength = 0; }\r\n if (knockout === undefined) { knockout = false; }\r\n\r\n Controller.call(this, FX_CONST.GLOW, gameObject);\r\n\r\n /**\r\n * The strength of the glow outward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#outerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.outerStrength = outerStrength;\r\n\r\n /**\r\n * The strength of the glow inward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#innerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.innerStrength = innerStrength;\r\n\r\n /**\r\n * If `true` only the glow is drawn, not the texture itself.\r\n *\r\n * @name Phaser.FX.Glow#knockout\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.knockout = knockout;\r\n\r\n /**\r\n * A 4 element array of gl color values.\r\n *\r\n * @name Phaser.FX.Glow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1, 1 ];\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the glow as a number value.\r\n *\r\n * @name Phaser.FX.Glow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Glow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Gradient\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n */\r\nvar Gradient = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Gradient (gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n if (alpha === undefined) { alpha = 0.2; }\r\n if (fromX === undefined) { fromX = 0; }\r\n if (fromY === undefined) { fromY = 0; }\r\n if (toX === undefined) { toX = 0; }\r\n if (toY === undefined) { toY = 1; }\r\n if (size === undefined) { size = 0; }\r\n\r\n Controller.call(this, FX_CONST.GRADIENT, gameObject);\r\n\r\n /**\r\n * The alpha value of the gradient effect.\r\n *\r\n * @name Phaser.FX.Gradient#alpha\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.alpha = alpha;\r\n\r\n /**\r\n * Sets how many 'chunks' the gradient is divided in to, as spread over the\r\n * entire height of the texture. Leave this at zero for a smooth gradient,\r\n * or set to a higher number to split the gradient into that many sections, giving\r\n * a more banded 'retro' effect.\r\n *\r\n * @name Phaser.FX.Gradient#size\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.size = size;\r\n\r\n /**\r\n * The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromX = fromX;\r\n\r\n /**\r\n * The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromY = fromY;\r\n\r\n /**\r\n * The horizontal position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toX = toX;\r\n\r\n /**\r\n * The vertical position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toY = toY;\r\n\r\n /**\r\n * The internal gl color array for the starting color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor1\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor1 = [ 255, 0, 0 ];\r\n\r\n /**\r\n * The internal gl color array for the ending color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 0, 255, 0 ];\r\n\r\n if (color1 !== undefined && color1 !== null)\r\n {\r\n this.color1 = color1;\r\n }\r\n\r\n if (color2 !== undefined && color2 !== null)\r\n {\r\n this.color2 = color2;\r\n }\r\n },\r\n\r\n /**\r\n * The first gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color1\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color1: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor1;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor1;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The second gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color2\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color2: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Gradient;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Pixelate\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n */\r\nvar Pixelate = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Pixelate (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.PIXELATE, gameObject);\r\n\r\n /**\r\n * The amount of pixelation to apply.\r\n *\r\n * @name Phaser.FX.Pixelate#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pixelate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Shadow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n */\r\nvar Shadow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shadow (gameObject, x, y, decay, power, color, samples, intensity)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (decay === undefined) { decay = 0.1; }\r\n if (power === undefined) { power = 1; }\r\n if (samples === undefined) { samples = 6; }\r\n if (intensity === undefined) { intensity = 1; }\r\n\r\n Controller.call(this, FX_CONST.SHADOW, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The amount of decay for the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#decay\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.decay = decay;\r\n\r\n /**\r\n * The power of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#power\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.power = power;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Shadow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 0, 0, 0, 1 ];\r\n\r\n /**\r\n * The number of samples that the shadow effect will run for.\r\n *\r\n * This should be an integer with a minimum value of 1 and a maximum of 12.\r\n *\r\n * @name Phaser.FX.Shadow#samples\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.samples = samples;\r\n\r\n /**\r\n * The intensity of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#intensity\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.intensity = intensity;\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the shadow.\r\n *\r\n * @name Phaser.FX.Shadow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shadow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Shine\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n */\r\nvar Shine = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shine (gameObject, speed, lineWidth, gradient, reveal)\r\n {\r\n if (speed === undefined) { speed = 0.5; }\r\n if (lineWidth === undefined) { lineWidth = 0.5; }\r\n if (gradient === undefined) { gradient = 3; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.SHINE, gameObject);\r\n\r\n /**\r\n * The speed of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#speed\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.speed = speed;\r\n\r\n /**\r\n * The line width of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#lineWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.lineWidth = lineWidth;\r\n\r\n /**\r\n * The gradient of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#gradient\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.gradient = gradient;\r\n\r\n /**\r\n * Does this Shine effect reveal or get added to its target?\r\n *\r\n * @name Phaser.FX.Shine#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shine;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Vignette\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n */\r\nvar Vignette = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Vignette (gameObject, x, y, radius, strength)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = 0.5; }\r\n if (radius === undefined) { radius = 0.5; }\r\n if (strength === undefined) { strength = 0.5; }\r\n\r\n Controller.call(this, FX_CONST.VIGNETTE, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#radius\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The strength of the vignette effect.\r\n *\r\n * @name Phaser.FX.Vignette#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Vignette;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Wipe\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n * @param {boolean} [reveal=false] - Is this a reveal (true) or a fade (false) effect?\r\n */\r\nvar Wipe = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Wipe (gameObject, wipeWidth, direction, axis, reveal)\r\n {\r\n if (wipeWidth === undefined) { wipeWidth = 0.1; }\r\n if (direction === undefined) { direction = 0; }\r\n if (axis === undefined) { axis = 0; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.WIPE, gameObject);\r\n\r\n // left to right: direction 0, axis 0\r\n // right to left: direction 1, axis 0\r\n // top to bottom: direction 1, axis 1\r\n // bottom to top: direction 1, axis 0\r\n // wipe: reveal 0\r\n // reveal: reveal 1\r\n // progress: 0 - 1\r\n\r\n /**\r\n * The progress of the Wipe effect. This value is normalized to the range 0 to 1.\r\n *\r\n * Adjust this value to make the wipe transition (i.e. via a Tween)\r\n *\r\n * @name Phaser.FX.Wipe#progress\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Wipe#wipeWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.wipeWidth = wipeWidth;\r\n\r\n /**\r\n * The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n *\r\n * @name Phaser.FX.Wipe#direction\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.direction = direction;\r\n\r\n /**\r\n * The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @name Phaser.FX.Wipe#axis\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.axis = axis;\r\n\r\n /**\r\n * Is this a reveal (true) or a fade (false) effect?\r\n *\r\n * @name Phaser.FX.Wipe#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Wipe;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FX_CONST = {\r\n\r\n /**\r\n * The Glow FX.\r\n *\r\n * @name Phaser.FX.GLOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GLOW: 4,\r\n\r\n /**\r\n * The Shadow FX.\r\n *\r\n * @name Phaser.FX.SHADOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHADOW: 5,\r\n\r\n /**\r\n * The Pixelate FX.\r\n *\r\n * @name Phaser.FX.PIXELATE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n PIXELATE: 6,\r\n\r\n /**\r\n * The Vignette FX.\r\n *\r\n * @name Phaser.FX.VIGNETTE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n VIGNETTE: 7,\r\n\r\n /**\r\n * The Shine FX.\r\n *\r\n * @name Phaser.FX.SHINE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHINE: 8,\r\n\r\n /**\r\n * The Blur FX.\r\n *\r\n * @name Phaser.FX.BLUR\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLUR: 9, // uses 3 shaders, slots 9, 10 and 11\r\n\r\n /**\r\n * The Gradient FX.\r\n *\r\n * @name Phaser.FX.GRADIENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GRADIENT: 12,\r\n\r\n /**\r\n * The Bloom FX.\r\n *\r\n * @name Phaser.FX.BLOOM\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLOOM: 13,\r\n\r\n /**\r\n * The Color Matrix FX.\r\n *\r\n * @name Phaser.FX.COLOR_MATRIX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n COLOR_MATRIX: 14,\r\n\r\n /**\r\n * The Circle FX.\r\n *\r\n * @name Phaser.FX.CIRCLE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n CIRCLE: 15,\r\n\r\n /**\r\n * The Barrel FX.\r\n *\r\n * @name Phaser.FX.BARREL\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BARREL: 16,\r\n\r\n /**\r\n * The Displacement FX.\r\n *\r\n * @name Phaser.FX.DISPLACEMENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DISPLACEMENT: 17,\r\n\r\n /**\r\n * The Wipe FX.\r\n *\r\n * @name Phaser.FX.WIPE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n WIPE: 18,\r\n\r\n /**\r\n * The Bokeh and Tilt Shift FX.\r\n *\r\n * @name Phaser.FX.BOKEH\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BOKEH: 19\r\n\r\n};\r\n\r\nmodule.exports = FX_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @namespace Phaser.FX\r\n */\r\n\r\nvar FX = {\r\n\r\n Barrel: require('./Barrel'),\r\n Controller: require('./Controller'),\r\n Bloom: require('./Bloom'),\r\n Blur: require('./Blur'),\r\n Bokeh: require('./Bokeh'),\r\n Circle: require('./Circle'),\r\n ColorMatrix: require('./ColorMatrix'),\r\n Displacement: require('./Displacement'),\r\n Glow: require('./Glow'),\r\n Gradient: require('./Gradient'),\r\n Pixelate: require('./Pixelate'),\r\n Shadow: require('./Shadow'),\r\n Shine: require('./Shine'),\r\n Vignette: require('./Vignette'),\r\n Wipe: require('./Wipe')\r\n\r\n};\r\n\r\nFX = Extend(false, FX, FX_CONST);\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar ComponentsToJSON = require('./components/ToJSON');\r\nvar DataManager = require('../data/DataManager');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The base class that all Game Objects extend.\r\n * You don't create GameObjects directly and they cannot be added to the display list.\r\n * Instead, use them as the base for your own custom classes.\r\n *\r\n * @class GameObject\r\n * @memberof Phaser.GameObjects\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\r\n */\r\nvar GameObject = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GameObject (scene, type)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene to which this Game Object belongs.\r\n *\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * You should consider this property as being read-only. You cannot move a\r\n * Game Object to another Scene by simply changing it.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Holds a reference to the Display List that contains this Game Object.\r\n *\r\n * This is set automatically when this Game Object is added to a Scene or Layer.\r\n *\r\n * You should treat this property as being read-only.\r\n *\r\n * @name Phaser.GameObjects.GameObject#displayList\r\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\r\n * @default null\r\n * @since 3.50.0\r\n */\r\n this.displayList = null;\r\n\r\n /**\r\n * A textual representation of this Game Object, i.e. `sprite`.\r\n * Used internally by Phaser but is available for your own custom classes to populate.\r\n *\r\n * @name Phaser.GameObjects.GameObject#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The current state of this Game Object.\r\n *\r\n * Phaser itself will never modify this value, although plugins may do so.\r\n *\r\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\r\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\r\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @name Phaser.GameObjects.GameObject#state\r\n * @type {(number|string)}\r\n * @since 3.16.0\r\n */\r\n this.state = 0;\r\n\r\n /**\r\n * The parent Container of this Game Object, if it has one.\r\n *\r\n * @name Phaser.GameObjects.GameObject#parentContainer\r\n * @type {Phaser.GameObjects.Container}\r\n * @since 3.4.0\r\n */\r\n this.parentContainer = null;\r\n\r\n /**\r\n * The name of this Game Object.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.GameObject#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The active state of this Game Object.\r\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\r\n * An active object is one which is having its logic and internal systems updated.\r\n *\r\n * @name Phaser.GameObjects.GameObject#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The Tab Index of the Game Object.\r\n * Reserved for future use by plugins and the Input Manager.\r\n *\r\n * @name Phaser.GameObjects.GameObject#tabIndex\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.tabIndex = -1;\r\n\r\n /**\r\n * A Data Manager.\r\n * It allows you to store, query and get key/value paired information specific to this Game Object.\r\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#data\r\n * @type {Phaser.Data.DataManager}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.data = null;\r\n\r\n /**\r\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\r\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\r\n * If those components are not used by your custom class then you can use this bitmask as you wish.\r\n *\r\n * @name Phaser.GameObjects.GameObject#renderFlags\r\n * @type {number}\r\n * @default 15\r\n * @since 3.0.0\r\n */\r\n this.renderFlags = 15;\r\n\r\n /**\r\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\r\n * Not usually set directly, instead call `Camera.ignore`, however you can\r\n * set this property directly using the Camera.id property:\r\n *\r\n * @example\r\n * this.cameraFilter |= camera.id\r\n *\r\n * @name Phaser.GameObjects.GameObject#cameraFilter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cameraFilter = 0;\r\n\r\n /**\r\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\r\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#input\r\n * @type {?Phaser.Types.Input.InteractiveObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.input = null;\r\n\r\n /**\r\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\r\n * This includes calls that may come from a Group, Container or the Scene itself.\r\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\r\n * responsible for managing references to and from this Game Object.\r\n *\r\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.ignoreDestroy = false;\r\n\r\n this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\r\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\r\n\r\n // Tell the Scene to re-sort the children\r\n scene.sys.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\r\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\r\n * The `name` property is not populated by Phaser and is presented for your own use.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The name to be given to this Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setName: function (value)\r\n {\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current state of this Game Object.\r\n *\r\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\r\n *\r\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\r\n * The state value should typically be an integer (ideally mapped to a constant\r\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setState\r\n * @since 3.16.0\r\n *\r\n * @param {(number|string)} value - The state of the Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setState: function (value)\r\n {\r\n this.state = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a Data Manager component to this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setDataEnabled\r\n * @since 3.0.0\r\n * @see Phaser.Data.DataManager\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setDataEnabled: function ()\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Allows you to store a key value pair within this Game Objects Data Manager.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * sprite.setData('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `getData`:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setData\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.set(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#incData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n incData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.inc(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toggleData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n toggleData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.toggle(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * sprite.getData([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n getData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this.data.get(key);\r\n },\r\n\r\n /**\r\n * Pass this Game Object to the Input Manager to enable it for Input.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @example\r\n * sprite.setInteractive();\r\n *\r\n * @example\r\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\r\n *\r\n * @example\r\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\r\n *\r\n * @method Phaser.GameObjects.GameObject#setInteractive\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\r\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will disable it.\r\n *\r\n * An object that is disabled for input stops processing or being considered for\r\n * input events, but can be turned back on again at any time by simply calling\r\n * `setInteractive()` with no arguments provided.\r\n *\r\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#disableInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n disableInteractive: function ()\r\n {\r\n this.scene.sys.input.disable(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will queue it\r\n * for removal, causing it to no longer be interactive. The removal happens on\r\n * the next game step, it is not immediate.\r\n *\r\n * The Interactive Object that was assigned to this Game Object will be destroyed,\r\n * removed from the Input Manager and cleared from this Game Object.\r\n *\r\n * If you wish to re-enable this Game Object at a later date you will need to\r\n * re-create its InteractiveObject by calling `setInteractive` again.\r\n *\r\n * If you wish to only temporarily stop an object from receiving input then use\r\n * `disableInteractive` instead, as that toggles the interactive state, where-as\r\n * this erases it completely.\r\n *\r\n * If you wish to resize a hit area, don't remove and then set it as being\r\n * interactive. Instead, access the hitarea object directly and resize the shape\r\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\r\n * shape is a Rectangle, which it is by default.)\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n removeInteractive: function ()\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is added to a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to add themselves into the Update List.\r\n *\r\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addedToScene\r\n * @since 3.50.0\r\n */\r\n addedToScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is removed from a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to removed themselves from the Update List.\r\n *\r\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removedFromScene\r\n * @since 3.50.0\r\n */\r\n removedFromScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\r\n *\r\n * @method Phaser.GameObjects.GameObject#update\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - args\r\n */\r\n update: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Returns a JSON representation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n return ComponentsToJSON(this);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.GameObject#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\r\n\r\n return !(!listWillRender || GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n },\r\n\r\n /**\r\n * Returns an array containing the display list index of either this Game Object, or if it has one,\r\n * its parent Container. It then iterates up through all of the parent containers until it hits the\r\n * root of the display list (which is index 0 in the returned array).\r\n *\r\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\r\n * this Game Object and all of its ancestors.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getIndexList\r\n * @since 3.4.0\r\n *\r\n * @return {number[]} An array of display list position indexes.\r\n */\r\n getIndexList: function ()\r\n {\r\n // eslint-disable-next-line consistent-this\r\n var child = this;\r\n var parent = this.parentContainer;\r\n\r\n var indexes = [];\r\n\r\n while (parent)\r\n {\r\n indexes.unshift(parent.getIndex(child));\r\n\r\n child = parent;\r\n\r\n if (!parent.parentContainer)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n parent = parent.parentContainer;\r\n }\r\n }\r\n\r\n if (this.displayList)\r\n {\r\n indexes.unshift(this.displayList.getIndex(child));\r\n }\r\n else\r\n {\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n }\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the given Display List.\r\n *\r\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\r\n * this Game Object belongs.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\r\n *\r\n * If this Game Object is already on another Display List when this method is called, it will first\r\n * be removed from it, before being added to the new list.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToDisplayList\r\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToDisplayList: function (displayList)\r\n {\r\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\r\n\r\n if (this.displayList && this.displayList !== displayList)\r\n {\r\n this.removeFromDisplayList();\r\n }\r\n\r\n // Don't repeat if it's already on this list\r\n if (!displayList.exists(this))\r\n {\r\n this.displayList = displayList;\r\n\r\n displayList.add(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the Update List belonging to the Scene.\r\n *\r\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\r\n * every game frame. This method is passed two parameters: `delta` and `time`.\r\n *\r\n * If you wish to run your own logic within `preUpdate` then you should always call\r\n * `super.preUpdate(delta, time)` within it, or it may fail to process required operations,\r\n * such as Sprite animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Display List it is currently on.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\r\n * and added back at a later stage.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\r\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromDisplayList: function ()\r\n {\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n if (displayList && displayList.exists(this))\r\n {\r\n displayList.remove(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.displayList = null;\r\n\r\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Scene's Update List.\r\n *\r\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\r\n * every game frame. Calling this method will remove it from the list, preventing this.\r\n *\r\n * Removing a Game Object from the Update List will stop most internal functions working.\r\n * For example, removing a Sprite from the Update List will prevent it from being able to\r\n * run animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.remove(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Game Object removing it from the Display List and Update List and\r\n * severing all ties to parent resources.\r\n *\r\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\r\n *\r\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\r\n * As long as no reference to it exists within your own code it should become free for\r\n * garbage collection by the browser.\r\n *\r\n * If you just want to temporarily disable an object then look at using the\r\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\r\n *\r\n * @method Phaser.GameObjects.GameObject#destroy\r\n * @fires Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [fromScene=false] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\n destroy: function (fromScene)\r\n {\r\n // This Game Object has already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n if (fromScene === undefined) { fromScene = false; }\r\n\r\n if (this.preDestroy)\r\n {\r\n this.preDestroy.call(this);\r\n }\r\n\r\n this.emit(Events.DESTROY, this, fromScene);\r\n\r\n this.removeAllListeners();\r\n\r\n if (this.postPipelines)\r\n {\r\n this.resetPostPipeline(true);\r\n }\r\n\r\n this.removeFromDisplayList();\r\n this.removeFromUpdateList();\r\n\r\n if (this.input)\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n }\r\n\r\n if (this.data)\r\n {\r\n this.data.destroy();\r\n\r\n this.data = undefined;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.body.destroy();\r\n\r\n this.body = undefined;\r\n }\r\n\r\n if (this.preFX)\r\n {\r\n this.preFX.destroy();\r\n\r\n this.preFX = undefined;\r\n }\r\n\r\n if (this.postFX)\r\n {\r\n this.postFX.destroy();\r\n\r\n this.postFX = undefined;\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n this.parentContainer = undefined;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\r\n *\r\n * @constant {number} RENDER_MASK\r\n * @memberof Phaser.GameObjects.GameObject\r\n * @default\r\n */\r\nGameObject.RENDER_MASK = 15;\r\n\r\nmodule.exports = GameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar PluginCache = require('../plugins/PluginCache');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and have them automatically registered with the Scene.\r\n *\r\n * Game Objects directly register themselves with the Factory and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectFactory\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectFactory = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectFactory (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Factory belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n this.events = scene.sys.events;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n this.events.once(SceneEvents.BOOT, this.boot, this);\r\n this.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Game Object to this Scene.\r\n *\r\n * If the Game Object renders, it will be added to the Display List.\r\n * If it has a `preUpdate` method, it will be added to the Update List.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#existing\r\n * @since 3.0.0\r\n *\r\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\r\n */\r\n existing: function (child)\r\n {\r\n if (child.renderCanvas || child.renderWebGL)\r\n {\r\n this.displayList.add(child);\r\n }\r\n\r\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\r\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\r\n if (child.preUpdate)\r\n {\r\n this.updateList.add(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.events = null;\r\n\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\r\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\r\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.register\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\r\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\r\n */\r\nGameObjectFactory.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectFactory.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\r\n * providing a its `factoryType`.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.remove\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\r\n */\r\nGameObjectFactory.remove = function (factoryType)\r\n{\r\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectFactory.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\r\n\r\nmodule.exports = GameObjectFactory;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha property of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.AlphaSingle\r\n * @since 3.22.0\r\n */\r\n\r\nvar AlphaSingle = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = AlphaSingle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../../renderer/BlendModes');\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string|number)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.displayList)\r\n {\r\n this.displayList.queueDepthSort();\r\n }\r\n\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Effects = require('../../fx/');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class FX\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.60.0\r\n * @webglOnly\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that owns this FX Component.\r\n * @param {boolean} isPost - Is this a Pre or Post FX Component?\r\n+- *\r\n */\r\nvar FX = new Class({\r\n\r\n initialize:\r\n\r\n function FX (gameObject, isPost)\r\n {\r\n /**\r\n * A reference to the Game Object that owns this FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Is this a Post FX Controller? or a Pre FX Controller?\r\n *\r\n * @name Phaser.GameObjects.Components.FX#isPost\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.isPost = isPost;\r\n\r\n /**\r\n * Has this FX Component been enabled?\r\n *\r\n * You should treat this property as read-only.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#enabled\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * An array containing all of the FX Controllers that\r\n * have been added to this FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#list\r\n * @type {Phaser.FX.Controller[]}\r\n * @since 3.60.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * The amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX or SpriteFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#padding\r\n * @type {number}\r\n * @default 0\r\n * @since 3.60.0\r\n */\r\n this.padding = 0;\r\n },\r\n\r\n /**\r\n * Sets the amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setPadding\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPadding: function (padding)\r\n {\r\n if (padding === undefined) { padding = 0; }\r\n\r\n this.padding = padding;\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is copied by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `copySprite` method.\r\n *\r\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFXCopy\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFXCopy: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is rendered by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `drawSprite` method.\r\n *\r\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFX\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFX: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Enables this FX Component and applies the FXPipeline to the parent Game Object.\r\n *\r\n * This is called automatically whenever you call a method such as `addBloom`, etc.\r\n *\r\n * You can check the `enabled` property to see if the Game Object is already enabled, or not.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#enable\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n */\r\n enable: function (padding)\r\n {\r\n var renderer = this.gameObject.scene.sys.renderer;\r\n\r\n if (renderer && renderer.pipelines)\r\n {\r\n this.gameObject.pipeline = renderer.pipelines.FX_PIPELINE;\r\n\r\n if (padding !== undefined)\r\n {\r\n this.padding = padding;\r\n }\r\n\r\n this.enabled = true;\r\n }\r\n else\r\n {\r\n this.enabled = false;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys and removes all FX Controllers that are part of this FX Component,\r\n * then disables it.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#clear\r\n * @since 3.60.0\r\n */\r\n clear: function ()\r\n {\r\n var list = this.list;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].destroy();\r\n }\r\n\r\n this.list = [];\r\n\r\n this.enabled = false;\r\n },\r\n\r\n /**\r\n * Searches for the given FX Controler within this FX Component.\r\n *\r\n * If found, the controller is removed from this compoent and then destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#remove\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX Component.\r\n */\r\n remove: function (fx)\r\n {\r\n var list = this.list;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n if (list[i] === fx)\r\n {\r\n SpliceOne(list, i);\r\n\r\n fx.destroy();\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Disables this FX Component.\r\n *\r\n * This will reset the pipeline on the Game Object that owns this component back to its\r\n * default and flag this component as disabled.\r\n *\r\n * You can re-enable it again by calling `enable`.\r\n *\r\n * Optionally, set `clear` to destroy all current FX Controllers.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#disable\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [clear=false] - Destroy and remove all FX Controllers that are part of this FX Component.\r\n */\r\n disable: function (clear)\r\n {\r\n if (clear === undefined) { clear = false; }\r\n\r\n this.gameObject.resetPipeline();\r\n\r\n this.enabled = false;\r\n\r\n if (clear)\r\n {\r\n this.clear();\r\n }\r\n },\r\n\r\n /**\r\n * Adds the given FX Controler to this FX Component.\r\n *\r\n * Note that adding an FX Controller does not remove any existing FX. They all stack-up\r\n * on-top of each other. If you don't want this, make sure to call either `remove` or\r\n * `clear` first.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#add\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX Component.\r\n * @param {object} [config] - Optional configuration object that is passed to the pipeline during instantiation.\r\n *\r\n * @return {Phaser.FX.Controller} The FX Controller.\r\n */\r\n add: function (fx, config)\r\n {\r\n if (this.isPost)\r\n {\r\n var type = String(fx.type);\r\n\r\n this.gameObject.setPostPipeline(type, config);\r\n\r\n var pipeline = this.gameObject.getPostPipeline(type);\r\n\r\n if (pipeline)\r\n {\r\n if (Array.isArray(pipeline))\r\n {\r\n pipeline = pipeline.pop();\r\n }\r\n\r\n if (pipeline) pipeline.controller = fx;\r\n\r\n return fx;\r\n }\r\n }\r\n else\r\n {\r\n if (!this.enabled)\r\n {\r\n this.enable();\r\n }\r\n\r\n this.list.push(fx);\r\n\r\n return fx;\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Glow effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGlow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n * @param {number} [quality=0.1] - Only available for PostFX. Sets the quality of this Glow effect. Default is 0.1. Cannot be changed post-creation.\r\n * @param {number} [distance=10] - Only available for PostFX. Sets the distance of this Glow effect. Default is 10. Cannot be changed post-creation.\r\n *\r\n * @return {Phaser.FX.Glow} The Glow FX Controller.\r\n */\r\n addGlow: function (color, outerStrength, innerStrength, knockout, quality, distance)\r\n {\r\n return this.add(new Effects.Glow(this.gameObject, color, outerStrength, innerStrength, knockout), { quality: quality, distance: distance });\r\n },\r\n\r\n /**\r\n * Adds a Shadow effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShadow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n *\r\n * @return {Phaser.FX.Shadow} The Shadow FX Controller.\r\n */\r\n addShadow: function (x, y, decay, power, color, samples, intensity)\r\n {\r\n return this.add(new Effects.Shadow(this.gameObject, x, y, decay, power, color, samples, intensity));\r\n },\r\n\r\n /**\r\n * Adds a Pixelate effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addPixelate\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n *\r\n * @return {Phaser.FX.Pixelate} The Pixelate FX Controller.\r\n */\r\n addPixelate: function (amount)\r\n {\r\n return this.add(new Effects.Pixelate(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Vignette effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addVignette\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n *\r\n * @return {Phaser.FX.Vignette} The Vignette FX Controller.\r\n */\r\n addVignette: function (x, y, radius, strength)\r\n {\r\n return this.add(new Effects.Vignette(this.gameObject, x, y, radius, strength));\r\n },\r\n\r\n /**\r\n * Adds a Shine effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShine\r\n * @since 3.60.0\r\n *\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n *\r\n * @return {Phaser.FX.Shine} The Shine FX Controller.\r\n */\r\n addShine: function (speed, lineWidth, gradient, reveal)\r\n {\r\n return this.add(new Effects.Shine(this.gameObject, speed, lineWidth, gradient, reveal));\r\n },\r\n\r\n /**\r\n * Adds a Blur effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBlur\r\n * @since 3.60.0\r\n *\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Blur} The Blur FX Controller.\r\n */\r\n addBlur: function (quality, x, y, strength, color, steps)\r\n {\r\n return this.add(new Effects.Blur(this.gameObject, quality, x, y, strength, color, steps));\r\n },\r\n\r\n /**\r\n * Adds a Gradient effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGradient\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n *\r\n * @return {Phaser.FX.Gradient} The Gradient FX Controller.\r\n */\r\n addGradient: function (color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n return this.add(new Effects.Gradient(this.gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size));\r\n },\r\n\r\n /**\r\n * Adds a Bloom effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBloom\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Bloom} The Bloom FX Controller.\r\n */\r\n addBloom: function (color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n return this.add(new Effects.Bloom(this.gameObject, color, offsetX, offsetY, blurStrength, strength, steps));\r\n },\r\n\r\n /**\r\n * Adds a ColorMatrix effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addColorMatrix\r\n * @since 3.60.0\r\n *\r\n * @return {Phaser.FX.ColorMatrix} The ColorMatrix FX Controller.\r\n */\r\n addColorMatrix: function ()\r\n {\r\n return this.add(new Effects.ColorMatrix(this.gameObject));\r\n },\r\n\r\n /**\r\n * Adds a Circle effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addCircle\r\n * @since 3.60.0\r\n *\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=16724914] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n *\r\n * @return {Phaser.FX.Circle} The Circle FX Controller.\r\n */\r\n addCircle: function (thickness, color, backgroundColor, scale, feather)\r\n {\r\n return this.add(new Effects.Circle(this.gameObject, thickness, color, backgroundColor, scale, feather));\r\n },\r\n\r\n /**\r\n * Adds a Barrel effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBarrel\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n *\r\n * @return {Phaser.FX.Barrel} The Barrel FX Controller.\r\n */\r\n addBarrel: function (amount)\r\n {\r\n return this.add(new Effects.Barrel(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Displacement effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addDisplacement\r\n * @since 3.60.0\r\n *\r\n * @param {string} [key='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply.\r\n *\r\n * @return {Phaser.FX.Displacement} The Displacement FX Controller.\r\n */\r\n addDisplacement: function (displacementTexture, x, y)\r\n {\r\n return this.add(new Effects.Displacement(this.gameObject, displacementTexture, x, y));\r\n },\r\n\r\n /**\r\n * Adds a Wipe effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addWipe\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addWipe: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis));\r\n },\r\n\r\n /**\r\n * Adds a Reveal Wipe effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addReveal\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addReveal: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis, true));\r\n },\r\n\r\n /**\r\n * Adds a Bokeh effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBokeh\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh FX Controller.\r\n */\r\n addBokeh: function (radius, amount, contrast)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast));\r\n },\r\n\r\n /**\r\n * Adds a TiltShift effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addTiltShift\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {number} [blurX=1] - If Tilt Shift, the amount of horizontal blur.\r\n * @param {number} [blurY=1] - If Tilt Shift, the amount of vertical blur.\r\n * @param {number} [strength=1] - If Tilt Shift, the strength of the blur.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh TiltShift FX Controller.\r\n */\r\n addTiltShift: function (radius, amount, contrast, blurX, blurY, strength)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast, true, blurX, blurY, strength));\r\n },\r\n\r\n /**\r\n * Destroys this FX Component.\r\n *\r\n * Called automatically when Game Objects are destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.clear();\r\n\r\n this.gameObject = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar RotateAround = require('../../math/RotateAround');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getCenter: function (output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is\r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = require('../../display/mask/BitmapMask');\r\nvar GeometryMask = require('../../display/mask/GeometryMask');\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n *\r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n *\r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one, or a Dynamic Texture.\r\n *\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable texture-based Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G\r\n * @generic {Phaser.Textures.DynamicTexture} T\r\n * @genericUse {(G|T|null)} [maskObject]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (maskObject, x, y, texture, frame)\r\n {\r\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n maskObject = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n *\r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G\r\n * @generic {Phaser.GameObjects.Shape} S\r\n * @genericUse {(G|S)} [graphics]\r\n *\r\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && (this.type === 'Graphics' || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = require('../../math/DegToRad');\r\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar TWEEN_CONST = require('../../tweens/tween/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The distance the follower has traveled from the previous point to the current one, at the last update.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathDelta\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.23.0\r\n */\r\n pathDelta: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.setTargetValue();\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n if (!this.pathDelta)\r\n {\r\n this.pathDelta = new Vector2();\r\n }\r\n\r\n this.pathDelta.reset();\r\n\r\n config.persist = true;\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n var pathDelta = this.pathDelta;\r\n var pathVector = this.pathVector;\r\n\r\n pathDelta.copy(pathVector).negate();\r\n\r\n if (tweenData.state === TWEEN_CONST.COMPLETE)\r\n {\r\n this.path.getPoint(tweenData.end, pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n return;\r\n }\r\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n pipelineData: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n *\r\n * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipeline)\r\n {\r\n this.pipelineData = {};\r\n\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return false;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n if (pipeline === undefined)\r\n {\r\n pipeline = pipelines.default;\r\n }\r\n\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.defaultPipeline = instance;\r\n this.pipeline = instance;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the main WebGL Pipeline of this Game Object.\r\n *\r\n * Also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipeline, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.pipeline = instance;\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipelineData: function (key, value)\r\n {\r\n var data = this.pipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n *\r\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\r\n */\r\n resetPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n this.pipeline = this.defaultPipeline;\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\nvar FX = require('../components/FX');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering post pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n\r\nvar PostPipeline = {\r\n\r\n /**\r\n * Does this Game Object have any Post Pipelines set?\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#hasPostPipeline\r\n * @type {boolean}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n hasPostPipeline: false,\r\n\r\n /**\r\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\r\n *\r\n * The pipelines are processed in the order in which they appear in this array.\r\n *\r\n * If you modify this array directly, be sure to set the\r\n * `hasPostPipeline` property accordingly.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelines\r\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelines: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelineData: null,\r\n\r\n /**\r\n * The Pre FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.preFX.addBloom();\r\n * ```\r\n *\r\n * Only the following Game Objects support Pre FX:\r\n *\r\n * * Image\r\n * * Sprite\r\n * * TileSprite\r\n * * Text\r\n * * RenderTexture\r\n * * Video\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#preFX\r\n * @type {Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n preFX: null,\r\n\r\n /**\r\n * The Post FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.postFX.addBloom();\r\n * ```\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postFX\r\n * @type {Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postFX: null,\r\n\r\n /**\r\n * This should only be called during the instantiation of the Game Object.\r\n *\r\n * It is called by default by all core Game Objects and doesn't need\r\n * calling again.\r\n *\r\n * After that, use `setPostPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#initPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [preFX=false] - Does this Game Object support Pre FX?\r\n */\r\n initPostPipeline: function (preFX)\r\n {\r\n this.postPipelines = [];\r\n this.postPipelineData = {};\r\n\r\n this.postFX = new FX(this, true);\r\n\r\n if (preFX)\r\n {\r\n this.preFX = new FX(this, false);\r\n }\r\n },\r\n\r\n /**\r\n * Sets one, or more, Post Pipelines on this Game Object.\r\n *\r\n * Post Pipelines are invoked after this Game Object has rendered to its target and\r\n * are commonly used for post-fx.\r\n *\r\n * The post pipelines are appended to the `postPipelines` array belonging to this\r\n * Game Object. When the renderer processes this Game Object, it iterates through the post\r\n * pipelines in the order in which they appear in the array. If you are stacking together\r\n * multiple effects, be aware that the order is important.\r\n *\r\n * If you call this method multiple times, the new pipelines will be appended to any existing\r\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\r\n *\r\n * You can optionally also set the `postPipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `postPipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `postPipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipeline: function (pipelines, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelineManager = renderer.pipelines;\r\n\r\n if (pipelineManager)\r\n {\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelineManager.getPostPipeline(pipelines[i], this, pipelineData);\r\n\r\n if (instance)\r\n {\r\n this.postPipelines.push(instance);\r\n }\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.postPipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `postPipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipelineData\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipelineData: function (key, value)\r\n {\r\n var data = this.postPipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#getPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} An array of all the Post Pipelines matching the name. This array will be empty if there was no match. If there was only one single match, that pipeline is returned directly, not in an array.\r\n */\r\n getPostPipeline: function (pipeline)\r\n {\r\n var isString = (typeof pipeline === 'string');\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n var results = [];\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\r\n {\r\n results.push(instance);\r\n }\r\n }\r\n\r\n return (results.length === 1) ? results[0] : results;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\r\n * the `destroy` method on each post pipeline and then clearing the local array.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#resetPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `postPipelineData` object to being an empty object?\r\n */\r\n resetPostPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n pipelines[i].destroy();\r\n }\r\n\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n\r\n if (resetData)\r\n {\r\n this.postPipelineData = {};\r\n }\r\n },\r\n\r\n /**\r\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\r\n *\r\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#removePostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removePostPipeline: function (pipeline)\r\n {\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = pipelines.length - 1; i >= 0; i--)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if (\r\n (typeof pipeline === 'string' && instance.name === pipeline) ||\r\n (typeof pipeline !== 'string' && instance instanceof pipeline))\r\n {\r\n instance.destroy();\r\n\r\n SpliceOne(pipelines, i);\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PostPipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleX * this.frame.realWidth);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleY * this.frame.realHeight);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame|boolean} [frame] - The frame to base the size of this Game Object on.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (!frame) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n var input = this.input;\r\n\r\n if (input && !input.customHitArea)\r\n {\r\n input.hitArea.width = this.width;\r\n input.hitArea.height = this.height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the tint of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Tint\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Tint = {\r\n\r\n /**\r\n * The tint value being applied to the top-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the top-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopRight: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomRight: 0xffffff,\r\n\r\n /**\r\n * The tint fill mode.\r\n *\r\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\r\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n tintFill: false,\r\n\r\n /**\r\n * Clears all tint values associated with this Game Object.\r\n *\r\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\r\n * which results in no visible change to the texture.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#clearTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearTint: function ()\r\n {\r\n this.setTint(0xffffff);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an additive tint on this Game Object.\r\n *\r\n * The tint works by taking the pixel color values from the Game Objects texture, and then\r\n * multiplying it by the color value of the tint. You can provide either one color value,\r\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\r\n * per corner. The colors are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 0xffffff; }\r\n\r\n if (topRight === undefined)\r\n {\r\n topRight = topLeft;\r\n bottomLeft = topLeft;\r\n bottomRight = topLeft;\r\n }\r\n\r\n this.tintTopLeft = topLeft;\r\n this.tintTopRight = topRight;\r\n this.tintBottomLeft = bottomLeft;\r\n this.tintBottomRight = bottomRight;\r\n\r\n this.tintFill = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a fill-based tint on this Game Object.\r\n *\r\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\r\n * with those in the tint. You can use this for effects such as making a player flash 'white'\r\n * if hit by something. You can provide either one color value, in which case the whole\r\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\r\n * are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTintFill\r\n * @webglOnly\r\n * @since 3.11.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n\r\n this.tintFill = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The tint value being applied to the whole of the Game Object.\r\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tint\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tint: {\r\n\r\n set: function (value)\r\n {\r\n this.setTint(value, value, value, value);\r\n }\r\n },\r\n\r\n /**\r\n * Does this Game Object have a tint applied?\r\n *\r\n * It checks to see if the 4 tint properties are set to the value 0xffffff\r\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#isTinted\r\n * @type {boolean}\r\n * @webglOnly\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n isTinted: {\r\n\r\n get: function ()\r\n {\r\n var white = 0xffffff;\r\n\r\n return (\r\n this.tintFill ||\r\n this.tintTopLeft !== white ||\r\n this.tintTopRight !== white ||\r\n this.tintBottomLeft !== white ||\r\n this.tintBottomRight !== white\r\n );\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Tint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../../math/const');\r\nvar TransformMatrix = require('./TransformMatrix');\r\nvar TransformXY = require('../../math/TransformXY');\r\nvar WrapAngle = require('../../math/angle/Wrap');\r\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Transform\r\n * @since 3.0.0\r\n */\r\n\r\nvar Transform = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\r\n * @type {boolean}\r\n * @readonly\r\n * @default true\r\n * @since 3.60.0\r\n */\r\n hasTransformComponent: true,\r\n\r\n /**\r\n * Private internal value. Holds the horizontal scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleX\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleX: 1,\r\n\r\n /**\r\n * Private internal value. Holds the vertical scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleY\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleY: 1,\r\n\r\n /**\r\n * Private internal value. Holds the rotation value in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _rotation: 0,\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: 0,\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: 0,\r\n\r\n /**\r\n * The z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: 0,\r\n\r\n /**\r\n * The w position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: 0,\r\n\r\n /**\r\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\r\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\r\n *\r\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\r\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.18.0\r\n */\r\n scale: {\r\n\r\n get: function ()\r\n {\r\n return (this._scaleX + this._scaleY) / 2;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleY !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleX !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The angle of this Game Object as expressed in degrees.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in radians, see the `rotation` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * The angle of this Game Object in radians.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\r\n * and -PI/2 is up.\r\n *\r\n * If you prefer to work in degrees, see the `angle` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#rotation\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of this Game Object.\r\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\r\n * @param {number} [z=0] - The z position of this Game Object.\r\n * @param {number} [w=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPosition: function (x, y, z, w)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n if (z === undefined) { z = 0; }\r\n if (w === undefined) { w = 0; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies an object's coordinates to this Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#copyPosition\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n copyPosition: function (source)\r\n {\r\n if (source.x !== undefined) { this.x = source.x; }\r\n if (source.y !== undefined) { this.y = source.y; }\r\n if (source.z !== undefined) { this.z = source.z; }\r\n if (source.w !== undefined) { this.w = source.w; }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object to be a random position within the confines of\r\n * the given area.\r\n *\r\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\r\n *\r\n * The position does not factor in the size of this Game Object, meaning that only the origin is\r\n * guaranteed to be within the area.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\r\n * @since 3.8.0\r\n *\r\n * @param {number} [x=0] - The x position of the top-left of the random area.\r\n * @param {number} [y=0] - The y position of the top-left of the random area.\r\n * @param {number} [width] - The width of the random area.\r\n * @param {number} [height] - The height of the random area.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRandomPosition: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n\r\n this.x = x + (Math.random() * width);\r\n this.y = y + (Math.random() * height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this.rotation = radians;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=1] - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScale: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scaleX = x;\r\n this.scaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the x position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The x position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setX: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the y position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The y position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setY: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The z position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setZ: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.z = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the w position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setW\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setW: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.w = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the local transform matrix for this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getLocalTransformMatrix: function (tempMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n },\r\n\r\n /**\r\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n var parent = this.parentContainer;\r\n\r\n if (!parent)\r\n {\r\n return this.getLocalTransformMatrix(tempMatrix);\r\n }\r\n\r\n if (!parentMatrix)\r\n {\r\n parentMatrix = new TransformMatrix();\r\n }\r\n\r\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n\r\n while (parent)\r\n {\r\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\r\n\r\n parentMatrix.multiply(tempMatrix, tempMatrix);\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return tempMatrix;\r\n },\r\n\r\n /**\r\n * Takes the given `x` and `y` coordinates and converts them into local space for this\r\n * Game Object, taking into account parent and local transforms, and the Display Origin.\r\n *\r\n * The returned Vector2 contains the translated point in its properties.\r\n *\r\n * A Camera needs to be provided in order to handle modified scroll factors. If no\r\n * camera is specified, it will use the `main` camera from the Scene to which this\r\n * Game Object belongs.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\r\n *\r\n * @return {Phaser.Math.Vector2} The translated point.\r\n */\r\n getLocalPoint: function (x, y, point, camera)\r\n {\r\n if (!point) { point = new Vector2(); }\r\n if (!camera) { camera = this.scene.sys.cameras.main; }\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n var px = x + (csx * this.scrollFactorX) - csx;\r\n var py = y + (csy * this.scrollFactorY) - csy;\r\n\r\n if (this.parentContainer)\r\n {\r\n this.getWorldTransformMatrix().applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\r\n }\r\n\r\n // Normalize origin\r\n if (this._originComponent)\r\n {\r\n point.x += this._displayOriginX;\r\n point.y += this._displayOriginY;\r\n }\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Gets the sum total rotation of all of this Game Objects parent Containers.\r\n *\r\n * The returned value is in radians and will be zero if this Game Object has no parent container.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\r\n * @since 3.18.0\r\n *\r\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\r\n */\r\n getParentRotation: function ()\r\n {\r\n var rotation = 0;\r\n\r\n var parent = this.parentContainer;\r\n\r\n while (parent)\r\n {\r\n rotation += parent.rotation;\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return rotation;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n\r\n /**\r\n * The temporary quad value cache.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\r\n * @type {Float32Array}\r\n * @since 3.60.0\r\n */\r\n this.quad = new Float32Array(8);\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n\r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n\r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? matrix : out.matrix;\r\n\r\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix[5] = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n *\r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point in to the local space of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {Phaser.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n *\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n *\r\n * The result must be applied in the following order to reproduce the current matrix:\r\n *\r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.DecomposeMatrixResults} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n *\r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Performs the 8 calculations required to create the vertices of\r\n * a quad based on this matrix and the given x/y/xw/yh values.\r\n *\r\n * The result is stored in `TransformMatrix.quad`, which is returned\r\n * from this method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\r\n * @since 3.60.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} xw - The xw value.\r\n * @param {number} yh - The yh value.\r\n * @param {boolean} roundPixels - Pass the results via Math.round?\r\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\r\n *\r\n * @return {Float32Array} The quad Float32Array.\r\n */\r\n setQuad: function (x, y, xw, yh, roundPixels, quad)\r\n {\r\n if (quad === undefined) { quad = this.quad; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var e = matrix[4];\r\n var f = matrix[5];\r\n\r\n quad[0] = x * a + y * c + e;\r\n quad[1] = x * b + y * d + f;\r\n\r\n quad[2] = x * a + yh * c + e;\r\n quad[3] = x * b + yh * d + f;\r\n\r\n quad[4] = xw * a + yh * c + e;\r\n quad[5] = xw * b + yh * d + f;\r\n\r\n quad[6] = xw * a + y * c + e;\r\n quad[7] = xw * b + y * d + f;\r\n\r\n if (roundPixels)\r\n {\r\n quad.forEach(function (value, index)\r\n {\r\n quad[index] = Math.round(value);\r\n });\r\n }\r\n\r\n return quad;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.quad = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: require('./Alpha'),\r\n AlphaSingle: require('./AlphaSingle'),\r\n BlendMode: require('./BlendMode'),\r\n ComputedSize: require('./ComputedSize'),\r\n Crop: require('./Crop'),\r\n Depth: require('./Depth'),\r\n Flip: require('./Flip'),\r\n FX: require('./FX'),\r\n GetBounds: require('./GetBounds'),\r\n Mask: require('./Mask'),\r\n Origin: require('./Origin'),\r\n PathFollower: require('./PathFollower'),\r\n Pipeline: require('./Pipeline'),\r\n PostPipeline: require('./PostPipeline'),\r\n ScrollFactor: require('./ScrollFactor'),\r\n Size: require('./Size'),\r\n Texture: require('./Texture'),\r\n TextureCrop: require('./TextureCrop'),\r\n Tint: require('./Tint'),\r\n ToJSON: require('./ToJSON'),\r\n Transform: require('./Transform'),\r\n TransformMatrix: require('./TransformMatrix'),\r\n Visible: require('./Visible')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = require('../../utils/array');\r\nvar BlendModes = require('../../renderer/BlendModes');\r\nvar Class = require('../../utils/Class');\r\nvar Components = require('../components');\r\nvar Events = require('../events');\r\nvar GameObject = require('../GameObject');\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar Render = require('./ContainerRender');\r\nvar Union = require('../../geom/rectangle/Union');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * The transform point of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\r\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\r\n * the Container, and position children positively and negative around it as required.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\r\n * or the input area will become misaligned.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.AlphaSingle\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.PostPipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.AlphaSingle,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.PostPipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {number}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.initPostPipeline();\r\n\r\n this.setPosition(x, y);\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {this} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\r\n\r\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\r\n }\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n var hasSetFirst = false;\r\n\r\n output.setEmpty();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getTextBounds)\r\n {\r\n var textBounds = entry.getTextBounds().global;\r\n tempRect.setTo(textBounds.x, textBounds.y, textBounds.width, textBounds.height);\r\n }\r\n else if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n }\r\n else\r\n {\r\n continue;\r\n }\r\n\r\n if (!hasSetFirst)\r\n {\r\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\r\n hasSetFirst = true;\r\n }\r\n else\r\n {\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.parentContainer = this;\r\n\r\n gameObject.removeFromDisplayList();\r\n\r\n gameObject.addedToScene();\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n\r\n gameObject.removedFromScene();\r\n\r\n gameObject.addToDisplayList();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n this.parentContainer.pointToContainer(source, output);\r\n }\r\n else\r\n {\r\n output.x = source.x;\r\n output.y = source.y;\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n *\r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {number} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {number} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {number} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {number} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object above another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveAbove\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveAbove: function (child1, child2)\r\n {\r\n ArrayUtils.MoveAbove(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object below another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveBelow\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveBelow: function (child1, child2)\r\n {\r\n ArrayUtils.MoveBelow(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var list = this.list;\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n if (list[i] && list[i].scene)\r\n {\r\n list[i].off(Events.DESTROY, this.remove, this);\r\n\r\n list[i].destroy();\r\n }\r\n }\r\n\r\n this.list = [];\r\n }\r\n else\r\n {\r\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [oldChild,newChild]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Container#setScrollFactor\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n if (container.mask)\r\n {\r\n container.mask.preRenderCanvas(renderer, null, camera);\r\n }\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n }\r\n\r\n if (container.mask)\r\n {\r\n container.mask.postRenderCanvas(renderer);\r\n }\r\n};\r\n\r\nmodule.exports = ContainerCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar NOOP = require('../../utils/NOOP');\r\nvar renderWebGL = NOOP;\r\nvar renderCanvas = NOOP;\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./ContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./ContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n *\r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n *\r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n *\r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n *\r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n *\r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {number} width - The width of the video.\r\n * @param {number} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n *\r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n *\r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n *\r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n *\r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n *\r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n *\r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n *\r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Timeout Event.\r\n *\r\n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\r\n * source to start playback.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\r\n */\r\nmodule.exports = 'timeout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n *\r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n *\r\n * @name Phaser.Geom.CIRCLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n *\r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n *\r\n * @name Phaser.Geom.LINE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n *\r\n * @name Phaser.Geom.POINT\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n *\r\n * @name Phaser.Geom.POLYGON\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = require('./Length');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Random = require('./Random');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GEOM_CONST = require('../const');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {this} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = require('./Perimeter');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = require('./GetPoint');\r\nvar Perimeter = require('./Perimeter');\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\r\n * @param {number} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Contains = require('./Contains');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Line = require('../line/Line');\r\nvar Random = require('./Random');\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('./Rectangle');\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\nvar GetURL = require('./GetURL');\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\nvar XHRLoader = require('./XHRLoader');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * @classdesc\r\n * The base File class used by all File Types that the Loader can support.\r\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class File\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\r\n */\r\nvar File = new Class({\r\n\r\n initialize:\r\n\r\n function File (loader, fileConfig)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.File#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\r\n *\r\n * @name Phaser.Loader.File#cache\r\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\r\n * @since 3.7.0\r\n */\r\n this.cache = GetFastValue(fileConfig, 'cache', false);\r\n\r\n /**\r\n * The file type string (image, json, etc) for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.File#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(fileConfig, 'type', false);\r\n\r\n if (!this.type)\r\n {\r\n throw new Error('Invalid File type: ' + this.type);\r\n }\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.File#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = GetFastValue(fileConfig, 'key', false);\r\n\r\n var loadKey = this.key;\r\n\r\n if (loader.prefix && loader.prefix !== '')\r\n {\r\n this.key = loader.prefix + loadKey;\r\n }\r\n\r\n if (!this.key)\r\n {\r\n throw new Error('Invalid File key: ' + this.key);\r\n }\r\n\r\n var url = GetFastValue(fileConfig, 'url');\r\n\r\n if (url === undefined)\r\n {\r\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n url = loader.path + url;\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n *\r\n * Automatically has Loader.path prepended to it if a string.\r\n *\r\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {object|string}\r\n * @since 3.0.0\r\n */\r\n this.url = url;\r\n\r\n /**\r\n * The final URL this file will load from, including baseURL and path.\r\n * Set automatically when the Loader calls 'load' on this file.\r\n *\r\n * @name Phaser.Loader.File#src\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.src = '';\r\n\r\n /**\r\n * The merged XHRSettings for this file.\r\n *\r\n * @name Phaser.Loader.File#xhrSettings\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\r\n\r\n if (GetFastValue(fileConfig, 'xhrSettings', false))\r\n {\r\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\r\n }\r\n\r\n /**\r\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\r\n *\r\n * @name Phaser.Loader.File#xhrLoader\r\n * @type {?XMLHttpRequest}\r\n * @since 3.0.0\r\n */\r\n this.xhrLoader = null;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.File#state\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\r\n\r\n /**\r\n * The total size of this file.\r\n * Set by onProgress and only if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesTotal\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bytesTotal = 0;\r\n\r\n /**\r\n * Updated as the file loads.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesLoaded\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.bytesLoaded = -1;\r\n\r\n /**\r\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#percentComplete\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.percentComplete = -1;\r\n\r\n /**\r\n * For CORs based loading.\r\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\r\n *\r\n * @name Phaser.Loader.File#crossOrigin\r\n * @type {(string|undefined)}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = undefined;\r\n\r\n /**\r\n * The processed file data, stored here after the file has loaded.\r\n *\r\n * @name Phaser.Loader.File#data\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.data = undefined;\r\n\r\n /**\r\n * A config object that can be used by file types to store transitional data.\r\n *\r\n * @name Phaser.Loader.File#config\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.config = GetFastValue(fileConfig, 'config', {});\r\n\r\n /**\r\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\r\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\r\n *\r\n * @name Phaser.Loader.File#multiFile\r\n * @type {?Phaser.Loader.MultiFile}\r\n * @since 3.7.0\r\n */\r\n this.multiFile;\r\n\r\n /**\r\n * Does this file have an associated linked file? Such as an image and a normal map.\r\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\r\n * actually bound by data, where-as a linkFile is.\r\n *\r\n * @name Phaser.Loader.File#linkFile\r\n * @type {?Phaser.Loader.File}\r\n * @since 3.7.0\r\n */\r\n this.linkFile;\r\n },\r\n\r\n /**\r\n * Links this File with another, so they depend upon each other for loading and processing.\r\n *\r\n * @method Phaser.Loader.File#setLink\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\r\n */\r\n setLink: function (fileB)\r\n {\r\n this.linkFile = fileB;\r\n\r\n fileB.linkFile = this;\r\n },\r\n\r\n /**\r\n * Resets the XHRLoader instance this file is using.\r\n *\r\n * @method Phaser.Loader.File#resetXHR\r\n * @since 3.0.0\r\n */\r\n resetXHR: function ()\r\n {\r\n if (this.xhrLoader)\r\n {\r\n this.xhrLoader.onload = undefined;\r\n this.xhrLoader.onerror = undefined;\r\n this.xhrLoader.onprogress = undefined;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.File#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\r\n this.loader.nextFile(this, true);\r\n }\r\n else\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n // The creation of this XHRLoader starts the load process going.\r\n // It will automatically call the following, based on the load outcome:\r\n //\r\n // xhr.onload = this.onLoad\r\n // xhr.onerror = this.onError\r\n // xhr.onprogress = this.onProgress\r\n\r\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onLoad\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\r\n */\r\n onLoad: function (xhr, event)\r\n {\r\n var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\r\n {\r\n return xhr.responseURL.indexOf(scheme) === 0;\r\n });\r\n\r\n var localFileOk = (isLocalFile && event.target.status === 0);\r\n\r\n var success = !(event.target && event.target.status !== 200) || localFileOk;\r\n\r\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\r\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\r\n {\r\n success = false;\r\n }\r\n\r\n this.state = CONST.FILE_LOADED;\r\n\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, success);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onError\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\r\n */\r\n onError: function ()\r\n {\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n *\r\n * @param {ProgressEvent} event - The DOM ProgressEvent.\r\n */\r\n onProgress: function (event)\r\n {\r\n if (event.lengthComputable)\r\n {\r\n this.bytesLoaded = event.loaded;\r\n this.bytesTotal = event.total;\r\n\r\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\r\n *\r\n * @method Phaser.Loader.File#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessComplete\r\n * @since 3.7.0\r\n */\r\n onProcessComplete: function ()\r\n {\r\n this.state = CONST.FILE_COMPLETE;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileComplete(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing but it generated an error.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessError\r\n * @since 3.7.0\r\n */\r\n onProcessError: function ()\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\r\n\r\n this.state = CONST.FILE_ERRORED;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileFailed(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Checks if a key matching the one used by this file exists in the target Cache or not.\r\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\r\n * loaded or will conflict.\r\n *\r\n * @method Phaser.Loader.File#hasCacheConflict\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\r\n */\r\n hasCacheConflict: function ()\r\n {\r\n return (this.cache && this.cache.exists(this.key));\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n * This method is often overridden by specific file types.\r\n *\r\n * @method Phaser.Loader.File#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.cache && this.data)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\r\n },\r\n\r\n /**\r\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.File#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.7.0\r\n */\r\n pendingDestroy: function (data)\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n if (data === undefined) { data = this.data; }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this File and any references it holds.\r\n *\r\n * @method Phaser.Loader.File#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.cache = null;\r\n this.xhrSettings = null;\r\n this.multiFile = null;\r\n this.linkFile = null;\r\n this.data = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\r\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\r\n *\r\n * @method Phaser.Loader.File.createObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\r\n * @param {Blob} blob - A Blob object to create an object URL for.\r\n * @param {string} defaultType - Default mime type used if blob type is not available.\r\n */\r\nFile.createObjectURL = function (image, blob, defaultType)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n image.src = URL.createObjectURL(blob);\r\n }\r\n else\r\n {\r\n var reader = new FileReader();\r\n\r\n reader.onload = function ()\r\n {\r\n image.removeAttribute('crossOrigin');\r\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\r\n };\r\n\r\n reader.onerror = image.onerror;\r\n\r\n reader.readAsDataURL(blob);\r\n }\r\n};\r\n\r\n/**\r\n * Static method for releasing an existing object URL which was previously created\r\n * by calling {@link File#createObjectURL} method.\r\n *\r\n * @method Phaser.Loader.File.revokeObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\r\n */\r\nFile.revokeObjectURL = function (image)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n URL.revokeObjectURL(image.src);\r\n }\r\n};\r\n\r\nmodule.exports = File;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n *\r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n *\r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n *\r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n var finalFiles = [];\r\n\r\n // Clean out any potential 'null' or 'undefined' file entries\r\n files.forEach(function (file)\r\n {\r\n if (file)\r\n {\r\n finalFiles.push(file);\r\n }\r\n });\r\n\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {number}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = finalFiles;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.MultiFile#state\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.state = CONST.FILE_PENDING;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {number}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = finalFiles.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < finalFiles.length; i++)\r\n {\r\n finalFiles[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n\r\n // eslint-disable-next-line no-console\r\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\r\n }\r\n },\r\n\r\n /**\r\n * Called once all children of this multi file have been added to their caches and is now\r\n * ready for deletion from the Loader.\r\n *\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.MultiFile#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.60.0\r\n */\r\n pendingDestroy: function ()\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n for (var i = 0; i < this.files.length; i++)\r\n {\r\n this.files[i].pendingDestroy();\r\n }\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this Multi File and any references it holds.\r\n *\r\n * @method Phaser.Loader.MultiFile#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.files = null;\r\n this.config = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {number} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n *\r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n *\r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n *\r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n *\r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n *\r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n *\r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n *\r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing.\r\n *\r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load.\r\n *\r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n *\r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n *\r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n *\r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request.\r\n *\r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19,\r\n\r\n /**\r\n * File is pending being destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING_DESTROY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n FILE_PENDING_DESTROY: 20\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n *\r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n *\r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n *\r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {number} totalComplete - The total number of files that successfully loaded.\r\n * @param {number} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n *\r\n * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n *\r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n *\r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n *\r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n *\r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n *\r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n *\r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n *\r\n * This event is dispatched even if there aren't any files in the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\nvar GetURL = require('../GetURL');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n\r\n this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\r\n\r\n if (this.useImageElementLoad)\r\n {\r\n this.load = this.loadImage;\r\n this.onProcess = this.onProcessImage;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Handles image load processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n onProcessImage: function ()\r\n {\r\n var result = this.state;\r\n\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n if (result === CONST.FILE_LOADED)\r\n {\r\n this.onProcessComplete();\r\n }\r\n else\r\n {\r\n this.onProcessError();\r\n }\r\n },\r\n\r\n /**\r\n * Loads the image using either XHR or an Image tag.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n loadImage: function ()\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n _this.state = CONST.FILE_LOADED;\r\n\r\n _this.loader.nextFile(_this, true);\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n _this.loader.nextFile(_this, false);\r\n };\r\n\r\n this.data.src = this.src;\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n // Check if we have a linked normal map\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile)\r\n {\r\n // We do, but has it loaded?\r\n if (linkFile.state >= CONST.FILE_COMPLETE)\r\n {\r\n // Both files have loaded\r\n if (this.type === 'normalMap')\r\n {\r\n // linkFile.data = Image\r\n // this.data = Normal Map\r\n this.cache.addImage(this.key, linkFile.data, this.data);\r\n }\r\n else\r\n {\r\n // linkFile.data = Normal Map\r\n // this.data = Image\r\n this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n }\r\n\r\n // Nothing to do here, we'll use the linkFile `addToCache` call\r\n // to process this pair\r\n }\r\n else\r\n {\r\n this.cache.addImage(this.key, this.data);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\r\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\r\n * via the Image tag instead.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\r\n *\r\n * @class JSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar JSONFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function JSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n var extension = 'json';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataKey = GetFastValue(config, 'dataKey', dataKey);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'json',\r\n cache: loader.cacheManager.json,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: dataKey\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\r\n if (IsPlainObject(url))\r\n {\r\n if (dataKey)\r\n {\r\n this.data = GetValue(url, dataKey);\r\n }\r\n else\r\n {\r\n this.data = url;\r\n }\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n try\r\n {\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n catch (e)\r\n {\r\n this.onProcessError();\r\n\r\n throw e;\r\n }\r\n\r\n var key = this.config;\r\n\r\n if (typeof key === 'string')\r\n {\r\n this.data = GetValue(json, key, json);\r\n }\r\n else\r\n {\r\n this.data = json;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON file, or array of JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.json({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n *\r\n * ```json\r\n * {\r\n * \"level1\": {\r\n * \"baddies\": {\r\n * \"aliens\": {},\r\n * \"boss\": {}\r\n * }\r\n * },\r\n * \"level2\": {},\r\n * \"level3\": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#json\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new JSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = JSONFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var type = 'text';\r\n var extension = 'txt';\r\n var cache = loader.cacheManager.text;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n type = GetFastValue(config, 'type', type);\r\n cache = GetFastValue(config, 'cache', cache);\r\n }\r\n\r\n var fileConfig = {\r\n type: type,\r\n cache: cache,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {number} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\nvar Class = require('../utils/Class');\r\nvar Matrix4 = require('./Matrix4');\r\nvar NOOP = require('../utils/NOOP');\r\n\r\nvar tempMatrix = new Matrix4();\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Euler\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Euler = new Class({\r\n\r\n initialize:\r\n\r\n function Euler (x, y, z, order)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (z === undefined) { z = 0; }\r\n if (order === undefined) { order = Euler.DefaultOrder; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback = NOOP;\r\n },\r\n\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n order: {\r\n get: function ()\r\n {\r\n return this._order;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._order = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n set: function (x, y, z, order)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n copy: function (euler)\r\n {\r\n return this.set(euler.x, euler.y, euler.z, euler.order);\r\n },\r\n\r\n setFromQuaternion: function (quaternion, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n tempMatrix.fromQuat(quaternion);\r\n\r\n return this.setFromRotationMatrix(tempMatrix, order, update);\r\n },\r\n\r\n setFromRotationMatrix: function (matrix, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n var elements = matrix.val;\r\n\r\n // Upper 3x3 of matrix is un-scaled rotation matrix\r\n var m11 = elements[0];\r\n var m12 = elements[4];\r\n var m13 = elements[8];\r\n var m21 = elements[1];\r\n var m22 = elements[5];\r\n var m23 = elements[9];\r\n var m31 = elements[2];\r\n var m32 = elements[6];\r\n var m33 = elements[10];\r\n\r\n var x = 0;\r\n var y = 0;\r\n var z = 0;\r\n var epsilon = 0.99999;\r\n\r\n switch (order)\r\n {\r\n case 'XYZ':\r\n {\r\n y = Math.asin(Clamp(m13, -1, 1));\r\n\r\n if (Math.abs(m13) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m33);\r\n z = Math.atan2(-m12, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(m32, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n x = Math.asin(-Clamp(m23, -1, 1));\r\n\r\n if (Math.abs(m23) < epsilon)\r\n {\r\n y = Math.atan2(m13, m33);\r\n z = Math.atan2(m21, m22);\r\n }\r\n else\r\n {\r\n y = Math.atan2(-m31, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n x = Math.asin(Clamp(m32, -1, 1));\r\n\r\n if (Math.abs(m32) < epsilon)\r\n {\r\n y = Math.atan2(-m31, m33);\r\n z = Math.atan2(-m12, m22);\r\n }\r\n else\r\n {\r\n z = Math.atan2(m21, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n y = Math.asin(-Clamp(m31, -1, 1));\r\n\r\n if (Math.abs(m31) < epsilon)\r\n {\r\n x = Math.atan2(m32, m33);\r\n z = Math.atan2(m21, m11);\r\n }\r\n else\r\n {\r\n z = Math.atan2(-m12, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n z = Math.asin(Clamp(m21, -1, 1));\r\n\r\n if (Math.abs(m21) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m22);\r\n y = Math.atan2(-m31, m11);\r\n }\r\n else\r\n {\r\n y = Math.atan2(m13, m33);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n z = Math.asin(-Clamp(m12, -1, 1));\r\n\r\n if (Math.abs(m12) < epsilon)\r\n {\r\n x = Math.atan2(m32, m22);\r\n y = Math.atan2(m13, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(-m23, m33);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\r\n\r\nEuler.DefaultOrder = 'XYZ';\r\n\r\nmodule.exports = Euler;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent + min;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {number} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Greg McLean \r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Interpolates two given Vectors and returns a new Vector between them.\r\n *\r\n * Does not modify either of the passed Vectors.\r\n *\r\n * @function Phaser.Math.LinearXY\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\r\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\r\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\r\n */\r\nvar LinearXY = function (vector1, vector2, t)\r\n{\r\n if (t === undefined) { t = 0; }\r\n\r\n return vector1.clone().lerp(vector2, t);\r\n};\r\n\r\nmodule.exports = LinearXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Sets all values of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#setValues\r\n * @since 3.50.0\r\n *\r\n * @param {number} m00 - The m00 value.\r\n * @param {number} m01 - The m01 value.\r\n * @param {number} m02 - The m02 value.\r\n * @param {number} m03 - The m03 value.\r\n * @param {number} m10 - The m10 value.\r\n * @param {number} m11 - The m11 value.\r\n * @param {number} m12 - The m12 value.\r\n * @param {number} m13 - The m13 value.\r\n * @param {number} m20 - The m20 value.\r\n * @param {number} m21 - The m21 value.\r\n * @param {number} m22 - The m22 value.\r\n * @param {number} m23 - The m23 value.\r\n * @param {number} m30 - The m30 value.\r\n * @param {number} m31 - The m31 value.\r\n * @param {number} m32 - The m32 value.\r\n * @param {number} m33 - The m33 value.\r\n *\r\n * @return {this} This Matrix4 instance.\r\n */\r\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = m00;\r\n out[1] = m01;\r\n out[2] = m02;\r\n out[3] = m03;\r\n out[4] = m10;\r\n out[5] = m11;\r\n out[6] = m12;\r\n out[7] = m13;\r\n out[8] = m20;\r\n out[9] = m21;\r\n out[10] = m22;\r\n out[11] = m23;\r\n out[12] = m30;\r\n out[13] = m31;\r\n out[14] = m32;\r\n out[15] = m33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var a = src.val;\r\n\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} a - The array to copy the values from. Must have at least 16 elements.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Generates a transform matrix based on the given position, scale and rotation.\r\n *\r\n * @method Phaser.Math.Matrix4#transform\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {Phaser.Math.Vector3} scale - The scale vector.\r\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transform: function (position, scale, rotation)\r\n {\r\n var rotMatrix = _tempMat1.fromQuat(rotation);\r\n\r\n var rm = rotMatrix.val;\r\n\r\n var sx = scale.x;\r\n var sy = scale.y;\r\n var sz = scale.z;\r\n\r\n return this.setValues(\r\n rm[0] * sx,\r\n rm[1] * sx,\r\n rm[2] * sx,\r\n 0,\r\n\r\n rm[4] * sy,\r\n rm[5] * sy,\r\n rm[6] * sy,\r\n 0,\r\n\r\n rm[8] * sz,\r\n rm[9] * sz,\r\n rm[10] * sz,\r\n 0,\r\n\r\n position.x,\r\n position.y,\r\n position.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies the given Matrix4 into this Matrix and then inverses it.\r\n *\r\n * @method Phaser.Math.Matrix4#getInverse\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n getInverse: function (m)\r\n {\r\n this.copy(m);\r\n\r\n return this.invert();\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return this;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n return this.setValues(\r\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\r\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\r\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\r\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\r\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\r\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\r\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\r\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\r\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\r\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\r\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\r\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\r\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\r\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\r\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\r\n (a20 * b03 - a21 * b01 + a22 * b00) * det\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n return this.setValues(\r\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\r\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\r\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\r\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\r\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\r\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\r\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\r\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\r\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\r\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\r\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\r\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\r\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\r\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\r\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\r\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n return this.setValues(\r\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\r\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\r\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\r\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\r\n\r\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\r\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\r\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\r\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\r\n\r\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\r\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\r\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\r\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\r\n\r\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\r\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\r\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\r\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\r\n );\r\n },\r\n\r\n /**\r\n * Multiplies the given Matrix4 object with this Matrix.\r\n *\r\n * This is the same as calling `multiplyMatrices(m, this)`.\r\n *\r\n * @method Phaser.Math.Matrix4#premultiply\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n premultiply: function (m)\r\n {\r\n return this.multiplyMatrices(m, this);\r\n },\r\n\r\n /**\r\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyMatrices\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\r\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyMatrices: function (a, b)\r\n {\r\n var am = a.val;\r\n var bm = b.val;\r\n\r\n var a11 = am[0];\r\n var a12 = am[4];\r\n var a13 = am[8];\r\n var a14 = am[12];\r\n var a21 = am[1];\r\n var a22 = am[5];\r\n var a23 = am[9];\r\n var a24 = am[13];\r\n var a31 = am[2];\r\n var a32 = am[6];\r\n var a33 = am[10];\r\n var a34 = am[14];\r\n var a41 = am[3];\r\n var a42 = am[7];\r\n var a43 = am[11];\r\n var a44 = am[15];\r\n\r\n var b11 = bm[0];\r\n var b12 = bm[4];\r\n var b13 = bm[8];\r\n var b14 = bm[12];\r\n var b21 = bm[1];\r\n var b22 = bm[5];\r\n var b23 = bm[9];\r\n var b24 = bm[13];\r\n var b31 = bm[2];\r\n var b32 = bm[6];\r\n var b33 = bm[10];\r\n var b34 = bm[14];\r\n var b41 = bm[3];\r\n var b42 = bm[7];\r\n var b43 = bm[11];\r\n var b44 = bm[15];\r\n\r\n return this.setValues(\r\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\r\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\r\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\r\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\r\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\r\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\r\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\r\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\r\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\r\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\r\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\r\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\r\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\r\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\r\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\r\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\r\n );\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n return this.translateXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n return this.scaleXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n return this.setValues(\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n );\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return this;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n return this.setValues(\r\n a00 * b00 + a10 * b01 + a20 * b02,\r\n a01 * b00 + a11 * b01 + a21 * b02,\r\n a02 * b00 + a12 * b01 + a22 * b02,\r\n a03 * b00 + a13 * b01 + a23 * b02,\r\n a00 * b10 + a10 * b11 + a20 * b12,\r\n a01 * b10 + a11 * b11 + a21 * b12,\r\n a02 * b10 + a12 * b11 + a22 * b12,\r\n a03 * b10 + a13 * b11 + a23 * b12,\r\n a00 * b20 + a10 * b21 + a20 * b22,\r\n a01 * b20 + a11 * b21 + a21 * b22,\r\n a02 * b20 + a12 * b21 + a22 * b22,\r\n a03 * b20 + a13 * b21 + a23 * b22,\r\n a30, a31, a32, a33\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n v.x,\r\n v.y,\r\n v.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 0,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n (near * 2) * rl,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (near * 2) * tb,\r\n 0,\r\n 0,\r\n\r\n (right + left) * rl,\r\n (top + bottom) * tb,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (far * near * 2) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n f / aspect,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n f,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (2 * far * near) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n return this.setValues(\r\n (2 * near) / width,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (2 * near) / height,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n -far / (near - far),\r\n 1,\r\n\r\n 0,\r\n 0,\r\n (near * far) / (near - far),\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n return this.setValues(\r\n -2 * lr,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n -2 * bt,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 2 * nf,\r\n 0,\r\n\r\n (left + right) * lr,\r\n (top + bottom) * bt,\r\n (far + near) * nf,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAtRH\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\r\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAtRH: function (eye, target, up)\r\n {\r\n var m = this.val;\r\n\r\n _z.subVectors(eye, target);\r\n\r\n if (_z.getLengthSquared() === 0)\r\n {\r\n // eye and target are in the same position\r\n _z.z = 1;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n\r\n if (_x.getLengthSquared() === 0)\r\n {\r\n // up and z are parallel\r\n\r\n if (Math.abs(up.z) === 1)\r\n {\r\n _z.x += 0.0001;\r\n }\r\n else\r\n {\r\n _z.z += 0.0001;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n }\r\n\r\n _x.normalize();\r\n _y.crossVectors(_z, _x);\r\n\r\n m[0] = _x.x;\r\n m[1] = _x.y;\r\n m[2] = _x.z;\r\n m[4] = _y.x;\r\n m[5] = _y.y;\r\n m[6] = _y.z;\r\n m[8] = _z.x;\r\n m[9] = _z.y;\r\n m[10] = _z.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n return this.setValues(\r\n x0,\r\n y0,\r\n z0,\r\n 0,\r\n\r\n x1,\r\n y1,\r\n z1,\r\n 0,\r\n\r\n x2,\r\n y2,\r\n z2,\r\n 0,\r\n\r\n -(x0 * eyex + x1 * eyey + x2 * eyez),\r\n -(y0 * eyex + y1 * eyey + y2 * eyez),\r\n -(z0 * eyex + z1 * eyey + z2 * eyez),\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyToMat4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\r\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\r\n */\r\n multiplyToMat4: function (src, out)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b03 = b[3];\r\n var b10 = b[4];\r\n var b11 = b[5];\r\n var b12 = b[6];\r\n var b13 = b[7];\r\n var b20 = b[8];\r\n var b21 = b[9];\r\n var b22 = b[10];\r\n var b23 = b[11];\r\n var b30 = b[12];\r\n var b31 = b[13];\r\n var b32 = b[14];\r\n var b33 = b[15];\r\n\r\n return out.setValues(\r\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\r\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\r\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\r\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\r\n\r\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\r\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\r\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\r\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\r\n\r\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\r\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\r\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\r\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\r\n\r\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\r\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\r\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\r\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\r\n );\r\n },\r\n\r\n /**\r\n * Takes the rotation and position vectors and builds this Matrix4 from them.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationXYTranslation: function (rotation, position, translateFirst)\r\n {\r\n var x = position.x;\r\n var y = position.y;\r\n var z = position.z;\r\n\r\n var sx = Math.sin(rotation.x);\r\n var cx = Math.cos(rotation.x);\r\n\r\n var sy = Math.sin(rotation.y);\r\n var cy = Math.cos(rotation.y);\r\n\r\n var a30 = x;\r\n var a31 = y;\r\n var a32 = z;\r\n\r\n // Rotate X\r\n\r\n var b21 = -sx;\r\n\r\n // Rotate Y\r\n\r\n var c01 = 0 - b21 * sy;\r\n\r\n var c02 = 0 - cx * sy;\r\n\r\n var c21 = b21 * cy;\r\n\r\n var c22 = cx * cy;\r\n\r\n // Translate\r\n if (!translateFirst)\r\n {\r\n // a30 = cy * x + 0 * y + sy * z;\r\n a30 = cy * x + sy * z;\r\n a31 = c01 * x + cx * y + c21 * z;\r\n a32 = c02 * x + sx * y + c22 * z;\r\n }\r\n\r\n return this.setValues(\r\n cy,\r\n c01,\r\n c02,\r\n 0,\r\n 0,\r\n cx,\r\n sx,\r\n 0,\r\n sy,\r\n c21,\r\n c22,\r\n 0,\r\n a30,\r\n a31,\r\n a32,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Returns the maximum axis scale from this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\r\n * @since 3.50.0\r\n *\r\n * @return {number} The maximum axis scale.\r\n */\r\n getMaxScaleOnAxis: function ()\r\n {\r\n var m = this.val;\r\n\r\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\r\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\r\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\r\n\r\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat1 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat2 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _x = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _y = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _z = new Vector3();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Vladislav Forsh \r\n * @copyright 2021 RoboWhale\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\r\n * In case of an even number of values, the average of the two middle values is returned.\r\n *\r\n * @function Phaser.Math.Median\r\n * @since 3.54.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The median value.\r\n */\r\nvar Median = function (values)\r\n{\r\n var valuesNum = values.length;\r\n if (valuesNum === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n values.sort(function (a, b) { return a - b; });\r\n\r\n var halfIndex = Math.floor(valuesNum / 2);\r\n\r\n return valuesNum % 2 === 0\r\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\r\n : values[halfIndex];\r\n};\r\n\r\nmodule.exports = Median;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Matrix3 = require('./Matrix3');\r\nvar NOOP = require('../utils/NOOP');\r\nvar Vector3 = require('./Vector3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x component.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=1] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_x\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_y\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_z\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_w\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * This callback is invoked, if set, each time a value in this quaternion is changed.\r\n * The callback is passed one argument, a reference to this quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#onChangeCallback\r\n * @type {function}\r\n * @since 3.50.0\r\n */\r\n this.onChangeCallback = NOOP;\r\n\r\n this.set(x, y, z, w);\r\n },\r\n\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: {\r\n get: function ()\r\n {\r\n return this._w;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._w = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n return this.set(src);\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n * @param {boolean} [update=true] - Call the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w, update)\r\n {\r\n if (update === undefined) { update = true; }\r\n\r\n if (typeof x === 'object')\r\n {\r\n this._x = x.x || 0;\r\n this._y = x.y || 0;\r\n this._z = x.z || 0;\r\n this._w = x.w || 0;\r\n }\r\n else\r\n {\r\n this._x = x || 0;\r\n this._y = y || 0;\r\n this._z = z || 0;\r\n this._w = w || 0;\r\n }\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this._x += v.x;\r\n this._y += v.y;\r\n this._z += v.z;\r\n this._w += v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this._x -= v.x;\r\n this._y -= v.y;\r\n this._z -= v.z;\r\n this._w -= v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this._x *= scale;\r\n this._y *= scale;\r\n this._z *= scale;\r\n this._w *= scale;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this._x = x * len;\r\n this._y = y * len;\r\n this._z = z * len;\r\n this._w = w * len;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n return this.set(\r\n ax + t * (v.x - ax),\r\n ay + t * (v.y - ay),\r\n az + t * (v.z - az),\r\n aw + t * (v.w - aw)\r\n );\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n return this.set(0, 0, 0, 1);\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this._x = tmpvec.x;\r\n this._y = tmpvec.y;\r\n this._z = tmpvec.z;\r\n this._w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n return this.set(0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n return this.set(\r\n s * axis.x,\r\n s * axis.y,\r\n s * axis.z,\r\n Math.cos(rad)\r\n );\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n return this.set(\r\n ax * bw + aw * bx + ay * bz - az * by,\r\n ay * bw + aw * by + az * bx - ax * bz,\r\n az * bw + aw * bz + ax * by - ay * bx,\r\n aw * bw - ax * bx - ay * by - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n return this.set(\r\n scale0 * ax + scale1 * bx,\r\n scale0 * ay + scale1 * by,\r\n scale0 * az + scale1 * bz,\r\n scale0 * aw + scale1 * bw\r\n );\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n return this.set(\r\n -a0 * invDot,\r\n -a1 * invDot,\r\n -a2 * invDot,\r\n a3 * invDot\r\n );\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this._x = -this.x;\r\n this._y = -this.y;\r\n this._z = -this.z;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + aw * bx,\r\n ay * bw + az * bx,\r\n az * bw - ay * bx,\r\n aw * bw - ax * bx\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw - az * by,\r\n ay * bw + aw * by,\r\n az * bw + ax * by,\r\n aw * bw - ay * by\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + ay * bz,\r\n ay * bw - ax * bz,\r\n az * bw + aw * bz,\r\n aw * bw - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set this Quaternion from the given Euler, based on Euler order.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromEuler\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\r\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromEuler: function (euler, update)\r\n {\r\n var x = euler.x / 2;\r\n var y = euler.y / 2;\r\n var z = euler.z / 2;\r\n\r\n var c1 = Math.cos(x);\r\n var c2 = Math.cos(y);\r\n var c3 = Math.cos(z);\r\n\r\n var s1 = Math.sin(x);\r\n var s2 = Math.sin(y);\r\n var s3 = Math.sin(z);\r\n\r\n switch (euler.order)\r\n {\r\n case 'XYZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Quaternion from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromRotationMatrix: function (mat4)\r\n {\r\n var m = mat4.val;\r\n\r\n var m11 = m[0];\r\n var m12 = m[4];\r\n var m13 = m[8];\r\n var m21 = m[1];\r\n var m22 = m[5];\r\n var m23 = m[9];\r\n var m31 = m[2];\r\n var m32 = m[6];\r\n var m33 = m[10];\r\n\r\n var trace = m11 + m22 + m33;\r\n var s;\r\n\r\n if (trace > 0)\r\n {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n this.set(\r\n (m32 - m23) * s,\r\n (m13 - m31) * s,\r\n (m21 - m12) * s,\r\n 0.25 / s\r\n );\r\n }\r\n else if (m11 > m22 && m11 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n this.set(\r\n 0.25 * s,\r\n (m12 + m21) / s,\r\n (m13 + m31) / s,\r\n (m32 - m23) / s\r\n );\r\n }\r\n else if (m22 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n this.set(\r\n (m12 + m21) / s,\r\n 0.25 * s,\r\n (m23 + m32) / s,\r\n (m13 - m31) / s\r\n );\r\n }\r\n else\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n this.set(\r\n (m13 + m31) / s,\r\n (m23 + m32) / s,\r\n 0.25 * s,\r\n (m21 - m12) / s\r\n );\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this._x = (m[7] - m[5]) * fRoot;\r\n this._y = (m[2] - m[6]) * fRoot;\r\n this._z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this._x = tmp[0];\r\n this._y = tmp[1];\r\n this._z = tmp[2];\r\n this._w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {number} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n *\r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n *\r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n *\r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {number} index - The position within the grid to get the x/y value for.\r\n * @param {number} width - The width of the grid.\r\n * @param {number} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n }\r\n\r\n return out.set(x, y);\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y=x] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n },\r\n\r\n /**\r\n * Project this Vector onto another.\r\n *\r\n * @method Phaser.Math.Vector2#project\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n project: function (src)\r\n {\r\n var scalar = this.dot(src) / src.dot(src);\r\n\r\n return this.copy(src).scale(scalar);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.min` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#min\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n min: function (v)\r\n {\r\n this.x = Math.min(this.x, v.x);\r\n this.y = Math.min(this.y, v.y);\r\n this.z = Math.min(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#max\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n max: function (v)\r\n {\r\n this.x = Math.max(this.x, v.x);\r\n this.y = Math.max(this.y, v.y);\r\n this.z = Math.max(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Adds the two given Vector3s and sets the results into this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#addVectors\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addVectors: function (a, b)\r\n {\r\n this.x = a.x + b.x;\r\n this.y = a.y + b.y;\r\n this.z = a.z + b.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the position of the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixPosition\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixPosition: function (m)\r\n {\r\n return this.fromArray(m.val, 12);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the Matrix4 column specified.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixColumn\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\r\n * @param {number} index - The column index.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixColumn: function (mat4, index)\r\n {\r\n return this.fromArray(mat4.val, index * 4);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the given array, based on the offset.\r\n *\r\n * Vector3.x = array[offset]\r\n * Vector3.y = array[offset + 1]\r\n * Vector3.z = array[offset + 2]\r\n *\r\n * @method Phaser.Math.Vector3#fromArray\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} array - The array of values to get this Vector from.\r\n * @param {number} [offset=0] - The offset index into the array.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n fromArray: function (array, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.x = array[offset];\r\n this.y = array[offset + 1];\r\n this.z = array[offset + 2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add the given value to each component of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#addScalar\r\n * @since 3.50.0\r\n *\r\n * @param {number} s - The amount to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScalar: function (s)\r\n {\r\n this.x += s;\r\n this.y += s;\r\n this.z += s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add and scale a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#addScale\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n * @param {number} scale - The amount to scale `v` by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScale: function (v, scale)\r\n {\r\n this.x += v.x * scale;\r\n this.y += v.y * scale;\r\n this.z += v.z * scale || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix3 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix3\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix3: function (mat3)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat3.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6] * z;\r\n this.y = m[1] * x + m[4] * y + m[7] * z;\r\n this.z = m[2] * x + m[5] * y + m[8] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix4 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix4: function (mat4)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat4.val;\r\n\r\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\r\n\r\n this.x = (m[0] * x + m[4] * y + m[8] * z + m[12]) * w;\r\n this.y = (m[1] * x + m[5] * y + m[9] * z + m[13]) * w;\r\n this.z = (m[2] * x + m[6] * y + m[10] * z + m[14]) * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given view and projection matrices.\r\n *\r\n * @method Phaser.Math.Vector3#projectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n projectViewMatrix: function (viewMatrix, projectionMatrix)\r\n {\r\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\r\n *\r\n * @method Phaser.Math.Vector3#unprojectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\r\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\r\n {\r\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max`.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n if (value >= min && value <= max)\r\n {\r\n // Skip modulo if already in range\r\n return value;\r\n }\r\n\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n *\r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n *\r\n * Yes, we undertstand that this should actually be PI * 2, but\r\n * it has been like this for so long we can't change it now.\r\n * If you need PI * 2, use the PI2 constant instead.\r\n *\r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n *\r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n *\r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n *\r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n *\r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Euler: require('./Euler'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n LinearXY: require('./LinearXY'),\r\n MaxAdd: require('./MaxAdd'),\r\n Median: require('./Median'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {number} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n *\r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n *\r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n *\r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar corePlugins = {};\r\n\r\n// Contains the plugins that the dev has loaded into their game\r\n// These are the source objects, not instantiated.\r\nvar customPlugins = {};\r\n\r\nvar PluginCache = {};\r\n\r\n/**\r\n * @namespace Phaser.Plugins.PluginCache\r\n */\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @method Phaser.Plugins.PluginCache.register\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\r\n */\r\nPluginCache.register = function (key, plugin, mapping, custom)\r\n{\r\n if (custom === undefined) { custom = false; }\r\n\r\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\r\n};\r\n\r\n/**\r\n * Stores a custom plugin in the global plugin cache.\r\n * The key must be unique, within the scope of the cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.registerCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {?any} data - A value to be passed to the plugin's `init` method.\r\n */\r\nPluginCache.registerCustom = function (key, plugin, mapping, data)\r\n{\r\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the core plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\r\n */\r\nPluginCache.hasCore = function (key)\r\n{\r\n return corePlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the custom plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\r\n */\r\nPluginCache.hasCustom = function (key)\r\n{\r\n return customPlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Returns the core plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\r\n */\r\nPluginCache.getCore = function (key)\r\n{\r\n return corePlugins[key];\r\n};\r\n\r\n/**\r\n * Returns the custom plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\r\n */\r\nPluginCache.getCustom = function (key)\r\n{\r\n return customPlugins[key];\r\n};\r\n\r\n/**\r\n * Returns an object from the custom cache based on the given key that can be instantiated.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustomClass\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {function} The custom plugin object.\r\n */\r\nPluginCache.getCustomClass = function (key)\r\n{\r\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\r\n};\r\n\r\n/**\r\n * Removes a core plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.remove\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to remove.\r\n */\r\nPluginCache.remove = function (key)\r\n{\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes a custom plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.removeCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to remove.\r\n */\r\nPluginCache.removeCustom = function (key)\r\n{\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Core Plugins.\r\n *\r\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\r\n * So be sure you only call this if you do not wish to run Phaser again.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCorePlugins = function ()\r\n{\r\n for (var key in corePlugins)\r\n {\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Custom Plugins.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCustomPlugins = function ()\r\n{\r\n for (var key in customPlugins)\r\n {\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = PluginCache;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager, pluginKey)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The key under which this plugin was installed into the Scene Systems.\r\n *\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#pluginKey\r\n * @type {string}\r\n * @readonly\r\n * @since 3.54.0\r\n */\r\n this.pluginKey = pluginKey;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n *\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n *\r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n *\r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.ADD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n *\r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n *\r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n *\r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n *\r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n *\r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n *\r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n *\r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n *\r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n *\r\n * @name Phaser.BlendModes.HUE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n *\r\n * @name Phaser.BlendModes.ERASE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n *\r\n * @name Phaser.BlendModes.COPY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n *\r\n * @name Phaser.BlendModes.XOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Modes.\r\n *\r\n * @namespace Phaser.ScaleModes\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScaleModes = {\r\n\r\n /**\r\n * Default Scale Mode (Linear).\r\n *\r\n * @name Phaser.ScaleModes.DEFAULT\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n DEFAULT: 0,\r\n\r\n /**\r\n * Linear Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.LINEAR\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.NEAREST\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n\r\n};\r\n\r\nmodule.exports = ScaleModes;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n *\r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('boot', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#BOOT\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n *\r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n *\r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n *\r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('create', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#CREATE\r\n * @type {string}\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('destroy', listener)`.\r\n *\r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n *\r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n *\r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('pause', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('postupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author samme\r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre-Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_RENDER\r\n * @type {string}\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'prerender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('preupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('ready', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#READY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('render', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n *\r\n * @event Phaser.Scenes.Events#RENDER\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n *\r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('resume', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#RESUME\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('shutdown', listener)`.\r\n *\r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n *\r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n *\r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('sleep', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('start', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioncomplete', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioninit', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n *\r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionout', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n *\r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n *\r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionstart', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionwake', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists and the Scene is in a Running state, otherwise this is skipped.\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('update', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n *\r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('wake', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#WAKE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\r\n BOOT: require('./BOOT_EVENT'),\r\n CREATE: require('./CREATE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n PAUSE: require('./PAUSE_EVENT'),\r\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\r\n RENDER: require('./RENDER_EVENT'),\r\n RESUME: require('./RESUME_EVENT'),\r\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\r\n SLEEP: require('./SLEEP_EVENT'),\r\n START: require('./START_EVENT'),\r\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\r\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\r\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\r\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\r\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\r\n UPDATE: require('./UPDATE_EVENT'),\r\n WAKE: require('./WAKE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Clamp = require('../math/Clamp');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @classdesc\r\n * A Frame is a section of a Texture.\r\n *\r\n * @class Frame\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\r\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n */\r\nvar Frame = new Class({\r\n\r\n initialize:\r\n\r\n function Frame (texture, name, sourceIndex, x, y, width, height)\r\n {\r\n /**\r\n * The Texture this Frame is a part of.\r\n *\r\n * @name Phaser.Textures.Frame#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The name of this Frame.\r\n * The name is unique within the Texture.\r\n *\r\n * @name Phaser.Textures.Frame#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The TextureSource this Frame is part of.\r\n *\r\n * @name Phaser.Textures.Frame#source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @since 3.0.0\r\n */\r\n this.source = texture.source[sourceIndex];\r\n\r\n /**\r\n * The index of the TextureSource in the Texture sources array.\r\n *\r\n * @name Phaser.Textures.Frame#sourceIndex\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.sourceIndex = sourceIndex;\r\n\r\n /**\r\n * A reference to the Texture Source WebGL Texture that this Frame is using.\r\n *\r\n * @name Phaser.Textures.Frame#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this.glTexture = this.source.glTexture;\r\n\r\n /**\r\n * X position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutX;\r\n\r\n /**\r\n * Y position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutY;\r\n\r\n /**\r\n * The width of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutWidth;\r\n\r\n /**\r\n * The height of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutHeight;\r\n\r\n /**\r\n * The X rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The Y rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The rendering width of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width;\r\n\r\n /**\r\n * The rendering height of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height;\r\n\r\n /**\r\n * Half the width, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth;\r\n\r\n /**\r\n * Half the height, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight;\r\n\r\n /**\r\n * The x center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerX;\r\n\r\n /**\r\n * The y center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerY;\r\n\r\n /**\r\n * The horizontal pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotX = 0;\r\n\r\n /**\r\n * The vertical pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotY = 0;\r\n\r\n /**\r\n * Does this Frame have a custom pivot point?\r\n *\r\n * @name Phaser.Textures.Frame#customPivot\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customPivot = false;\r\n\r\n /**\r\n * **CURRENTLY UNSUPPORTED**\r\n *\r\n * Is this frame is rotated or not in the Texture?\r\n * Rotation allows you to use rotated frames in texture atlas packing.\r\n * It has nothing to do with Sprite rotation.\r\n *\r\n * @name Phaser.Textures.Frame#rotated\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rotated = false;\r\n\r\n /**\r\n * Over-rides the Renderer setting.\r\n * -1 = use Renderer Setting\r\n * 0 = No rounding\r\n * 1 = Round\r\n *\r\n * @name Phaser.Textures.Frame#autoRound\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.autoRound = -1;\r\n\r\n /**\r\n * Any Frame specific custom data can be stored here.\r\n *\r\n * @name Phaser.Textures.Frame#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * WebGL UV u0 value.\r\n *\r\n * @name Phaser.Textures.Frame#u0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u0 = 0;\r\n\r\n /**\r\n * WebGL UV v0 value.\r\n *\r\n * @name Phaser.Textures.Frame#v0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v0 = 0;\r\n\r\n /**\r\n * WebGL UV u1 value.\r\n *\r\n * @name Phaser.Textures.Frame#u1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u1 = 0;\r\n\r\n /**\r\n * WebGL UV v1 value.\r\n *\r\n * @name Phaser.Textures.Frame#v1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v1 = 0;\r\n\r\n /**\r\n * The un-modified source frame, trim and UV data.\r\n *\r\n * @name Phaser.Textures.Frame#data\r\n * @type {object}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n cut: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n trim: false,\r\n sourceSize: {\r\n w: 0,\r\n h: 0\r\n },\r\n spriteSourceSize: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n radius: 0,\r\n drawImage: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n }\r\n };\r\n\r\n this.setSize(width, height, x, y);\r\n },\r\n\r\n /**\r\n * Sets the width, height, x and y of this Frame.\r\n *\r\n * This is called automatically by the constructor\r\n * and should rarely be changed on-the-fly.\r\n *\r\n * @method Phaser.Textures.Frame#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {number} width - The width of the frame before being trimmed.\r\n * @param {number} height - The height of the frame before being trimmed.\r\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\r\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setSize: function (width, height, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.cutX = x;\r\n this.cutY = y;\r\n this.cutWidth = width;\r\n this.cutHeight = height;\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width * 0.5);\r\n this.halfHeight = Math.floor(height * 0.5);\r\n\r\n this.centerX = Math.floor(width / 2);\r\n this.centerY = Math.floor(height / 2);\r\n\r\n var data = this.data;\r\n var cut = data.cut;\r\n\r\n cut.x = x;\r\n cut.y = y;\r\n cut.w = width;\r\n cut.h = height;\r\n cut.r = x + width;\r\n cut.b = y + height;\r\n\r\n data.sourceSize.w = width;\r\n data.sourceSize.h = height;\r\n\r\n data.spriteSourceSize.w = width;\r\n data.spriteSourceSize.h = height;\r\n\r\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\r\n\r\n var drawImage = data.drawImage;\r\n\r\n drawImage.x = x;\r\n drawImage.y = y;\r\n drawImage.width = width;\r\n drawImage.height = height;\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\r\n *\r\n * @method Phaser.Textures.Frame#setTrim\r\n * @since 3.0.0\r\n *\r\n * @param {number} actualWidth - The width of the frame before being trimmed.\r\n * @param {number} actualHeight - The height of the frame before being trimmed.\r\n * @param {number} destX - The destination X position of the trimmed frame for display.\r\n * @param {number} destY - The destination Y position of the trimmed frame for display.\r\n * @param {number} destWidth - The destination width of the trimmed frame for display.\r\n * @param {number} destHeight - The destination height of the trimmed frame for display.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\r\n {\r\n var data = this.data;\r\n var ss = data.spriteSourceSize;\r\n\r\n // Store actual values\r\n\r\n data.trim = true;\r\n\r\n data.sourceSize.w = actualWidth;\r\n data.sourceSize.h = actualHeight;\r\n\r\n ss.x = destX;\r\n ss.y = destY;\r\n ss.w = destWidth;\r\n ss.h = destHeight;\r\n ss.r = destX + destWidth;\r\n ss.b = destY + destHeight;\r\n\r\n // Adjust properties\r\n this.x = destX;\r\n this.y = destY;\r\n\r\n this.width = destWidth;\r\n this.height = destHeight;\r\n\r\n this.halfWidth = destWidth * 0.5;\r\n this.halfHeight = destHeight * 0.5;\r\n\r\n this.centerX = Math.floor(destWidth / 2);\r\n this.centerY = Math.floor(destHeight / 2);\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * Takes a crop data object and, based on the rectangular region given, calculates the\r\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\r\n *\r\n * This is called directly by the Game Object Texture Components `setCrop` method.\r\n * Please use that method to crop a Game Object.\r\n *\r\n * @method Phaser.Textures.Frame#setCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\r\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\r\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\r\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\r\n {\r\n // Clamp the input values\r\n\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n var rw = this.realWidth;\r\n var rh = this.realHeight;\r\n\r\n x = Clamp(x, 0, rw);\r\n y = Clamp(y, 0, rh);\r\n\r\n width = Clamp(width, 0, rw - x);\r\n height = Clamp(height, 0, rh - y);\r\n\r\n var ox = cx + x;\r\n var oy = cy + y;\r\n var ow = width;\r\n var oh = height;\r\n\r\n var data = this.data;\r\n\r\n if (data.trim)\r\n {\r\n var ss = data.spriteSourceSize;\r\n\r\n // Need to check for intersection between the cut area and the crop area\r\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\r\n\r\n width = Clamp(width, 0, cw - x);\r\n height = Clamp(height, 0, ch - y);\r\n\r\n var cropRight = x + width;\r\n var cropBottom = y + height;\r\n\r\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\r\n\r\n if (intersects)\r\n {\r\n var ix = Math.max(ss.x, x);\r\n var iy = Math.max(ss.y, y);\r\n var iw = Math.min(ss.r, cropRight) - ix;\r\n var ih = Math.min(ss.b, cropBottom) - iy;\r\n\r\n ow = iw;\r\n oh = ih;\r\n\r\n if (flipX)\r\n {\r\n ox = cx + (cw - (ix - ss.x) - iw);\r\n }\r\n else\r\n {\r\n ox = cx + (ix - ss.x);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - (iy - ss.y) - ih);\r\n }\r\n else\r\n {\r\n oy = cy + (iy - ss.y);\r\n }\r\n\r\n x = ix;\r\n y = iy;\r\n\r\n width = iw;\r\n height = ih;\r\n }\r\n else\r\n {\r\n ox = 0;\r\n oy = 0;\r\n ow = 0;\r\n oh = 0;\r\n }\r\n }\r\n else\r\n {\r\n if (flipX)\r\n {\r\n ox = cx + (cw - x - width);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - y - height);\r\n }\r\n }\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n // Map the given coordinates into UV space, clamping to the 0-1 range.\r\n\r\n crop.u0 = Math.max(0, ox / tw);\r\n crop.v0 = Math.max(0, oy / th);\r\n crop.u1 = Math.min(1, (ox + ow) / tw);\r\n crop.v1 = Math.min(1, (oy + oh) / th);\r\n\r\n crop.x = x;\r\n crop.y = y;\r\n\r\n crop.cx = ox;\r\n crop.cy = oy;\r\n crop.cw = ow;\r\n crop.ch = oh;\r\n\r\n crop.width = width;\r\n crop.height = height;\r\n\r\n crop.flipX = flipX;\r\n crop.flipY = flipY;\r\n\r\n return crop;\r\n },\r\n\r\n /**\r\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\r\n * Called automatically by `setFrame`.\r\n *\r\n * @method Phaser.Textures.Frame#updateCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n updateCropUVs: function (crop, flipX, flipY)\r\n {\r\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\r\n },\r\n\r\n /**\r\n * Directly sets the canvas and WebGL UV data for this frame.\r\n *\r\n * Use this if you need to override the values that are generated automatically\r\n * when the Frame is created.\r\n *\r\n * @method Phaser.Textures.Frame#setUVs\r\n * @since 3.50.0\r\n *\r\n * @param {number} width - Width of this frame for the Canvas data.\r\n * @param {number} height - Height of this frame for the Canvas data.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setUVs: function (width, height, u0, v0, u1, v1)\r\n {\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = width;\r\n cd.height = height;\r\n\r\n // WebGL data\r\n\r\n this.u0 = u0;\r\n this.v0 = v0;\r\n\r\n this.u1 = u1;\r\n this.v1 = v1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache and the drawImage cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVs\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVs: function ()\r\n {\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = cw;\r\n cd.height = ch;\r\n\r\n // WebGL data\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = cx / tw;\r\n this.v0 = cy / th;\r\n\r\n this.u1 = (cx + cw) / tw;\r\n this.v1 = (cy + ch) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVsInverted\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVsInverted: function ()\r\n {\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = (this.cutX + this.cutHeight) / tw;\r\n this.v0 = this.cutY / th;\r\n\r\n this.u1 = this.cutX / tw;\r\n this.v1 = (this.cutY + this.cutWidth) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clones this Frame into a new Frame object.\r\n *\r\n * @method Phaser.Textures.Frame#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} A clone of this Frame.\r\n */\r\n clone: function ()\r\n {\r\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\r\n\r\n clone.cutX = this.cutX;\r\n clone.cutY = this.cutY;\r\n clone.cutWidth = this.cutWidth;\r\n clone.cutHeight = this.cutHeight;\r\n\r\n clone.x = this.x;\r\n clone.y = this.y;\r\n\r\n clone.width = this.width;\r\n clone.height = this.height;\r\n\r\n clone.halfWidth = this.halfWidth;\r\n clone.halfHeight = this.halfHeight;\r\n\r\n clone.centerX = this.centerX;\r\n clone.centerY = this.centerY;\r\n\r\n clone.rotated = this.rotated;\r\n\r\n clone.data = Extend(true, clone.data, this.data);\r\n\r\n clone.updateUVs();\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\r\n *\r\n * @method Phaser.Textures.Frame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.source = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n this.customData = null;\r\n this.data = null;\r\n },\r\n\r\n /**\r\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.w;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.h;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\r\n *\r\n * @name Phaser.Textures.Frame#radius\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.data.radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Frame trimmed or not?\r\n *\r\n * @name Phaser.Textures.Frame#trimmed\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n trimmed: {\r\n\r\n get: function ()\r\n {\r\n return this.data.trim;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Canvas drawImage data object.\r\n *\r\n * @name Phaser.Textures.Frame#canvasData\r\n * @type {object}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canvasData: {\r\n\r\n get: function ()\r\n {\r\n return this.data.drawImage;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Frame;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {boolean} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Tween States.\r\n *\r\n * @namespace Phaser.Tweens.States\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\n/**\r\n * Phaser Tween state constants.\r\n *\r\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.CREATED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n // 1 used to be INIT prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n // 3 used to be OFFSET_DELAY prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_RENDER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_FORWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.HOLD_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.REPEAT_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state. The Tween has been created but has not yet been added to the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING: 20,\r\n\r\n /**\r\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\r\n * or was playing and is currently paused, but in both cases it's still being processed by\r\n * the Tween Manager, so is considered 'active'.\r\n *\r\n * @name Phaser.Tweens.States.ACTIVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 21,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a loop countdown to elapse.\r\n *\r\n * @name Phaser.Tweens.States.LOOP_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a complete delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 23,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a starting delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.START_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n START_DELAY: 24,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_REMOVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state. The Tween has been removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.REMOVED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\r\n * so will not be automatically removed by the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.FINISHED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n FINISHED: 27,\r\n\r\n /**\r\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.DESTROYED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DESTROYED: 28,\r\n\r\n /**\r\n * A large integer value used for 'infinite' style countdowns.\r\n *\r\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\r\n * supported on IE.\r\n *\r\n * @name Phaser.Tweens.States.MAX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n MAX: 999999999999\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @ignore\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @ignore\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * Existing elements in the array are shifted up.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {number} [index=0] - The index in the array where the item will be inserted.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {number} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {number} startIndex - The start index to search from.\r\n * @param {number} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array and flattens it, returning a shallow-copy flattened array.\r\n *\r\n * @function Phaser.Utils.Array.Flatten\r\n * @since 3.60.0\r\n *\r\n * @param {array} array - The array to flatten.\r\n * @param {array} [output] - An array to hold the results in.\r\n *\r\n * @return {array} The flattened output array.\r\n */\r\nvar Flatten = function (array, output)\r\n{\r\n if (output === undefined) { output = []; }\r\n\r\n for (var i = 0; i < array.length; i++)\r\n {\r\n if (Array.isArray(array[i]))\r\n {\r\n Flatten(array[i], output);\r\n }\r\n else\r\n {\r\n output.push(array[i]);\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = Flatten;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element above another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveAbove\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move above base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveAbove = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex > baseIndex)\r\n {\r\n // item1 is already above item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === array.length - 1)\r\n {\r\n array.push(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveAbove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element below another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveBelow\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move below base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveBelow = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex < baseIndex)\r\n {\r\n // item1 is already below item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === 0)\r\n {\r\n array.unshift(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveBelow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {number} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\r\n\r\n/**\r\n * Create an array of numbers (positive and/or negative) progressing from `start`\r\n * up to but not including `end` by advancing by `step`.\r\n *\r\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\r\n *\r\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\r\n * for forward compatibility make sure to pass in actual numbers.\r\n *\r\n * @example\r\n * NumberArrayStep(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * NumberArrayStep(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * NumberArrayStep(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * NumberArrayStep(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * NumberArrayStep(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * NumberArrayStep(0);\r\n * // => []\r\n *\r\n * @function Phaser.Utils.Array.NumberArrayStep\r\n * @since 3.0.0\r\n *\r\n * @param {number} [start=0] - The start of the range.\r\n * @param {number} [end=null] - The end of the range.\r\n * @param {number} [step=1] - The value to increment or decrement by.\r\n *\r\n * @return {number[]} The array of number values.\r\n */\r\nvar NumberArrayStep = function (start, end, step)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (end === undefined) { end = null; }\r\n if (step === undefined) { step = 1; }\r\n\r\n if (end === null)\r\n {\r\n end = start;\r\n start = 0;\r\n }\r\n\r\n var result = [];\r\n\r\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n result.push(start);\r\n start += step;\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArrayStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {number} k - The k-th element index.\r\n * @param {number} [left=0] - The index of the left part of the range.\r\n * @param {number} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = require('../object/GetValue');\r\nvar Shuffle = require('./Shuffle');\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n *\r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n *\r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n *\r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n *\r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n *\r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n *\r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n var removed = [];\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n removed.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return removed;\r\n};\r\n\r\nmodule.exports = Remove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} startIndex - The start index to remove from.\r\n * @param {number} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {number} [start=0] - The array index to start the search from.\r\n * @param {number} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search within.\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The \"rotation\" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The \"rotation\" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n *\r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {number} startIndex - The start index.\r\n * @param {number} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {number} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n","/**\r\n * @author Richard Davey \r\n * @author Angry Bytes (and contributors)\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Device = require('../../device');\r\n\r\n/**\r\n * The comparator function.\r\n *\r\n * @ignore\r\n *\r\n * @param {*} a - The first item to test.\r\n * @param {*} b - The second itemt to test.\r\n *\r\n * @return {boolean} True if they localCompare, otherwise false.\r\n */\r\nfunction Compare (a, b)\r\n{\r\n return String(a).localeCompare(b);\r\n}\r\n\r\n/**\r\n * Process the array contents.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} array - The array to process.\r\n * @param {function} compare - The comparison function.\r\n *\r\n * @return {array} - The processed array.\r\n */\r\nfunction Process (array, compare)\r\n{\r\n // Short-circuit when there's nothing to sort.\r\n var len = array.length;\r\n\r\n if (len <= 1)\r\n {\r\n return array;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n\r\n for (var chk = 1; chk < len; chk *= 2)\r\n {\r\n RunPass(array, compare, chk, buffer);\r\n\r\n var tmp = array;\r\n\r\n array = buffer;\r\n\r\n buffer = tmp;\r\n }\r\n\r\n return array;\r\n}\r\n\r\n/**\r\n * Run a single pass with the given chunk size.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} arr - The array to run the pass on.\r\n * @param {function} comp - The comparison function.\r\n * @param {number} chk - The number of iterations.\r\n * @param {array} result - The array to store the result in.\r\n */\r\nfunction RunPass (arr, comp, chk, result)\r\n{\r\n var len = arr.length;\r\n var i = 0;\r\n\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl)\r\n {\r\n r = l + chk;\r\n e = r + chk;\r\n\r\n if (r > len)\r\n {\r\n r = len;\r\n }\r\n\r\n if (e > len)\r\n {\r\n e = len;\r\n }\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n\r\n while (true)\r\n {\r\n // Compare the chunks.\r\n if (li < r && ri < e)\r\n {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0)\r\n {\r\n result[i++] = arr[li++];\r\n }\r\n else\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n else if (li < r)\r\n {\r\n // Nothing to compare, just flush what's left.\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e)\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n else\r\n {\r\n // Both iterators are at the chunk ends.\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\r\n *\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The input array to be sorted.\r\n * @param {function} [compare] - The comparison function.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar StableSort = function (array, compare)\r\n{\r\n if (compare === undefined) { compare = Compare; }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n if (!array || array.length < 2)\r\n {\r\n return array;\r\n }\r\n\r\n if (Device.features.stableSort)\r\n {\r\n return array.sort(compare);\r\n }\r\n\r\n var result = Process(array, compare);\r\n\r\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\r\n if (result !== array)\r\n {\r\n RunPass(result, null, array.length, array);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = StableSort;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: require('./matrix'),\r\n\r\n Add: require('./Add'),\r\n AddAt: require('./AddAt'),\r\n BringToTop: require('./BringToTop'),\r\n CountAllMatching: require('./CountAllMatching'),\r\n Each: require('./Each'),\r\n EachInRange: require('./EachInRange'),\r\n FindClosestInSorted: require('./FindClosestInSorted'),\r\n Flatten: require('./Flatten'),\r\n GetAll: require('./GetAll'),\r\n GetFirst: require('./GetFirst'),\r\n GetRandom: require('./GetRandom'),\r\n MoveDown: require('./MoveDown'),\r\n MoveTo: require('./MoveTo'),\r\n MoveUp: require('./MoveUp'),\r\n MoveAbove: require('./MoveAbove'),\r\n MoveBelow: require('./MoveBelow'),\r\n NumberArray: require('./NumberArray'),\r\n NumberArrayStep: require('./NumberArrayStep'),\r\n QuickSelect: require('./QuickSelect'),\r\n Range: require('./Range'),\r\n Remove: require('./Remove'),\r\n RemoveAt: require('./RemoveAt'),\r\n RemoveBetween: require('./RemoveBetween'),\r\n RemoveRandomElement: require('./RemoveRandomElement'),\r\n Replace: require('./Replace'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateRight: require('./RotateRight'),\r\n SafeRange: require('./SafeRange'),\r\n SendToBack: require('./SendToBack'),\r\n SetAll: require('./SetAll'),\r\n Shuffle: require('./Shuffle'),\r\n SortByDigits: require('./SortByDigits'),\r\n SpliceOne: require('./SpliceOne'),\r\n StableSort: require('./StableSort'),\r\n Swap: require('./Swap')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = require('../../string/Pad');\r\nvar CheckMatrix = require('./CheckMatrix');\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = require('./CheckMatrix');\r\nvar TransposeMatrix = require('./TransposeMatrix');\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateLeft = require('../RotateLeft');\r\nvar RotateRight = require('../RotateRight');\r\n\r\n/**\r\n * Translates the given Array Matrix by shifting each column and row the\r\n * amount specified.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Translate\r\n * @since 3.50.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to translate.\r\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\r\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\r\n *\r\n * @return {T[][]} The translated matrix.\r\n */\r\nvar TranslateMatrix = function (matrix, x, y)\r\n{\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n // Vertical translation\r\n\r\n if (y !== 0)\r\n {\r\n if (y < 0)\r\n {\r\n // Shift Up\r\n RotateLeft(matrix, Math.abs(y));\r\n }\r\n else\r\n {\r\n // Shift Down\r\n RotateRight(matrix, y);\r\n }\r\n }\r\n\r\n // Horizontal translation\r\n\r\n if (x !== 0)\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n var row = matrix[i];\r\n\r\n if (x < 0)\r\n {\r\n RotateLeft(row, Math.abs(x));\r\n }\r\n else\r\n {\r\n RotateRight(row, x);\r\n }\r\n }\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = TranslateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n *\r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: require('./CheckMatrix'),\r\n MatrixToString: require('./MatrixToString'),\r\n ReverseColumns: require('./ReverseColumns'),\r\n ReverseRows: require('./ReverseRows'),\r\n Rotate180: require('./Rotate180'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateMatrix: require('./RotateMatrix'),\r\n RotateRight: require('./RotateRight'),\r\n Translate: require('./TranslateMatrix'),\r\n TransposeMatrix: require('./TransposeMatrix')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Deep Copy the given object or array.\r\n *\r\n * @function Phaser.Utils.Objects.DeepCopy\r\n * @since 3.50.0\r\n *\r\n * @param {object} obj - The object to deep copy.\r\n *\r\n * @return {object} A deep copy of the original object.\r\n */\r\nvar DeepCopy = function (inObject)\r\n{\r\n var outObject;\r\n var value;\r\n var key;\r\n\r\n if (typeof inObject !== 'object' || inObject === null)\r\n {\r\n // inObject is not an object\r\n return inObject;\r\n }\r\n\r\n // Create an array or object to hold the values\r\n outObject = Array.isArray(inObject) ? [] : {};\r\n\r\n for (key in inObject)\r\n {\r\n value = inObject[key];\r\n\r\n // Recursively (deep) copy for nested objects, including arrays\r\n outObject[key] = DeepCopy(value);\r\n }\r\n\r\n return outObject;\r\n};\r\n\r\nmodule.exports = DeepCopy;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n *\r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n *\r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\r\n *\r\n * The key is a string, which can be split based on the use of the period character.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * const source = {\r\n * lives: 3,\r\n * render: {\r\n * screen: {\r\n * width: 1024\r\n * }\r\n * }\r\n * }\r\n *\r\n * const lives = GetValue(source, 'lives', 1);\r\n * const width = GetValue(source, 'render.screen.width', 800);\r\n * const height = GetValue(source, 'render.screen.height', 600);\r\n * ```\r\n *\r\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\r\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\r\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue, altSource)\r\n{\r\n if ((!source && !altSource) || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source && source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (altSource && altSource.hasOwnProperty(key))\r\n {\r\n return altSource[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parentA = source;\r\n var parentB = altSource;\r\n var valueA = defaultValue;\r\n var valueB = defaultValue;\r\n var valueAFound = true;\r\n var valueBFound = true;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parentA && parentA.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentA has a key property, let's carry on down\r\n valueA = parentA[keys[i]];\r\n parentA = parentA[keys[i]];\r\n }\r\n else\r\n {\r\n valueAFound = false;\r\n }\r\n\r\n if (parentB && parentB.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentB has a key property, let's carry on down\r\n valueB = parentB[keys[i]];\r\n parentB = parentB[keys[i]];\r\n }\r\n else\r\n {\r\n valueBFound = false;\r\n }\r\n }\r\n\r\n if (valueAFound)\r\n {\r\n return valueA;\r\n }\r\n else if (valueBFound)\r\n {\r\n return valueB;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (!obj || typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and pads it out, to the length required, using the character\r\n * specified. For example if you need a string to be 6 characters long, you can call:\r\n *\r\n * `pad('bob', 6, '-', 2)`\r\n *\r\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\r\n *\r\n * You can also use it to pad numbers (they are always returned as strings):\r\n *\r\n * `pad(512, 6, '0', 1)`\r\n *\r\n * Would return: `000512` with the string padded to the left.\r\n *\r\n * If you don't specify a direction it'll pad to both sides:\r\n *\r\n * `pad('c64', 7, '*')`\r\n *\r\n * Would return: `**c64**`\r\n *\r\n * @function Phaser.Utils.String.Pad\r\n * @since 3.0.0\r\n *\r\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\r\n * @param {number} [len=0] - The number of characters to be added.\r\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\r\n * @param {number} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\r\n *\r\n * @return {string} The padded string.\r\n */\r\nvar Pad = function (str, len, pad, dir)\r\n{\r\n if (len === undefined) { len = 0; }\r\n if (pad === undefined) { pad = ' '; }\r\n if (dir === undefined) { dir = 3; }\r\n\r\n str = str.toString();\r\n\r\n var padlen = 0;\r\n\r\n if (len + 1 >= str.length)\r\n {\r\n switch (dir)\r\n {\r\n case 1:\r\n str = new Array(len + 1 - str.length).join(pad) + str;\r\n break;\r\n\r\n case 3:\r\n var right = Math.ceil((padlen = len - str.length) / 2);\r\n var left = padlen - right;\r\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\r\n break;\r\n\r\n default:\r\n str = str + new Array(len + 1 - str.length).join(pad);\r\n break;\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = Pad;\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./SpinePlugin.js\");\n",""],"names":[],"sourceRoot":""} +{"version":3,"file":"SpineCanvasPluginDebug.js","mappings":";;;;;;;;;;AAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0DAA0D,OAAO;AACjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,SAAS;AACnD;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA,gBAAgB,YAAY;AAC5B;;AAEA;AACA,4DAA4D;AAC5D,gEAAgE;AAChE,oEAAoE;AACpE,wEAAwE;AACxE;AACA,2DAA2D,SAAS;AACpE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,4DAA4D,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;;;AC/UA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,mBAAmB,mBAAO,CAAC,yFAAwC;AACnE,gBAAgB,mBAAO,CAAC,8FAA4C;AACpE,oBAAoB,mBAAO,CAAC,2FAAyC;AACrE,eAAe,mBAAO,CAAC,4FAA2C;AAClE,gBAAgB,mBAAO,CAAC,0EAAkC;AAC1D,eAAe,mBAAO,CAAC,4FAA2C;AAClE;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,kDAAkD;AAC7D,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,mBAAmB;AAC9B,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sFAAsF;AAC7H;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,yCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sGAAsG;AACrH,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC,eAAe,SAAS;AACxB,eAAe,uCAAuC;AACtD,eAAe,uCAAuC;AACtD,eAAe,QAAQ,yDAAyD;AAChF;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;;;;;;;;;;;AC9uCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oBAAoB,qBAAqB;AACzC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,KAAqB;AACzB,EAEC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC,8CAAe;AAClC,iBAAiB,mBAAO,CAAC,0DAAqB;AAC9C,WAAW,mBAAO,CAAC,8CAAe;;AAElC;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,8EAAoC;AAC/D,YAAY,mBAAO,CAAC,8DAA4B;AAChD,YAAY,mBAAO,CAAC,gEAA6B;AACjD,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,sBAAsB,mBAAO,CAAC,kGAA8C;AAC5E,qBAAqB,mBAAO,CAAC,gGAA6C;AAC1E,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oCAAoC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,mCAAmC;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,KAAqB;AACzB,EAGC;;AAED,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;AAC/B;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0DAA0D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtsBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;AACxC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ,qGAAqG;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,0BAA0B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,mBAAmB,+IAA+I;AACpN;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,GAAG,uBAAuB,OAAO;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,kBAAkB;AAChC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,0BAA0B;AACxC,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;AAC9C;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5qBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,wCAAwC;AACxC,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,2BAA2B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,oDAAoD;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAgE;AAC/E;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3OA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,6BAA6B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,4BAA4B;AAC9D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACpTA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC,0CAA0C;AAC1C,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B,+BAA+B;AAC/B,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,oCAAoC;AACpC,sCAAsC;AACtC,yCAAyC;AACzC,mCAAmC;AACnC,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,mCAAmC;AACnC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjKA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,sBAAsB,mBAAO,CAAC,mEAAwB;AACtD,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACrEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACpEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,2CAA2C;AAC3C,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,iCAAiC;AACjC,iCAAiC;AACjC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,mCAAmC;AACnC,qCAAqC;AACrC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,uCAAuC;AACvC,sCAAsC;AACtC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,oCAAoC;AACpC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,uCAAuC;AACvC,kCAAkC;AAClC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,2CAAU;AAC9B,gBAAgB,mBAAO,CAAC,mDAAc;AACtC,WAAW,mBAAO,CAAC,yCAAS;AAC5B,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,YAAY,mBAAO,CAAC,2CAAU;AAC9B,iBAAiB,mBAAO,CAAC,qDAAe;AACxC,kBAAkB,mBAAO,CAAC,uDAAgB;AAC1C,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,cAAc,mBAAO,CAAC,+CAAY;AAClC,cAAc,mBAAO,CAAC,+CAAY;AAClC,YAAY,mBAAO,CAAC,2CAAU;AAC9B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,cAAc,mBAAO,CAAC,+CAAY;AAClC,UAAU,mBAAO,CAAC,uCAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,+BAA+B;AAC1C,WAAW,2CAA2C;AACtD;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW,KAAK,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB,KAAK,gBAAgB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,KAAK,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAA0D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,oCAAoC;AACnD,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2DAA2D;AAC1E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACl5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mFAAmF;AACpG;AACA,eAAe,mFAAmF;AAClG;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC;AAClD;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,cAAc,mBAAO,CAAC,2CAAW;AACjC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC,eAAe,QAAQ;AACvB;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA,4GAA4G,sCAAsC;AAClJ,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/lBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA,eAAe,gCAAgC;AAC/C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChWA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAmE;AAClF;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,iBAAiB,gCAAgC;AACjD,oBAAoB,YAAY;AAChC;AACA,eAAe,gEAAgE;AAC/E,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,kCAAkC;AACjD,eAAe,uCAAuC;AACtD;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,6BAA6B;AAC9C,iBAAiB,0BAA0B;AAC3C,oBAAoB,OAAO;AAC3B;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wDAAwD;AACnF;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,wGAAwG;AACvH;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wGAAwG,UAAU;AACjI,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,SAAS,mBAAO,CAAC,mEAAkB;AACnC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uIAAuI;AACtJ,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,mGAAmG;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uDAAuD;AACtE;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAkC;AACjD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iDAAiD;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6FAA6F;AAC5G;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAoD;AAC5D;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,sBAAsB;AACtB,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3mBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,sDAAsD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,cAAc;AAC7B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,6DAAS;AAC5B,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,eAAe,mBAAO,CAAC,qEAAa;AACpC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,eAAe,mBAAO,CAAC,qEAAa;AACpC,qBAAqB,mBAAO,CAAC,iFAAmB;AAChD,aAAa,mBAAO,CAAC,iEAAW;AAChC;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,KAAK;AACzB;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC37CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;AACA;AACA,IAAI,KAAqB;AACzB,EAEC;AACD;AACA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;;AAEpD;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,sDAAY;AACnC,gBAAgB,mBAAO,CAAC,wDAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,aAAa,mBAAO,CAAC,kDAAU;AAC/B,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,mBAAmB;AAC9B;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,2DAAY;AACnC,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,WAAW,mBAAO,CAAC,oDAAc;AACjC,aAAa,mBAAO,CAAC,uDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjjBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,uCAAuC;AAClD;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3SA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,uCAAuC;AAClD;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,sCAAsC;AACtC,+BAA+B;AAC/B,8BAA8B;AAC9B,kCAAkC;AAClC,iCAAiC;AACjC,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,4BAA4B;AACvC,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,wDAAwD;AAClJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,oFAAoF,oDAAoD;AACxI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mBAAO,CAAC,4DAAa;AAC9B,cAAc,mBAAO,CAAC,sEAAkB;AACxC,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,uBAAuB,mBAAO,CAAC,wFAA2B;AAC1D,qBAAqB,mBAAO,CAAC,oFAAyB;AACtD,eAAe,mBAAO,CAAC,wEAAmB;AAC1C,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,kBAAkB,mBAAO,CAAC,8EAAsB;AAChD,cAAc,mBAAO,CAAC,sEAAkB;AACxC,WAAW,mBAAO,CAAC,gEAAe;AAClC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D,aAAa,mBAAO,CAAC,gDAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,wDAAwD;AACnE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,gDAAgD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wGAAwG;AACnH,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9VA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,mDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpRA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1vDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,gDAAgD;AAC3D;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AClxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/gCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACthBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,uCAAuC;AAClF;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,iCAAiC;AAC5E;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4CAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,yDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0CAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,0CAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;AACxC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;AAChC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iGAAoC;;;;;;;;;;;ACNpC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,oGAAqC;;;;;;;;;;;ACVrC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;AAClC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;AAC3B;AACA;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;AAC9E;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;AAC1B;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,oDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,8CAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;AACvD;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;AAC1C;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,kDAAkD;AAClD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wCAAwC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;AAC1B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,uCAAuC;AACnG;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,0CAA0C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,4CAA4C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1MA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,yCAAyC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8CAA8C;AACrF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,sDAAsD;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,uDAAuD;AACnI;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,YAAY,mBAAO,CAAC,iEAAgB;AACpC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,cAAc,mBAAO,CAAC,qEAAkB;AACxC,WAAW,mBAAO,CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;AAChC;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1NA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzPA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,oCAAoC;AACpC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,sDAAsD;AACtD,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE,qEAAqE;AACrE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,wBAAwB,mBAAO,CAAC,4EAA8B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,6BAA6B;AAC7B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA,6BAA6B,mBAAmB;AAChD;AACA,4BAA4B,SAAS;AACrC;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA,WAAW,KAAK;AAChB;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAc;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,0DAAU;AAC9B;AACA,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;AAC1B;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,iEAAa;AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;AAChD;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,8CAA8C,cAAc,oBAAoB;AAChF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UCrEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack:///../../../node_modules/eventemitter3/index.js","webpack:///./runtimes/spine-canvas.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///../../../src/const.js","webpack:///../../../src/data/DataManager.js","webpack:///../../../src/data/events/CHANGE_DATA_EVENT.js","webpack:///../../../src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///../../../src/data/events/DESTROY_EVENT.js","webpack:///../../../src/data/events/REMOVE_DATA_EVENT.js","webpack:///../../../src/data/events/SET_DATA_EVENT.js","webpack:///../../../src/data/events/index.js","webpack:///../../../src/device/Audio.js","webpack:///../../../src/device/Browser.js","webpack:///../../../src/device/CanvasFeatures.js","webpack:///../../../src/device/Features.js","webpack:///../../../src/device/Fullscreen.js","webpack:///../../../src/device/Input.js","webpack:///../../../src/device/OS.js","webpack:///../../../src/device/Video.js","webpack:///../../../src/device/index.js","webpack:///../../../src/display/ColorMatrix.js","webpack:///../../../src/display/canvas/CanvasPool.js","webpack:///../../../src/display/canvas/Smoothing.js","webpack:///../../../src/display/mask/BitmapMask.js","webpack:///../../../src/display/mask/GeometryMask.js","webpack:///../../../src/fx/Barrel.js","webpack:///../../../src/fx/Bloom.js","webpack:///../../../src/fx/Blur.js","webpack:///../../../src/fx/Bokeh.js","webpack:///../../../src/fx/Circle.js","webpack:///../../../src/fx/ColorMatrix.js","webpack:///../../../src/fx/Controller.js","webpack:///../../../src/fx/Displacement.js","webpack:///../../../src/fx/Glow.js","webpack:///../../../src/fx/Gradient.js","webpack:///../../../src/fx/Pixelate.js","webpack:///../../../src/fx/Shadow.js","webpack:///../../../src/fx/Shine.js","webpack:///../../../src/fx/Vignette.js","webpack:///../../../src/fx/Wipe.js","webpack:///../../../src/fx/const.js","webpack:///../../../src/fx/index.js","webpack:///../../../src/gameobjects/BuildGameObject.js","webpack:///../../../src/gameobjects/GameObject.js","webpack:///../../../src/gameobjects/GameObjectFactory.js","webpack:///../../../src/gameobjects/components/Alpha.js","webpack:///../../../src/gameobjects/components/AlphaSingle.js","webpack:///../../../src/gameobjects/components/BlendMode.js","webpack:///../../../src/gameobjects/components/ComputedSize.js","webpack:///../../../src/gameobjects/components/Crop.js","webpack:///../../../src/gameobjects/components/Depth.js","webpack:///../../../src/gameobjects/components/FX.js","webpack:///../../../src/gameobjects/components/Flip.js","webpack:///../../../src/gameobjects/components/GetBounds.js","webpack:///../../../src/gameobjects/components/Mask.js","webpack:///../../../src/gameobjects/components/Origin.js","webpack:///../../../src/gameobjects/components/PathFollower.js","webpack:///../../../src/gameobjects/components/Pipeline.js","webpack:///../../../src/gameobjects/components/PostPipeline.js","webpack:///../../../src/gameobjects/components/ScrollFactor.js","webpack:///../../../src/gameobjects/components/Size.js","webpack:///../../../src/gameobjects/components/Texture.js","webpack:///../../../src/gameobjects/components/TextureCrop.js","webpack:///../../../src/gameobjects/components/Tint.js","webpack:///../../../src/gameobjects/components/ToJSON.js","webpack:///../../../src/gameobjects/components/Transform.js","webpack:///../../../src/gameobjects/components/TransformMatrix.js","webpack:///../../../src/gameobjects/components/Visible.js","webpack:///../../../src/gameobjects/components/index.js","webpack:///../../../src/gameobjects/container/Container.js","webpack:///../../../src/gameobjects/container/ContainerCanvasRenderer.js","webpack:///../../../src/gameobjects/container/ContainerRender.js","webpack:///../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/DESTROY_EVENT.js","webpack:///../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/index.js","webpack:///../../../src/geom/const.js","webpack:///../../../src/geom/line/GetPoint.js","webpack:///../../../src/geom/line/GetPoints.js","webpack:///../../../src/geom/line/Length.js","webpack:///../../../src/geom/line/Line.js","webpack:///../../../src/geom/line/Random.js","webpack:///../../../src/geom/point/Point.js","webpack:///../../../src/geom/rectangle/Contains.js","webpack:///../../../src/geom/rectangle/GetPoint.js","webpack:///../../../src/geom/rectangle/GetPoints.js","webpack:///../../../src/geom/rectangle/Perimeter.js","webpack:///../../../src/geom/rectangle/Random.js","webpack:///../../../src/geom/rectangle/Rectangle.js","webpack:///../../../src/geom/rectangle/Union.js","webpack:///../../../src/loader/File.js","webpack:///../../../src/loader/FileTypesManager.js","webpack:///../../../src/loader/GetURL.js","webpack:///../../../src/loader/MergeXHRSettings.js","webpack:///../../../src/loader/MultiFile.js","webpack:///../../../src/loader/XHRLoader.js","webpack:///../../../src/loader/XHRSettings.js","webpack:///../../../src/loader/const.js","webpack:///../../../src/loader/events/ADD_EVENT.js","webpack:///../../../src/loader/events/COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_EVENT.js","webpack:///../../../src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///../../../src/loader/events/POST_PROCESS_EVENT.js","webpack:///../../../src/loader/events/PROGRESS_EVENT.js","webpack:///../../../src/loader/events/START_EVENT.js","webpack:///../../../src/loader/events/index.js","webpack:///../../../src/loader/filetypes/ImageFile.js","webpack:///../../../src/loader/filetypes/JSONFile.js","webpack:///../../../src/loader/filetypes/TextFile.js","webpack:///../../../src/math/Average.js","webpack:///../../../src/math/Bernstein.js","webpack:///../../../src/math/Between.js","webpack:///../../../src/math/CatmullRom.js","webpack:///../../../src/math/CeilTo.js","webpack:///../../../src/math/Clamp.js","webpack:///../../../src/math/DegToRad.js","webpack:///../../../src/math/Difference.js","webpack:///../../../src/math/Euler.js","webpack:///../../../src/math/Factorial.js","webpack:///../../../src/math/FloatBetween.js","webpack:///../../../src/math/FloorTo.js","webpack:///../../../src/math/FromPercent.js","webpack:///../../../src/math/GetSpeed.js","webpack:///../../../src/math/IsEven.js","webpack:///../../../src/math/IsEvenStrict.js","webpack:///../../../src/math/Linear.js","webpack:///../../../src/math/LinearXY.js","webpack:///../../../src/math/Matrix3.js","webpack:///../../../src/math/Matrix4.js","webpack:///../../../src/math/MaxAdd.js","webpack:///../../../src/math/Median.js","webpack:///../../../src/math/MinSub.js","webpack:///../../../src/math/Percent.js","webpack:///../../../src/math/Quaternion.js","webpack:///../../../src/math/RadToDeg.js","webpack:///../../../src/math/RandomXY.js","webpack:///../../../src/math/RandomXYZ.js","webpack:///../../../src/math/RandomXYZW.js","webpack:///../../../src/math/Rotate.js","webpack:///../../../src/math/RotateAround.js","webpack:///../../../src/math/RotateAroundDistance.js","webpack:///../../../src/math/RotateTo.js","webpack:///../../../src/math/RotateVec3.js","webpack:///../../../src/math/RoundAwayFromZero.js","webpack:///../../../src/math/RoundTo.js","webpack:///../../../src/math/SinCosTableGenerator.js","webpack:///../../../src/math/SmoothStep.js","webpack:///../../../src/math/SmootherStep.js","webpack:///../../../src/math/ToXY.js","webpack:///../../../src/math/TransformXY.js","webpack:///../../../src/math/Vector2.js","webpack:///../../../src/math/Vector3.js","webpack:///../../../src/math/Vector4.js","webpack:///../../../src/math/Within.js","webpack:///../../../src/math/Wrap.js","webpack:///../../../src/math/angle/Between.js","webpack:///../../../src/math/angle/BetweenPoints.js","webpack:///../../../src/math/angle/BetweenPointsY.js","webpack:///../../../src/math/angle/BetweenY.js","webpack:///../../../src/math/angle/CounterClockwise.js","webpack:///../../../src/math/angle/Normalize.js","webpack:///../../../src/math/angle/Random.js","webpack:///../../../src/math/angle/RandomDegrees.js","webpack:///../../../src/math/angle/Reverse.js","webpack:///../../../src/math/angle/RotateTo.js","webpack:///../../../src/math/angle/ShortestBetween.js","webpack:///../../../src/math/angle/Wrap.js","webpack:///../../../src/math/angle/WrapDegrees.js","webpack:///../../../src/math/angle/index.js","webpack:///../../../src/math/const.js","webpack:///../../../src/math/distance/DistanceBetween.js","webpack:///../../../src/math/distance/DistanceBetweenPoints.js","webpack:///../../../src/math/distance/DistanceBetweenPointsSquared.js","webpack:///../../../src/math/distance/DistanceChebyshev.js","webpack:///../../../src/math/distance/DistancePower.js","webpack:///../../../src/math/distance/DistanceSnake.js","webpack:///../../../src/math/distance/DistanceSquared.js","webpack:///../../../src/math/distance/index.js","webpack:///../../../src/math/easing/back/In.js","webpack:///../../../src/math/easing/back/InOut.js","webpack:///../../../src/math/easing/back/Out.js","webpack:///../../../src/math/easing/back/index.js","webpack:///../../../src/math/easing/bounce/In.js","webpack:///../../../src/math/easing/bounce/InOut.js","webpack:///../../../src/math/easing/bounce/Out.js","webpack:///../../../src/math/easing/bounce/index.js","webpack:///../../../src/math/easing/circular/In.js","webpack:///../../../src/math/easing/circular/InOut.js","webpack:///../../../src/math/easing/circular/Out.js","webpack:///../../../src/math/easing/circular/index.js","webpack:///../../../src/math/easing/cubic/In.js","webpack:///../../../src/math/easing/cubic/InOut.js","webpack:///../../../src/math/easing/cubic/Out.js","webpack:///../../../src/math/easing/cubic/index.js","webpack:///../../../src/math/easing/elastic/In.js","webpack:///../../../src/math/easing/elastic/InOut.js","webpack:///../../../src/math/easing/elastic/Out.js","webpack:///../../../src/math/easing/elastic/index.js","webpack:///../../../src/math/easing/expo/In.js","webpack:///../../../src/math/easing/expo/InOut.js","webpack:///../../../src/math/easing/expo/Out.js","webpack:///../../../src/math/easing/expo/index.js","webpack:///../../../src/math/easing/index.js","webpack:///../../../src/math/easing/linear/Linear.js","webpack:///../../../src/math/easing/linear/index.js","webpack:///../../../src/math/easing/quadratic/In.js","webpack:///../../../src/math/easing/quadratic/InOut.js","webpack:///../../../src/math/easing/quadratic/Out.js","webpack:///../../../src/math/easing/quadratic/index.js","webpack:///../../../src/math/easing/quartic/In.js","webpack:///../../../src/math/easing/quartic/InOut.js","webpack:///../../../src/math/easing/quartic/Out.js","webpack:///../../../src/math/easing/quartic/index.js","webpack:///../../../src/math/easing/quintic/In.js","webpack:///../../../src/math/easing/quintic/InOut.js","webpack:///../../../src/math/easing/quintic/Out.js","webpack:///../../../src/math/easing/quintic/index.js","webpack:///../../../src/math/easing/sine/In.js","webpack:///../../../src/math/easing/sine/InOut.js","webpack:///../../../src/math/easing/sine/Out.js","webpack:///../../../src/math/easing/sine/index.js","webpack:///../../../src/math/easing/stepped/Stepped.js","webpack:///../../../src/math/easing/stepped/index.js","webpack:///../../../src/math/fuzzy/Ceil.js","webpack:///../../../src/math/fuzzy/Equal.js","webpack:///../../../src/math/fuzzy/Floor.js","webpack:///../../../src/math/fuzzy/GreaterThan.js","webpack:///../../../src/math/fuzzy/LessThan.js","webpack:///../../../src/math/fuzzy/index.js","webpack:///../../../src/math/index.js","webpack:///../../../src/math/interpolation/BezierInterpolation.js","webpack:///../../../src/math/interpolation/CatmullRomInterpolation.js","webpack:///../../../src/math/interpolation/CubicBezierInterpolation.js","webpack:///../../../src/math/interpolation/LinearInterpolation.js","webpack:///../../../src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///../../../src/math/interpolation/SmoothStepInterpolation.js","webpack:///../../../src/math/interpolation/SmootherStepInterpolation.js","webpack:///../../../src/math/interpolation/index.js","webpack:///../../../src/math/pow2/GetPowerOfTwo.js","webpack:///../../../src/math/pow2/IsSizePowerOfTwo.js","webpack:///../../../src/math/pow2/IsValuePowerOfTwo.js","webpack:///../../../src/math/pow2/index.js","webpack:///../../../src/math/random-data-generator/RandomDataGenerator.js","webpack:///../../../src/math/snap/SnapCeil.js","webpack:///../../../src/math/snap/SnapFloor.js","webpack:///../../../src/math/snap/SnapTo.js","webpack:///../../../src/math/snap/index.js","webpack:///../../../src/plugins/BasePlugin.js","webpack:///../../../src/plugins/PluginCache.js","webpack:///../../../src/plugins/ScenePlugin.js","webpack:///../../../src/renderer/BlendModes.js","webpack:///../../../src/renderer/ScaleModes.js","webpack:///../../../src/scale/events/RESIZE_EVENT.js","webpack:///../../../src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/scene/events/BOOT_EVENT.js","webpack:///../../../src/scene/events/CREATE_EVENT.js","webpack:///../../../src/scene/events/DESTROY_EVENT.js","webpack:///../../../src/scene/events/PAUSE_EVENT.js","webpack:///../../../src/scene/events/POST_UPDATE_EVENT.js","webpack:///../../../src/scene/events/PRE_RENDER_EVENT.js","webpack:///../../../src/scene/events/PRE_UPDATE_EVENT.js","webpack:///../../../src/scene/events/READY_EVENT.js","webpack:///../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/scene/events/RENDER_EVENT.js","webpack:///../../../src/scene/events/RESUME_EVENT.js","webpack:///../../../src/scene/events/SHUTDOWN_EVENT.js","webpack:///../../../src/scene/events/SLEEP_EVENT.js","webpack:///../../../src/scene/events/START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///../../../src/scene/events/UPDATE_EVENT.js","webpack:///../../../src/scene/events/WAKE_EVENT.js","webpack:///../../../src/scene/events/index.js","webpack:///../../../src/textures/Frame.js","webpack:///../../../src/tweens/builders/GetBoolean.js","webpack:///../../../src/tweens/tween/const.js","webpack:///../../../src/utils/Class.js","webpack:///../../../src/utils/NOOP.js","webpack:///../../../src/utils/array/Add.js","webpack:///../../../src/utils/array/AddAt.js","webpack:///../../../src/utils/array/BringToTop.js","webpack:///../../../src/utils/array/CountAllMatching.js","webpack:///../../../src/utils/array/Each.js","webpack:///../../../src/utils/array/EachInRange.js","webpack:///../../../src/utils/array/FindClosestInSorted.js","webpack:///../../../src/utils/array/Flatten.js","webpack:///../../../src/utils/array/GetAll.js","webpack:///../../../src/utils/array/GetFirst.js","webpack:///../../../src/utils/array/GetRandom.js","webpack:///../../../src/utils/array/MoveAbove.js","webpack:///../../../src/utils/array/MoveBelow.js","webpack:///../../../src/utils/array/MoveDown.js","webpack:///../../../src/utils/array/MoveTo.js","webpack:///../../../src/utils/array/MoveUp.js","webpack:///../../../src/utils/array/NumberArray.js","webpack:///../../../src/utils/array/NumberArrayStep.js","webpack:///../../../src/utils/array/QuickSelect.js","webpack:///../../../src/utils/array/Range.js","webpack:///../../../src/utils/array/Remove.js","webpack:///../../../src/utils/array/RemoveAt.js","webpack:///../../../src/utils/array/RemoveBetween.js","webpack:///../../../src/utils/array/RemoveRandomElement.js","webpack:///../../../src/utils/array/Replace.js","webpack:///../../../src/utils/array/RotateLeft.js","webpack:///../../../src/utils/array/RotateRight.js","webpack:///../../../src/utils/array/SafeRange.js","webpack:///../../../src/utils/array/SendToBack.js","webpack:///../../../src/utils/array/SetAll.js","webpack:///../../../src/utils/array/Shuffle.js","webpack:///../../../src/utils/array/SortByDigits.js","webpack:///../../../src/utils/array/SpliceOne.js","webpack:///../../../src/utils/array/StableSort.js","webpack:///../../../src/utils/array/Swap.js","webpack:///../../../src/utils/array/index.js","webpack:///../../../src/utils/array/matrix/CheckMatrix.js","webpack:///../../../src/utils/array/matrix/MatrixToString.js","webpack:///../../../src/utils/array/matrix/ReverseColumns.js","webpack:///../../../src/utils/array/matrix/ReverseRows.js","webpack:///../../../src/utils/array/matrix/Rotate180.js","webpack:///../../../src/utils/array/matrix/RotateLeft.js","webpack:///../../../src/utils/array/matrix/RotateMatrix.js","webpack:///../../../src/utils/array/matrix/RotateRight.js","webpack:///../../../src/utils/array/matrix/TranslateMatrix.js","webpack:///../../../src/utils/array/matrix/TransposeMatrix.js","webpack:///../../../src/utils/array/matrix/index.js","webpack:///../../../src/utils/object/DeepCopy.js","webpack:///../../../src/utils/object/Extend.js","webpack:///../../../src/utils/object/GetAdvancedValue.js","webpack:///../../../src/utils/object/GetFastValue.js","webpack:///../../../src/utils/object/GetValue.js","webpack:///../../../src/utils/object/IsPlainObject.js","webpack:///../../../src/utils/string/Pad.js","webpack:///webpack/bootstrap","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["'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","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Animation = (function () {\r\n function Animation(name, timelines, duration) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (timelines == null)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n Animation.prototype.hasTimeline = function (id) {\r\n return this.timelineIds[id] == true;\r\n };\r\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n var timelines = this.timelines;\r\n for (var i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n };\r\n Animation.binarySearch = function (values, target, step) {\r\n if (step === void 0) { step = 1; }\r\n var low = 0;\r\n var high = values.length / step - 2;\r\n if (high == 0)\r\n return step;\r\n var current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high)\r\n return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n };\r\n Animation.linearSearch = function (values, target, step) {\r\n for (var i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target)\r\n return i;\r\n return -1;\r\n };\r\n return Animation;\r\n }());\r\n spine.Animation = Animation;\r\n var MixBlend;\r\n (function (MixBlend) {\r\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\r\n var MixDirection;\r\n (function (MixDirection) {\r\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n var TimelineType;\r\n (function (TimelineType) {\r\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n var CurveTimeline = (function () {\r\n function CurveTimeline(frameCount) {\r\n if (frameCount <= 0)\r\n throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n CurveTimeline.prototype.getFrameCount = function () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n };\r\n CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n };\r\n CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n };\r\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length)\r\n return CurveTimeline.LINEAR;\r\n var type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR)\r\n return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED)\r\n return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n };\r\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n var x = dfx, y = dfy;\r\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n };\r\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n percent = spine.MathUtils.clamp(percent, 0, 1);\r\n var curves = this.curves;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var type = curves[i];\r\n if (type == CurveTimeline.LINEAR)\r\n return percent;\r\n if (type == CurveTimeline.STEPPED)\r\n return 0;\r\n i++;\r\n var x = 0;\r\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n var prevX = void 0, prevY = void 0;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n }\r\n else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n var y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x);\r\n };\r\n CurveTimeline.LINEAR = 0;\r\n CurveTimeline.STEPPED = 1;\r\n CurveTimeline.BEZIER = 2;\r\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n return CurveTimeline;\r\n }());\r\n spine.CurveTimeline = CurveTimeline;\r\n var RotateTimeline = (function (_super) {\r\n __extends(RotateTimeline, _super);\r\n function RotateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n return _this;\r\n }\r\n RotateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n };\r\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n };\r\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n var r_1 = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r_2 * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r_2 += bone.data.rotation - bone.rotation;\r\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n case MixBlend.add:\r\n bone.rotation += r_2 * alpha;\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n };\r\n RotateTimeline.ENTRIES = 2;\r\n RotateTimeline.PREV_TIME = -2;\r\n RotateTimeline.PREV_ROTATION = -1;\r\n RotateTimeline.ROTATION = 1;\r\n return RotateTimeline;\r\n }(CurveTimeline));\r\n spine.RotateTimeline = RotateTimeline;\r\n var TranslateTimeline = (function (_super) {\r\n __extends(TranslateTimeline, _super);\r\n function TranslateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TranslateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n };\r\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n };\r\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n };\r\n TranslateTimeline.ENTRIES = 3;\r\n TranslateTimeline.PREV_TIME = -3;\r\n TranslateTimeline.PREV_X = -2;\r\n TranslateTimeline.PREV_Y = -1;\r\n TranslateTimeline.X = 1;\r\n TranslateTimeline.Y = 2;\r\n return TranslateTimeline;\r\n }(CurveTimeline));\r\n spine.TranslateTimeline = TranslateTimeline;\r\n var ScaleTimeline = (function (_super) {\r\n __extends(ScaleTimeline, _super);\r\n function ScaleTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ScaleTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n };\r\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n }\r\n else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n }\r\n else {\r\n var bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = spine.MathUtils.signum(x);\r\n by = spine.MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n };\r\n return ScaleTimeline;\r\n }(TranslateTimeline));\r\n spine.ScaleTimeline = ScaleTimeline;\r\n var ShearTimeline = (function (_super) {\r\n __extends(ShearTimeline, _super);\r\n function ShearTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ShearTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n };\r\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n };\r\n return ShearTimeline;\r\n }(TranslateTimeline));\r\n spine.ShearTimeline = ShearTimeline;\r\n var ColorTimeline = (function (_super) {\r\n __extends(ColorTimeline, _super);\r\n function ColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n ColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n };\r\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n };\r\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n var color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n var color = slot.color;\r\n if (blend == MixBlend.setup)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n };\r\n ColorTimeline.ENTRIES = 5;\r\n ColorTimeline.PREV_TIME = -5;\r\n ColorTimeline.PREV_R = -4;\r\n ColorTimeline.PREV_G = -3;\r\n ColorTimeline.PREV_B = -2;\r\n ColorTimeline.PREV_A = -1;\r\n ColorTimeline.R = 1;\r\n ColorTimeline.G = 2;\r\n ColorTimeline.B = 3;\r\n ColorTimeline.A = 4;\r\n return ColorTimeline;\r\n }(CurveTimeline));\r\n spine.ColorTimeline = ColorTimeline;\r\n var TwoColorTimeline = (function (_super) {\r\n __extends(TwoColorTimeline, _super);\r\n function TwoColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TwoColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n };\r\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n };\r\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n }\r\n else {\r\n var light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n };\r\n TwoColorTimeline.ENTRIES = 8;\r\n TwoColorTimeline.PREV_TIME = -8;\r\n TwoColorTimeline.PREV_R = -7;\r\n TwoColorTimeline.PREV_G = -6;\r\n TwoColorTimeline.PREV_B = -5;\r\n TwoColorTimeline.PREV_A = -4;\r\n TwoColorTimeline.PREV_R2 = -3;\r\n TwoColorTimeline.PREV_G2 = -2;\r\n TwoColorTimeline.PREV_B2 = -1;\r\n TwoColorTimeline.R = 1;\r\n TwoColorTimeline.G = 2;\r\n TwoColorTimeline.B = 3;\r\n TwoColorTimeline.A = 4;\r\n TwoColorTimeline.R2 = 5;\r\n TwoColorTimeline.G2 = 6;\r\n TwoColorTimeline.B2 = 7;\r\n return TwoColorTimeline;\r\n }(CurveTimeline));\r\n spine.TwoColorTimeline = TwoColorTimeline;\r\n var AttachmentTimeline = (function () {\r\n function AttachmentTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n AttachmentTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n };\r\n AttachmentTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n };\r\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frameIndex = 0;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n var attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n return AttachmentTimeline;\r\n }());\r\n spine.AttachmentTimeline = AttachmentTimeline;\r\n var zeros = null;\r\n var DeformTimeline = (function (_super) {\r\n __extends(DeformTimeline, _super);\r\n function DeformTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount);\r\n _this.frameVertices = new Array(frameCount);\r\n if (zeros == null)\r\n zeros = spine.Utils.newFloatArray(64);\r\n return _this;\r\n }\r\n DeformTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n };\r\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n };\r\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var slotAttachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\r\n return;\r\n var deformArray = slot.deform;\r\n if (deformArray.length == 0)\r\n blend = MixBlend.setup;\r\n var frameVertices = this.frameVertices;\r\n var vertexCount = frameVertices[0].length;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n var vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n }\r\n else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) {\r\n var lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n }\r\n }\r\n else {\r\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n deform[i_2] += lastVertices[i_2];\r\n }\r\n }\r\n else {\r\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_1 = slotAttachment;\r\n if (vertexAttachment_1.bones == null) {\r\n var setupVertices = vertexAttachment_1.vertices;\r\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n var setup = setupVertices[i_3];\r\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n deform[i_4] = lastVertices[i_4] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n deform[i_7] += lastVertices[i_7] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time);\r\n var prevVertices = frameVertices[frame - 1];\r\n var nextVertices = frameVertices[frame];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n var prev = prevVertices[i_8];\r\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n }\r\n }\r\n else {\r\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n var prev = prevVertices[i_9];\r\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n var prev = prevVertices[i_10];\r\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_2 = slotAttachment;\r\n if (vertexAttachment_2.bones == null) {\r\n var setupVertices = vertexAttachment_2.vertices;\r\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n var prev = prevVertices[i_12];\r\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n var prev = prevVertices[i_13];\r\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n var prev = prevVertices[i_14];\r\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n var prev = prevVertices[i_15];\r\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n return DeformTimeline;\r\n }(CurveTimeline));\r\n spine.DeformTimeline = DeformTimeline;\r\n var EventTimeline = (function () {\r\n function EventTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n EventTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.event << 24;\r\n };\r\n EventTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n };\r\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (firedEvents == null)\r\n return;\r\n var frames = this.frames;\r\n var frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n }\r\n else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n var frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n var frameTime = frames[frame];\r\n while (frame > 0) {\r\n if (frames[frame - 1] != frameTime)\r\n break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n };\r\n return EventTimeline;\r\n }());\r\n spine.EventTimeline = EventTimeline;\r\n var DrawOrderTimeline = (function () {\r\n function DrawOrderTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n DrawOrderTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.drawOrder << 24;\r\n };\r\n DrawOrderTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n };\r\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var drawOrder = skeleton.drawOrder;\r\n var slots = skeleton.slots;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frame = 0;\r\n if (time >= frames[frames.length - 1])\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n var drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n };\r\n return DrawOrderTimeline;\r\n }());\r\n spine.DrawOrderTimeline = DrawOrderTimeline;\r\n var IkConstraintTimeline = (function (_super) {\r\n __extends(IkConstraintTimeline, _super);\r\n function IkConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n IkConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n };\r\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n };\r\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n };\r\n IkConstraintTimeline.ENTRIES = 6;\r\n IkConstraintTimeline.PREV_TIME = -6;\r\n IkConstraintTimeline.PREV_MIX = -5;\r\n IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n IkConstraintTimeline.PREV_COMPRESS = -2;\r\n IkConstraintTimeline.PREV_STRETCH = -1;\r\n IkConstraintTimeline.MIX = 1;\r\n IkConstraintTimeline.SOFTNESS = 2;\r\n IkConstraintTimeline.BEND_DIRECTION = 3;\r\n IkConstraintTimeline.COMPRESS = 4;\r\n IkConstraintTimeline.STRETCH = 5;\r\n return IkConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.IkConstraintTimeline = IkConstraintTimeline;\r\n var TransformConstraintTimeline = (function (_super) {\r\n __extends(TransformConstraintTimeline, _super);\r\n function TransformConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n };\r\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n };\r\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n var data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n };\r\n TransformConstraintTimeline.ENTRIES = 5;\r\n TransformConstraintTimeline.PREV_TIME = -5;\r\n TransformConstraintTimeline.PREV_ROTATE = -4;\r\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n TransformConstraintTimeline.PREV_SCALE = -2;\r\n TransformConstraintTimeline.PREV_SHEAR = -1;\r\n TransformConstraintTimeline.ROTATE = 1;\r\n TransformConstraintTimeline.TRANSLATE = 2;\r\n TransformConstraintTimeline.SCALE = 3;\r\n TransformConstraintTimeline.SHEAR = 4;\r\n return TransformConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n var PathConstraintPositionTimeline = (function (_super) {\r\n __extends(PathConstraintPositionTimeline, _super);\r\n function PathConstraintPositionTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n };\r\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n var position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n };\r\n PathConstraintPositionTimeline.ENTRIES = 2;\r\n PathConstraintPositionTimeline.PREV_TIME = -2;\r\n PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n PathConstraintPositionTimeline.VALUE = 1;\r\n return PathConstraintPositionTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n var PathConstraintSpacingTimeline = (function (_super) {\r\n __extends(PathConstraintSpacingTimeline, _super);\r\n function PathConstraintSpacingTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n var spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n };\r\n return PathConstraintSpacingTimeline;\r\n }(PathConstraintPositionTimeline));\r\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n var PathConstraintMixTimeline = (function (_super) {\r\n __extends(PathConstraintMixTimeline, _super);\r\n function PathConstraintMixTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n };\r\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n };\r\n PathConstraintMixTimeline.ENTRIES = 3;\r\n PathConstraintMixTimeline.PREV_TIME = -3;\r\n PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n PathConstraintMixTimeline.ROTATE = 1;\r\n PathConstraintMixTimeline.TRANSLATE = 2;\r\n return PathConstraintMixTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationState = (function () {\r\n function AnimationState(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new spine.IntSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n this.data = data;\r\n }\r\n AnimationState.prototype.update = function (delta) {\r\n delta *= this.timeScale;\r\n var tracks = this.tracks;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n var currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n var next = current.next;\r\n if (next != null) {\r\n var nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n }\r\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n var from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null)\r\n from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n var from = to.mixingFrom;\r\n if (from == null)\r\n return true;\r\n var finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n };\r\n AnimationState.prototype.apply = function (skeleton) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n var events = this.events;\r\n var tracks = this.tracks;\r\n var applied = false;\r\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\r\n var current = tracks[i_16];\r\n if (current == null || current.delay > 0)\r\n continue;\r\n applied = true;\r\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\r\n var mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n var timelineCount = current.animation.timelines.length;\r\n var timelines = current.animation.timelines;\r\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n else {\r\n var timelineMode = current.timelineMode;\r\n var firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = current.timelinesRotation;\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n var timeline_1 = timelines[ii];\r\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\r\n if (timeline_1 instanceof spine.RotateTimeline) {\r\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n }\r\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\r\n }\r\n else {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n };\r\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n var from = to.mixingFrom;\r\n if (from.mixingFrom != null)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n var mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == spine.MixBlend.first)\r\n blend = spine.MixBlend.setup;\r\n }\r\n else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != spine.MixBlend.first)\r\n blend = from.mixBlend;\r\n }\r\n var events = mix < from.eventThreshold ? this.events : null;\r\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n var timelineCount = from.animation.timelines.length;\r\n var timelines = from.animation.timelines;\r\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == spine.MixBlend.add) {\r\n for (var i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\r\n }\r\n else {\r\n var timelineMode = from.timelineMode;\r\n var timelineHoldMix = from.timelineHoldMix;\r\n var firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = from.timelinesRotation;\r\n from.totalAlpha = 0;\r\n for (var i = 0; i < timelineCount; i++) {\r\n var timeline = timelines[i];\r\n var direction = spine.MixDirection.mixOut;\r\n var timelineBlend = void 0;\r\n var alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = spine.MixBlend.setup;\r\n var holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof spine.RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n spine.Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\r\n direction = spine.MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n };\r\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = timeline.frames;\r\n if (time < frames[0]) {\r\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n };\r\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n };\r\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\r\n return;\r\n }\r\n var rotateTimeline = timeline;\r\n var frames = rotateTimeline.frames;\r\n var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n var r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case spine.MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case spine.MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n }\r\n else {\r\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n else {\r\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n var total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n }\r\n else {\r\n var lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n }\r\n else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n var current = diff > 0, dir = lastTotal >= 0;\r\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * spine.MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n };\r\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n var duration = animationEnd - animationStart;\r\n var trackLastWrapped = entry.trackLast % duration;\r\n var events = this.events;\r\n var i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n var event_1 = events[i];\r\n if (event_1.time < trackLastWrapped)\r\n break;\r\n if (event_1.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event_1);\r\n }\r\n var complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n var event_2 = events[i];\r\n if (event_2.time < animationStart)\r\n continue;\r\n this.queue.event(entry, events[i]);\r\n }\r\n };\r\n AnimationState.prototype.clearTracks = function () {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.clearTrack = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n var current = this.tracks[trackIndex];\r\n if (current == null)\r\n return;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n var entry = current;\r\n while (true) {\r\n var from = entry.mixingFrom;\r\n if (from == null)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n var from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n if (from != null) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n };\r\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n };\r\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var interrupt = true;\r\n var current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n }\r\n else\r\n this.disposeNext(current);\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n };\r\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n };\r\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n }\r\n else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n var duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n }\r\n else\r\n delay = last.trackTime;\r\n }\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n if (delay <= 0)\r\n delay -= mixDuration;\r\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var current = this.tracks[i];\r\n if (current != null)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.expandToIndex = function (index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n };\r\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n var entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = spine.MixBlend.replace;\r\n return entry;\r\n };\r\n AnimationState.prototype.disposeNext = function (entry) {\r\n var next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n };\r\n AnimationState.prototype._animationsChanged = function () {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var entry = this.tracks[i];\r\n if (entry == null)\r\n continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null);\r\n }\r\n };\r\n AnimationState.prototype.computeHold = function (entry) {\r\n var to = entry.mixingTo;\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n var propertyIDs = this.propertyIDs;\r\n if (to != null && to.holdPrevious) {\r\n for (var i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n outer: for (var i = 0; i < timelinesCount; i++) {\r\n var timeline = timelines[i];\r\n var id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\r\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n }\r\n else {\r\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.getCurrent = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n };\r\n AnimationState.prototype.addListener = function (listener) {\r\n if (listener == null)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n };\r\n AnimationState.prototype.removeListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n };\r\n AnimationState.prototype.clearListeners = function () {\r\n this.listeners.length = 0;\r\n };\r\n AnimationState.prototype.clearListenerNotifications = function () {\r\n this.queue.clear();\r\n };\r\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n AnimationState.SUBSEQUENT = 0;\r\n AnimationState.FIRST = 1;\r\n AnimationState.HOLD_SUBSEQUENT = 2;\r\n AnimationState.HOLD_FIRST = 3;\r\n AnimationState.HOLD_MIX = 4;\r\n AnimationState.SETUP = 1;\r\n AnimationState.CURRENT = 2;\r\n return AnimationState;\r\n }());\r\n spine.AnimationState = AnimationState;\r\n var TrackEntry = (function () {\r\n function TrackEntry() {\r\n this.mixBlend = spine.MixBlend.replace;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n TrackEntry.prototype.reset = function () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n };\r\n TrackEntry.prototype.getAnimationTime = function () {\r\n if (this.loop) {\r\n var duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n };\r\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n };\r\n TrackEntry.prototype.isComplete = function () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n };\r\n TrackEntry.prototype.resetRotationDirections = function () {\r\n this.timelinesRotation.length = 0;\r\n };\r\n return TrackEntry;\r\n }());\r\n spine.TrackEntry = TrackEntry;\r\n var EventQueue = (function () {\r\n function EventQueue(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n EventQueue.prototype.start = function (entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.interrupt = function (entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.end = function (entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.dispose = function (entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.complete = function (entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.event = function (entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n };\r\n EventQueue.prototype.drain = function () {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n var objects = this.objects;\r\n var listeners = this.animState.listeners;\r\n for (var i = 0; i < objects.length; i += 2) {\r\n var type = objects[i];\r\n var entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start)\r\n listeners[ii].start(entry);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt)\r\n listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end)\r\n listeners[ii].end(entry);\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose)\r\n listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete)\r\n listeners[ii].complete(entry);\r\n break;\r\n case EventType.event:\r\n var event_3 = objects[i++ + 2];\r\n if (entry.listener != null && entry.listener.event)\r\n entry.listener.event(entry, event_3);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event)\r\n listeners[ii].event(entry, event_3);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n };\r\n EventQueue.prototype.clear = function () {\r\n this.objects.length = 0;\r\n };\r\n return EventQueue;\r\n }());\r\n spine.EventQueue = EventQueue;\r\n var EventType;\r\n (function (EventType) {\r\n EventType[EventType[\"start\"] = 0] = \"start\";\r\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType[EventType[\"end\"] = 2] = \"end\";\r\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n EventType[EventType[\"event\"] = 5] = \"event\";\r\n })(EventType = spine.EventType || (spine.EventType = {}));\r\n var AnimationStateAdapter = (function () {\r\n function AnimationStateAdapter() {\r\n }\r\n AnimationStateAdapter.prototype.start = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.end = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.dispose = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.complete = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.event = function (entry, event) {\r\n };\r\n return AnimationStateAdapter;\r\n }());\r\n spine.AnimationStateAdapter = AnimationStateAdapter;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationStateData = (function () {\r\n function AnimationStateData(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (skeletonData == null)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n var from = this.skeletonData.findAnimation(fromName);\r\n if (from == null)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n var to = this.skeletonData.findAnimation(toName);\r\n if (to == null)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n };\r\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n if (from == null)\r\n throw new Error(\"from cannot be null.\");\r\n if (to == null)\r\n throw new Error(\"to cannot be null.\");\r\n var key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n };\r\n AnimationStateData.prototype.getMix = function (from, to) {\r\n var key = from.name + \".\" + to.name;\r\n var value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n };\r\n return AnimationStateData;\r\n }());\r\n spine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AssetManager = (function () {\r\n function AssetManager(textureLoader, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.rawDataUris = {};\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n }\r\n AssetManager.prototype.downloadText = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(request.responseText);\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.downloadBinary = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(new Uint8Array(request.response));\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.setRawDataURI = function (path, data) {\r\n this.rawDataUris[this.pathPrefix + path] = data;\r\n };\r\n AssetManager.prototype.loadBinary = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadBinary(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadText = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadTexture = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n var storagePath = path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[storagePath] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \".concat(path));\r\n };\r\n if (this.rawDataUris[path])\r\n path = this.rawDataUris[path];\r\n img.src = path;\r\n };\r\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (atlasData) {\r\n var pagesLoaded = { count: 0 };\r\n var atlasPages = new Array();\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\r\n var image = document.createElement(\"img\");\r\n image.width = 16;\r\n image.height = 16;\r\n return new spine.FakeTexture(image);\r\n });\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n return;\r\n }\r\n var _loop_1 = function (atlasPage) {\r\n var pageLoadError = false;\r\n _this.loadTexture(atlasPage, function (imagePath, image) {\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n if (!pageLoadError) {\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\r\n });\r\n _this.assets[path] = atlas;\r\n if (success)\r\n success(path, atlas);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(path));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n }, function (imagePath, errorMessage) {\r\n pageLoadError = true;\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(path));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n });\r\n };\r\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n var atlasPage = atlasPages_1[_i];\r\n _loop_1(atlasPage);\r\n }\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.get = function (path) {\r\n path = this.pathPrefix + path;\r\n return this.assets[path];\r\n };\r\n AssetManager.prototype.remove = function (path) {\r\n path = this.pathPrefix + path;\r\n var asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n this.assets[path] = null;\r\n };\r\n AssetManager.prototype.removeAll = function () {\r\n for (var key in this.assets) {\r\n var asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n };\r\n AssetManager.prototype.isLoadingComplete = function () {\r\n return this.toLoad == 0;\r\n };\r\n AssetManager.prototype.getToLoad = function () {\r\n return this.toLoad;\r\n };\r\n AssetManager.prototype.getLoaded = function () {\r\n return this.loaded;\r\n };\r\n AssetManager.prototype.dispose = function () {\r\n this.removeAll();\r\n };\r\n AssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n AssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return AssetManager;\r\n }());\r\n spine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AtlasAttachmentLoader = (function () {\r\n function AtlasAttachmentLoader(atlas) {\r\n this.atlas = atlas;\r\n }\r\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.RegionAttachment(name);\r\n attachment.setRegion(region);\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n return new spine.BoundingBoxAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n return new spine.PathAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n return new spine.PointAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n return new spine.ClippingAttachment(name);\r\n };\r\n return AtlasAttachmentLoader;\r\n }());\r\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BlendMode;\r\n (function (BlendMode) {\r\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Bone = (function () {\r\n function Bone(data, skeleton, parent) {\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.appliedValid = false;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n Bone.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n Bone.prototype.update = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransform = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n var skeleton = this.skeleton;\r\n var rotationY = rotation + 90 + shearY;\r\n var sx = skeleton.scaleX;\r\n var sy = skeleton.scaleY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case spine.TransformMode.Normal: {\r\n var rotationY = rotation + 90 + shearY;\r\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case spine.TransformMode.OnlyTranslation: {\r\n var rotationY = rotation + 90 + shearY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case spine.TransformMode.NoRotationOrReflection: {\r\n var s = pa * pa + pc * pc;\r\n var prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n }\r\n var rx = rotation + shearX - prx;\r\n var ry = rotation + shearY - prx + 90;\r\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection: {\r\n var cos = spine.MathUtils.cosDeg(rotation);\r\n var sin = spine.MathUtils.sinDeg(rotation);\r\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n var s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == spine.TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n var r = Math.PI / 2 + Math.atan2(zc, za);\r\n var zb = Math.cos(r) * s;\r\n var zd = Math.sin(r) * s;\r\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n };\r\n Bone.prototype.setToSetupPose = function () {\r\n var data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n };\r\n Bone.prototype.getWorldRotationX = function () {\r\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldRotationY = function () {\r\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldScaleX = function () {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n };\r\n Bone.prototype.getWorldScaleY = function () {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n };\r\n Bone.prototype.updateAppliedTransform = function () {\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n this.ax = this.worldX;\r\n this.ay = this.worldY;\r\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n var pid = 1 / (pa * pd - pb * pc);\r\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = (dx * pd * pid - dy * pb * pid);\r\n this.ay = (dy * pa * pid - dx * pc * pid);\r\n var ia = pid * pd;\r\n var id = pid * pa;\r\n var ib = pid * pb;\r\n var ic = pid * pc;\r\n var ra = ia * this.a - ib * this.c;\r\n var rb = ia * this.b - ib * this.d;\r\n var rc = id * this.c - ic * this.a;\r\n var rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n var det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n }\r\n };\r\n Bone.prototype.worldToLocal = function (world) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var invDet = 1 / (a * d - b * c);\r\n var x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n };\r\n Bone.prototype.localToWorld = function (local) {\r\n var x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n };\r\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\r\n };\r\n Bone.prototype.localToWorldRotation = function (localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.rotateWorld = function (degrees) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n };\r\n return Bone;\r\n }());\r\n spine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoneData = (function () {\r\n function BoneData(index, name, parent) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new spine.Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n return BoneData;\r\n }());\r\n spine.BoneData = BoneData;\r\n var TransformMode;\r\n (function (TransformMode) {\r\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ConstraintData = (function () {\r\n function ConstraintData(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n return ConstraintData;\r\n }());\r\n spine.ConstraintData = ConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Event = (function () {\r\n function Event(time, data) {\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n return Event;\r\n }());\r\n spine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var EventData = (function () {\r\n function EventData(name) {\r\n this.name = name;\r\n }\r\n return EventData;\r\n }());\r\n spine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraint = (function () {\r\n function IkConstraint(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n IkConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n IkConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n IkConstraint.prototype.update = function () {\r\n var target = this.target;\r\n var bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n };\r\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var p = bone.parent;\r\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case spine.TransformMode.NoRotationOrReflection:\r\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n var sa = pa / bone.skeleton.scaleX;\r\n var sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\r\n default:\r\n var x = targetX - p.worldX, y = targetY - p.worldY;\r\n var d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n var sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n var s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n };\r\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid)\r\n parent.updateAppliedTransform();\r\n if (!child.appliedValid)\r\n child.updateAppliedTransform();\r\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n var os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n }\r\n else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n }\r\n else\r\n os2 = 0;\r\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n var u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n }\r\n else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n var pp = parent.parent;\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n var dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n var p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer: if (u) {\r\n l2 *= psx;\r\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch)\r\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n }\r\n else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n var c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n var q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) / 2;\r\n var r0 = q / c2, r1 = c / q;\r\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n }\r\n else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n var os = Math.atan2(cy, cx) * s2;\r\n var rotation = parent.arotation;\r\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n };\r\n return IkConstraint;\r\n }());\r\n spine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraintData = (function (_super) {\r\n __extends(IkConstraintData, _super);\r\n function IkConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.bendDirection = 1;\r\n _this.compress = false;\r\n _this.stretch = false;\r\n _this.uniform = false;\r\n _this.mix = 1;\r\n _this.softness = 0;\r\n return _this;\r\n }\r\n return IkConstraintData;\r\n }(spine.ConstraintData));\r\n spine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraint = (function () {\r\n function PathConstraint(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n PathConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n PathConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n PathConstraint.prototype.update = function () {\r\n var attachment = this.target.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n var translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate)\r\n return;\r\n var data = this.data;\r\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\r\n var rotateMode = data.rotateMode;\r\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n var bones = this.bones;\r\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n var spacing = this.spacing;\r\n if (scale || !percentSpacing) {\r\n if (scale)\r\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\r\n for (var i = 0, n = spacesCount - 1; i < n;) {\r\n var bone = bones[i];\r\n var setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = 0;\r\n }\r\n else if (percentSpacing) {\r\n if (scale) {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_1 = Math.sqrt(x * x + y * y);\r\n lengths[i] = length_1;\r\n }\r\n spaces[++i] = spacing;\r\n }\r\n else {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_2 = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length_2;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\r\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n var tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == spine.RotateMode.Chain;\r\n else {\r\n tip = false;\r\n var p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n }\r\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n var bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * translateMix;\r\n bone.worldY += (boneY - bone.worldY) * translateMix;\r\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n var length_3 = lengths[i];\r\n if (length_3 != 0) {\r\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n var length_4 = bone.data.length;\r\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\r\n }\r\n else {\r\n r += offsetRotation;\r\n }\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n };\r\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n var target = this.target;\r\n var position = this.position;\r\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n var closed = path.closed;\r\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n var lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n var pathLength_1 = lengths[curveCount];\r\n if (percentPosition)\r\n position *= pathLength_1;\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength_1;\r\n }\r\n world = spine.Utils.setArraySize(this.world, 8);\r\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength_1;\r\n if (p < 0)\r\n p += pathLength_1;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength_1) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_5 = lengths[curve];\r\n if (p > length_5)\r\n continue;\r\n if (curve == 0)\r\n p /= length_5;\r\n else {\r\n var prev = lengths[curve - 1];\r\n p = (p - prev) / (length_5 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n }\r\n else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n if (closed) {\r\n verticesLength += 2;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n }\r\n else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n var pathLength = 0;\r\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition)\r\n position *= pathLength;\r\n else\r\n position *= pathLength / path.lengths[curveCount - 1];\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n var segments = this.segments;\r\n var curveLength = 0;\r\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_6 = curves[curve];\r\n if (p > length_6)\r\n continue;\r\n if (curve == 0)\r\n p /= length_6;\r\n else {\r\n var prev = curves[curve - 1];\r\n p = (p - prev) / (length_6 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n var ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (;; segment++) {\r\n var length_7 = segments[segment];\r\n if (p > length_7)\r\n continue;\r\n if (segment == 0)\r\n p /= length_7;\r\n else {\r\n var prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length_7 - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n };\r\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 0.001)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n };\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 0.00001;\r\n return PathConstraint;\r\n }());\r\n spine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraintData = (function (_super) {\r\n __extends(PathConstraintData, _super);\r\n function PathConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n return _this;\r\n }\r\n return PathConstraintData;\r\n }(spine.ConstraintData));\r\n spine.PathConstraintData = PathConstraintData;\r\n var PositionMode;\r\n (function (PositionMode) {\r\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n var SpacingMode;\r\n (function (SpacingMode) {\r\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n var RotateMode;\r\n (function (RotateMode) {\r\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Assets = (function () {\r\n function Assets(clientId) {\r\n this.toLoad = new Array();\r\n this.assets = {};\r\n this.clientId = clientId;\r\n }\r\n Assets.prototype.loaded = function () {\r\n var i = 0;\r\n for (var v in this.assets)\r\n i++;\r\n return i;\r\n };\r\n return Assets;\r\n }());\r\n var SharedAssetManager = (function () {\r\n function SharedAssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.clientAssets = {};\r\n this.queuedAssets = {};\r\n this.rawAssets = {};\r\n this.errors = {};\r\n this.pathPrefix = pathPrefix;\r\n }\r\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined) {\r\n clientAssets = new Assets(clientId);\r\n this.clientAssets[clientId] = clientAssets;\r\n }\r\n if (textureLoader !== null)\r\n clientAssets.textureLoader = textureLoader;\r\n clientAssets.toLoad.push(path);\r\n if (this.queuedAssets[path] === path) {\r\n return false;\r\n }\r\n else {\r\n this.queuedAssets[path] = path;\r\n return true;\r\n }\r\n };\r\n SharedAssetManager.prototype.loadText = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = request.responseText;\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(request.status, \", \").concat(request.responseText);\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = JSON.parse(request.responseText);\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(request.status, \", \").concat(request.responseText);\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, textureLoader, path))\r\n return;\r\n var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n if (isWebWorker) {\r\n var options = { mode: \"cors\" };\r\n fetch(path, options).then(function (response) {\r\n if (!response.ok) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n }\r\n return response.blob();\r\n }).then(function (blob) {\r\n return createImageBitmap(blob, {\r\n premultiplyAlpha: 'none',\r\n colorSpaceConversion: 'none'\r\n });\r\n }).then(function (bitmap) {\r\n _this.rawAssets[path] = bitmap;\r\n });\r\n }\r\n else {\r\n var img_1 = new Image();\r\n img_1.crossOrigin = \"anonymous\";\r\n img_1.onload = function (ev) {\r\n _this.rawAssets[path] = img_1;\r\n };\r\n img_1.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n };\r\n img_1.src = path;\r\n }\r\n };\r\n SharedAssetManager.prototype.get = function (clientId, path) {\r\n path = this.pathPrefix + path;\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n return clientAssets.assets[path];\r\n };\r\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n var path = clientAssets.toLoad[i];\r\n var asset = clientAssets.assets[path];\r\n if (asset === null || asset === undefined) {\r\n var rawAsset = this.rawAssets[path];\r\n if (rawAsset === null || rawAsset === undefined)\r\n continue;\r\n if (isWebWorker) {\r\n if (rawAsset instanceof ImageBitmap) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n else {\r\n if (rawAsset instanceof HTMLImageElement) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n this.updateClientAssets(clientAssets);\r\n return clientAssets.toLoad.length == clientAssets.loaded();\r\n };\r\n SharedAssetManager.prototype.dispose = function () {\r\n };\r\n SharedAssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n SharedAssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return SharedAssetManager;\r\n }());\r\n spine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Skeleton = (function () {\r\n function Skeleton(data) {\r\n this._updateCache = new Array();\r\n this.updateCacheReset = new Array();\r\n this.time = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++) {\r\n var boneData = data.bones[i];\r\n var bone = void 0;\r\n if (boneData.parent == null)\r\n bone = new spine.Bone(boneData, this, null);\r\n else {\r\n var parent_1 = this.bones[boneData.parent.index];\r\n bone = new spine.Bone(boneData, this, parent_1);\r\n parent_1.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (var i = 0; i < data.slots.length; i++) {\r\n var slotData = data.slots[i];\r\n var bone = this.bones[slotData.boneData.index];\r\n var slot = new spine.Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (var i = 0; i < data.ikConstraints.length; i++) {\r\n var ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (var i = 0; i < data.transformConstraints.length; i++) {\r\n var transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (var i = 0; i < data.pathConstraints.length; i++) {\r\n var pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n Skeleton.prototype.updateCache = function () {\r\n var updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin != null) {\r\n var skinBones = this.skin.bones;\r\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n var bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n var ikConstraints = this.ikConstraints;\r\n var transformConstraints = this.transformConstraints;\r\n var pathConstraints = this.pathConstraints;\r\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n var constraintCount = ikCount + transformCount + pathCount;\r\n outer: for (var i = 0; i < constraintCount; i++) {\r\n for (var ii = 0; ii < ikCount; ii++) {\r\n var constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < transformCount; ii++) {\r\n var constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < pathCount; ii++) {\r\n var constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n };\r\n Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var target = constraint.target;\r\n this.sortBone(target);\r\n var constrained = constraint.bones;\r\n var parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length > 1) {\r\n var child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var slot = constraint.target;\r\n var slotIndex = slot.data.index;\r\n var slotBone = slot.bone;\r\n if (this.skin != null)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (var i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n };\r\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (var i = 0; i < boneCount; i++) {\r\n var child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n var attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (var key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var pathBones = attachment.bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n var bones = this.bones;\r\n var i = 0;\r\n while (i < pathBones.length) {\r\n var boneCount = pathBones[i++];\r\n for (var n = i + boneCount; i < n; i++) {\r\n var boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n };\r\n Skeleton.prototype.sortBone = function (bone) {\r\n if (bone.sorted)\r\n return;\r\n var parent = bone.parent;\r\n if (parent != null)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n };\r\n Skeleton.prototype.sortReset = function (bones) {\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n };\r\n Skeleton.prototype.updateWorldTransform = function () {\r\n var updateCacheReset = this.updateCacheReset;\r\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n var bone = updateCacheReset[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n var updateCache = this._updateCache;\r\n for (var i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n };\r\n Skeleton.prototype.setToSetupPose = function () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n };\r\n Skeleton.prototype.setBonesToSetupPose = function () {\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n var data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n };\r\n Skeleton.prototype.setSlotsToSetupPose = function () {\r\n var slots = this.slots;\r\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n };\r\n Skeleton.prototype.getRootBone = function () {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n };\r\n Skeleton.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.setSkinByName = function (skinName) {\r\n var skin = this.data.findSkin(skinName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n };\r\n Skeleton.prototype.setSkin = function (newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var name_1 = slot.data.attachmentName;\r\n if (name_1 != null) {\r\n var attachment = newSkin.getAttachment(i, name_1);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n };\r\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n };\r\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n if (attachmentName == null)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin != null)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n };\r\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n var attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n };\r\n Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n if (temp === void 0) { temp = new Array(2); }\r\n if (offset == null)\r\n throw new Error(\"offset cannot be null.\");\r\n if (size == null)\r\n throw new Error(\"size cannot be null.\");\r\n var drawOrder = this.drawOrder;\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var verticesLength = 0;\r\n var vertices = null;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n };\r\n Skeleton.prototype.update = function (delta) {\r\n this.time += delta;\r\n };\r\n return Skeleton;\r\n }());\r\n spine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBinary = (function () {\r\n function SkeletonBinary(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n skeletonData.name = \"\";\r\n var input = new BinaryInput(binary);\r\n skeletonData.hash = input.readString();\r\n skeletonData.version = input.readString();\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n var nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n var n = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n input.strings.push(input.readString());\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var name_2 = input.readString();\r\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n var data = new spine.BoneData(i, name_2, parent_2);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var slotName = input.readString();\r\n var boneData = skeletonData.bones[input.readInt(true)];\r\n var data = new spine.SlotData(i, slotName, boneData);\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n var darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.IkConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.TransformConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n data.scaleMix = input.readFloat();\r\n data.shearMix = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.PathConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin != null) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n var i = skeletonData.skins.length;\r\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++)\r\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n }\r\n n = this.linkedMeshes.length;\r\n for (var i = 0; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_3 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_3);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var data = new spine.EventData(input.readStringRef());\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath != null) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n return skeletonData;\r\n };\r\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n var skin = null;\r\n var slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new spine.Skin(\"default\");\r\n }\r\n else {\r\n skin = new spine.Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (var i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (var i = 0; i < slotCount; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var name_3 = input.readStringRef();\r\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\r\n if (attachment != null)\r\n skin.setAttachment(slotIndex, name_3, attachment);\r\n }\r\n }\r\n return skin;\r\n };\r\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n var scale = this.scale;\r\n var name = input.readStringRef();\r\n if (name == null)\r\n name = attachmentName;\r\n var typeIndex = input.readByte();\r\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n switch (type) {\r\n case spine.AttachmentType.Region: {\r\n var path = input.readStringRef();\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var scaleX = input.readFloat();\r\n var scaleY = input.readFloat();\r\n var width = input.readFloat();\r\n var height = input.readFloat();\r\n var color = input.readInt32();\r\n if (path == null)\r\n path = name;\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n spine.Color.rgba8888ToColor(region.color, color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case spine.AttachmentType.BoundingBox: {\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case spine.AttachmentType.Mesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var vertexCount = input.readInt(true);\r\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n var triangles = this.readShortArray(input);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var hullLength = input.readInt(true);\r\n var edges = null;\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.hullLength = hullLength << 1;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case spine.AttachmentType.LinkedMesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var skinName = input.readStringRef();\r\n var parent_4 = input.readStringRef();\r\n var inheritDeform = input.readBoolean();\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\r\n return mesh;\r\n }\r\n case spine.AttachmentType.Path: {\r\n var closed_1 = input.readBoolean();\r\n var constantSpeed = input.readBoolean();\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n var color = nonessential ? input.readInt32() : 0;\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = closed_1;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case spine.AttachmentType.Point: {\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var color = nonessential ? input.readInt32() : 0;\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case spine.AttachmentType.Clipping: {\r\n var endSlotIndex = input.readInt(true);\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n var verticesLength = vertexCount << 1;\r\n var vertices = new Vertices();\r\n var scale = this.scale;\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n var weights = new Array();\r\n var bonesArray = new Array();\r\n for (var i = 0; i < vertexCount; i++) {\r\n var boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (var ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = spine.Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n };\r\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n var array = new Array(n);\r\n if (scale == 1) {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n }\r\n else {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readShortArray = function (input) {\r\n var n = input.readInt(true);\r\n var array = new Array(n);\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n var timelines = new Array();\r\n var scale = this.scale;\r\n var duration = 0;\r\n var tempColor1 = new spine.Color();\r\n var tempColor2 = new spine.Color();\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.SLOT_ATTACHMENT: {\r\n var timeline = new spine.AttachmentTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_COLOR: {\r\n var timeline = new spine.ColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_TWO_COLOR: {\r\n var timeline = new spine.TwoColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var boneIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.BONE_ROTATE: {\r\n var timeline = new spine.RotateTimeline(frameCount);\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.BONE_TRANSLATE:\r\n case SkeletonBinary.BONE_SCALE:\r\n case SkeletonBinary.BONE_SHEAR: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.BONE_SCALE)\r\n timeline = new spine.ScaleTimeline(frameCount);\r\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n timeline = new spine.ShearTimeline(frameCount);\r\n else {\r\n timeline = new spine.TranslateTimeline(frameCount);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.IkConstraintTimeline(frameCount);\r\n timeline.ikConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.TransformConstraintTimeline(frameCount);\r\n timeline.transformConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.PATH_POSITION:\r\n case SkeletonBinary.PATH_SPACING: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.PATH_MIX: {\r\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var skin = skeletonData.skins[input.readInt(true)];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var slotIndex = input.readInt(true);\r\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.DeformTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n var deform = void 0;\r\n var end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n }\r\n else {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (var v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, time, deform);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n }\r\n }\r\n }\r\n var drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\r\n var slotCount = skeletonData.slots.length;\r\n for (var i = 0; i < drawOrderCount; i++) {\r\n var time = input.readFloat();\r\n var offsetCount = input.readInt(true);\r\n var drawOrder = spine.Utils.newArray(slotCount, 0);\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var ii = 0; ii < offsetCount; ii++) {\r\n var slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n }\r\n var eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n var timeline = new spine.EventTimeline(eventCount);\r\n for (var i = 0; i < eventCount; i++) {\r\n var time = input.readFloat();\r\n var eventData = skeletonData.events[input.readInt(true)];\r\n var event_4 = new spine.Event(time, eventData);\r\n event_4.intValue = input.readInt(false);\r\n event_4.floatValue = input.readFloat();\r\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event_4.data.audioPath != null) {\r\n event_4.volume = input.readFloat();\r\n event_4.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event_4);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n }\r\n return new spine.Animation(name, timelines, duration);\r\n };\r\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n switch (input.readByte()) {\r\n case SkeletonBinary.CURVE_STEPPED:\r\n timeline.setStepped(frameIndex);\r\n break;\r\n case SkeletonBinary.CURVE_BEZIER:\r\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n break;\r\n }\r\n };\r\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n };\r\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\r\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\r\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\r\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\r\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\r\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\r\n SkeletonBinary.BONE_ROTATE = 0;\r\n SkeletonBinary.BONE_TRANSLATE = 1;\r\n SkeletonBinary.BONE_SCALE = 2;\r\n SkeletonBinary.BONE_SHEAR = 3;\r\n SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n SkeletonBinary.SLOT_COLOR = 1;\r\n SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n SkeletonBinary.PATH_POSITION = 0;\r\n SkeletonBinary.PATH_SPACING = 1;\r\n SkeletonBinary.PATH_MIX = 2;\r\n SkeletonBinary.CURVE_LINEAR = 0;\r\n SkeletonBinary.CURVE_STEPPED = 1;\r\n SkeletonBinary.CURVE_BEZIER = 2;\r\n return SkeletonBinary;\r\n }());\r\n spine.SkeletonBinary = SkeletonBinary;\r\n var BinaryInput = (function () {\r\n function BinaryInput(data, strings, index, buffer) {\r\n if (strings === void 0) { strings = new Array(); }\r\n if (index === void 0) { index = 0; }\r\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n BinaryInput.prototype.readByte = function () {\r\n return this.buffer.getInt8(this.index++);\r\n };\r\n BinaryInput.prototype.readShort = function () {\r\n var value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt32 = function () {\r\n var value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt = function (optimizePositive) {\r\n var b = this.readByte();\r\n var result = b & 0x7F;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 7;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 14;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 21;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n };\r\n BinaryInput.prototype.readStringRef = function () {\r\n var index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n };\r\n BinaryInput.prototype.readString = function () {\r\n var byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n var chars = \"\";\r\n var charCount = 0;\r\n for (var i = 0; i < byteCount;) {\r\n var b = this.readByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n };\r\n BinaryInput.prototype.readFloat = function () {\r\n var value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readBoolean = function () {\r\n return this.readByte() != 0;\r\n };\r\n return BinaryInput;\r\n }());\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n var Vertices = (function () {\r\n function Vertices(bones, vertices) {\r\n if (bones === void 0) { bones = null; }\r\n if (vertices === void 0) { vertices = null; }\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n return Vertices;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBounds = (function () {\r\n function SkeletonBounds() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return spine.Utils.newFloatArray(16);\r\n });\r\n }\r\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n var boundingBoxes = this.boundingBoxes;\r\n var polygons = this.polygons;\r\n var polygonPool = this.polygonPool;\r\n var slots = skeleton.slots;\r\n var slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (var i = 0; i < slotCount; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.BoundingBoxAttachment) {\r\n var boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n var polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n }\r\n else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n };\r\n SkeletonBounds.prototype.aabbCompute = function () {\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n var vertices = polygon;\r\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n var x = vertices[ii];\r\n var y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n };\r\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n var minX = this.minX;\r\n var minY = this.minY;\r\n var maxX = this.maxX;\r\n var maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n var m = (y2 - y1) / (x2 - x1);\r\n var y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n var x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n };\r\n SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var prevIndex = nn - 2;\r\n var inside = false;\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var vertexY = vertices[ii + 1];\r\n var prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n var vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n };\r\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var width12 = x1 - x2, height12 = y1 - y2;\r\n var det1 = x1 * y2 - y1 * x2;\r\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n var det2 = x3 * y4 - y3 * x4;\r\n var width34 = x3 - x4, height34 = y3 - y4;\r\n var det3 = width12 * height34 - height12 * width34;\r\n var x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n var y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n };\r\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n if (boundingBox == null)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n var index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n };\r\n SkeletonBounds.prototype.getWidth = function () {\r\n return this.maxX - this.minX;\r\n };\r\n SkeletonBounds.prototype.getHeight = function () {\r\n return this.maxY - this.minY;\r\n };\r\n return SkeletonBounds;\r\n }());\r\n spine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonClipping = (function () {\r\n function SkeletonClipping() {\r\n this.triangulator = new spine.Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n }\r\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n if (this.clipAttachment != null)\r\n return 0;\r\n this.clipAttachment = clip;\r\n var n = clip.worldVerticesLength;\r\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n var clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\r\n var polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n };\r\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n };\r\n SkeletonClipping.prototype.clipEnd = function () {\r\n if (this.clipAttachment == null)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n };\r\n SkeletonClipping.prototype.isClipping = function () {\r\n return this.clipAttachment != null;\r\n };\r\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n var clippedTriangles = this.clippedTriangles;\r\n var polygons = this.clippingPolygons;\r\n var polygonsCount = this.clippingPolygons.length;\r\n var vertexSize = twoColor ? 12 : 8;\r\n var index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer: for (var i = 0; i < trianglesLength; i += 3) {\r\n var vertexOffset = triangles[i] << 1;\r\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (var p = 0; p < polygonsCount; p++) {\r\n var s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n var clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n var clipOutputCount = clipOutputLength >> 1;\r\n var clipOutputItems = this.clipOutput;\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n var c0 = x - x3, c1 = y - y3;\r\n var a = (d0 * c0 + d1 * c1) * d;\r\n var b = (d4 * c0 + d2 * c1) * d;\r\n var c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (var ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + ii);\r\n clippedTrianglesItems[s + 2] = (index + ii + 1);\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n }\r\n else {\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n }\r\n else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + 1);\r\n clippedTrianglesItems[s + 2] = (index + 2);\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n };\r\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n var originalOutput = output;\r\n var clipped = false;\r\n var input = null;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n }\r\n else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n var clippingVertices = clippingArea;\r\n var clippingVerticesLast = clippingArea.length - 4;\r\n for (var i = 0;; i += 2) {\r\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n var inputVertices = input;\r\n var inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n }\r\n else if (side2) {\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n var temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (var i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n }\r\n else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n };\r\n SkeletonClipping.makeClockwise = function (polygon) {\r\n var vertices = polygon;\r\n var verticeslength = polygon.length;\r\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n var x = vertices[i], y = vertices[i + 1];\r\n var other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n };\r\n return SkeletonClipping;\r\n }());\r\n spine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonData = (function () {\r\n function SkeletonData() {\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.fps = 0;\r\n }\r\n SkeletonData.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSkin = function (skinName) {\r\n if (skinName == null)\r\n throw new Error(\"skinName cannot be null.\");\r\n var skins = this.skins;\r\n for (var i = 0, n = skins.length; i < n; i++) {\r\n var skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findEvent = function (eventDataName) {\r\n if (eventDataName == null)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n var events = this.events;\r\n for (var i = 0, n = events.length; i < n; i++) {\r\n var event_5 = events[i];\r\n if (event_5.name == eventDataName)\r\n return event_5;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findAnimation = function (animationName) {\r\n if (animationName == null)\r\n throw new Error(\"animationName cannot be null.\");\r\n var animations = this.animations;\r\n for (var i = 0, n = animations.length; i < n; i++) {\r\n var animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n if (pathConstraintName == null)\r\n throw new Error(\"pathConstraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName)\r\n return i;\r\n return -1;\r\n };\r\n return SkeletonData;\r\n }());\r\n spine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonJson = (function () {\r\n function SkeletonJson(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonJson.prototype.readSkeletonData = function (json) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n var skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (var i = 0; i < root.bones.length; i++) {\r\n var boneMap = root.bones[i];\r\n var parent_5 = null;\r\n var parentName = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent_5 = skeletonData.findBone(parentName);\r\n if (parent_5 == null)\r\n throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (var i = 0; i < root.slots.length; i++) {\r\n var slotMap = root.slots[i];\r\n var slotName = slotMap.name;\r\n var boneName = slotMap.bone;\r\n var boneData = skeletonData.findBone(boneName);\r\n if (boneData == null)\r\n throw new Error(\"Slot bone not found: \" + boneName);\r\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n var color = this.getValue(slotMap, \"color\", null);\r\n if (color != null)\r\n data.color.setFromString(color);\r\n var dark = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new spine.Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (var i = 0; i < root.ik.length; i++) {\r\n var constraintMap = root.ik[i];\r\n var data = new spine.IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"IK target bone not found: \" + targetName);\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (var i = 0; i < root.transform.length; i++) {\r\n var constraintMap = root.transform[i];\r\n var data = new spine.TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (var i = 0; i < root.path.length; i++) {\r\n var constraintMap = root.path[i];\r\n var data = new spine.PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Path target slot not found: \" + targetName);\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (var i = 0; i < root.skins.length; i++) {\r\n var skinMap = root.skins[i];\r\n var skin = new spine.Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null)\r\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (var slotName in skinMap.attachments) {\r\n var slot = skeletonData.findSlot(slotName);\r\n if (slot == null)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n var slotMap = skinMap.attachments[slotName];\r\n for (var entryName in slotMap) {\r\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_6 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_6);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (var eventName in root.events) {\r\n var eventMap = root.events[eventName];\r\n var data = new spine.EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (var animationName in root.animations) {\r\n var animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n };\r\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n var scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n var type = this.getValue(map, \"type\", \"region\");\r\n switch (type) {\r\n case \"region\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n region.color.setFromString(color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n mesh.color.setFromString(color);\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n var parent_7 = this.getValue(map, \"parent\", null);\r\n if (parent_7 != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n var uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n var end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n var slot = skeletonData.findSlot(end);\r\n if (slot == null)\r\n throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n var scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n var vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n var scaledVertices = spine.Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (var i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n var weights = new Array();\r\n var bones = new Array();\r\n for (var i = 0, n = vertices.length; i < n;) {\r\n var boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = spine.Utils.toFloatArray(weights);\r\n };\r\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n var scale = this.scale;\r\n var timelines = new Array();\r\n var duration = 0;\r\n if (map.slots) {\r\n for (var slotName in map.slots) {\r\n var slotMap = map.slots[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n else if (timelineName == \"color\") {\r\n var timeline = new spine.ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var color = new spine.Color();\r\n color.setFromString(valueMap.color);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n }\r\n else if (timelineName == \"twoColor\") {\r\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var light = new spine.Color();\r\n var dark = new spine.Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (var boneName in map.bones) {\r\n var boneMap = map.bones[boneName];\r\n var boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n for (var timelineName in boneMap) {\r\n var timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n var timeline = new spine.RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n var timeline = null;\r\n var timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new spine.ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n }\r\n else if (timelineName === \"shear\")\r\n timeline = new spine.ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new spine.TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (var constraintName in map.ik) {\r\n var constraintMap = map.ik[constraintName];\r\n var constraint = skeletonData.findIkConstraint(constraintName);\r\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.transform) {\r\n for (var constraintName in map.transform) {\r\n var constraintMap = map.transform[constraintName];\r\n var constraint = skeletonData.findTransformConstraint(constraintName);\r\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.path) {\r\n for (var constraintName in map.path) {\r\n var constraintMap = map.path[constraintName];\r\n var index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var timelineName in constraintMap) {\r\n var timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n var timeline = null;\r\n var timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"mix\") {\r\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n if (map.deform) {\r\n for (var deformName in map.deform) {\r\n var deformMap = map.deform[deformName];\r\n var skin = skeletonData.findSkin(deformName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + deformName);\r\n for (var slotName in deformMap) {\r\n var slotMap = deformMap[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n var attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null)\r\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var timeline = new spine.DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n var frameIndex = 0;\r\n for (var j = 0; j < timelineMap.length; j++) {\r\n var valueMap = timelineMap[j];\r\n var deform = void 0;\r\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = this.getValue(valueMap, \"offset\", 0);\r\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (var i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n var drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null)\r\n drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n var slotCount = skeletonData.slots.length;\r\n var frameIndex = 0;\r\n for (var j = 0; j < drawOrderNode.length; j++) {\r\n var drawOrderMap = drawOrderNode[j];\r\n var drawOrder = null;\r\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = spine.Utils.newArray(slotCount, -1);\r\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var i = 0; i < offsets.length; i++) {\r\n var offsetMap = offsets[i];\r\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1)\r\n drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (map.events) {\r\n var timeline = new spine.EventTimeline(map.events.length);\r\n var frameIndex = 0;\r\n for (var i = 0; i < map.events.length; i++) {\r\n var eventMap = map.events[i];\r\n var eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event_6.data.audioPath != null) {\r\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\r\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event_6);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n };\r\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n if (!map.hasOwnProperty(\"curve\"))\r\n return;\r\n if (map.curve == \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n var curve = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n };\r\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n };\r\n SkeletonJson.blendModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.BlendMode.Normal;\r\n if (str == \"additive\")\r\n return spine.BlendMode.Additive;\r\n if (str == \"multiply\")\r\n return spine.BlendMode.Multiply;\r\n if (str == \"screen\")\r\n return spine.BlendMode.Screen;\r\n throw new Error(\"Unknown blend mode: \".concat(str));\r\n };\r\n SkeletonJson.positionModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\")\r\n return spine.PositionMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.PositionMode.Percent;\r\n throw new Error(\"Unknown position mode: \".concat(str));\r\n };\r\n SkeletonJson.spacingModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"length\")\r\n return spine.SpacingMode.Length;\r\n if (str == \"fixed\")\r\n return spine.SpacingMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.SpacingMode.Percent;\r\n throw new Error(\"Unknown position mode: \".concat(str));\r\n };\r\n SkeletonJson.rotateModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\")\r\n return spine.RotateMode.Tangent;\r\n if (str == \"chain\")\r\n return spine.RotateMode.Chain;\r\n if (str == \"chainscale\")\r\n return spine.RotateMode.ChainScale;\r\n throw new Error(\"Unknown rotate mode: \".concat(str));\r\n };\r\n SkeletonJson.transformModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.TransformMode.Normal;\r\n if (str == \"onlytranslation\")\r\n return spine.TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\")\r\n return spine.TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\")\r\n return spine.TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\")\r\n return spine.TransformMode.NoScaleOrReflection;\r\n throw new Error(\"Unknown transform mode: \".concat(str));\r\n };\r\n return SkeletonJson;\r\n }());\r\n spine.SkeletonJson = SkeletonJson;\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkinEntry = (function () {\r\n function SkinEntry(slotIndex, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n return SkinEntry;\r\n }());\r\n spine.SkinEntry = SkinEntry;\r\n var Skin = (function () {\r\n function Skin(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n if (attachment == null)\r\n throw new Error(\"attachment cannot be null.\");\r\n var attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n };\r\n Skin.prototype.addSkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n };\r\n Skin.prototype.copySkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null)\r\n continue;\r\n if (attachment.attachment instanceof spine.MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n };\r\n Skin.prototype.getAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n };\r\n Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n dictionary[name] = null;\r\n };\r\n Skin.prototype.getAttachments = function () {\r\n var entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n var slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (var name_4 in slotAttachments) {\r\n var attachment = slotAttachments[name_4];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name_4, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n };\r\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n var slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (var name_5 in slotAttachments) {\r\n var attachment = slotAttachments[name_5];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\r\n }\r\n }\r\n };\r\n Skin.prototype.clear = function () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n };\r\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n var slotIndex = 0;\r\n for (var i = 0; i < skeleton.slots.length; i++) {\r\n var slot = skeleton.slots[i];\r\n var slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n var dictionary = oldSkin.attachments[slotIndex];\r\n for (var key in dictionary) {\r\n var skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n var attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n };\r\n return Skin;\r\n }());\r\n spine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Slot = (function () {\r\n function Slot(data, bone) {\r\n this.deform = new Array();\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (bone == null)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new spine.Color();\r\n this.darkColor = data.darkColor == null ? null : new spine.Color();\r\n this.setToSetupPose();\r\n }\r\n Slot.prototype.getSkeleton = function () {\r\n return this.bone.skeleton;\r\n };\r\n Slot.prototype.getAttachment = function () {\r\n return this.attachment;\r\n };\r\n Slot.prototype.setAttachment = function (attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n };\r\n Slot.prototype.setAttachmentTime = function (time) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n };\r\n Slot.prototype.getAttachmentTime = function () {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n };\r\n Slot.prototype.setToSetupPose = function () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n };\r\n return Slot;\r\n }());\r\n spine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SlotData = (function () {\r\n function SlotData(index, name, boneData) {\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (boneData == null)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n return SlotData;\r\n }());\r\n spine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Texture = (function () {\r\n function Texture(image) {\r\n this._image = image;\r\n }\r\n Texture.prototype.getImage = function () {\r\n return this._image;\r\n };\r\n Texture.filterFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(\"Unknown texture filter \".concat(text));\r\n }\r\n };\r\n Texture.wrapFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(\"Unknown texture wrap \".concat(text));\r\n }\r\n };\r\n return Texture;\r\n }());\r\n spine.Texture = Texture;\r\n var TextureFilter;\r\n (function (TextureFilter) {\r\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n var TextureWrap;\r\n (function (TextureWrap) {\r\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n var TextureRegion = (function () {\r\n function TextureRegion() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.rotate = false;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n return TextureRegion;\r\n }());\r\n spine.TextureRegion = TextureRegion;\r\n var FakeTexture = (function (_super) {\r\n __extends(FakeTexture, _super);\r\n function FakeTexture() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n FakeTexture.prototype.dispose = function () { };\r\n return FakeTexture;\r\n }(Texture));\r\n spine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TextureAtlas = (function () {\r\n function TextureAtlas(atlasText, textureLoader) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n this.load(atlasText, textureLoader);\r\n }\r\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n var reader = new TextureAtlasReader(atlasText);\r\n var tuple = new Array(4);\r\n var page = null;\r\n while (true) {\r\n var line = reader.readLine();\r\n if (line == null)\r\n break;\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n if (reader.readTuple(tuple) == 2) {\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n reader.readTuple(tuple);\r\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n var direction = reader.readValue();\r\n page.uWrap = spine.TextureWrap.ClampToEdge;\r\n page.vWrap = spine.TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n page.texture = textureLoader(line);\r\n page.texture.setFilters(page.minFilter, page.magFilter);\r\n page.texture.setWraps(page.uWrap, page.vWrap);\r\n page.width = page.texture.getImage().width;\r\n page.height = page.texture.getImage().height;\r\n this.pages.push(page);\r\n }\r\n else {\r\n var region = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n var rotateValue = reader.readValue();\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n region.degrees = 90;\r\n }\r\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n region.degrees = 0;\r\n }\r\n else {\r\n region.degrees = parseFloat(rotateValue);\r\n }\r\n region.rotate = region.degrees == 90;\r\n reader.readTuple(tuple);\r\n var x = parseInt(tuple[0]);\r\n var y = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n var width = parseInt(tuple[0]);\r\n var height = parseInt(tuple[1]);\r\n region.u = x / page.width;\r\n region.v = y / page.height;\r\n if (region.rotate) {\r\n region.u2 = (x + height) / page.width;\r\n region.v2 = (y + width) / page.height;\r\n }\r\n else {\r\n region.u2 = (x + width) / page.width;\r\n region.v2 = (y + height) / page.height;\r\n }\r\n region.x = x;\r\n region.y = y;\r\n region.width = Math.abs(width);\r\n region.height = Math.abs(height);\r\n if (reader.readTuple(tuple) == 4) {\r\n if (reader.readTuple(tuple) == 4) {\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n region.originalWidth = parseInt(tuple[0]);\r\n region.originalHeight = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n region.offsetX = parseInt(tuple[0]);\r\n region.offsetY = parseInt(tuple[1]);\r\n region.index = parseInt(reader.readValue());\r\n region.texture = page.texture;\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n TextureAtlas.prototype.findRegion = function (name) {\r\n for (var i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n };\r\n TextureAtlas.prototype.dispose = function () {\r\n for (var i = 0; i < this.pages.length; i++) {\r\n this.pages[i].texture.dispose();\r\n }\r\n };\r\n return TextureAtlas;\r\n }());\r\n spine.TextureAtlas = TextureAtlas;\r\n var TextureAtlasReader = (function () {\r\n function TextureAtlasReader(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n TextureAtlasReader.prototype.readLine = function () {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n };\r\n TextureAtlasReader.prototype.readValue = function () {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n };\r\n TextureAtlasReader.prototype.readTuple = function (tuple) {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n var i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n var comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1)\r\n break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n };\r\n return TextureAtlasReader;\r\n }());\r\n var TextureAtlasPage = (function () {\r\n function TextureAtlasPage() {\r\n }\r\n return TextureAtlasPage;\r\n }());\r\n spine.TextureAtlasPage = TextureAtlasPage;\r\n var TextureAtlasRegion = (function (_super) {\r\n __extends(TextureAtlasRegion, _super);\r\n function TextureAtlasRegion() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return TextureAtlasRegion;\r\n }(spine.TextureRegion));\r\n spine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraint = (function () {\r\n function TransformConstraint(data, skeleton) {\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.scaleMix = 0;\r\n this.shearMix = 0;\r\n this.temp = new spine.Vector2();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n TransformConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n TransformConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n TransformConstraint.prototype.update = function () {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n }\r\n else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * translateMix;\r\n bone.worldY += (temp.y - bone.worldY) * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n var ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var b = bone.b, d = bone.d;\r\n var by = Math.atan2(d, b);\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * translateMix;\r\n bone.worldY += temp.y * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n var b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n var r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0) {\r\n var r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0)\r\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001)\r\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0)\r\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n return TransformConstraint;\r\n }());\r\n spine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraintData = (function (_super) {\r\n __extends(TransformConstraintData, _super);\r\n function TransformConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.rotateMix = 0;\r\n _this.translateMix = 0;\r\n _this.scaleMix = 0;\r\n _this.shearMix = 0;\r\n _this.offsetRotation = 0;\r\n _this.offsetX = 0;\r\n _this.offsetY = 0;\r\n _this.offsetScaleX = 0;\r\n _this.offsetScaleY = 0;\r\n _this.offsetShearY = 0;\r\n _this.relative = false;\r\n _this.local = false;\r\n return _this;\r\n }\r\n return TransformConstraintData;\r\n }(spine.ConstraintData));\r\n spine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Triangulator = (function () {\r\n function Triangulator() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n }\r\n Triangulator.prototype.triangulate = function (verticesArray) {\r\n var vertices = verticesArray;\r\n var vertexCount = verticesArray.length >> 1;\r\n var indices = this.indicesArray;\r\n indices.length = 0;\r\n for (var i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n var isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (var i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n var triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n var previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer: if (!isConcave[i]) {\r\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n var v = indices[ii] << 1;\r\n var vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n var previousIndex = (vertexCount + i - 1) % vertexCount;\r\n var nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n };\r\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\r\n var vertices = verticesArray;\r\n var convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n var convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n var polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n var polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n var fanBaseIndex = -1, lastWinding = 0;\r\n for (var i = 0, n = triangles.length; i < n; i += 3) {\r\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n var merged = false;\r\n if (fanBaseIndex == t1) {\r\n var o = polygon.length - 4;\r\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n var firstIndex = polygonIndices[0];\r\n var lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n var o = polygon.length - 4;\r\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n var firstX = polygon[0], firstY = polygon[1];\r\n var secondX = polygon[2], secondY = polygon[3];\r\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (var ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n var otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n var otherFirstIndex = otherIndices[0];\r\n var otherSecondIndex = otherIndices[1];\r\n var otherLastIndex = otherIndices[2];\r\n var otherPoly = convexPolygons[ii];\r\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n };\r\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n var current = indices[index] << 1;\r\n var next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n };\r\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n };\r\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n var px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n };\r\n return Triangulator;\r\n }());\r\n spine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IntSet = (function () {\r\n function IntSet() {\r\n this.array = new Array();\r\n }\r\n IntSet.prototype.add = function (value) {\r\n var contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n };\r\n IntSet.prototype.contains = function (value) {\r\n return this.array[value | 0] != undefined;\r\n };\r\n IntSet.prototype.remove = function (value) {\r\n this.array[value | 0] = undefined;\r\n };\r\n IntSet.prototype.clear = function () {\r\n this.array.length = 0;\r\n };\r\n return IntSet;\r\n }());\r\n spine.IntSet = IntSet;\r\n var Color = (function () {\r\n function Color(r, g, b, a) {\r\n if (r === void 0) { r = 0; }\r\n if (g === void 0) { g = 0; }\r\n if (b === void 0) { b = 0; }\r\n if (a === void 0) { a = 0; }\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n Color.prototype.set = function (r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.setFromColor = function (c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n };\r\n Color.prototype.setFromString = function (hex) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n };\r\n Color.prototype.add = function (r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.clamp = function () {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n };\r\n Color.rgba8888ToColor = function (color, value) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.rgb888ToColor = function (color, value) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.WHITE = new Color(1, 1, 1, 1);\r\n Color.RED = new Color(1, 0, 0, 1);\r\n Color.GREEN = new Color(0, 1, 0, 1);\r\n Color.BLUE = new Color(0, 0, 1, 1);\r\n Color.MAGENTA = new Color(1, 0, 1, 1);\r\n return Color;\r\n }());\r\n spine.Color = Color;\r\n var MathUtils = (function () {\r\n function MathUtils() {\r\n }\r\n MathUtils.clamp = function (value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n MathUtils.cosDeg = function (degrees) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.sinDeg = function (degrees) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.signum = function (value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n };\r\n MathUtils.toInt = function (x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n };\r\n MathUtils.cbrt = function (x) {\r\n var y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n };\r\n MathUtils.randomTriangular = function (min, max) {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n };\r\n MathUtils.randomTriangularWith = function (min, max, mode) {\r\n var u = Math.random();\r\n var d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n };\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n MathUtils.degRad = MathUtils.degreesToRadians;\r\n return MathUtils;\r\n }());\r\n spine.MathUtils = MathUtils;\r\n var Interpolation = (function () {\r\n function Interpolation() {\r\n }\r\n Interpolation.prototype.apply = function (start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n };\r\n return Interpolation;\r\n }());\r\n spine.Interpolation = Interpolation;\r\n var Pow = (function (_super) {\r\n __extends(Pow, _super);\r\n function Pow(power) {\r\n var _this = _super.call(this) || this;\r\n _this.power = 2;\r\n _this.power = power;\r\n return _this;\r\n }\r\n Pow.prototype.applyInternal = function (a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n };\r\n return Pow;\r\n }(Interpolation));\r\n spine.Pow = Pow;\r\n var PowOut = (function (_super) {\r\n __extends(PowOut, _super);\r\n function PowOut(power) {\r\n return _super.call(this, power) || this;\r\n }\r\n PowOut.prototype.applyInternal = function (a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n };\r\n return PowOut;\r\n }(Pow));\r\n spine.PowOut = PowOut;\r\n var Utils = (function () {\r\n function Utils() {\r\n }\r\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n };\r\n Utils.setArraySize = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n var oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (var i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n };\r\n Utils.ensureArrayCapacity = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n if (array.length >= size)\r\n return array;\r\n return Utils.setArraySize(array, size, value);\r\n };\r\n Utils.newArray = function (size, defaultValue) {\r\n var array = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n };\r\n Utils.newFloatArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.newShortArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.toFloatArray = function (array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n };\r\n Utils.toSinglePrecision = function (value) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n };\r\n Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n };\r\n Utils.contains = function (array, element, identity) {\r\n if (identity === void 0) { identity = true; }\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] == element)\r\n return true;\r\n }\r\n return false;\r\n };\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n return Utils;\r\n }());\r\n spine.Utils = Utils;\r\n var DebugUtils = (function () {\r\n function DebugUtils() {\r\n }\r\n DebugUtils.logBones = function (skeleton) {\r\n for (var i = 0; i < skeleton.bones.length; i++) {\r\n var bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n };\r\n return DebugUtils;\r\n }());\r\n spine.DebugUtils = DebugUtils;\r\n var Pool = (function () {\r\n function Pool(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n Pool.prototype.obtain = function () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n };\r\n Pool.prototype.free = function (item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n };\r\n Pool.prototype.freeAll = function (items) {\r\n for (var i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n };\r\n Pool.prototype.clear = function () {\r\n this.items.length = 0;\r\n };\r\n return Pool;\r\n }());\r\n spine.Pool = Pool;\r\n var Vector2 = (function () {\r\n function Vector2(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n }\r\n Vector2.prototype.set = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2.prototype.length = function () {\r\n var x = this.x;\r\n var y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n };\r\n Vector2.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n };\r\n return Vector2;\r\n }());\r\n spine.Vector2 = Vector2;\r\n var TimeKeeper = (function () {\r\n function TimeKeeper() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1000;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n TimeKeeper.prototype.update = function () {\r\n var now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n };\r\n return TimeKeeper;\r\n }());\r\n spine.TimeKeeper = TimeKeeper;\r\n var WindowedMean = (function () {\r\n function WindowedMean(windowSize) {\r\n if (windowSize === void 0) { windowSize = 32; }\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n WindowedMean.prototype.hasEnoughData = function () {\r\n return this.addedValues >= this.values.length;\r\n };\r\n WindowedMean.prototype.addValue = function (value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n };\r\n WindowedMean.prototype.getMean = function () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n var mean = 0;\r\n for (var i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n return WindowedMean;\r\n }());\r\n spine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n if (!Math.fround) {\r\n Math.fround = (function (array) {\r\n return function (x) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Attachment = (function () {\r\n function Attachment(name) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n return Attachment;\r\n }());\r\n spine.Attachment = Attachment;\r\n var VertexAttachment = (function (_super) {\r\n __extends(VertexAttachment, _super);\r\n function VertexAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n _this.worldVerticesLength = 0;\r\n _this.deformAttachment = _this;\r\n return _this;\r\n }\r\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n var skeleton = slot.bone.skeleton;\r\n var deformArray = slot.deform;\r\n var vertices = this.vertices;\r\n var bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n var bone = slot.bone;\r\n var x = bone.worldX;\r\n var y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n var v = 0, skip = 0;\r\n for (var i = 0; i < start; i += 2) {\r\n var n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n var skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n else {\r\n var deform = deformArray;\r\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n };\r\n VertexAttachment.prototype.copyTo = function (attachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n }\r\n else\r\n attachment.bones = null;\r\n if (this.vertices != null) {\r\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\r\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n else\r\n attachment.vertices = null;\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n };\r\n VertexAttachment.nextID = 0;\r\n return VertexAttachment;\r\n }(Attachment));\r\n spine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AttachmentType;\r\n (function (AttachmentType) {\r\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoundingBoxAttachment = (function (_super) {\r\n __extends(BoundingBoxAttachment, _super);\r\n function BoundingBoxAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n BoundingBoxAttachment.prototype.copy = function () {\r\n var copy = new BoundingBoxAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return BoundingBoxAttachment;\r\n }(spine.VertexAttachment));\r\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ClippingAttachment = (function (_super) {\r\n __extends(ClippingAttachment, _super);\r\n function ClippingAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n return _this;\r\n }\r\n ClippingAttachment.prototype.copy = function () {\r\n var copy = new ClippingAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return ClippingAttachment;\r\n }(spine.VertexAttachment));\r\n spine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var MeshAttachment = (function (_super) {\r\n __extends(MeshAttachment, _super);\r\n function MeshAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.tempColor = new spine.Color(0, 0, 0, 0);\r\n return _this;\r\n }\r\n MeshAttachment.prototype.updateUVs = function () {\r\n var regionUVs = this.regionUVs;\r\n if (this.uvs == null || this.uvs.length != regionUVs.length)\r\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n var uvs = this.uvs;\r\n var n = this.uvs.length;\r\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof spine.TextureAtlasRegion) {\r\n var region = this.region;\r\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n }\r\n else if (this.region == null) {\r\n u = v = 0;\r\n width = height = 1;\r\n }\r\n else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n };\r\n MeshAttachment.prototype.getParentMesh = function () {\r\n return this.parentMesh;\r\n };\r\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n };\r\n MeshAttachment.prototype.copy = function () {\r\n if (this.parentMesh != null)\r\n return this.newLinkedMesh();\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n };\r\n MeshAttachment.prototype.newLinkedMesh = function () {\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n copy.updateUVs();\r\n return copy;\r\n };\r\n return MeshAttachment;\r\n }(spine.VertexAttachment));\r\n spine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathAttachment = (function (_super) {\r\n __extends(PathAttachment, _super);\r\n function PathAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.closed = false;\r\n _this.constantSpeed = false;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n PathAttachment.prototype.copy = function () {\r\n var copy = new PathAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PathAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PointAttachment = (function (_super) {\r\n __extends(PointAttachment, _super);\r\n function PointAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n return _this;\r\n }\r\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n };\r\n PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n var x = cos * bone.a + sin * bone.b;\r\n var y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n };\r\n PointAttachment.prototype.copy = function () {\r\n var copy = new PointAttachment(this.name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PointAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var RegionAttachment = (function (_super) {\r\n __extends(RegionAttachment, _super);\r\n function RegionAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.scaleX = 1;\r\n _this.scaleY = 1;\r\n _this.rotation = 0;\r\n _this.width = 0;\r\n _this.height = 0;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.offset = spine.Utils.newFloatArray(8);\r\n _this.uvs = spine.Utils.newFloatArray(8);\r\n _this.tempColor = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n RegionAttachment.prototype.updateOffset = function () {\r\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n var localX2 = localX + this.region.width * regionScaleX;\r\n var localY2 = localY + this.region.height * regionScaleY;\r\n var radians = this.rotation * Math.PI / 180;\r\n var cos = Math.cos(radians);\r\n var sin = Math.sin(radians);\r\n var localXCos = localX * cos + this.x;\r\n var localXSin = localX * sin;\r\n var localYCos = localY * cos + this.y;\r\n var localYSin = localY * sin;\r\n var localX2Cos = localX2 * cos + this.x;\r\n var localX2Sin = localX2 * sin;\r\n var localY2Cos = localY2 * cos + this.y;\r\n var localY2Sin = localY2 * sin;\r\n var offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n };\r\n RegionAttachment.prototype.setRegion = function (region) {\r\n this.region = region;\r\n var uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n }\r\n else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n };\r\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n var vertexOffset = this.offset;\r\n var x = bone.worldX, y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n };\r\n RegionAttachment.prototype.copy = function () {\r\n var copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n RegionAttachment.OX1 = 0;\r\n RegionAttachment.OY1 = 1;\r\n RegionAttachment.OX2 = 2;\r\n RegionAttachment.OY2 = 3;\r\n RegionAttachment.OX3 = 4;\r\n RegionAttachment.OY3 = 5;\r\n RegionAttachment.OX4 = 6;\r\n RegionAttachment.OY4 = 7;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n return RegionAttachment;\r\n }(spine.Attachment));\r\n spine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var JitterEffect = (function () {\r\n function JitterEffect(jitterX, jitterY) {\r\n this.jitterX = 0;\r\n this.jitterY = 0;\r\n this.jitterX = jitterX;\r\n this.jitterY = jitterY;\r\n }\r\n JitterEffect.prototype.begin = function (skeleton) {\r\n };\r\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n };\r\n JitterEffect.prototype.end = function () {\r\n };\r\n return JitterEffect;\r\n }());\r\n spine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SwirlEffect = (function () {\r\n function SwirlEffect(radius) {\r\n this.centerX = 0;\r\n this.centerY = 0;\r\n this.radius = 0;\r\n this.angle = 0;\r\n this.worldX = 0;\r\n this.worldY = 0;\r\n this.radius = radius;\r\n }\r\n SwirlEffect.prototype.begin = function (skeleton) {\r\n this.worldX = skeleton.x + this.centerX;\r\n this.worldY = skeleton.y + this.centerY;\r\n };\r\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n var x = position.x - this.worldX;\r\n var y = position.y - this.worldY;\r\n var dist = Math.sqrt(x * x + y * y);\r\n if (dist < this.radius) {\r\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n var cos = Math.cos(theta);\r\n var sin = Math.sin(theta);\r\n position.x = cos * x - sin * y + this.worldX;\r\n position.y = sin * x + cos * y + this.worldY;\r\n }\r\n };\r\n SwirlEffect.prototype.end = function () {\r\n };\r\n SwirlEffect.interpolation = new spine.PowOut(2);\r\n return SwirlEffect;\r\n }());\r\n spine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n canvas.AssetManager = AssetManager;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var CanvasTexture = (function (_super) {\r\n __extends(CanvasTexture, _super);\r\n function CanvasTexture(image) {\r\n return _super.call(this, image) || this;\r\n }\r\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n CanvasTexture.prototype.dispose = function () { };\r\n return CanvasTexture;\r\n }(spine.Texture));\r\n canvas.CanvasTexture = CanvasTexture;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context) {\r\n this.triangleRendering = false;\r\n this.debugRendering = false;\r\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\r\n this.tempColor = new spine.Color();\r\n this.ctx = context;\r\n }\r\n SkeletonRenderer.prototype.draw = function (skeleton) {\r\n if (this.triangleRendering)\r\n this.drawTriangles(skeleton);\r\n else\r\n this.drawImages(skeleton);\r\n };\r\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\r\n var ctx = this.ctx;\r\n var drawOrder = skeleton.drawOrder;\r\n if (this.debugRendering)\r\n ctx.strokeStyle = \"green\";\r\n ctx.save();\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n var regionAttachment = null;\r\n var region = null;\r\n var image = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n regionAttachment = attachment;\r\n region = regionAttachment.region;\r\n image = region.texture.getImage();\r\n }\r\n else\r\n continue;\r\n var skeleton_1 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_1.color;\r\n var slotColor = slot.color;\r\n var regionColor = regionAttachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\r\n var att = attachment;\r\n var bone = slot.bone;\r\n var w = region.width;\r\n var h = region.height;\r\n ctx.save();\r\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n ctx.translate(attachment.offset[0], attachment.offset[1]);\r\n ctx.rotate(attachment.rotation * Math.PI / 180);\r\n var atlasScale = att.width / w;\r\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n ctx.translate(w / 2, h / 2);\r\n if (attachment.region.rotate) {\r\n var t = w;\r\n w = h;\r\n h = t;\r\n ctx.rotate(-Math.PI / 2);\r\n }\r\n ctx.scale(1, -1);\r\n ctx.translate(-w / 2, -h / 2);\r\n ctx.globalAlpha = color.a;\r\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n if (this.debugRendering)\r\n ctx.strokeRect(0, 0, w, h);\r\n ctx.restore();\r\n }\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\r\n var blendMode = null;\r\n var vertices = this.vertices;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n var region = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n region = regionAttachment.region;\r\n texture = region.texture.getImage();\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n vertices = this.computeMeshVertices(slot, mesh, false);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture.getImage();\r\n }\r\n else\r\n continue;\r\n if (texture != null) {\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n }\r\n var skeleton_2 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_2.color;\r\n var slotColor = slot.color;\r\n var attachmentColor = attachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\r\n var ctx = this.ctx;\r\n ctx.globalAlpha = color.a;\r\n for (var j = 0; j < triangles.length; j += 3) {\r\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n if (this.debugRendering) {\r\n ctx.strokeStyle = \"green\";\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x0, y0);\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n }\r\n this.ctx.globalAlpha = 1;\r\n };\r\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n var ctx = this.ctx;\r\n u0 *= img.width;\r\n v0 *= img.height;\r\n u1 *= img.width;\r\n v1 *= img.height;\r\n u2 *= img.width;\r\n v2 *= img.height;\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.closePath();\r\n x1 -= x0;\r\n y1 -= y0;\r\n x2 -= x0;\r\n y2 -= y0;\r\n u1 -= u0;\r\n v1 -= v0;\r\n u2 -= u0;\r\n v2 -= v0;\r\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n ctx.save();\r\n ctx.transform(a, b, c, d, e, f);\r\n ctx.clip();\r\n ctx.drawImage(img, 0, 0);\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = region.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var vertices = this.vertices;\r\n var uvs = region.uvs;\r\n vertices[spine.RegionAttachment.C1R] = color.r;\r\n vertices[spine.RegionAttachment.C1G] = color.g;\r\n vertices[spine.RegionAttachment.C1B] = color.b;\r\n vertices[spine.RegionAttachment.C1A] = color.a;\r\n vertices[spine.RegionAttachment.U1] = uvs[0];\r\n vertices[spine.RegionAttachment.V1] = uvs[1];\r\n vertices[spine.RegionAttachment.C2R] = color.r;\r\n vertices[spine.RegionAttachment.C2G] = color.g;\r\n vertices[spine.RegionAttachment.C2B] = color.b;\r\n vertices[spine.RegionAttachment.C2A] = color.a;\r\n vertices[spine.RegionAttachment.U2] = uvs[2];\r\n vertices[spine.RegionAttachment.V2] = uvs[3];\r\n vertices[spine.RegionAttachment.C3R] = color.r;\r\n vertices[spine.RegionAttachment.C3G] = color.g;\r\n vertices[spine.RegionAttachment.C3B] = color.b;\r\n vertices[spine.RegionAttachment.C3A] = color.a;\r\n vertices[spine.RegionAttachment.U3] = uvs[4];\r\n vertices[spine.RegionAttachment.V3] = uvs[5];\r\n vertices[spine.RegionAttachment.C4R] = color.r;\r\n vertices[spine.RegionAttachment.C4G] = color.g;\r\n vertices[spine.RegionAttachment.C4B] = color.b;\r\n vertices[spine.RegionAttachment.C4A] = color.a;\r\n vertices[spine.RegionAttachment.U4] = uvs[6];\r\n vertices[spine.RegionAttachment.V4] = uvs[7];\r\n return vertices;\r\n };\r\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = mesh.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n var numVertices = mesh.worldVerticesLength / 2;\r\n if (this.vertices.length < mesh.worldVerticesLength) {\r\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\r\n }\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var uvs = mesh.uvs;\r\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\r\n vertices[v++] = color.r;\r\n vertices[v++] = color.g;\r\n vertices[v++] = color.b;\r\n vertices[v++] = color.a;\r\n vertices[v++] = uvs[u++];\r\n vertices[v++] = uvs[u++];\r\n v += 2;\r\n }\r\n return vertices;\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n return SkeletonRenderer;\r\n }());\r\n canvas.SkeletonRenderer = SkeletonRenderer;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-canvas.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\r\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\r\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\r\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\r\nvar MultiFile = require('../../../src/loader/MultiFile.js');\r\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\r\n\r\n/**\r\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\r\n *\r\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Spine File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\r\n *\r\n * @class SpineFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar SpineFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\r\n {\r\n var i;\r\n var json;\r\n var atlas;\r\n var files = [];\r\n var cache = loader.cacheManager.custom.spine;\r\n\r\n // atlas can be an array of atlas files, not just a single one\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n json = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'jsonURL'),\r\n extension: GetFastValue(config, 'jsonExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\r\n });\r\n\r\n atlasURL = GetFastValue(config, 'atlasURL');\r\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, {\r\n key: key + '!' + i,\r\n url: atlasURL[i],\r\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n else\r\n {\r\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, key + '!' + i, atlasURL[i], atlasXhrSettings);\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n\r\n files.unshift(json);\r\n\r\n MultiFile.call(this, loader, 'spine', key, files);\r\n\r\n this.config.preMultipliedAlpha = preMultipliedAlpha;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'text')\r\n {\r\n // Inspect the data for the files to now load\r\n var content = file.data.split('\\n');\r\n\r\n // Extract the textures\r\n var textures = [];\r\n\r\n for (var t = 0; t < content.length; t++)\r\n {\r\n var line = content[t];\r\n\r\n if (line.trim() === '' && t < content.length - 1)\r\n {\r\n line = content[t + 1];\r\n\r\n textures.push(line);\r\n }\r\n }\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\r\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\r\n var prefix = GetFastValue(config, 'prefix', this.prefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n var textureURL = textures[i];\r\n\r\n var key = this.key + ':' + textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n if (!loader.keyExists(image))\r\n {\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\r\n * @since 3.19.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var atlasCache;\r\n var atlasKey = '';\r\n var combinedAtlasData = '';\r\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\r\n var textureManager = this.loader.textureManager;\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'text')\r\n {\r\n atlasKey = file.key.replace(/![\\d]$/, '');\r\n\r\n atlasCache = file.cache;\r\n\r\n combinedAtlasData = combinedAtlasData.concat(file.data);\r\n }\r\n else\r\n {\r\n var src = file.key.trim();\r\n var pos = src.indexOf('!');\r\n var key = src.substr(pos + 1);\r\n\r\n if (!textureManager.exists(key))\r\n {\r\n textureManager.addImage(key, file.data);\r\n }\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetValue = require('../../../src/utils/object/GetValue');\r\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\r\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\r\nvar Spine = require('Spine');\r\nvar SpineFile = require('./SpineFile');\r\nvar SpineGameObject = require('./gameobject/SpineGameObject');\r\nvar SpineContainer = require('./container/SpineContainer');\r\nvar NOOP = require('../../../src/utils/NOOP');\r\n\r\n/**\r\n * @classdesc\r\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\r\n *\r\n * Find more details about Spine itself at http://esotericsoftware.com/.\r\n *\r\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\r\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\r\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\r\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\r\n *\r\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\r\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\r\n *\r\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\r\n *\r\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\r\n *\r\n * ```javascript\r\n * import * as SpinePlugin from './SpinePlugin.js';\r\n * ```\r\n *\r\n * and then adding it to your Phaser Game configuration:\r\n *\r\n * ```javascript\r\n * plugins: {\r\n * scene: [\r\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\r\n * ]\r\n * }\r\n * ```\r\n *\r\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\r\n * Game Configuration object, like this:\r\n *\r\n * ```javascript\r\n * scene: {\r\n * preload: preload,\r\n * create: create,\r\n * pack: {\r\n * files: [\r\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\r\n * ]\r\n * }\r\n * }\r\n * ```\r\n *\r\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\r\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\r\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\r\n * subsequent Scenes.\r\n *\r\n * ## A note about inlined data:\r\n *\r\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\r\n * at all. Instead, call the functions directly as required:\r\n *\r\n * scene.cache.json.add\r\n * scene.cache.custom.spine.add\r\n * scene.textures.addBase64\r\n *\r\n * ## Using the plugin\r\n *\r\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\r\n *\r\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\r\n * Spine files directly, i.e.:\r\n *\r\n * ```javascript\r\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\r\n * ```\r\n *\r\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\r\n * and Spine Containers:\r\n *\r\n * ```javascript\r\n * const man = this.add.spine(512, 650, 'stretchyman');\r\n *\r\n * const container = this.add.spineContainer();\r\n *\r\n * container.add(man);\r\n * ```\r\n *\r\n * The first argument is the key which you used when importing the Spine data. There are lots of\r\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\r\n * see the respective documentation and examples for further details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\r\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\r\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\r\n * load arguments, or you may see black outlines around skeleton textures.\r\n *\r\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\r\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\r\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\r\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\r\n * game, regardless if the Scene loaded the Spine data or not.\r\n *\r\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\r\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\r\n *\r\n * ```javascript\r\n * this.plugins.removeScenePlugin('SpinePlugin');\r\n * ```\r\n *\r\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\r\n *\r\n * @class SpinePlugin\r\n * @extends Phaser.Plugins.ScenePlugin\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar SpinePlugin = new Class({\r\n\r\n Extends: ScenePlugin,\r\n\r\n initialize:\r\n\r\n function SpinePlugin (scene, pluginManager, pluginKey)\r\n {\r\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\r\n\r\n var game = pluginManager.game;\r\n\r\n /**\r\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\r\n *\r\n * @name SpinePlugin#isWebGL\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isWebGL = (game.config.renderType === 2);\r\n\r\n /**\r\n * A custom cache that stores the Spine atlas data.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.cache = game.cache.addCustom('spine');\r\n\r\n /**\r\n * A custom cache that stores the Spine Textures.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#spineTextures\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.spineTextures = game.cache.addCustom('spineTextures');\r\n\r\n /**\r\n * A reference to the global JSON Cache.\r\n *\r\n * @name SpinePlugin#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.json = game.cache.json;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name SpinePlugin#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.19.0\r\n */\r\n this.textures = game.textures;\r\n\r\n /**\r\n * A flag that sets if the Skeleton Renderers will render debug information over the top\r\n * of the skeleton or not.\r\n *\r\n * @name SpinePlugin#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The underlying WebGL context of the Phaser renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.19.0\r\n */\r\n this.gl;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name SpinePlugin#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.renderer;\r\n\r\n /**\r\n * An instance of the Spine WebGL Scene Renderer.\r\n *\r\n * There is only one instance of the Scene Renderer shared across the whole plugin.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#sceneRenderer\r\n * @type {spine.webgl.SceneRenderer}\r\n * @since 3.19.0\r\n */\r\n this.sceneRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Renderer.\r\n *\r\n * @name SpinePlugin#skeletonRenderer\r\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.skeletonRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Debug Renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#skeletonDebugRenderer\r\n * @type {spine.webgl.skeletonDebugRenderer}\r\n * @since 3.19.0\r\n */\r\n this.skeletonDebugRenderer;\r\n\r\n /**\r\n * A reference to the Spine runtime.\r\n * This is the runtime created by Esoteric Software.\r\n *\r\n * @name SpinePlugin#plugin\r\n * @type {spine}\r\n * @since 3.19.0\r\n */\r\n this.plugin = Spine;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp1\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp1;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp2\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp2;\r\n\r\n if (this.isWebGL)\r\n {\r\n this.runtime = Spine.webgl;\r\n\r\n this.renderer = game.renderer;\r\n this.gl = game.renderer.gl;\r\n\r\n this.getAtlas = this.getAtlasWebGL;\r\n }\r\n else\r\n {\r\n this.runtime = Spine.canvas;\r\n\r\n this.renderer = game.renderer;\r\n\r\n this.getAtlas = this.getAtlasCanvas;\r\n }\r\n\r\n // Headless mode?\r\n if (!this.renderer)\r\n {\r\n this.renderer = {\r\n width: game.scale.width,\r\n height: game.scale.height,\r\n preRender: NOOP,\r\n postRender: NOOP,\r\n render: NOOP,\r\n destroy: NOOP\r\n };\r\n }\r\n\r\n var isWebGL = this.isWebGL;\r\n\r\n var add = function (x, y, key, animationName, loop)\r\n {\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.clear();\r\n }\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, x, y, key, animationName, loop);\r\n\r\n this.displayList.add(spineGO);\r\n this.updateList.add(spineGO);\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.rebind();\r\n }\r\n\r\n return spineGO;\r\n };\r\n\r\n var make = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.clear();\r\n }\r\n\r\n var key = GetValue(config, 'key', null);\r\n var animationName = GetValue(config, 'animationName', null);\r\n var loop = GetValue(config, 'loop', false);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 0, 0, key, animationName, loop);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, spineGO, config);\r\n\r\n // Spine specific\r\n var skinName = GetValue(config, 'skinName', false);\r\n\r\n if (skinName)\r\n {\r\n spineGO.setSkinByName(skinName);\r\n }\r\n\r\n var slotName = GetValue(config, 'slotName', false);\r\n var attachmentName = GetValue(config, 'attachmentName', null);\r\n\r\n if (slotName)\r\n {\r\n spineGO.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.rebind();\r\n }\r\n\r\n return spineGO.refresh();\r\n };\r\n\r\n var addContainer = function (x, y, children)\r\n {\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n this.displayList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var makeContainer = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetValue(config, 'x', 0);\r\n var y = GetValue(config, 'y', 0);\r\n var children = GetValue(config, 'children', null);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var container = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n\r\n return container;\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\r\n },\r\n\r\n /**\r\n * Internal boot handler.\r\n *\r\n * @method SpinePlugin#boot\r\n * @private\r\n * @since 3.19.0\r\n */\r\n boot: function ()\r\n {\r\n if (this.isWebGL)\r\n {\r\n this.bootWebGL();\r\n this.onResize();\r\n this.game.scale.on(ResizeEvent, this.onResize, this);\r\n }\r\n else\r\n {\r\n this.bootCanvas();\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n eventEmitter.once('destroy', this.destroy, this);\r\n\r\n this.game.events.once('destroy', this.gameDestroy, this);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the Canvas Renderer.\r\n *\r\n * @method SpinePlugin#bootCanvas\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootCanvas: function ()\r\n {\r\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the WebGL Renderer.\r\n *\r\n * @method SpinePlugin#bootWebGL\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootWebGL: function ()\r\n {\r\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\r\n\r\n var setBlendMode = function (srcBlend, dstBlend)\r\n {\r\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\r\n {\r\n var gl = this.context.gl;\r\n\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n\r\n if (this.isDrawing)\r\n {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n }\r\n };\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (!sceneRenderer)\r\n {\r\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n sceneRenderer.batcher.setBlendMode = setBlendMode;\r\n sceneRenderer.shapes.setBlendMode = setBlendMode;\r\n\r\n this.renderer.spineSceneRenderer = sceneRenderer;\r\n }\r\n\r\n // All scene share the same instance\r\n this.sceneRenderer = sceneRenderer;\r\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer;\r\n\r\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\r\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasCanvas\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasCanvas: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage());\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasWebGL\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasWebGL: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n var gl = this.sceneRenderer.context.gl;\r\n\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage(), false);\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\r\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\r\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\r\n * outlines around skeleton textures.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\r\n * Loading a file using a key that is already taken will result in a warning.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.spine({\r\n * key: 'mainmenu',\r\n * jsonURL: 'boy.json',\r\n * atlasURL: 'boy.atlas',\r\n * preMultipliedAlpha: true\r\n * });\r\n * ```\r\n *\r\n * If you need to load multiple Spine atlas files, provide them as an array:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\r\n * }\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the data from the Spine plugin.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spine\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.19.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {object} [settings] - An external Settings configuration object { prefix: '' }\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\r\n {\r\n var multifile;\r\n settings = settings || {};\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new SpineFile(this, key[i]);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#worldToLocal\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The screen space x coordinate to convert.\r\n * @param {number} y - The screen space y coordinate to convert.\r\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\r\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\r\n *\r\n * @return {spine.Vector2} A Vector2 containing the translated point.\r\n */\r\n worldToLocal: function (x, y, skeleton, bone)\r\n {\r\n var temp1 = this.temp1;\r\n var temp2 = this.temp2;\r\n var camera = this.sceneRenderer.camera;\r\n\r\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\r\n\r\n var width = camera.viewportWidth;\r\n var height = camera.viewportHeight;\r\n\r\n camera.screenToWorld(temp1, width, height);\r\n\r\n if (bone && bone.parent !== null)\r\n {\r\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\r\n\r\n return new Spine.Vector2(temp2.x, temp2.y);\r\n }\r\n else if (bone)\r\n {\r\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\r\n }\r\n else\r\n {\r\n return new Spine.Vector2(temp1.x, temp1.y);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x and y values.\r\n *\r\n * @method SpinePlugin#getVector2\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector2: function (x, y)\r\n {\r\n return new Spine.Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x, y and z values.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#getVector3\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n * @param {number} z - The Vector z value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector3: function (x, y, z)\r\n {\r\n return new Spine.webgl.Vector3(x, y, z);\r\n },\r\n\r\n /**\r\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBones\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBones: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBones = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugRegionAttachments\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugRegionAttachments: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawRegionAttachments = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBoundingBoxes\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBoundingBoxes: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshHull\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshHull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshHull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshTriangles\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshTriangles: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshTriangles = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugPaths\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugPaths: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawPaths = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugSkeletonXY\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugSkeletonXY: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawSkeletonXY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugClipping\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugClipping: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawClipping = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the given vertex effect on the Spine Skeleton Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setEffect\r\n * @since 3.19.0\r\n *\r\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setEffect: function (effect)\r\n {\r\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\r\n *\r\n * The Skeleton data should have already been loaded before calling this method.\r\n *\r\n * @method SpinePlugin#createSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\r\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\r\n *\r\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\r\n */\r\n createSkeleton: function (key, skeletonJSON)\r\n {\r\n var atlasKey = key;\r\n var jsonKey = key;\r\n var split = (key.indexOf('.') !== -1);\r\n\r\n if (split)\r\n {\r\n var parts = key.split('.');\r\n\r\n atlasKey = parts.shift();\r\n jsonKey = parts.join('.');\r\n }\r\n\r\n var atlasData = this.cache.get(atlasKey);\r\n var atlas = this.getAtlas(atlasKey);\r\n\r\n if (!atlas)\r\n {\r\n return null;\r\n }\r\n\r\n if (!this.spineTextures.has(atlasKey))\r\n {\r\n this.spineTextures.add(atlasKey, atlas);\r\n }\r\n\r\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\r\n\r\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\r\n\r\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\r\n\r\n var data;\r\n\r\n if (skeletonJSON)\r\n {\r\n data = skeletonJSON;\r\n }\r\n else\r\n {\r\n var json = this.json.get(atlasKey);\r\n\r\n data = (split) ? GetValue(json, jsonKey) : json;\r\n }\r\n\r\n if (data)\r\n {\r\n var skeletonData = skeletonJson.readSkeletonData(data);\r\n\r\n var skeleton = new Spine.Skeleton(skeletonData);\r\n\r\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Animation State and Animation State Data for the given skeleton.\r\n *\r\n * The returned object contains two properties: `state` and `stateData` respectively.\r\n *\r\n * @method SpinePlugin#createAnimationState\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\r\n *\r\n * @return {any} An object containing the Animation State and Animation State Data instances.\r\n */\r\n createAnimationState: function (skeleton)\r\n {\r\n var stateData = new Spine.AnimationStateData(skeleton.data);\r\n\r\n var state = new Spine.AnimationState(stateData);\r\n\r\n return { stateData: stateData, state: state };\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpinePlugin#getBounds\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function (skeleton)\r\n {\r\n var offset = new Spine.Vector2();\r\n var size = new Spine.Vector2();\r\n\r\n skeleton.getBounds(offset, size, []);\r\n\r\n return { offset: offset, size: size };\r\n },\r\n\r\n /**\r\n * Internal handler for when the renderer resizes.\r\n *\r\n * Only called if running in WebGL.\r\n *\r\n * @method SpinePlugin#onResize\r\n * @since 3.19.0\r\n */\r\n onResize: function ()\r\n {\r\n var renderer = this.renderer;\r\n var sceneRenderer = this.sceneRenderer;\r\n\r\n var viewportWidth = renderer.width;\r\n var viewportHeight = renderer.height;\r\n\r\n sceneRenderer.camera.position.x = viewportWidth / 2;\r\n sceneRenderer.camera.position.y = viewportHeight / 2;\r\n\r\n sceneRenderer.camera.setViewport(viewportWidth, viewportHeight);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n *\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method SpinePlugin#shutdown\r\n * @private\r\n * @since 3.19.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n if (this.isWebGL)\r\n {\r\n this.game.scale.off(ResizeEvent, this.onResize, this);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n *\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method SpinePlugin#destroy\r\n * @private\r\n * @since 3.19.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.cache = null;\r\n this.spineTextures = null;\r\n this.json = null;\r\n this.textures = null;\r\n this.skeletonRenderer = null;\r\n this.gl = null;\r\n },\r\n\r\n /**\r\n * The Game that owns this plugin is being destroyed.\r\n *\r\n * Dispose of the Scene Renderer and remove the Game Objects.\r\n *\r\n * @method SpinePlugin#gameDestroy\r\n * @private\r\n * @since 3.50.0\r\n */\r\n gameDestroy: function ()\r\n {\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n this.pluginManager.removeGameObject('spineContainer', true, true);\r\n\r\n this.pluginManager = null;\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (sceneRenderer)\r\n {\r\n sceneRenderer.dispose();\r\n }\r\n\r\n this.renderer.spineSceneRenderer = null;\r\n this.sceneRenderer = null;\r\n }\r\n\r\n});\r\n\r\nSpinePlugin.SpineGameObject = SpineGameObject;\r\nSpinePlugin.SpineContainer = SpineContainer;\r\n\r\n/**\r\n * Creates a new Spine Game Object and adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\r\n *\r\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\r\n *\r\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\r\n * name, then use `SpinePlugin.make` instead.\r\n *\r\n * @method SpinePlugin#add\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\n/**\r\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 500, y: 500, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-idle', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * @method SpinePlugin#make\r\n * @since 3.19.0\r\n *\r\n * @param {any} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\nmodule.exports = SpinePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../../src/utils/Class');\r\nvar Container = require('../../../../src/gameobjects/container/Container');\r\nvar SpineContainerRender = require('./SpineContainerRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\r\n *\r\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\r\n * for Spine Game Objects. You must only add ever Spine Game Objects, or other Spine Containers, to this type of Container.\r\n * Although Phaser will not prevent you from adding other types, they will not render and are likely to throw runtime errors.\r\n *\r\n * To create one in a Scene, use the factory methods:\r\n *\r\n * ```javascript\r\n * this.add.spineContainer();\r\n * ```\r\n *\r\n * or\r\n *\r\n * ```javascript\r\n * this.make.spineContainer();\r\n * ```\r\n *\r\n * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\r\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\r\n * Spine Containers. In short, if you need masking, don't mix and match the types.\r\n *\r\n * See the Container documentation for further details about what Containers can do.\r\n *\r\n * @class SpineContainer\r\n * @extends Phaser.GameObjects.Container\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\r\n */\r\nvar SpineContainer = new Class({\r\n\r\n Extends: Container,\r\n\r\n Mixins: [\r\n SpineContainerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineContainer (scene, plugin, x, y, children)\r\n {\r\n Container.call(this, scene, x, y, children);\r\n\r\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\r\n this.type = 'Spine';\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineContainer#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.50.0\r\n */\r\n this.plugin = plugin;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineContainer#preDestroy\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineContainer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n camera.addToRenderList(container);\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = SpineContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AngleBetween = require('../../../../src/math/angle/Between');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar Class = require('../../../../src/utils/Class');\r\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\r\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\r\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\r\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\r\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\r\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar DegToRad = require('../../../../src/math/DegToRad');\r\nvar GameObject = require('../../../../src/gameobjects/GameObject');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar SpineEvents = require('../events/');\r\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\r\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\r\n * easily change the skin, slot attachment, bone positions and more.\r\n *\r\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\r\n * You can only create them if the Spine plugin has been loaded into Phaser.\r\n *\r\n * The quickest way is the Game Object Factory:\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\r\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\r\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\r\n * animation to loop. Look at the documentation for further details on each of these options.\r\n *\r\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\r\n * Configuration object:\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 512, y: 550, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-think', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\r\n * overall scale.\r\n *\r\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\r\n * update and render, it must be added to the display and update lists of your Scene:\r\n *\r\n * ```javascript\r\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\r\n * this.sys.displayList.add(jelly);\r\n * this.sys.updateList.add(jelly);\r\n * ```\r\n *\r\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\r\n * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup\r\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\r\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\r\n * input shape being created. If it's not suitable, provide your own shape to the `setInteractive` method.\r\n *\r\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\r\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\r\n * Object position with it. See the examples for further details.\r\n *\r\n * If your Spine Game Object has black outlines around the different parts of the texture when it\r\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\r\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\r\n *\r\n * @class SpineGameObject\r\n * @extends Phaser.GameObjects.GameObject\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n */\r\nvar SpineGameObject = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsComputedSize,\r\n ComponentsDepth,\r\n ComponentsFlip,\r\n ComponentsScrollFactor,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n SpineGameObjectRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\r\n {\r\n GameObject.call(this, scene, 'Spine');\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineGameObject#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.19.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The Spine Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeleton\r\n * @type {spine.Skeleton}\r\n * @since 3.19.0\r\n */\r\n this.skeleton = null;\r\n\r\n /**\r\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeletonData\r\n * @type {spine.SkeletonData}\r\n * @since 3.19.0\r\n */\r\n this.skeletonData = null;\r\n\r\n /**\r\n * The Spine Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#state\r\n * @type {spine.AnimationState}\r\n * @since 3.19.0\r\n */\r\n this.state = null;\r\n\r\n /**\r\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#stateData\r\n * @type {spine.AnimationStateData}\r\n * @since 3.19.0\r\n */\r\n this.stateData = null;\r\n\r\n /**\r\n * A reference to the root bone of the Skeleton.\r\n *\r\n * @name SpineGameObject#root\r\n * @type {spine.Bone}\r\n * @since 3.19.0\r\n */\r\n this.root = null;\r\n\r\n /**\r\n * This object holds the calculated bounds of the current\r\n * pose, as set when a new Skeleton is applied.\r\n *\r\n * @name SpineGameObject#bounds\r\n * @type {any}\r\n * @since 3.19.0\r\n */\r\n this.bounds = null;\r\n\r\n /**\r\n * A Game Object level flag that allows you to enable debug drawing\r\n * to the Skeleton Debug Renderer by toggling it.\r\n *\r\n * @name SpineGameObject#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The factor to scale the Animation update time by.\r\n *\r\n * @name SpineGameObject#timeScale\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginX\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginY\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * A flag that stores if the texture associated with the current\r\n * Skin being used by this Game Object, has its alpha pre-multiplied\r\n * into it, or not.\r\n *\r\n * @name SpineGameObject#preMultipliedAlpha\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.preMultipliedAlpha = false;\r\n\r\n /**\r\n * A default Blend Mode. You cannot change the blend mode of a\r\n * Spine Game Object.\r\n *\r\n * @name SpineGameObject#blendMode\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.blendMode = -1;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key)\r\n {\r\n this.setSkeleton(key, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Returns `true` if this Spine Game Object both has a skeleton and\r\n * also passes the render tests for the given Camera.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n *\r\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function (camera, container)\r\n {\r\n var GameObjectRenderMask = 15;\r\n\r\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\r\n\r\n if (!container && !result && this.parentContainer)\r\n {\r\n var plugin = this.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\r\n {\r\n sceneRenderer.end();\r\n\r\n plugin.renderer.pipelines.rebind();\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Set the Alpha level for the whole Skeleton of this Game Object.\r\n *\r\n * The alpha controls the opacity of the Game Object as it renders.\r\n *\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method SpineGameObject#setAlpha\r\n * @since 3.19.0\r\n *\r\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value, slotName)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n slot.color.a = Clamp(value, 0, 1);\r\n }\r\n }\r\n else\r\n {\r\n this.alpha = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#alpha\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.a = v;\r\n }\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~2;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 2;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of red used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#red\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.r = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of green used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#green\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.g = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of blue used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#blue\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.b = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\r\n *\r\n * @method SpineGameObject#setColor\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\r\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setColor: function (color, slotName)\r\n {\r\n if (color === undefined) { color = 0xffffff; }\r\n\r\n var red = (color >> 16 & 0xFF) / 255;\r\n var green = (color >> 8 & 0xFF) / 255;\r\n var blue = (color & 0xFF) / 255;\r\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\r\n\r\n var target = this.skeleton;\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n target = slot;\r\n }\r\n }\r\n\r\n target.color.r = red;\r\n target.color.g = green;\r\n target.color.b = blue;\r\n\r\n if (alpha !== null)\r\n {\r\n target.color.a = alpha;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\r\n * that contains the Skeleton data.\r\n *\r\n * @method SpineGameObject#setSkeletonFromJSON\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\r\n {\r\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on its cache key.\r\n *\r\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\r\n * or slot attachment, or any other property to adjust it.\r\n *\r\n * @method SpineGameObject#setSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\r\n\r\n this.skeletonData = data.skeletonData;\r\n\r\n this.preMultipliedAlpha = data.preMultipliedAlpha;\r\n\r\n var skeleton = data.skeleton;\r\n\r\n skeleton.setSkin();\r\n skeleton.setToSetupPose();\r\n\r\n this.skeleton = skeleton;\r\n\r\n // AnimationState\r\n data = this.plugin.createAnimationState(skeleton);\r\n\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.state = data.state;\r\n this.stateData = data.stateData;\r\n\r\n this.state.addListener({\r\n event: this.onEvent.bind(this),\r\n complete: this.onComplete.bind(this),\r\n start: this.onStart.bind(this),\r\n end: this.onEnd.bind(this),\r\n dispose: this.onDispose.bind(this),\r\n interrupted: this.onInterrupted.bind(this)\r\n });\r\n\r\n if (animationName)\r\n {\r\n this.setAnimation(0, animationName, loop);\r\n }\r\n\r\n this.root = this.getRootBone();\r\n\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.state.apply(skeleton);\r\n\r\n skeleton.updateCache();\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onComplete event via this Game Object.\r\n *\r\n * @method SpineGameObject#onComplete\r\n * @fires SpinePluginEvents#COMPLETE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onComplete: function (entry)\r\n {\r\n this.emit(SpineEvents.COMPLETE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onDispose event via this Game Object.\r\n *\r\n * @method SpineGameObject#onDispose\r\n * @fires SpinePluginEvents#DISPOSE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onDispose: function (entry)\r\n {\r\n this.emit(SpineEvents.DISPOSE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onEnd event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEnd\r\n * @fires SpinePluginEvents#END\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onEnd: function (entry)\r\n {\r\n this.emit(SpineEvents.END, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine Event event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEvent\r\n * @fires SpinePluginEvents#EVENT\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n * @param {spine.Event} event - The Spine event.\r\n */\r\n onEvent: function (entry, event)\r\n {\r\n this.emit(SpineEvents.EVENT, entry, event);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\r\n *\r\n * @method SpineGameObject#onInterrupted\r\n * @fires SpinePluginEvents#INTERRUPTED\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onInterrupted: function (entry)\r\n {\r\n this.emit(SpineEvents.INTERRUPTED, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onStart event via this Game Object.\r\n *\r\n * @method SpineGameObject#onStart\r\n * @fires SpinePluginEvents#START\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onStart: function (entry)\r\n {\r\n this.emit(SpineEvents.START, entry);\r\n },\r\n\r\n /**\r\n * Refreshes the data about the current Skeleton.\r\n *\r\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\r\n *\r\n * Call this method if you need to access the Skeleton data directly, and it may have changed\r\n * recently.\r\n *\r\n * @method SpineGameObject#refresh\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n refresh: function ()\r\n {\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.updateSize();\r\n\r\n this.skeleton.updateCache();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n *\r\n * If no arguments are given it uses the current skeleton data dimensions.\r\n *\r\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\r\n * when the skeleton data doesn't match what is required in-game.\r\n *\r\n * @method SpineGameObject#setSize\r\n * @since 3.19.0\r\n *\r\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\r\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSize: function (width, height, offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (width === undefined) { width = skeleton.data.width; }\r\n if (height === undefined) { height = skeleton.data.height; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of this Game Object from the Skeleton position.\r\n *\r\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\r\n *\r\n * @method SpineGameObject#setOffset\r\n * @since 3.19.0\r\n *\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setOffset: function (offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\r\n * It then syncs the skeleton bounds back to this Game Object.\r\n *\r\n * This method is called automatically as needed internally, however, it's also exposed should\r\n * you require overriding the size settings.\r\n *\r\n * @method SpineGameObject#updateSize\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n updateSize: function ()\r\n {\r\n var skeleton = this.skeleton;\r\n var renderer = this.plugin.renderer;\r\n\r\n var height = renderer.height;\r\n\r\n var oldScaleX = this.scaleX;\r\n var oldScaleY = this.scaleY;\r\n\r\n skeleton.x = this.x;\r\n skeleton.y = height - this.y;\r\n skeleton.scaleX = 1;\r\n skeleton.scaleY = 1;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n var bounds = this.getBounds();\r\n\r\n this.width = bounds.size.x;\r\n this.height = bounds.size.y;\r\n\r\n this.displayOriginX = this.x - bounds.offset.x;\r\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\r\n\r\n skeleton.scaleX = oldScaleX;\r\n skeleton.scaleY = oldScaleY;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the bones in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getBoneList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\r\n */\r\n getBoneList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.bones.length; i++)\r\n {\r\n output.push(skeletonData.bones[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the skins in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getSkinList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\r\n */\r\n getSkinList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.skins.length; i++)\r\n {\r\n output.push(skeletonData.skins[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the slots in the Skeleton.\r\n *\r\n * @method SpineGameObject#getSlotList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\r\n */\r\n getSlotList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeleton = this.skeleton;\r\n\r\n for (var i = 0; i < skeleton.slots.length; i++)\r\n {\r\n output.push(skeleton.slots[i].data.name);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the animations in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getAnimationList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\r\n */\r\n getAnimationList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.animations.length; i++)\r\n {\r\n output.push(skeletonData.animations[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the current animation being played on the given track, if any.\r\n *\r\n * @method SpineGameObject#getCurrentAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\r\n *\r\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\r\n */\r\n getCurrentAnimation: function (trackIndex)\r\n {\r\n if (trackIndex === undefined) { trackIndex = 0; }\r\n\r\n var current = this.state.getCurrent(trackIndex);\r\n\r\n if (current)\r\n {\r\n return current.animation;\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#play\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\r\n */\r\n play: function (animationName, loop, ignoreIfPlaying)\r\n {\r\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#setAnimation\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to play the animation on.\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n\r\n if (ignoreIfPlaying && this.state)\r\n {\r\n var currentTrack = this.state.getCurrent(trackIndex);\r\n\r\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (this.findAnimation(animationName))\r\n {\r\n return this.state.setAnimation(trackIndex, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an animation to be played after the current or last queued animation for a track.\r\n * If the track is empty, it is equivalent to calling setAnimation.\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\r\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\r\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\r\n * If the previous entry is looping, its next loop completion is used instead of its duration.\r\n *\r\n * @method SpineGameObject#addAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {string} animationName - The string-based key of the animation to add.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n addAnimation: function (trackIndex, animationName, loop, delay)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (delay === undefined) { delay = 0; }\r\n\r\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\r\n },\r\n\r\n /**\r\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\r\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n *\r\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\r\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\r\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\r\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\r\n * A mix duration of 0 still mixes out over one frame.\r\n *\r\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\r\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\r\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\r\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\r\n * property to the value keyed in the new animation.\r\n *\r\n * @method SpineGameObject#setEmptyAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {spine.TrackEntry} The returned Track Entry.\r\n */\r\n setEmptyAnimation: function (trackIndex, mixDuration)\r\n {\r\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\r\n },\r\n\r\n /**\r\n * Removes all animations from the track, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTrack\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTrack: function (trackIndex)\r\n {\r\n this.state.clearTrack(trackIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all animations from all tracks, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTracks\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTracks: function ()\r\n {\r\n this.state.clearTracks();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkinByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to set.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkinByName: function (skinName)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkinByName(skinName);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkin\r\n * @since 3.19.0\r\n *\r\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkin: function (newSkin)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkin(newSkin);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mix duration when changing from the specified animation to the other.\r\n *\r\n * @method SpineGameObject#setMix\r\n * @since 3.19.0\r\n *\r\n * @param {string} fromName - The animation to mix from.\r\n * @param {string} toName - The animation to mix to.\r\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMix: function (fromName, toName, duration)\r\n {\r\n this.stateData.setMix(fromName, toName, duration);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot\r\n * index and attachment name. First the skin is checked and if the attachment was not found,\r\n * the default skin is checked.\r\n *\r\n * @method SpineGameObject#getAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {integer} slotIndex - The slot index to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachment: function (slotIndex, attachmentName)\r\n {\r\n return this.skeleton.getAttachment(slotIndex, attachmentName);\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\r\n *\r\n * @method SpineGameObject#getAttachmentByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachmentByName: function (slotName, attachmentName)\r\n {\r\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n },\r\n\r\n /**\r\n * A convenience method to set an attachment by finding the slot with findSlot,\r\n * finding the attachment with getAttachment, then setting the slot's attachment.\r\n *\r\n * @method SpineGameObject#setAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to add the attachment to.\r\n * @param {string} attachmentName - The attachment name to add.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAttachment: function (slotName, attachmentName)\r\n {\r\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\r\n {\r\n for (var i = 0; i < slotName.length; i++)\r\n {\r\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\r\n }\r\n }\r\n else\r\n {\r\n this.skeleton.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setToSetupPose: function ()\r\n {\r\n this.skeleton.setToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the slots and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setSlotsToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSlotsToSetupPose: function ()\r\n {\r\n this.skeleton.setSlotsToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones and constraints to their setup pose values.\r\n *\r\n * @method SpineGameObject#setBonesToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBonesToSetupPose: function ()\r\n {\r\n this.skeleton.setBonesToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the root bone, or null.\r\n *\r\n * @method SpineGameObject#getRootBone\r\n * @since 3.19.0\r\n *\r\n * @return {spine.Bone} The root bone, or null.\r\n */\r\n getRootBone: function ()\r\n {\r\n return this.skeleton.getRootBone();\r\n },\r\n\r\n /**\r\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\r\n * towards the given position. You can set an optional angle offset, should the bone be\r\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\r\n *\r\n * @method SpineGameObject#angleBoneToXY\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\r\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\r\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\r\n * @param {number} [offset=0] - An offset to add to the rotation angle.\r\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\r\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n if (minAngle === undefined) { minAngle = 0; }\r\n if (maxAngle === undefined) { maxAngle = 360; }\r\n\r\n var renderer = this.plugin.renderer;\r\n var height = renderer.height;\r\n\r\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\r\n\r\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBone\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {spine.Bone} The bone, or null.\r\n */\r\n findBone: function (boneName)\r\n {\r\n return this.skeleton.findBone(boneName);\r\n },\r\n\r\n /**\r\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBoneIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {integer} The bone index. Or -1 if the bone was not found.\r\n */\r\n findBoneIndex: function (boneName)\r\n {\r\n return this.skeleton.findBoneIndex(boneName);\r\n },\r\n\r\n /**\r\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlot\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {spine.Slot} The Slot. May be null.\r\n */\r\n findSlot: function (slotName)\r\n {\r\n return this.skeleton.findSlot(slotName);\r\n },\r\n\r\n /**\r\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlotIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {integer} The slot index. Or -1 if the Slot was not found.\r\n */\r\n findSlotIndex: function (slotName)\r\n {\r\n return this.skeleton.findSlotIndex(slotName);\r\n },\r\n\r\n /**\r\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\r\n * this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSkin\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to find.\r\n *\r\n * @return {spine.Skin} The Skin. May be null.\r\n */\r\n findSkin: function (skinName)\r\n {\r\n return this.skeletonData.findSkin(skinName);\r\n },\r\n\r\n /**\r\n * Finds an event by comparing each events's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findEvent\r\n * @since 3.19.0\r\n *\r\n * @param {string} eventDataName - The name of the event to find.\r\n *\r\n * @return {spine.EventData} The Event Data. May be null.\r\n */\r\n findEvent: function (eventDataName)\r\n {\r\n return this.skeletonData.findEvent(eventDataName);\r\n },\r\n\r\n /**\r\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The name of the animation to find.\r\n *\r\n * @return {spine.Animation} The Animation. May be null.\r\n */\r\n findAnimation: function (animationName)\r\n {\r\n return this.skeletonData.findAnimation(animationName);\r\n },\r\n\r\n /**\r\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findIkConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.IkConstraintData} The IK constraint. May be null.\r\n */\r\n findIkConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findIkConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds an transform constraint by comparing each transform constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findTransformConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\r\n */\r\n findTransformConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findTransformConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.PathConstraintData} The path constraint. May be null.\r\n */\r\n findPathConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds the index of a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraintIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\r\n */\r\n findPathConstraintIndex: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraintIndex(constraintName);\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpineGameObject#getBounds\r\n * @since 3.19.0\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function ()\r\n {\r\n return this.plugin.getBounds(this.skeleton);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method SpineGameObject#preUpdate\r\n * @protected\r\n * @since 3.19.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n this.state.update((delta / 1000) * this.timeScale);\r\n\r\n this.state.apply(skeleton);\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineGameObject#preDestroy\r\n * @protected\r\n * @since 3.19.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.plugin = null;\r\n\r\n this.skeleton = null;\r\n this.skeletonData = null;\r\n\r\n this.state = null;\r\n this.stateData = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderCanvas\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatrix)\r\n{\r\n var context = renderer.currentContext;\r\n\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var skeletonRenderer = plugin.skeletonRenderer;\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n camera.addToRenderList(src);\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n\r\n // Inverse or we get upside-down skeletons\r\n skeleton.scaleY = calcMatrix.scaleY * -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n if (camera.renderToTexture)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n skeletonRenderer.ctx = context;\r\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\r\n\r\n context.save();\r\n\r\n skeletonRenderer.draw(skeleton);\r\n\r\n context.restore();\r\n};\r\n\r\nmodule.exports = SpineGameObjectCanvasRenderer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Global constants.\r\n *\r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Phaser Release Version\r\n *\r\n * @name Phaser.VERSION\r\n * @const\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n VERSION: '3.60.0-beta.20',\r\n\r\n BlendModes: require('./renderer/BlendModes'),\r\n\r\n ScaleModes: require('./renderer/ScaleModes'),\r\n\r\n /**\r\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\r\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\r\n *\r\n * @name Phaser.AUTO\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n AUTO: 0,\r\n\r\n /**\r\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\r\n * WebGL or not.\r\n *\r\n * @name Phaser.CANVAS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n CANVAS: 1,\r\n\r\n /**\r\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\r\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\r\n * message to the user.\r\n *\r\n * @name Phaser.WEBGL\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n WEBGL: 2,\r\n\r\n /**\r\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\r\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\r\n * not for running Phaser on the server, which is something you really shouldn't do.\r\n *\r\n * @name Phaser.HEADLESS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n HEADLESS: 3,\r\n\r\n /**\r\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\r\n * to help you remember what the value is doing in your code.\r\n *\r\n * @name Phaser.FOREVER\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FOREVER: -1,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.NONE\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n NONE: 4,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.UP\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n UP: 5,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.DOWN\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DOWN: 6,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.LEFT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LEFT: 7,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.RIGHT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 8\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n *\r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once(Events.DESTROY, this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n *\r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {number} [data=1] - The amount to increase the given key by. Pass a negative value to decrease the key.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n\r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n *\r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n *\r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n *\r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.on('changedata', listener)`.\r\n *\r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Data Manager Destroy Event.\r\n *\r\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\r\n *\r\n * @event Phaser.Data.Events#DESTROY\r\n * @type {string}\r\n * @since 3.50.0\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.audio` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Audio\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} audioData - Can this device play HTML Audio tags?\r\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\r\n * @property {boolean} m4a - Can this device can play m4a files.\r\n * @property {boolean} aac - Can this device can play aac files.\r\n * @property {boolean} flac - Can this device can play flac files.\r\n * @property {boolean} mp3 - Can this device play mp3 files?\r\n * @property {boolean} ogg - Can this device play ogg files?\r\n * @property {boolean} opus - Can this device play opus files?\r\n * @property {boolean} wav - Can this device play wav files?\r\n * @property {boolean} webAudio - Does this device have the Web Audio API?\r\n * @property {boolean} webm - Can this device play webm files?\r\n */\r\nvar Audio = {\r\n\r\n flac: false,\r\n aac: false,\r\n audioData: false,\r\n dolby: false,\r\n m4a: false,\r\n mp3: false,\r\n ogg: false,\r\n opus: false,\r\n wav: false,\r\n webAudio: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Audio;\r\n }\r\n\r\n Audio.audioData = !!(window['Audio']);\r\n\r\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\r\n\r\n var audioElement = document.createElement('audio');\r\n var result = !!audioElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n var CanPlay = function (type1, type2)\r\n {\r\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\r\n\r\n if (type2)\r\n {\r\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\r\n }\r\n else\r\n {\r\n return Boolean(canPlayType1);\r\n }\r\n };\r\n\r\n // wav Mimetypes accepted:\r\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\r\n\r\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\r\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\r\n Audio.mp3 = CanPlay('mpeg');\r\n Audio.wav = CanPlay('wav');\r\n Audio.m4a = CanPlay('x-m4a');\r\n Audio.aac = CanPlay('aac');\r\n Audio.flac = CanPlay('flac', 'x-flac');\r\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\r\n\r\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\r\n {\r\n if (Browser.edge)\r\n {\r\n Audio.dolby = true;\r\n }\r\n else if (Browser.safari && Browser.safariVersion >= 9)\r\n {\r\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\r\n {\r\n var major = parseInt(RegExp.$1, 10);\r\n var minor = parseInt(RegExp.$2, 10);\r\n\r\n if ((major === 10 && minor >= 11) || major > 10)\r\n {\r\n Audio.dolby = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do here\r\n }\r\n\r\n return Audio;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\n\r\n/**\r\n * Determines the browser type and version running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.browser` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Browser\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} chrome - Set to true if running in Chrome.\r\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\r\n * @property {boolean} firefox - Set to true if running in Firefox.\r\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\r\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\r\n * @property {boolean} opera - Set to true if running in Opera.\r\n * @property {boolean} safari - Set to true if running in Safari.\r\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\r\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\r\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\r\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\r\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\r\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\r\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\r\n */\r\nvar Browser = {\r\n\r\n chrome: false,\r\n chromeVersion: 0,\r\n edge: false,\r\n firefox: false,\r\n firefoxVersion: 0,\r\n ie: false,\r\n ieVersion: 0,\r\n mobileSafari: false,\r\n opera: false,\r\n safari: false,\r\n safariVersion: 0,\r\n silk: false,\r\n trident: false,\r\n tridentVersion: 0,\r\n es2019: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Edg\\/\\d+/).test(ua))\r\n {\r\n Browser.edge = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/OPR/).test(ua))\r\n {\r\n Browser.opera = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.chrome = true;\r\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.chromeVersion > 69);\r\n }\r\n else if ((/Firefox\\D+(\\d+)/).test(ua))\r\n {\r\n Browser.firefox = true;\r\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.firefoxVersion > 10);\r\n }\r\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\r\n {\r\n Browser.mobileSafari = true;\r\n }\r\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.ieVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.safari = true;\r\n Browser.safariVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.safariVersion > 10);\r\n }\r\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.trident = true;\r\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\r\n Browser.ieVersion = parseInt(RegExp.$3, 10);\r\n }\r\n\r\n // Silk gets its own if clause because its ua also contains 'Safari'\r\n if ((/Silk/).test(ua))\r\n {\r\n Browser.silk = true;\r\n }\r\n\r\n return Browser;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the canvas features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.CanvasFeatures\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\r\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\r\n */\r\nvar CanvasFeatures = {\r\n\r\n supportInverseAlpha: false,\r\n supportNewBlendModes: false\r\n\r\n};\r\n\r\nfunction checkBlendMode ()\r\n{\r\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\r\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\r\n\r\n var magenta = new Image();\r\n\r\n magenta.onload = function ()\r\n {\r\n var yellow = new Image();\r\n\r\n yellow.onload = function ()\r\n {\r\n var canvas = CanvasPool.create2D(yellow, 6);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.globalCompositeOperation = 'multiply';\r\n\r\n context.drawImage(magenta, 0, 0);\r\n context.drawImage(yellow, 2, 0);\r\n\r\n if (!context.getImageData(2, 0, 1, 1))\r\n {\r\n return false;\r\n }\r\n\r\n var data = context.getImageData(2, 0, 1, 1).data;\r\n\r\n CanvasPool.remove(yellow);\r\n\r\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\r\n };\r\n\r\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\r\n };\r\n\r\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\r\n\r\n return false;\r\n}\r\n\r\nfunction checkInverseAlpha ()\r\n{\r\n var canvas = CanvasPool.create2D(this, 2);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\r\n\r\n // Draw a single pixel\r\n context.fillRect(0, 0, 1, 1);\r\n\r\n // Get the color values\r\n var s1 = context.getImageData(0, 0, 1, 1);\r\n\r\n if (s1 === null)\r\n {\r\n return false;\r\n }\r\n\r\n // Plot them to x2\r\n context.putImageData(s1, 1, 0);\r\n\r\n // Get those values\r\n var s2 = context.getImageData(1, 0, 1, 1);\r\n\r\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\r\n\r\n CanvasPool.remove(this);\r\n\r\n // Compare and return\r\n return result;\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts !== 'function' && document !== undefined)\r\n {\r\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\r\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\r\n }\r\n\r\n return CanvasFeatures;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\nvar Browser = require('./Browser');\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.features` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Features\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} canvas - Is canvas available?\r\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\r\n * @property {boolean} file - Is file available?\r\n * @property {boolean} fileSystem - Is fileSystem available?\r\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\r\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\r\n * @property {boolean} localStorage - Is localStorage available?\r\n * @property {boolean} pointerLock - Is Pointer Lock available?\r\n * @property {boolean} stableSort - Is Array.sort stable?\r\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\r\n * @property {boolean} vibration - Does the device support the Vibration API?\r\n * @property {boolean} webGL - Is webGL available?\r\n * @property {boolean} worker - Is worker available?\r\n */\r\nvar Features = {\r\n\r\n canvas: false,\r\n canvasBitBltShift: null,\r\n file: false,\r\n fileSystem: false,\r\n getUserMedia: true,\r\n littleEndian: false,\r\n localStorage: false,\r\n pointerLock: false,\r\n stableSort: false,\r\n support32bit: false,\r\n vibration: false,\r\n webGL: false,\r\n worker: false\r\n\r\n};\r\n\r\n// Check Little or Big Endian system.\r\n// @author Matt DesLauriers (@mattdesl)\r\nfunction checkIsLittleEndian ()\r\n{\r\n var a = new ArrayBuffer(4);\r\n var b = new Uint8Array(a);\r\n var c = new Uint32Array(a);\r\n\r\n b[0] = 0xa1;\r\n b[1] = 0xb2;\r\n b[2] = 0xc3;\r\n b[3] = 0xd4;\r\n\r\n if (c[0] === 0xd4c3b2a1)\r\n {\r\n return true;\r\n }\r\n\r\n if (c[0] === 0xa1b2c3d4)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n // Could not determine endianness\r\n return null;\r\n }\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Features;\r\n }\r\n\r\n Features.canvas = !!window['CanvasRenderingContext2D'];\r\n\r\n try\r\n {\r\n Features.localStorage = !!localStorage.getItem;\r\n }\r\n catch (error)\r\n {\r\n Features.localStorage = false;\r\n }\r\n\r\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\r\n Features.fileSystem = !!window['requestFileSystem'];\r\n\r\n var isUint8 = false;\r\n\r\n var testWebGL = function ()\r\n {\r\n if (window['WebGLRenderingContext'])\r\n {\r\n try\r\n {\r\n var canvas = CanvasPool.createWebGL(this);\r\n\r\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\r\n\r\n var canvas2D = CanvasPool.create2D(this);\r\n\r\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\r\n\r\n // Can't be done on a webgl context\r\n var image = ctx2D.createImageData(1, 1);\r\n\r\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\r\n // @author Matt DesLauriers (@mattdesl)\r\n isUint8 = image.data instanceof Uint8ClampedArray;\r\n\r\n CanvasPool.remove(canvas);\r\n CanvasPool.remove(canvas2D);\r\n\r\n return !!ctx;\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n Features.webGL = testWebGL();\r\n\r\n Features.worker = !!window['Worker'];\r\n\r\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\r\n\r\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\r\n\r\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\r\n\r\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\r\n\r\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\r\n if (Browser.firefox && Browser.firefoxVersion < 21)\r\n {\r\n Features.getUserMedia = false;\r\n }\r\n\r\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\r\n // is safer to not try and use the fast copy-over method.\r\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\r\n {\r\n Features.canvasBitBltShift = true;\r\n }\r\n\r\n // Known not to work\r\n if (Browser.safari || Browser.mobileSafari)\r\n {\r\n Features.canvasBitBltShift = false;\r\n }\r\n\r\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\r\n\r\n if (navigator.vibrate)\r\n {\r\n Features.vibration = true;\r\n }\r\n\r\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\r\n {\r\n Features.littleEndian = checkIsLittleEndian();\r\n }\r\n\r\n Features.support32bit = (\r\n typeof ArrayBuffer !== 'undefined' &&\r\n typeof Uint8ClampedArray !== 'undefined' &&\r\n typeof Int32Array !== 'undefined' &&\r\n Features.littleEndian !== null &&\r\n isUint8\r\n );\r\n\r\n return Features;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the full screen support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.fullscreen` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Fullscreen\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} available - Does the browser support the Full Screen API?\r\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\r\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\r\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\r\n */\r\nvar Fullscreen = {\r\n\r\n available: false,\r\n cancel: '',\r\n keyboard: false,\r\n request: ''\r\n\r\n};\r\n\r\n/**\r\n* Checks for support of the Full Screen API.\r\n*\r\n* @ignore\r\n*/\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Fullscreen;\r\n }\r\n\r\n var i;\r\n\r\n var suffix1 = 'Fullscreen';\r\n var suffix2 = 'FullScreen';\r\n\r\n var fs = [\r\n 'request' + suffix1,\r\n 'request' + suffix2,\r\n 'webkitRequest' + suffix1,\r\n 'webkitRequest' + suffix2,\r\n 'msRequest' + suffix1,\r\n 'msRequest' + suffix2,\r\n 'mozRequest' + suffix2,\r\n 'mozRequest' + suffix1\r\n ];\r\n\r\n for (i = 0; i < fs.length; i++)\r\n {\r\n if (document.documentElement[fs[i]])\r\n {\r\n Fullscreen.available = true;\r\n Fullscreen.request = fs[i];\r\n break;\r\n }\r\n }\r\n\r\n var cfs = [\r\n 'cancel' + suffix2,\r\n 'exit' + suffix1,\r\n 'webkitCancel' + suffix2,\r\n 'webkitExit' + suffix1,\r\n 'msCancel' + suffix2,\r\n 'msExit' + suffix1,\r\n 'mozCancel' + suffix2,\r\n 'mozExit' + suffix1\r\n ];\r\n\r\n if (Fullscreen.available)\r\n {\r\n for (i = 0; i < cfs.length; i++)\r\n {\r\n if (document[cfs[i]])\r\n {\r\n Fullscreen.cancel = cfs[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Keyboard Input?\r\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\r\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\r\n {\r\n Fullscreen.keyboard = true;\r\n }\r\n\r\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\r\n\r\n return Fullscreen;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the input support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.input` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Input\r\n * @since 3.0.0\r\n *\r\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\r\n * @property {boolean} gamepads - Is navigator.getGamepads available?\r\n * @property {boolean} mspointer - Is mspointer available?\r\n * @property {boolean} touch - Is touch available?\r\n */\r\nvar Input = {\r\n\r\n gamepads: false,\r\n mspointer: false,\r\n touch: false,\r\n wheelEvent: null\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Input;\r\n }\r\n\r\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\r\n {\r\n Input.touch = true;\r\n }\r\n\r\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\r\n {\r\n Input.mspointer = true;\r\n }\r\n\r\n if (navigator.getGamepads)\r\n {\r\n Input.gamepads = true;\r\n }\r\n\r\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\r\n {\r\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\r\n Input.wheelEvent = 'wheel';\r\n }\r\n else if ('onmousewheel' in window)\r\n {\r\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\r\n Input.wheelEvent = 'mousewheel';\r\n }\r\n else if (Browser.firefox && 'MouseScrollEvent' in window)\r\n {\r\n // FF prior to 17. This should probably be scrubbed.\r\n Input.wheelEvent = 'DOMMouseScroll';\r\n }\r\n\r\n return Input;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the operating system of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.os` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.OS\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} android - Is running on android?\r\n * @property {boolean} chromeOS - Is running on chromeOS?\r\n * @property {boolean} cordova - Is the game running under Apache Cordova?\r\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\r\n * @property {boolean} desktop - Is running on a desktop?\r\n * @property {boolean} ejecta - Is the game running under Ejecta?\r\n * @property {boolean} electron - Is the game running under GitHub Electron?\r\n * @property {boolean} iOS - Is running on iOS?\r\n * @property {boolean} iPad - Is running on iPad?\r\n * @property {boolean} iPhone - Is running on iPhone?\r\n * @property {boolean} kindle - Is running on an Amazon Kindle?\r\n * @property {boolean} linux - Is running on linux?\r\n * @property {boolean} macOS - Is running on macOS?\r\n * @property {boolean} node - Is the game running under Node.js?\r\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\r\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\r\n * @property {boolean} windows - Is running on windows?\r\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\r\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\r\n * @property {number} pixelRatio - PixelRatio of the host device?\r\n */\r\nvar OS = {\r\n\r\n android: false,\r\n chromeOS: false,\r\n cordova: false,\r\n crosswalk: false,\r\n desktop: false,\r\n ejecta: false,\r\n electron: false,\r\n iOS: false,\r\n iOSVersion: 0,\r\n iPad: false,\r\n iPhone: false,\r\n kindle: false,\r\n linux: false,\r\n macOS: false,\r\n node: false,\r\n nodeWebkit: false,\r\n pixelRatio: 1,\r\n webApp: false,\r\n windows: false,\r\n windowsPhone: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return OS;\r\n }\r\n\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Windows/).test(ua))\r\n {\r\n OS.windows = true;\r\n }\r\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\r\n {\r\n // Because iOS 13 identifies as Mac OS:\r\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\r\n {\r\n OS.iOS = true;\r\n OS.iPad = true;\r\n\r\n (navigator.appVersion).match(/Version\\/(\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else\r\n {\r\n OS.macOS = true;\r\n }\r\n }\r\n else if ((/Android/).test(ua))\r\n {\r\n OS.android = true;\r\n }\r\n else if ((/Linux/).test(ua))\r\n {\r\n OS.linux = true;\r\n }\r\n else if ((/iP[ao]d|iPhone/i).test(ua))\r\n {\r\n OS.iOS = true;\r\n\r\n (navigator.appVersion).match(/OS (\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n\r\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\r\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\r\n }\r\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\r\n {\r\n OS.kindle = true;\r\n\r\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\r\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\r\n }\r\n else if ((/CrOS/).test(ua))\r\n {\r\n OS.chromeOS = true;\r\n }\r\n\r\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\r\n {\r\n OS.android = false;\r\n OS.iOS = false;\r\n OS.macOS = false;\r\n OS.windows = true;\r\n OS.windowsPhone = true;\r\n }\r\n\r\n var silk = (/Silk/).test(ua);\r\n\r\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\r\n {\r\n OS.desktop = true;\r\n }\r\n\r\n // Windows Phone / Table reset\r\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\r\n {\r\n OS.desktop = false;\r\n }\r\n\r\n // WebApp mode in iOS\r\n if (navigator.standalone)\r\n {\r\n OS.webApp = true;\r\n }\r\n\r\n if (typeof importScripts !== 'function')\r\n {\r\n if (window.cordova !== undefined)\r\n {\r\n OS.cordova = true;\r\n }\r\n\r\n if (window.ejecta !== undefined)\r\n {\r\n OS.ejecta = true;\r\n }\r\n }\r\n\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\r\n {\r\n OS.node = true;\r\n }\r\n\r\n if (OS.node && typeof process.versions === 'object')\r\n {\r\n OS.nodeWebkit = !!process.versions['node-webkit'];\r\n\r\n OS.electron = !!process.versions.electron;\r\n }\r\n\r\n if ((/Crosswalk/).test(ua))\r\n {\r\n OS.crosswalk = true;\r\n }\r\n\r\n OS.pixelRatio = window['devicePixelRatio'] || 1;\r\n\r\n return OS;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the video support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.video` from within any Scene.\r\n *\r\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\r\n *\r\n * @typedef {object} Phaser.Device.Video\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\r\n * @property {boolean} hls - Can this device play hls video files?\r\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\r\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\r\n * @property {boolean} ogg - Can this device play ogg video files?\r\n * @property {boolean} vp9 - Can this device play vp9 video files?\r\n * @property {boolean} webm - Can this device play webm video files?\r\n */\r\nvar Video = {\r\n\r\n h264: false,\r\n hls: false,\r\n mp4: false,\r\n m4v: false,\r\n ogg: false,\r\n vp9: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Video;\r\n }\r\n\r\n var videoElement = document.createElement('video');\r\n var result = !!videoElement.canPlayType;\r\n var no = /^no$/;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\r\n {\r\n Video.ogg = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\r\n Video.h264 = true;\r\n Video.mp4 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\r\n {\r\n Video.m4v = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\r\n {\r\n Video.webm = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\r\n {\r\n Video.vp9 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n Video.hls = true;\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do\r\n }\r\n\r\n return Video;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// This singleton is instantiated as soon as Phaser loads,\r\n// before a Phaser.Game instance has even been created.\r\n// Which means all instances of Phaser Games can share it,\r\n// without having to re-poll the device all over again\r\n\r\n/**\r\n * @namespace Phaser.Device\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.DeviceConf\r\n *\r\n * @property {Phaser.Device.OS} os - The OS Device functions.\r\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\r\n * @property {Phaser.Device.Features} features - The Features Device functions.\r\n * @property {Phaser.Device.Input} input - The Input Device functions.\r\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\r\n * @property {Phaser.Device.Video} video - The Video Device functions.\r\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\r\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\r\n */\r\n\r\nmodule.exports = {\r\n\r\n os: require('./OS'),\r\n browser: require('./Browser'),\r\n features: require('./Features'),\r\n input: require('./Input'),\r\n audio: require('./Audio'),\r\n video: require('./Video'),\r\n fullscreen: require('./Fullscreen'),\r\n canvasFeatures: require('./CanvasFeatures')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar tempMatrix = new Float32Array(20);\r\n\r\n/**\r\n * @classdesc\r\n * The ColorMatrix class creates a 5x4 matrix that can be used in shaders and graphics\r\n * operations. It provides methods required to modify the color values, such as adjusting\r\n * the brightness, setting a sepia tone, hue rotation and more.\r\n *\r\n * Use the method `getData` to return a Float32Array containing the current color values.\r\n *\r\n * @class ColorMatrix\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.50.0\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function ColorMatrix ()\r\n {\r\n /**\r\n * Internal ColorMatrix array.\r\n *\r\n * @name Phaser.Display.ColorMatrix#_matrix\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._matrix = new Float32Array(20);\r\n\r\n /**\r\n * The value that determines how much of the original color is used\r\n * when mixing the colors. A value between 0 (all original) and 1 (all final)\r\n *\r\n * @name Phaser.Display.ColorMatrix#alpha\r\n * @type {number}\r\n * @since 3.50.0\r\n */\r\n this.alpha = 1;\r\n\r\n /**\r\n * Is the ColorMatrix array dirty?\r\n *\r\n * @name Phaser.Display.ColorMatrix#_dirty\r\n * @type {boolean}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._dirty = true;\r\n\r\n /**\r\n * The matrix data as a Float32Array.\r\n *\r\n * Returned by the `getData` method.\r\n *\r\n * @name Phaser.Display.ColorMatrix#data\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._data = new Float32Array(20);\r\n\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix from the given array of color values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#set\r\n * @since 3.50.0\r\n *\r\n * @param {(number[]|Float32Array)} value - The ColorMatrix values to set. Must have 20 elements.\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n set: function (value)\r\n {\r\n this._matrix.set(value);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the ColorMatrix to default values and also resets\r\n * the `alpha` property back to 1.\r\n *\r\n * @method Phaser.Display.ColorMatrix#reset\r\n * @since 3.50.0\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n reset: function ()\r\n {\r\n var m = this._matrix;\r\n\r\n m.fill(0);\r\n\r\n m[0] = 1;\r\n m[6] = 1;\r\n m[12] = 1;\r\n m[18] = 1;\r\n\r\n this.alpha = 1;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the ColorMatrix as a Float32Array.\r\n *\r\n * Can be used directly as a 1fv shader uniform value.\r\n *\r\n * @method Phaser.Display.ColorMatrix#getData\r\n * @since 3.50.0\r\n *\r\n * @return {Float32Array} The ColorMatrix as a Float32Array.\r\n */\r\n getData: function ()\r\n {\r\n var data = this._data;\r\n\r\n if (this._dirty)\r\n {\r\n data.set(this._matrix);\r\n\r\n data[4] /= 255;\r\n data[9] /= 255;\r\n data[14] /= 255;\r\n data[19] /= 255;\r\n\r\n this._dirty = false;\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Changes the brightness of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brightness\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of brightness to apply to this ColorMatrix. Between 0 (black) and 1.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brightness: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var b = value;\r\n\r\n return this.multiply([\r\n b, 0, 0, 0, 0,\r\n 0, b, 0, 0, 0,\r\n 0, 0, b, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Changes the saturation of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturate\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of saturation to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n saturate: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var x = (value * 2 / 3) + 1;\r\n var y = ((x - 1) * -0.5);\r\n\r\n return this.multiply([\r\n x, y, y, 0, 0,\r\n y, x, y, 0, 0,\r\n y, y, x, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Desaturates this ColorMatrix (removes color from it).\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturation\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturate: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-1, multiply);\r\n },\r\n\r\n /**\r\n * Rotates the hues of this ColorMatrix by the value given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#hue\r\n * @since 3.50.0\r\n *\r\n * @param {number} [rotation=0] - The amount of hue rotation to apply to this ColorMatrix, in degrees.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n hue: function (rotation, multiply)\r\n {\r\n if (rotation === undefined) { rotation = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n rotation = rotation / 180 * Math.PI;\r\n\r\n var cos = Math.cos(rotation);\r\n var sin = Math.sin(rotation);\r\n var lumR = 0.213;\r\n var lumG = 0.715;\r\n var lumB = 0.072;\r\n\r\n return this.multiply([\r\n lumR + cos * (1 - lumR) + sin * (-lumR),lumG + cos * (-lumG) + sin * (-lumG),lumB + cos * (-lumB) + sin * (1 - lumB), 0, 0,\r\n lumR + cos * (-lumR) + sin * (0.143),lumG + cos * (1 - lumG) + sin * (0.140),lumB + cos * (-lumB) + sin * (-0.283), 0, 0,\r\n lumR + cos * (-lumR) + sin * (-(1 - lumR)),lumG + cos * (-lumG) + sin * (lumG),lumB + cos * (1 - lumB) + sin * (lumB), 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be grayscale.\r\n *\r\n * @method Phaser.Display.ColorMatrix#grayscale\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=1] - The grayscale scale (0 is black).\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n grayscale: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-value, multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be black and white.\r\n *\r\n * @method Phaser.Display.ColorMatrix#blackWhite\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n blackWhite: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BLACK_WHITE, multiply);\r\n },\r\n\r\n /**\r\n * Change the contrast of this ColorMatrix by the amount given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#contrast\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of contrast to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n contrast: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var v = value + 1;\r\n var o = -0.5 * (v - 1);\r\n\r\n return this.multiply([\r\n v, 0, 0, 0, o,\r\n 0, v, 0, 0, o,\r\n 0, 0, v, 0, o,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Converts this ColorMatrix to have negative values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#negative\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n negative: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.NEGATIVE, multiply);\r\n },\r\n\r\n /**\r\n * Apply a desaturated luminance to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#desaturateLuminance\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturateLuminance: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.DESATURATE_LUMINANCE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a sepia tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#sepia\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n sepia: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SEPIA, multiply);\r\n },\r\n\r\n /**\r\n * Applies a night vision tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#night\r\n * @since 3.50.0\r\n *\r\n * @param {number} [intensity=0.1] - The intensity of this effect.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n night: function (intensity, multiply)\r\n {\r\n if (intensity === undefined) { intensity = 0.1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply([\r\n intensity * (-2.0), -intensity, 0, 0, 0,\r\n -intensity, 0, intensity, 0, 0,\r\n 0, intensity, intensity * 2.0, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Applies a trippy color tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#lsd\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n lsd: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.LSD, multiply);\r\n },\r\n\r\n /**\r\n * Applies a brown tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brown\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brown: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BROWN, multiply);\r\n },\r\n\r\n /**\r\n * Applies a vintage pinhole color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#vintagePinhole\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n vintagePinhole: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.VINTAGE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a kodachrome color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#kodachrome\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n kodachrome: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.KODACHROME, multiply);\r\n },\r\n\r\n /**\r\n * Applies a technicolor color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#technicolor\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n technicolor: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.TECHNICOLOR, multiply);\r\n },\r\n\r\n /**\r\n * Applies a polaroid color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#polaroid\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n polaroid: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.POLAROID, multiply);\r\n },\r\n\r\n /**\r\n * Shifts the values of this ColorMatrix into BGR order.\r\n *\r\n * @method Phaser.Display.ColorMatrix#shiftToBGR\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n shiftToBGR: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SHIFT_BGR, multiply);\r\n },\r\n\r\n /**\r\n * Multiplies the two given matrices.\r\n *\r\n * @method Phaser.Display.ColorMatrix#multiply\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} a - The 5x4 array to multiply with ColorMatrix._matrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n multiply: function (a, multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n // Duplicate _matrix into c\r\n\r\n if (!multiply)\r\n {\r\n this.reset();\r\n }\r\n\r\n var m = this._matrix;\r\n var c = tempMatrix;\r\n\r\n // copy _matrix to tempMatrox\r\n c.set(m);\r\n\r\n m.set([\r\n // R\r\n (c[0] * a[0]) + (c[1] * a[5]) + (c[2] * a[10]) + (c[3] * a[15]),\r\n (c[0] * a[1]) + (c[1] * a[6]) + (c[2] * a[11]) + (c[3] * a[16]),\r\n (c[0] * a[2]) + (c[1] * a[7]) + (c[2] * a[12]) + (c[3] * a[17]),\r\n (c[0] * a[3]) + (c[1] * a[8]) + (c[2] * a[13]) + (c[3] * a[18]),\r\n (c[0] * a[4]) + (c[1] * a[9]) + (c[2] * a[14]) + (c[3] * a[19]) + c[4],\r\n\r\n // G\r\n (c[5] * a[0]) + (c[6] * a[5]) + (c[7] * a[10]) + (c[8] * a[15]),\r\n (c[5] * a[1]) + (c[6] * a[6]) + (c[7] * a[11]) + (c[8] * a[16]),\r\n (c[5] * a[2]) + (c[6] * a[7]) + (c[7] * a[12]) + (c[8] * a[17]),\r\n (c[5] * a[3]) + (c[6] * a[8]) + (c[7] * a[13]) + (c[8] * a[18]),\r\n (c[5] * a[4]) + (c[6] * a[9]) + (c[7] * a[14]) + (c[8] * a[19]) + c[9],\r\n\r\n // B\r\n (c[10] * a[0]) + (c[11] * a[5]) + (c[12] * a[10]) + (c[13] * a[15]),\r\n (c[10] * a[1]) + (c[11] * a[6]) + (c[12] * a[11]) + (c[13] * a[16]),\r\n (c[10] * a[2]) + (c[11] * a[7]) + (c[12] * a[12]) + (c[13] * a[17]),\r\n (c[10] * a[3]) + (c[11] * a[8]) + (c[12] * a[13]) + (c[13] * a[18]),\r\n (c[10] * a[4]) + (c[11] * a[9]) + (c[12] * a[14]) + (c[13] * a[19]) + c[14],\r\n\r\n // A\r\n (c[15] * a[0]) + (c[16] * a[5]) + (c[17] * a[10]) + (c[18] * a[15]),\r\n (c[15] * a[1]) + (c[16] * a[6]) + (c[17] * a[11]) + (c[18] * a[16]),\r\n (c[15] * a[2]) + (c[16] * a[7]) + (c[17] * a[12]) + (c[18] * a[17]),\r\n (c[15] * a[3]) + (c[16] * a[8]) + (c[17] * a[13]) + (c[18] * a[18]),\r\n (c[15] * a[4]) + (c[16] * a[9]) + (c[17] * a[14]) + (c[18] * a[19]) + c[19]\r\n\r\n ]);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for black_white operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BLACK_WHITE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BLACK_WHITE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for negative operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.NEGATIVE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.NEGATIVE = [ -1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for desatured luminance operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.DESATURATE_LUMINANCE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.DESATURATE_LUMINANCE = [ 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for sepia operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SEPIA\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SEPIA = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for lsd operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.LSD\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.LSD = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for brown operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BROWN\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BROWN = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for vintage pinhole operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.VINTAGE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.VINTAGE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for kodachrome operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.KODACHROME\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.KODACHROME = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for technicolor operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.TECHNICOLOR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.TECHNICOLOR = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for polaroid shift operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.POLAROID\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.POLAROID = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for shift BGR operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SHIFT_BGR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SHIFT_BGR = [ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0 ];\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../../const');\r\nvar Smoothing = require('./Smoothing');\r\n\r\n// The pool into which the canvas elements are placed.\r\nvar pool = [];\r\n\r\n// Automatically apply smoothing(false) to created Canvas elements\r\nvar _disableContextSmoothing = false;\r\n\r\n/**\r\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\r\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\r\n * which is useless for some of the Phaser pipelines / renderer.\r\n *\r\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\r\n * Which means all instances of Phaser Games on the same page can share the one single pool.\r\n *\r\n * @namespace Phaser.Display.Canvas.CanvasPool\r\n * @since 3.0.0\r\n */\r\nvar CanvasPool = function ()\r\n{\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\r\n *\r\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\r\n */\r\n var create = function (parent, width, height, canvasType, selfParent)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = 1; }\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n if (selfParent === undefined) { selfParent = false; }\r\n\r\n var canvas;\r\n var container = first(canvasType);\r\n\r\n if (container === null)\r\n {\r\n container = {\r\n parent: parent,\r\n canvas: document.createElement('canvas'),\r\n type: canvasType\r\n };\r\n\r\n if (canvasType === CONST.CANVAS)\r\n {\r\n pool.push(container);\r\n }\r\n\r\n canvas = container.canvas;\r\n }\r\n else\r\n {\r\n container.parent = parent;\r\n\r\n canvas = container.canvas;\r\n }\r\n\r\n if (selfParent)\r\n {\r\n container.parent = canvas;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\r\n {\r\n Smoothing.disable(canvas.getContext('2d', { willReadFrequently: false }));\r\n }\r\n\r\n return canvas;\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create2D\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created canvas.\r\n */\r\n var create2D = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.CANVAS);\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created WebGL canvas.\r\n */\r\n var createWebGL = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.WEBGL);\r\n };\r\n\r\n /**\r\n * Gets the first free canvas index from the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.first\r\n * @since 3.0.0\r\n *\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n *\r\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\r\n */\r\n var first = function (canvasType)\r\n {\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n\r\n if (canvasType === CONST.WEBGL)\r\n {\r\n return null;\r\n }\r\n\r\n for (var i = 0; i < pool.length; i++)\r\n {\r\n var container = pool[i];\r\n\r\n if (!container.parent && container.type === canvasType)\r\n {\r\n return container;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\r\n * The canvas has its width and height set to 1, and its parent attribute nulled.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.remove\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The canvas or the parent of the canvas to free.\r\n */\r\n var remove = function (parent)\r\n {\r\n // Check to see if the parent is a canvas object\r\n var isCanvas = parent instanceof HTMLCanvasElement;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\r\n {\r\n container.parent = null;\r\n container.canvas.width = 1;\r\n container.canvas.height = 1;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the total number of used canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.total\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of used canvases.\r\n */\r\n var total = function ()\r\n {\r\n var c = 0;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if (container.parent)\r\n {\r\n c++;\r\n }\r\n });\r\n\r\n return c;\r\n };\r\n\r\n /**\r\n * Gets the total number of free canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.free\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of free canvases.\r\n */\r\n var free = function ()\r\n {\r\n return pool.length - total();\r\n };\r\n\r\n /**\r\n * Disable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\r\n * @since 3.0.0\r\n */\r\n var disableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = true;\r\n };\r\n\r\n /**\r\n * Enable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\r\n * @since 3.0.0\r\n */\r\n var enableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = false;\r\n };\r\n\r\n return {\r\n create2D: create2D,\r\n create: create,\r\n createWebGL: createWebGL,\r\n disableSmoothing: disableSmoothing,\r\n enableSmoothing: enableSmoothing,\r\n first: first,\r\n free: free,\r\n pool: pool,\r\n remove: remove,\r\n total: total\r\n };\r\n};\r\n\r\n// If we export the called function here, it'll only be invoked once (not every time it's required).\r\nmodule.exports = CanvasPool();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Browser specific prefix, so not going to change between contexts, only between browsers\r\nvar prefix = '';\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.Smoothing\r\n * @since 3.0.0\r\n */\r\nvar Smoothing = function ()\r\n{\r\n /**\r\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\r\n *\r\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\r\n */\r\n var getPrefix = function (context)\r\n {\r\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\r\n\r\n for (var i = 0; i < vendors.length; i++)\r\n {\r\n var s = vendors[i] + 'mageSmoothingEnabled';\r\n\r\n if (s in context)\r\n {\r\n return s;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.enable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var enable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = true;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.disable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var disable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = false;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\r\n * Returns null if no smoothing prefix is available.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\r\n *\r\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\r\n */\r\n var isEnabled = function (context)\r\n {\r\n return (prefix !== null) ? context[prefix] : null;\r\n };\r\n\r\n return {\r\n disable: disable,\r\n enable: enable,\r\n getPrefix: getPrefix,\r\n isEnabled: isEnabled\r\n };\r\n\r\n};\r\n\r\nmodule.exports = Smoothing();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object or Dynamic Texture to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this mask is being added.\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, maskObject, x, y, texture, frame)\r\n {\r\n if (!maskObject)\r\n {\r\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\r\n }\r\n\r\n /**\r\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = maskObject;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel.\r\n *\r\n * Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask? This is false by default and should not be changed.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n },\r\n\r\n /**\r\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\r\n *\r\n * If a Game Object it must have a texture, such as a Sprite.\r\n *\r\n * You can update the source of the mask as often as you like.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\r\n */\r\n setBitmap: function (maskObject)\r\n {\r\n this.bitmapMask = maskObject;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\r\n */\r\n postRenderWebGL: function (renderer, camera, renderTarget)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object, or Dynamic Texture, to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\r\n * @since 3.60.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\r\n */\r\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\r\n{\r\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level. This can change dynamically at runtime\r\n * and is set in the applyStencil method.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n *\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n var mask = 0xff;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n\r\n // Do this _after_ we set the stencilFunc\r\n level++;\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n this.level = level;\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, mask);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var current = renderer.currentMask;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n current.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n current.mask = prev.mask;\r\n current.camera = prev.camera;\r\n }\r\n else\r\n {\r\n current.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Barrel FX Controller.\r\n *\r\n * This FX controller manages the barrel distortion effect for a Game Object.\r\n *\r\n * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to\r\n * a Game Object. The amount of the effect can be modified in real-time.\r\n *\r\n * A Barrel effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBarrel();\r\n * sprite.postFX.addBarrel();\r\n * ```\r\n *\r\n * @class Barrel\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n */\r\nvar Barrel = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Barrel (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.BARREL, gameObject);\r\n\r\n /**\r\n * The amount of distortion applied to the barrel effect.\r\n *\r\n * Typically keep this within the range 1 (no distortion) to +- 1.\r\n *\r\n * @name Phaser.FX.Barrel#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Barrel;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Bloom\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n */\r\nvar Bloom = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bloom (gameObject, color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n if (offsetX === undefined) { offsetX = 1; }\r\n if (offsetY === undefined) { offsetY = 1; }\r\n if (blurStrength === undefined) { blurStrength = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLOOM, gameObject);\r\n\r\n /**\r\n * The number of steps to run the Bloom effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the Bloom,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Bloom#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The horizontal offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetX = offsetX;\r\n\r\n /**\r\n * The vertical offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetY = offsetY;\r\n\r\n /**\r\n * The strength of the blur process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#blurStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurStrength = blurStrength;\r\n\r\n /**\r\n * The strength of the blend process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Bloom#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the bloom as a number value.\r\n *\r\n * @name Phaser.FX.Bloom#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bloom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Blur\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n */\r\nvar Blur = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Blur (gameObject, quality, x, y, strength, color, steps)\r\n {\r\n if (quality === undefined) { quality = 0; }\r\n if (x === undefined) { x = 2; }\r\n if (y === undefined) { y = 2; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLUR, gameObject);\r\n\r\n /**\r\n * The quality of the blur effect.\r\n *\r\n * This can be:\r\n *\r\n * 0 for Low Quality\r\n * 1 for Medium Quality\r\n * 2 for High Quality\r\n *\r\n * The higher the quality, the more complex shader is used\r\n * and the more processing time is spent on the GPU calculating\r\n * the final blur. This value is used in conjunction with the\r\n * `steps` value, as one has a direct impact on the other.\r\n *\r\n * Keep this value as low as you can, while still achieving the\r\n * desired effect you need for your game.\r\n *\r\n * @name Phaser.FX.Blur#quality\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.quality = 0;\r\n\r\n /**\r\n * The horizontal offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The number of steps to run the Blur effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the blur,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Blur#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The strength of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Blur#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the blur as a number value.\r\n *\r\n * @name Phaser.FX.Blur#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Blur;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Bokeh\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {boolean} [isTiltShift=false] - Is this a bokeh or Tile Shift effect?\r\n * @param {number} [blurX=1] - If Tilt Shift, the amount of horizontal blur.\r\n * @param {number} [blurY=1] - If Tilt Shift, the amount of vertical blur.\r\n * @param {number} [strength=1] - If Tilt Shift, the strength of the blur.\r\n */\r\nvar Bokeh = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bokeh (gameObject, radius, amount, contrast, isTiltShift, blurX, blurY, strength)\r\n {\r\n if (radius === undefined) { radius = 0.5; }\r\n if (amount === undefined) { amount = 1; }\r\n if (contrast === undefined) { contrast = 0.2; }\r\n if (isTiltShift === undefined) { isTiltShift = false; }\r\n if (blurX === undefined) { blurX = 1; }\r\n if (blurY === undefined) { blurY = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n\r\n Controller.call(this, FX_CONST.BOKEH, gameObject);\r\n\r\n this.radius = radius;\r\n this.amount = amount;\r\n this.contrast = contrast;\r\n\r\n this.isTiltShift = isTiltShift;\r\n this.strength = strength;\r\n this.blurX = blurX;\r\n this.blurY = blurY;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bokeh;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Circle\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=16724914] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n */\r\nvar Circle = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Circle (gameObject, thickness, color, backgroundColor, scale, feather)\r\n {\r\n if (thickness === undefined) { thickness = 8; }\r\n if (scale === undefined) { scale = 1; }\r\n if (feather === undefined) { feather = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.CIRCLE, gameObject);\r\n\r\n /**\r\n * The scale of the circle. The default scale is 1, which is a circle\r\n * the full size of the underlying texture. Reduce this value to create\r\n * a smaller circle, or increase it to create a circle that extends off\r\n * the edges of the texture.\r\n *\r\n * @name Phaser.FX.Circle#scale\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.scale = scale;\r\n\r\n /**\r\n * The amount of feathering to apply to the circle from the ring,\r\n * extending into the middle of the circle. The default is 0.005,\r\n * which is a very low amount of feathering just making sure the ring\r\n * has a smooth edge. Increase this amount to a value such as 0.5\r\n * or 0.025 for larger amounts of feathering.\r\n *\r\n * @name Phaser.FX.Circle#feather\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.feather = feather;\r\n\r\n /**\r\n * The width of the circle around the texture, in pixels. This value\r\n * doesn't factor in the feather, which can extend the thickness\r\n * internally depending on its value.\r\n *\r\n * @name Phaser.FX.Circle#thickness\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.thickness = thickness;\r\n\r\n /**\r\n * The internal gl color array for the ring color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 0.2, 0.7 ];\r\n\r\n /**\r\n * The internal gl color array for the background color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 1, 0, 0, 0.4 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n\r\n if (backgroundColor !== undefined && backgroundColor !== null)\r\n {\r\n this.backgroundColor = backgroundColor;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the circular ring, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of the background, behind the texture, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#backgroundColor\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n backgroundColor: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Circle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar BaseColorMatrix = require('../display/ColorMatrix');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class ColorMatrix\r\n * @extends Phaser.Display.ColorMatrix\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n Extends: BaseColorMatrix,\r\n\r\n initialize:\r\n\r\n function ColorMatrix (gameObject)\r\n {\r\n BaseColorMatrix.call(this);\r\n\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = FX_CONST.COLOR_MATRIX;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * @name Phaser.FX.ColorMatrix#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this._matrix = null;\r\n this._data = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {number} type - The FX Type constant.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar Controller = new Class({\r\n\r\n initialize:\r\n\r\n function Controller (type, gameObject)\r\n {\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.Controller#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.Controller#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * @name Phaser.FX.Controller#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n /**\r\n * Destroys this FX Controller.\r\n *\r\n * @method Phaser.FX.Controller#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this.active = false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Controller;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Displacement\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {string} [key='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply.\r\n */\r\nvar Displacement = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Displacement (gameObject, displacementTexture, x, y)\r\n {\r\n if (displacementTexture === undefined) { displacementTexture = '__WHITE'; }\r\n if (x === undefined) { x = 0.005; }\r\n if (y === undefined) { y = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.DISPLACEMENT, gameObject);\r\n\r\n /**\r\n * The amount of horizontal displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The amount of vertical displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The underlying WebGLTexture used for displacement.\r\n *\r\n * @name Phaser.FX.Displacement#glTexture\r\n * @type {WebGLTexture}\r\n * @since 3.60.0\r\n */\r\n this.glTexture;\r\n\r\n this.setTexture(displacementTexture);\r\n },\r\n\r\n setTexture: function (texture)\r\n {\r\n var phaserTexture = this.gameObject.scene.sys.textures.getFrame(texture);\r\n\r\n if (phaserTexture)\r\n {\r\n this.glTexture = phaserTexture.glTexture;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Displacement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Glow FX Controller.\r\n *\r\n * This FX controller manages the glow effect for a Game Object.\r\n *\r\n * A glow effect allows you to apply a soft, blurred 'glow' around either the outside,\r\n * inside, or both of a Game Object. The color and strength of the glow can be modified.\r\n *\r\n * You can modify most of its properties in real-time to adjust the visual effect.\r\n *\r\n * A Glow effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addGlow();\r\n * sprite.postFX.addGlow();\r\n * ```\r\n *\r\n * @class Glow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n */\r\nvar Glow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Glow (gameObject, color, outerStrength, innerStrength, knockout)\r\n {\r\n if (outerStrength === undefined) { outerStrength = 4; }\r\n if (innerStrength === undefined) { innerStrength = 0; }\r\n if (knockout === undefined) { knockout = false; }\r\n\r\n Controller.call(this, FX_CONST.GLOW, gameObject);\r\n\r\n /**\r\n * The strength of the glow outward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#outerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.outerStrength = outerStrength;\r\n\r\n /**\r\n * The strength of the glow inward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#innerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.innerStrength = innerStrength;\r\n\r\n /**\r\n * If `true` only the glow is drawn, not the texture itself.\r\n *\r\n * @name Phaser.FX.Glow#knockout\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.knockout = knockout;\r\n\r\n /**\r\n * A 4 element array of gl color values.\r\n *\r\n * @name Phaser.FX.Glow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1, 1 ];\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the glow as a number value.\r\n *\r\n * @name Phaser.FX.Glow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Glow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Gradient\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n */\r\nvar Gradient = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Gradient (gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n if (alpha === undefined) { alpha = 0.2; }\r\n if (fromX === undefined) { fromX = 0; }\r\n if (fromY === undefined) { fromY = 0; }\r\n if (toX === undefined) { toX = 0; }\r\n if (toY === undefined) { toY = 1; }\r\n if (size === undefined) { size = 0; }\r\n\r\n Controller.call(this, FX_CONST.GRADIENT, gameObject);\r\n\r\n /**\r\n * The alpha value of the gradient effect.\r\n *\r\n * @name Phaser.FX.Gradient#alpha\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.alpha = alpha;\r\n\r\n /**\r\n * Sets how many 'chunks' the gradient is divided in to, as spread over the\r\n * entire height of the texture. Leave this at zero for a smooth gradient,\r\n * or set to a higher number to split the gradient into that many sections, giving\r\n * a more banded 'retro' effect.\r\n *\r\n * @name Phaser.FX.Gradient#size\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.size = size;\r\n\r\n /**\r\n * The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromX = fromX;\r\n\r\n /**\r\n * The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromY = fromY;\r\n\r\n /**\r\n * The horizontal position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toX = toX;\r\n\r\n /**\r\n * The vertical position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toY = toY;\r\n\r\n /**\r\n * The internal gl color array for the starting color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor1\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor1 = [ 255, 0, 0 ];\r\n\r\n /**\r\n * The internal gl color array for the ending color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 0, 255, 0 ];\r\n\r\n if (color1 !== undefined && color1 !== null)\r\n {\r\n this.color1 = color1;\r\n }\r\n\r\n if (color2 !== undefined && color2 !== null)\r\n {\r\n this.color2 = color2;\r\n }\r\n },\r\n\r\n /**\r\n * The first gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color1\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color1: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor1;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor1;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The second gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color2\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color2: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Gradient;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Pixelate\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n */\r\nvar Pixelate = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Pixelate (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.PIXELATE, gameObject);\r\n\r\n /**\r\n * The amount of pixelation to apply.\r\n *\r\n * @name Phaser.FX.Pixelate#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pixelate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Shadow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n */\r\nvar Shadow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shadow (gameObject, x, y, decay, power, color, samples, intensity)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (decay === undefined) { decay = 0.1; }\r\n if (power === undefined) { power = 1; }\r\n if (samples === undefined) { samples = 6; }\r\n if (intensity === undefined) { intensity = 1; }\r\n\r\n Controller.call(this, FX_CONST.SHADOW, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The amount of decay for the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#decay\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.decay = decay;\r\n\r\n /**\r\n * The power of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#power\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.power = power;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Shadow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 0, 0, 0, 1 ];\r\n\r\n /**\r\n * The number of samples that the shadow effect will run for.\r\n *\r\n * This should be an integer with a minimum value of 1 and a maximum of 12.\r\n *\r\n * @name Phaser.FX.Shadow#samples\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.samples = samples;\r\n\r\n /**\r\n * The intensity of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#intensity\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.intensity = intensity;\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the shadow.\r\n *\r\n * @name Phaser.FX.Shadow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shadow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Shine\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n */\r\nvar Shine = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shine (gameObject, speed, lineWidth, gradient, reveal)\r\n {\r\n if (speed === undefined) { speed = 0.5; }\r\n if (lineWidth === undefined) { lineWidth = 0.5; }\r\n if (gradient === undefined) { gradient = 3; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.SHINE, gameObject);\r\n\r\n /**\r\n * The speed of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#speed\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.speed = speed;\r\n\r\n /**\r\n * The line width of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#lineWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.lineWidth = lineWidth;\r\n\r\n /**\r\n * The gradient of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#gradient\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.gradient = gradient;\r\n\r\n /**\r\n * Does this Shine effect reveal or get added to its target?\r\n *\r\n * @name Phaser.FX.Shine#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shine;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Vignette\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n */\r\nvar Vignette = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Vignette (gameObject, x, y, radius, strength)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = 0.5; }\r\n if (radius === undefined) { radius = 0.5; }\r\n if (strength === undefined) { strength = 0.5; }\r\n\r\n Controller.call(this, FX_CONST.VIGNETTE, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#radius\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The strength of the vignette effect.\r\n *\r\n * @name Phaser.FX.Vignette#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Vignette;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Wipe\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n * @param {boolean} [reveal=false] - Is this a reveal (true) or a fade (false) effect?\r\n */\r\nvar Wipe = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Wipe (gameObject, wipeWidth, direction, axis, reveal)\r\n {\r\n if (wipeWidth === undefined) { wipeWidth = 0.1; }\r\n if (direction === undefined) { direction = 0; }\r\n if (axis === undefined) { axis = 0; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.WIPE, gameObject);\r\n\r\n // left to right: direction 0, axis 0\r\n // right to left: direction 1, axis 0\r\n // top to bottom: direction 1, axis 1\r\n // bottom to top: direction 1, axis 0\r\n // wipe: reveal 0\r\n // reveal: reveal 1\r\n // progress: 0 - 1\r\n\r\n /**\r\n * The progress of the Wipe effect. This value is normalized to the range 0 to 1.\r\n *\r\n * Adjust this value to make the wipe transition (i.e. via a Tween)\r\n *\r\n * @name Phaser.FX.Wipe#progress\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Wipe#wipeWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.wipeWidth = wipeWidth;\r\n\r\n /**\r\n * The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n *\r\n * @name Phaser.FX.Wipe#direction\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.direction = direction;\r\n\r\n /**\r\n * The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @name Phaser.FX.Wipe#axis\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.axis = axis;\r\n\r\n /**\r\n * Is this a reveal (true) or a fade (false) effect?\r\n *\r\n * @name Phaser.FX.Wipe#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Wipe;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FX_CONST = {\r\n\r\n /**\r\n * The Glow FX.\r\n *\r\n * @name Phaser.FX.GLOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GLOW: 4,\r\n\r\n /**\r\n * The Shadow FX.\r\n *\r\n * @name Phaser.FX.SHADOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHADOW: 5,\r\n\r\n /**\r\n * The Pixelate FX.\r\n *\r\n * @name Phaser.FX.PIXELATE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n PIXELATE: 6,\r\n\r\n /**\r\n * The Vignette FX.\r\n *\r\n * @name Phaser.FX.VIGNETTE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n VIGNETTE: 7,\r\n\r\n /**\r\n * The Shine FX.\r\n *\r\n * @name Phaser.FX.SHINE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHINE: 8,\r\n\r\n /**\r\n * The Blur FX.\r\n *\r\n * @name Phaser.FX.BLUR\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLUR: 9, // uses 3 shaders, slots 9, 10 and 11\r\n\r\n /**\r\n * The Gradient FX.\r\n *\r\n * @name Phaser.FX.GRADIENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GRADIENT: 12,\r\n\r\n /**\r\n * The Bloom FX.\r\n *\r\n * @name Phaser.FX.BLOOM\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLOOM: 13,\r\n\r\n /**\r\n * The Color Matrix FX.\r\n *\r\n * @name Phaser.FX.COLOR_MATRIX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n COLOR_MATRIX: 14,\r\n\r\n /**\r\n * The Circle FX.\r\n *\r\n * @name Phaser.FX.CIRCLE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n CIRCLE: 15,\r\n\r\n /**\r\n * The Barrel FX.\r\n *\r\n * @name Phaser.FX.BARREL\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BARREL: 16,\r\n\r\n /**\r\n * The Displacement FX.\r\n *\r\n * @name Phaser.FX.DISPLACEMENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DISPLACEMENT: 17,\r\n\r\n /**\r\n * The Wipe FX.\r\n *\r\n * @name Phaser.FX.WIPE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n WIPE: 18,\r\n\r\n /**\r\n * The Bokeh and Tilt Shift FX.\r\n *\r\n * @name Phaser.FX.BOKEH\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BOKEH: 19\r\n\r\n};\r\n\r\nmodule.exports = FX_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @namespace Phaser.FX\r\n */\r\n\r\nvar FX = {\r\n\r\n Barrel: require('./Barrel'),\r\n Controller: require('./Controller'),\r\n Bloom: require('./Bloom'),\r\n Blur: require('./Blur'),\r\n Bokeh: require('./Bokeh'),\r\n Circle: require('./Circle'),\r\n ColorMatrix: require('./ColorMatrix'),\r\n Displacement: require('./Displacement'),\r\n Glow: require('./Glow'),\r\n Gradient: require('./Gradient'),\r\n Pixelate: require('./Pixelate'),\r\n Shadow: require('./Shadow'),\r\n Shine: require('./Shine'),\r\n Vignette: require('./Vignette'),\r\n Wipe: require('./Wipe')\r\n\r\n};\r\n\r\nFX = Extend(false, FX, FX_CONST);\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar ComponentsToJSON = require('./components/ToJSON');\r\nvar DataManager = require('../data/DataManager');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The base class that all Game Objects extend.\r\n * You don't create GameObjects directly and they cannot be added to the display list.\r\n * Instead, use them as the base for your own custom classes.\r\n *\r\n * @class GameObject\r\n * @memberof Phaser.GameObjects\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\r\n */\r\nvar GameObject = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GameObject (scene, type)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene to which this Game Object belongs.\r\n *\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * You should consider this property as being read-only. You cannot move a\r\n * Game Object to another Scene by simply changing it.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Holds a reference to the Display List that contains this Game Object.\r\n *\r\n * This is set automatically when this Game Object is added to a Scene or Layer.\r\n *\r\n * You should treat this property as being read-only.\r\n *\r\n * @name Phaser.GameObjects.GameObject#displayList\r\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\r\n * @default null\r\n * @since 3.50.0\r\n */\r\n this.displayList = null;\r\n\r\n /**\r\n * A textual representation of this Game Object, i.e. `sprite`.\r\n * Used internally by Phaser but is available for your own custom classes to populate.\r\n *\r\n * @name Phaser.GameObjects.GameObject#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The current state of this Game Object.\r\n *\r\n * Phaser itself will never modify this value, although plugins may do so.\r\n *\r\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\r\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\r\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @name Phaser.GameObjects.GameObject#state\r\n * @type {(number|string)}\r\n * @since 3.16.0\r\n */\r\n this.state = 0;\r\n\r\n /**\r\n * The parent Container of this Game Object, if it has one.\r\n *\r\n * @name Phaser.GameObjects.GameObject#parentContainer\r\n * @type {Phaser.GameObjects.Container}\r\n * @since 3.4.0\r\n */\r\n this.parentContainer = null;\r\n\r\n /**\r\n * The name of this Game Object.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.GameObject#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The active state of this Game Object.\r\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\r\n * An active object is one which is having its logic and internal systems updated.\r\n *\r\n * @name Phaser.GameObjects.GameObject#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The Tab Index of the Game Object.\r\n * Reserved for future use by plugins and the Input Manager.\r\n *\r\n * @name Phaser.GameObjects.GameObject#tabIndex\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.tabIndex = -1;\r\n\r\n /**\r\n * A Data Manager.\r\n * It allows you to store, query and get key/value paired information specific to this Game Object.\r\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#data\r\n * @type {Phaser.Data.DataManager}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.data = null;\r\n\r\n /**\r\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\r\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\r\n * If those components are not used by your custom class then you can use this bitmask as you wish.\r\n *\r\n * @name Phaser.GameObjects.GameObject#renderFlags\r\n * @type {number}\r\n * @default 15\r\n * @since 3.0.0\r\n */\r\n this.renderFlags = 15;\r\n\r\n /**\r\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\r\n * Not usually set directly, instead call `Camera.ignore`, however you can\r\n * set this property directly using the Camera.id property:\r\n *\r\n * @example\r\n * this.cameraFilter |= camera.id\r\n *\r\n * @name Phaser.GameObjects.GameObject#cameraFilter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cameraFilter = 0;\r\n\r\n /**\r\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\r\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#input\r\n * @type {?Phaser.Types.Input.InteractiveObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.input = null;\r\n\r\n /**\r\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\r\n * This includes calls that may come from a Group, Container or the Scene itself.\r\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\r\n * responsible for managing references to and from this Game Object.\r\n *\r\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.ignoreDestroy = false;\r\n\r\n this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\r\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\r\n\r\n // Tell the Scene to re-sort the children\r\n scene.sys.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\r\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\r\n * The `name` property is not populated by Phaser and is presented for your own use.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The name to be given to this Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setName: function (value)\r\n {\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current state of this Game Object.\r\n *\r\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\r\n *\r\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\r\n * The state value should typically be an integer (ideally mapped to a constant\r\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setState\r\n * @since 3.16.0\r\n *\r\n * @param {(number|string)} value - The state of the Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setState: function (value)\r\n {\r\n this.state = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a Data Manager component to this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setDataEnabled\r\n * @since 3.0.0\r\n * @see Phaser.Data.DataManager\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setDataEnabled: function ()\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Allows you to store a key value pair within this Game Objects Data Manager.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * sprite.setData('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `getData`:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setData\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.set(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#incData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n incData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.inc(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toggleData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n toggleData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.toggle(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * sprite.getData([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n getData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this.data.get(key);\r\n },\r\n\r\n /**\r\n * Pass this Game Object to the Input Manager to enable it for Input.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @example\r\n * sprite.setInteractive();\r\n *\r\n * @example\r\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\r\n *\r\n * @example\r\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\r\n *\r\n * @method Phaser.GameObjects.GameObject#setInteractive\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\r\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will disable it.\r\n *\r\n * An object that is disabled for input stops processing or being considered for\r\n * input events, but can be turned back on again at any time by simply calling\r\n * `setInteractive()` with no arguments provided.\r\n *\r\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#disableInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n disableInteractive: function ()\r\n {\r\n this.scene.sys.input.disable(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will queue it\r\n * for removal, causing it to no longer be interactive. The removal happens on\r\n * the next game step, it is not immediate.\r\n *\r\n * The Interactive Object that was assigned to this Game Object will be destroyed,\r\n * removed from the Input Manager and cleared from this Game Object.\r\n *\r\n * If you wish to re-enable this Game Object at a later date you will need to\r\n * re-create its InteractiveObject by calling `setInteractive` again.\r\n *\r\n * If you wish to only temporarily stop an object from receiving input then use\r\n * `disableInteractive` instead, as that toggles the interactive state, where-as\r\n * this erases it completely.\r\n *\r\n * If you wish to resize a hit area, don't remove and then set it as being\r\n * interactive. Instead, access the hitarea object directly and resize the shape\r\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\r\n * shape is a Rectangle, which it is by default.)\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n removeInteractive: function ()\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is added to a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to add themselves into the Update List.\r\n *\r\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addedToScene\r\n * @since 3.50.0\r\n */\r\n addedToScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is removed from a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to removed themselves from the Update List.\r\n *\r\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removedFromScene\r\n * @since 3.50.0\r\n */\r\n removedFromScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\r\n *\r\n * @method Phaser.GameObjects.GameObject#update\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - args\r\n */\r\n update: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Returns a JSON representation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n return ComponentsToJSON(this);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.GameObject#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\r\n\r\n return !(!listWillRender || GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n },\r\n\r\n /**\r\n * Returns an array containing the display list index of either this Game Object, or if it has one,\r\n * its parent Container. It then iterates up through all of the parent containers until it hits the\r\n * root of the display list (which is index 0 in the returned array).\r\n *\r\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\r\n * this Game Object and all of its ancestors.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getIndexList\r\n * @since 3.4.0\r\n *\r\n * @return {number[]} An array of display list position indexes.\r\n */\r\n getIndexList: function ()\r\n {\r\n // eslint-disable-next-line consistent-this\r\n var child = this;\r\n var parent = this.parentContainer;\r\n\r\n var indexes = [];\r\n\r\n while (parent)\r\n {\r\n indexes.unshift(parent.getIndex(child));\r\n\r\n child = parent;\r\n\r\n if (!parent.parentContainer)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n parent = parent.parentContainer;\r\n }\r\n }\r\n\r\n if (this.displayList)\r\n {\r\n indexes.unshift(this.displayList.getIndex(child));\r\n }\r\n else\r\n {\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n }\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the given Display List.\r\n *\r\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\r\n * this Game Object belongs.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\r\n *\r\n * If this Game Object is already on another Display List when this method is called, it will first\r\n * be removed from it, before being added to the new list.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToDisplayList\r\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToDisplayList: function (displayList)\r\n {\r\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\r\n\r\n if (this.displayList && this.displayList !== displayList)\r\n {\r\n this.removeFromDisplayList();\r\n }\r\n\r\n // Don't repeat if it's already on this list\r\n if (!displayList.exists(this))\r\n {\r\n this.displayList = displayList;\r\n\r\n displayList.add(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the Update List belonging to the Scene.\r\n *\r\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\r\n * every game frame. This method is passed two parameters: `delta` and `time`.\r\n *\r\n * If you wish to run your own logic within `preUpdate` then you should always call\r\n * `super.preUpdate(delta, time)` within it, or it may fail to process required operations,\r\n * such as Sprite animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Display List it is currently on.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\r\n * and added back at a later stage.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\r\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromDisplayList: function ()\r\n {\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n if (displayList && displayList.exists(this))\r\n {\r\n displayList.remove(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.displayList = null;\r\n\r\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Scene's Update List.\r\n *\r\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\r\n * every game frame. Calling this method will remove it from the list, preventing this.\r\n *\r\n * Removing a Game Object from the Update List will stop most internal functions working.\r\n * For example, removing a Sprite from the Update List will prevent it from being able to\r\n * run animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.remove(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Game Object removing it from the Display List and Update List and\r\n * severing all ties to parent resources.\r\n *\r\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\r\n *\r\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\r\n * As long as no reference to it exists within your own code it should become free for\r\n * garbage collection by the browser.\r\n *\r\n * If you just want to temporarily disable an object then look at using the\r\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\r\n *\r\n * @method Phaser.GameObjects.GameObject#destroy\r\n * @fires Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [fromScene=false] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\n destroy: function (fromScene)\r\n {\r\n // This Game Object has already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n if (fromScene === undefined) { fromScene = false; }\r\n\r\n if (this.preDestroy)\r\n {\r\n this.preDestroy.call(this);\r\n }\r\n\r\n this.emit(Events.DESTROY, this, fromScene);\r\n\r\n this.removeAllListeners();\r\n\r\n if (this.postPipelines)\r\n {\r\n this.resetPostPipeline(true);\r\n }\r\n\r\n this.removeFromDisplayList();\r\n this.removeFromUpdateList();\r\n\r\n if (this.input)\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n }\r\n\r\n if (this.data)\r\n {\r\n this.data.destroy();\r\n\r\n this.data = undefined;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.body.destroy();\r\n\r\n this.body = undefined;\r\n }\r\n\r\n if (this.preFX)\r\n {\r\n this.preFX.destroy();\r\n\r\n this.preFX = undefined;\r\n }\r\n\r\n if (this.postFX)\r\n {\r\n this.postFX.destroy();\r\n\r\n this.postFX = undefined;\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n this.parentContainer = undefined;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\r\n *\r\n * @constant {number} RENDER_MASK\r\n * @memberof Phaser.GameObjects.GameObject\r\n * @default\r\n */\r\nGameObject.RENDER_MASK = 15;\r\n\r\nmodule.exports = GameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar PluginCache = require('../plugins/PluginCache');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and have them automatically registered with the Scene.\r\n *\r\n * Game Objects directly register themselves with the Factory and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectFactory\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectFactory = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectFactory (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Factory belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n this.events = scene.sys.events;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n this.events.once(SceneEvents.BOOT, this.boot, this);\r\n this.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Game Object to this Scene.\r\n *\r\n * If the Game Object renders, it will be added to the Display List.\r\n * If it has a `preUpdate` method, it will be added to the Update List.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#existing\r\n * @since 3.0.0\r\n *\r\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\r\n */\r\n existing: function (child)\r\n {\r\n if (child.renderCanvas || child.renderWebGL)\r\n {\r\n this.displayList.add(child);\r\n }\r\n\r\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\r\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\r\n if (child.preUpdate)\r\n {\r\n this.updateList.add(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.events = null;\r\n\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\r\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\r\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.register\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\r\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\r\n */\r\nGameObjectFactory.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectFactory.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\r\n * providing a its `factoryType`.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.remove\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\r\n */\r\nGameObjectFactory.remove = function (factoryType)\r\n{\r\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectFactory.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\r\n\r\nmodule.exports = GameObjectFactory;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha property of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.AlphaSingle\r\n * @since 3.22.0\r\n */\r\n\r\nvar AlphaSingle = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = AlphaSingle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../../renderer/BlendModes');\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string|number)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.displayList)\r\n {\r\n this.displayList.queueDepthSort();\r\n }\r\n\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Effects = require('../../fx/');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class FX\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.60.0\r\n * @webglOnly\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that owns this FX Component.\r\n * @param {boolean} isPost - Is this a Pre or Post FX Component?\r\n+- *\r\n */\r\nvar FX = new Class({\r\n\r\n initialize:\r\n\r\n function FX (gameObject, isPost)\r\n {\r\n /**\r\n * A reference to the Game Object that owns this FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Is this a Post FX Controller? or a Pre FX Controller?\r\n *\r\n * @name Phaser.GameObjects.Components.FX#isPost\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.isPost = isPost;\r\n\r\n /**\r\n * Has this FX Component been enabled?\r\n *\r\n * You should treat this property as read-only.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#enabled\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * An array containing all of the FX Controllers that\r\n * have been added to this FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#list\r\n * @type {Phaser.FX.Controller[]}\r\n * @since 3.60.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * The amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX or SpriteFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#padding\r\n * @type {number}\r\n * @default 0\r\n * @since 3.60.0\r\n */\r\n this.padding = 0;\r\n },\r\n\r\n /**\r\n * Sets the amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setPadding\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPadding: function (padding)\r\n {\r\n if (padding === undefined) { padding = 0; }\r\n\r\n this.padding = padding;\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is copied by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `copySprite` method.\r\n *\r\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFXCopy\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFXCopy: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is rendered by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `drawSprite` method.\r\n *\r\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFX\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFX: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Enables this FX Component and applies the FXPipeline to the parent Game Object.\r\n *\r\n * This is called automatically whenever you call a method such as `addBloom`, etc.\r\n *\r\n * You can check the `enabled` property to see if the Game Object is already enabled, or not.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#enable\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n */\r\n enable: function (padding)\r\n {\r\n var renderer = this.gameObject.scene.sys.renderer;\r\n\r\n if (renderer && renderer.pipelines)\r\n {\r\n this.gameObject.pipeline = renderer.pipelines.FX_PIPELINE;\r\n\r\n if (padding !== undefined)\r\n {\r\n this.padding = padding;\r\n }\r\n\r\n this.enabled = true;\r\n }\r\n else\r\n {\r\n this.enabled = false;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys and removes all FX Controllers that are part of this FX Component,\r\n * then disables it.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#clear\r\n * @since 3.60.0\r\n */\r\n clear: function ()\r\n {\r\n var list = this.list;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].destroy();\r\n }\r\n\r\n this.list = [];\r\n\r\n this.enabled = false;\r\n },\r\n\r\n /**\r\n * Searches for the given FX Controler within this FX Component.\r\n *\r\n * If found, the controller is removed from this compoent and then destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#remove\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX Component.\r\n */\r\n remove: function (fx)\r\n {\r\n var list = this.list;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n if (list[i] === fx)\r\n {\r\n SpliceOne(list, i);\r\n\r\n fx.destroy();\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Disables this FX Component.\r\n *\r\n * This will reset the pipeline on the Game Object that owns this component back to its\r\n * default and flag this component as disabled.\r\n *\r\n * You can re-enable it again by calling `enable`.\r\n *\r\n * Optionally, set `clear` to destroy all current FX Controllers.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#disable\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [clear=false] - Destroy and remove all FX Controllers that are part of this FX Component.\r\n */\r\n disable: function (clear)\r\n {\r\n if (clear === undefined) { clear = false; }\r\n\r\n this.gameObject.resetPipeline();\r\n\r\n this.enabled = false;\r\n\r\n if (clear)\r\n {\r\n this.clear();\r\n }\r\n },\r\n\r\n /**\r\n * Adds the given FX Controler to this FX Component.\r\n *\r\n * Note that adding an FX Controller does not remove any existing FX. They all stack-up\r\n * on-top of each other. If you don't want this, make sure to call either `remove` or\r\n * `clear` first.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#add\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX Component.\r\n * @param {object} [config] - Optional configuration object that is passed to the pipeline during instantiation.\r\n *\r\n * @return {Phaser.FX.Controller} The FX Controller.\r\n */\r\n add: function (fx, config)\r\n {\r\n if (this.isPost)\r\n {\r\n var type = String(fx.type);\r\n\r\n this.gameObject.setPostPipeline(type, config);\r\n\r\n var pipeline = this.gameObject.getPostPipeline(type);\r\n\r\n if (pipeline)\r\n {\r\n if (Array.isArray(pipeline))\r\n {\r\n pipeline = pipeline.pop();\r\n }\r\n\r\n pipeline.controller = fx;\r\n\r\n return fx;\r\n }\r\n }\r\n else\r\n {\r\n if (!this.enabled)\r\n {\r\n this.enable();\r\n }\r\n\r\n this.list.push(fx);\r\n\r\n return fx;\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Glow effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGlow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n * @param {number} [quality=0.1] - Only available for PostFX. Sets the quality of this Glow effect. Default is 0.1. Cannot be changed post-creation.\r\n * @param {number} [distance=10] - Only available for PostFX. Sets the distance of this Glow effect. Default is 10. Cannot be changed post-creation.\r\n *\r\n * @return {Phaser.FX.Glow} The Glow FX Controller.\r\n */\r\n addGlow: function (color, outerStrength, innerStrength, knockout, quality, distance)\r\n {\r\n return this.add(new Effects.Glow(this.gameObject, color, outerStrength, innerStrength, knockout), { quality: quality, distance: distance });\r\n },\r\n\r\n /**\r\n * Adds a Shadow effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShadow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n *\r\n * @return {Phaser.FX.Shadow} The Shadow FX Controller.\r\n */\r\n addShadow: function (x, y, decay, power, color, samples, intensity)\r\n {\r\n return this.add(new Effects.Shadow(this.gameObject, x, y, decay, power, color, samples, intensity));\r\n },\r\n\r\n /**\r\n * Adds a Pixelate effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addPixelate\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n *\r\n * @return {Phaser.FX.Pixelate} The Pixelate FX Controller.\r\n */\r\n addPixelate: function (amount)\r\n {\r\n return this.add(new Effects.Pixelate(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Vignette effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addVignette\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n *\r\n * @return {Phaser.FX.Vignette} The Vignette FX Controller.\r\n */\r\n addVignette: function (x, y, radius, strength)\r\n {\r\n return this.add(new Effects.Vignette(this.gameObject, x, y, radius, strength));\r\n },\r\n\r\n /**\r\n * Adds a Shine effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShine\r\n * @since 3.60.0\r\n *\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n *\r\n * @return {Phaser.FX.Shine} The Shine FX Controller.\r\n */\r\n addShine: function (speed, lineWidth, gradient, reveal)\r\n {\r\n return this.add(new Effects.Shine(this.gameObject, speed, lineWidth, gradient, reveal));\r\n },\r\n\r\n /**\r\n * Adds a Blur effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBlur\r\n * @since 3.60.0\r\n *\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Blur} The Blur FX Controller.\r\n */\r\n addBlur: function (quality, x, y, strength, color, steps)\r\n {\r\n return this.add(new Effects.Blur(this.gameObject, quality, x, y, strength, color, steps));\r\n },\r\n\r\n /**\r\n * Adds a Gradient effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGradient\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n *\r\n * @return {Phaser.FX.Gradient} The Gradient FX Controller.\r\n */\r\n addGradient: function (color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n return this.add(new Effects.Gradient(this.gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size));\r\n },\r\n\r\n /**\r\n * Adds a Bloom effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBloom\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Bloom} The Bloom FX Controller.\r\n */\r\n addBloom: function (color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n return this.add(new Effects.Bloom(this.gameObject, color, offsetX, offsetY, blurStrength, strength, steps));\r\n },\r\n\r\n /**\r\n * Adds a ColorMatrix effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addColorMatrix\r\n * @since 3.60.0\r\n *\r\n * @return {Phaser.FX.ColorMatrix} The ColorMatrix FX Controller.\r\n */\r\n addColorMatrix: function ()\r\n {\r\n return this.add(new Effects.ColorMatrix(this.gameObject));\r\n },\r\n\r\n /**\r\n * Adds a Circle effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addCircle\r\n * @since 3.60.0\r\n *\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=16724914] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n *\r\n * @return {Phaser.FX.Circle} The Circle FX Controller.\r\n */\r\n addCircle: function (thickness, color, backgroundColor, scale, feather)\r\n {\r\n return this.add(new Effects.Circle(this.gameObject, thickness, color, backgroundColor, scale, feather));\r\n },\r\n\r\n /**\r\n * Adds a Barrel effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBarrel\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n *\r\n * @return {Phaser.FX.Barrel} The Barrel FX Controller.\r\n */\r\n addBarrel: function (amount)\r\n {\r\n return this.add(new Effects.Barrel(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Displacement effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addDisplacement\r\n * @since 3.60.0\r\n *\r\n * @param {string} [key='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply.\r\n *\r\n * @return {Phaser.FX.Displacement} The Displacement FX Controller.\r\n */\r\n addDisplacement: function (displacementTexture, x, y)\r\n {\r\n return this.add(new Effects.Displacement(this.gameObject, displacementTexture, x, y));\r\n },\r\n\r\n /**\r\n * Adds a Wipe effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addWipe\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addWipe: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis));\r\n },\r\n\r\n /**\r\n * Adds a Reveal Wipe effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addReveal\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addReveal: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis, true));\r\n },\r\n\r\n /**\r\n * Adds a Bokeh effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBokeh\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh FX Controller.\r\n */\r\n addBokeh: function (radius, amount, contrast)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast));\r\n },\r\n\r\n /**\r\n * Adds a TiltShift effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addTiltShift\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {number} [blurX=1] - If Tilt Shift, the amount of horizontal blur.\r\n * @param {number} [blurY=1] - If Tilt Shift, the amount of vertical blur.\r\n * @param {number} [strength=1] - If Tilt Shift, the strength of the blur.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh TiltShift FX Controller.\r\n */\r\n addTiltShift: function (radius, amount, contrast, blurX, blurY, strength)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast, true, blurX, blurY, strength));\r\n },\r\n\r\n /**\r\n * Destroys this FX Component.\r\n *\r\n * Called automatically when Game Objects are destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.clear();\r\n\r\n this.gameObject = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar RotateAround = require('../../math/RotateAround');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getCenter: function (output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is\r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = require('../../display/mask/BitmapMask');\r\nvar GeometryMask = require('../../display/mask/GeometryMask');\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n *\r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n *\r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one, or a Dynamic Texture.\r\n *\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable texture-based Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G\r\n * @generic {Phaser.Textures.DynamicTexture} T\r\n * @genericUse {(G|T|null)} [maskObject]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (maskObject, x, y, texture, frame)\r\n {\r\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n maskObject = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n *\r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G\r\n * @generic {Phaser.GameObjects.Shape} S\r\n * @genericUse {(G|S)} [graphics]\r\n *\r\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && (this.type === 'Graphics' || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = require('../../math/DegToRad');\r\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar TWEEN_CONST = require('../../tweens/tween/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The distance the follower has traveled from the previous point to the current one, at the last update.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathDelta\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.23.0\r\n */\r\n pathDelta: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.setTargetValue();\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n if (!this.pathDelta)\r\n {\r\n this.pathDelta = new Vector2();\r\n }\r\n\r\n this.pathDelta.reset();\r\n\r\n config.persist = true;\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n var pathDelta = this.pathDelta;\r\n var pathVector = this.pathVector;\r\n\r\n pathDelta.copy(pathVector).negate();\r\n\r\n if (tweenData.state === TWEEN_CONST.COMPLETE)\r\n {\r\n this.path.getPoint(tweenData.end, pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n return;\r\n }\r\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n pipelineData: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n *\r\n * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipeline)\r\n {\r\n this.pipelineData = {};\r\n\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return false;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n if (pipeline === undefined)\r\n {\r\n pipeline = pipelines.default;\r\n }\r\n\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.defaultPipeline = instance;\r\n this.pipeline = instance;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the main WebGL Pipeline of this Game Object.\r\n *\r\n * Also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipeline, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.pipeline = instance;\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipelineData: function (key, value)\r\n {\r\n var data = this.pipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n *\r\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\r\n */\r\n resetPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n this.pipeline = this.defaultPipeline;\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\nvar FX = require('../components/FX');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering post pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n\r\nvar PostPipeline = {\r\n\r\n /**\r\n * Does this Game Object have any Post Pipelines set?\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#hasPostPipeline\r\n * @type {boolean}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n hasPostPipeline: false,\r\n\r\n /**\r\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\r\n *\r\n * The pipelines are processed in the order in which they appear in this array.\r\n *\r\n * If you modify this array directly, be sure to set the\r\n * `hasPostPipeline` property accordingly.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelines\r\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelines: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelineData: null,\r\n\r\n /**\r\n * The Pre FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.preFX.addBloom();\r\n * ```\r\n *\r\n * Only the following Game Objects support Pre FX:\r\n *\r\n * * Image\r\n * * Sprite\r\n * * TileSprite\r\n * * Text\r\n * * RenderTexture\r\n * * Video\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#preFX\r\n * @type {Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n preFX: null,\r\n\r\n /**\r\n * The Post FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.postFX.addBloom();\r\n * ```\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postFX\r\n * @type {Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postFX: null,\r\n\r\n /**\r\n * This should only be called during the instantiation of the Game Object.\r\n *\r\n * It is called by default by all core Game Objects and doesn't need\r\n * calling again.\r\n *\r\n * After that, use `setPostPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#initPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [preFX=false] - Does this Game Object support Pre FX?\r\n */\r\n initPostPipeline: function (preFX)\r\n {\r\n this.postPipelines = [];\r\n this.postPipelineData = {};\r\n\r\n this.postFX = new FX(this, true);\r\n\r\n if (preFX)\r\n {\r\n this.preFX = new FX(this, false);\r\n }\r\n },\r\n\r\n /**\r\n * Sets one, or more, Post Pipelines on this Game Object.\r\n *\r\n * Post Pipelines are invoked after this Game Object has rendered to its target and\r\n * are commonly used for post-fx.\r\n *\r\n * The post pipelines are appended to the `postPipelines` array belonging to this\r\n * Game Object. When the renderer processes this Game Object, it iterates through the post\r\n * pipelines in the order in which they appear in the array. If you are stacking together\r\n * multiple effects, be aware that the order is important.\r\n *\r\n * If you call this method multiple times, the new pipelines will be appended to any existing\r\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\r\n *\r\n * You can optionally also set the `postPipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `postPipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `postPipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipeline: function (pipelines, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelineManager = renderer.pipelines;\r\n\r\n if (pipelineManager)\r\n {\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelineManager.getPostPipeline(pipelines[i], this, pipelineData);\r\n\r\n if (instance)\r\n {\r\n this.postPipelines.push(instance);\r\n }\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.postPipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `postPipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipelineData\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipelineData: function (key, value)\r\n {\r\n var data = this.postPipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#getPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} An array of all the Post Pipelines matching the name. This array will be empty if there was no match. If there was only one single match, that pipeline is returned directly, not in an array.\r\n */\r\n getPostPipeline: function (pipeline)\r\n {\r\n var isString = (typeof pipeline === 'string');\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n var results = [];\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\r\n {\r\n results.push(instance);\r\n }\r\n }\r\n\r\n return (results.length === 1) ? results[0] : results;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\r\n * the `destroy` method on each post pipeline and then clearing the local array.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#resetPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `postPipelineData` object to being an empty object?\r\n */\r\n resetPostPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n pipelines[i].destroy();\r\n }\r\n\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n\r\n if (resetData)\r\n {\r\n this.postPipelineData = {};\r\n }\r\n },\r\n\r\n /**\r\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\r\n *\r\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#removePostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removePostPipeline: function (pipeline)\r\n {\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = pipelines.length - 1; i >= 0; i--)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if (\r\n (typeof pipeline === 'string' && instance.name === pipeline) ||\r\n (typeof pipeline !== 'string' && instance instanceof pipeline))\r\n {\r\n instance.destroy();\r\n\r\n SpliceOne(pipelines, i);\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PostPipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleX * this.frame.realWidth);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleY * this.frame.realHeight);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame|boolean} [frame] - The frame to base the size of this Game Object on.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (!frame) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n var input = this.input;\r\n\r\n if (input && !input.customHitArea)\r\n {\r\n input.hitArea.width = this.width;\r\n input.hitArea.height = this.height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the tint of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Tint\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Tint = {\r\n\r\n /**\r\n * The tint value being applied to the top-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the top-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopRight: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomRight: 0xffffff,\r\n\r\n /**\r\n * The tint fill mode.\r\n *\r\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\r\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n tintFill: false,\r\n\r\n /**\r\n * Clears all tint values associated with this Game Object.\r\n *\r\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\r\n * which results in no visible change to the texture.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#clearTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearTint: function ()\r\n {\r\n this.setTint(0xffffff);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an additive tint on this Game Object.\r\n *\r\n * The tint works by taking the pixel color values from the Game Objects texture, and then\r\n * multiplying it by the color value of the tint. You can provide either one color value,\r\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\r\n * per corner. The colors are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 0xffffff; }\r\n\r\n if (topRight === undefined)\r\n {\r\n topRight = topLeft;\r\n bottomLeft = topLeft;\r\n bottomRight = topLeft;\r\n }\r\n\r\n this.tintTopLeft = topLeft;\r\n this.tintTopRight = topRight;\r\n this.tintBottomLeft = bottomLeft;\r\n this.tintBottomRight = bottomRight;\r\n\r\n this.tintFill = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a fill-based tint on this Game Object.\r\n *\r\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\r\n * with those in the tint. You can use this for effects such as making a player flash 'white'\r\n * if hit by something. You can provide either one color value, in which case the whole\r\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\r\n * are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTintFill\r\n * @webglOnly\r\n * @since 3.11.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n\r\n this.tintFill = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The tint value being applied to the whole of the Game Object.\r\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tint\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tint: {\r\n\r\n set: function (value)\r\n {\r\n this.setTint(value, value, value, value);\r\n }\r\n },\r\n\r\n /**\r\n * Does this Game Object have a tint applied?\r\n *\r\n * It checks to see if the 4 tint properties are set to the value 0xffffff\r\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#isTinted\r\n * @type {boolean}\r\n * @webglOnly\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n isTinted: {\r\n\r\n get: function ()\r\n {\r\n var white = 0xffffff;\r\n\r\n return (\r\n this.tintFill ||\r\n this.tintTopLeft !== white ||\r\n this.tintTopRight !== white ||\r\n this.tintBottomLeft !== white ||\r\n this.tintBottomRight !== white\r\n );\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Tint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../../math/const');\r\nvar TransformMatrix = require('./TransformMatrix');\r\nvar TransformXY = require('../../math/TransformXY');\r\nvar WrapAngle = require('../../math/angle/Wrap');\r\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Transform\r\n * @since 3.0.0\r\n */\r\n\r\nvar Transform = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\r\n * @type {boolean}\r\n * @readonly\r\n * @default true\r\n * @since 3.60.0\r\n */\r\n hasTransformComponent: true,\r\n\r\n /**\r\n * Private internal value. Holds the horizontal scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleX\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleX: 1,\r\n\r\n /**\r\n * Private internal value. Holds the vertical scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleY\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleY: 1,\r\n\r\n /**\r\n * Private internal value. Holds the rotation value in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _rotation: 0,\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: 0,\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: 0,\r\n\r\n /**\r\n * The z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: 0,\r\n\r\n /**\r\n * The w position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: 0,\r\n\r\n /**\r\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\r\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\r\n *\r\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\r\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.18.0\r\n */\r\n scale: {\r\n\r\n get: function ()\r\n {\r\n return (this._scaleX + this._scaleY) / 2;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleY !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleX !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The angle of this Game Object as expressed in degrees.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in radians, see the `rotation` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * The angle of this Game Object in radians.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\r\n * and -PI/2 is up.\r\n *\r\n * If you prefer to work in degrees, see the `angle` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#rotation\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of this Game Object.\r\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\r\n * @param {number} [z=0] - The z position of this Game Object.\r\n * @param {number} [w=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPosition: function (x, y, z, w)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n if (z === undefined) { z = 0; }\r\n if (w === undefined) { w = 0; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies an object's coordinates to this Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#copyPosition\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n copyPosition: function (source)\r\n {\r\n if (source.x !== undefined) { this.x = source.x; }\r\n if (source.y !== undefined) { this.y = source.y; }\r\n if (source.z !== undefined) { this.z = source.z; }\r\n if (source.w !== undefined) { this.w = source.w; }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object to be a random position within the confines of\r\n * the given area.\r\n *\r\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\r\n *\r\n * The position does not factor in the size of this Game Object, meaning that only the origin is\r\n * guaranteed to be within the area.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\r\n * @since 3.8.0\r\n *\r\n * @param {number} [x=0] - The x position of the top-left of the random area.\r\n * @param {number} [y=0] - The y position of the top-left of the random area.\r\n * @param {number} [width] - The width of the random area.\r\n * @param {number} [height] - The height of the random area.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRandomPosition: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n\r\n this.x = x + (Math.random() * width);\r\n this.y = y + (Math.random() * height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this.rotation = radians;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=1] - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScale: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scaleX = x;\r\n this.scaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the x position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The x position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setX: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the y position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The y position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setY: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The z position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setZ: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.z = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the w position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setW\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setW: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.w = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the local transform matrix for this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getLocalTransformMatrix: function (tempMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n },\r\n\r\n /**\r\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n var parent = this.parentContainer;\r\n\r\n if (!parent)\r\n {\r\n return this.getLocalTransformMatrix(tempMatrix);\r\n }\r\n\r\n if (!parentMatrix)\r\n {\r\n parentMatrix = new TransformMatrix();\r\n }\r\n\r\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n\r\n while (parent)\r\n {\r\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\r\n\r\n parentMatrix.multiply(tempMatrix, tempMatrix);\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return tempMatrix;\r\n },\r\n\r\n /**\r\n * Takes the given `x` and `y` coordinates and converts them into local space for this\r\n * Game Object, taking into account parent and local transforms, and the Display Origin.\r\n *\r\n * The returned Vector2 contains the translated point in its properties.\r\n *\r\n * A Camera needs to be provided in order to handle modified scroll factors. If no\r\n * camera is specified, it will use the `main` camera from the Scene to which this\r\n * Game Object belongs.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\r\n *\r\n * @return {Phaser.Math.Vector2} The translated point.\r\n */\r\n getLocalPoint: function (x, y, point, camera)\r\n {\r\n if (!point) { point = new Vector2(); }\r\n if (!camera) { camera = this.scene.sys.cameras.main; }\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n var px = x + (csx * this.scrollFactorX) - csx;\r\n var py = y + (csy * this.scrollFactorY) - csy;\r\n\r\n if (this.parentContainer)\r\n {\r\n this.getWorldTransformMatrix().applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\r\n }\r\n\r\n // Normalize origin\r\n if (this._originComponent)\r\n {\r\n point.x += this._displayOriginX;\r\n point.y += this._displayOriginY;\r\n }\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Gets the sum total rotation of all of this Game Objects parent Containers.\r\n *\r\n * The returned value is in radians and will be zero if this Game Object has no parent container.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\r\n * @since 3.18.0\r\n *\r\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\r\n */\r\n getParentRotation: function ()\r\n {\r\n var rotation = 0;\r\n\r\n var parent = this.parentContainer;\r\n\r\n while (parent)\r\n {\r\n rotation += parent.rotation;\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return rotation;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n\r\n /**\r\n * The temporary quad value cache.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\r\n * @type {Float32Array}\r\n * @since 3.60.0\r\n */\r\n this.quad = new Float32Array(8);\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n\r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n\r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? matrix : out.matrix;\r\n\r\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix[5] = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n *\r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point in to the local space of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {Phaser.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n *\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n *\r\n * The result must be applied in the following order to reproduce the current matrix:\r\n *\r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.DecomposeMatrixResults} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n *\r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Performs the 8 calculations required to create the vertices of\r\n * a quad based on this matrix and the given x/y/xw/yh values.\r\n *\r\n * The result is stored in `TransformMatrix.quad`, which is returned\r\n * from this method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\r\n * @since 3.60.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} xw - The xw value.\r\n * @param {number} yh - The yh value.\r\n * @param {boolean} roundPixels - Pass the results via Math.round?\r\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\r\n *\r\n * @return {Float32Array} The quad Float32Array.\r\n */\r\n setQuad: function (x, y, xw, yh, roundPixels, quad)\r\n {\r\n if (quad === undefined) { quad = this.quad; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var e = matrix[4];\r\n var f = matrix[5];\r\n\r\n quad[0] = x * a + y * c + e;\r\n quad[1] = x * b + y * d + f;\r\n\r\n quad[2] = x * a + yh * c + e;\r\n quad[3] = x * b + yh * d + f;\r\n\r\n quad[4] = xw * a + yh * c + e;\r\n quad[5] = xw * b + yh * d + f;\r\n\r\n quad[6] = xw * a + y * c + e;\r\n quad[7] = xw * b + y * d + f;\r\n\r\n if (roundPixels)\r\n {\r\n quad.forEach(function (value, index)\r\n {\r\n quad[index] = Math.round(value);\r\n });\r\n }\r\n\r\n return quad;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.quad = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: require('./Alpha'),\r\n AlphaSingle: require('./AlphaSingle'),\r\n BlendMode: require('./BlendMode'),\r\n ComputedSize: require('./ComputedSize'),\r\n Crop: require('./Crop'),\r\n Depth: require('./Depth'),\r\n Flip: require('./Flip'),\r\n FX: require('./FX'),\r\n GetBounds: require('./GetBounds'),\r\n Mask: require('./Mask'),\r\n Origin: require('./Origin'),\r\n PathFollower: require('./PathFollower'),\r\n Pipeline: require('./Pipeline'),\r\n PostPipeline: require('./PostPipeline'),\r\n ScrollFactor: require('./ScrollFactor'),\r\n Size: require('./Size'),\r\n Texture: require('./Texture'),\r\n TextureCrop: require('./TextureCrop'),\r\n Tint: require('./Tint'),\r\n ToJSON: require('./ToJSON'),\r\n Transform: require('./Transform'),\r\n TransformMatrix: require('./TransformMatrix'),\r\n Visible: require('./Visible')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = require('../../utils/array');\r\nvar BlendModes = require('../../renderer/BlendModes');\r\nvar Class = require('../../utils/Class');\r\nvar Components = require('../components');\r\nvar Events = require('../events');\r\nvar GameObject = require('../GameObject');\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar Render = require('./ContainerRender');\r\nvar Union = require('../../geom/rectangle/Union');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * The transform point of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\r\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\r\n * the Container, and position children positively and negative around it as required.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\r\n * or the input area will become misaligned.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.AlphaSingle\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.PostPipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.AlphaSingle,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.PostPipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {number}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.initPostPipeline();\r\n\r\n this.setPosition(x, y);\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {this} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\r\n\r\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\r\n }\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n var hasSetFirst = false;\r\n\r\n output.setEmpty();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getTextBounds)\r\n {\r\n var textBounds = entry.getTextBounds().global;\r\n tempRect.setTo(textBounds.x, textBounds.y, textBounds.width, textBounds.height);\r\n }\r\n else if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n }\r\n else\r\n {\r\n continue;\r\n }\r\n\r\n if (!hasSetFirst)\r\n {\r\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\r\n hasSetFirst = true;\r\n }\r\n else\r\n {\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.parentContainer = this;\r\n\r\n gameObject.removeFromDisplayList();\r\n\r\n gameObject.addedToScene();\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n\r\n gameObject.removedFromScene();\r\n\r\n gameObject.addToDisplayList();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n this.parentContainer.pointToContainer(source, output);\r\n }\r\n else\r\n {\r\n output.x = source.x;\r\n output.y = source.y;\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n *\r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {number} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {number} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {number} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {number} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object above another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveAbove\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveAbove: function (child1, child2)\r\n {\r\n ArrayUtils.MoveAbove(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object below another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveBelow\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveBelow: function (child1, child2)\r\n {\r\n ArrayUtils.MoveBelow(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var list = this.list;\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n if (list[i] && list[i].scene)\r\n {\r\n list[i].off(Events.DESTROY, this.remove, this);\r\n\r\n list[i].destroy();\r\n }\r\n }\r\n\r\n this.list = [];\r\n }\r\n else\r\n {\r\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [oldChild,newChild]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Container#setScrollFactor\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n if (container.mask)\r\n {\r\n container.mask.preRenderCanvas(renderer, null, camera);\r\n }\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n }\r\n\r\n if (container.mask)\r\n {\r\n container.mask.postRenderCanvas(renderer);\r\n }\r\n};\r\n\r\nmodule.exports = ContainerCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar NOOP = require('../../utils/NOOP');\r\nvar renderWebGL = NOOP;\r\nvar renderCanvas = NOOP;\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./ContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./ContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n *\r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n *\r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n *\r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n *\r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n *\r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {number} width - The width of the video.\r\n * @param {number} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n *\r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n *\r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n *\r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n *\r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n *\r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n *\r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n *\r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Timeout Event.\r\n *\r\n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\r\n * source to start playback.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\r\n */\r\nmodule.exports = 'timeout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n *\r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n *\r\n * @name Phaser.Geom.CIRCLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n *\r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n *\r\n * @name Phaser.Geom.LINE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n *\r\n * @name Phaser.Geom.POINT\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n *\r\n * @name Phaser.Geom.POLYGON\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = require('./Length');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Random = require('./Random');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GEOM_CONST = require('../const');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {this} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = require('./Perimeter');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = require('./GetPoint');\r\nvar Perimeter = require('./Perimeter');\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\r\n * @param {number} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Contains = require('./Contains');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Line = require('../line/Line');\r\nvar Random = require('./Random');\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('./Rectangle');\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\nvar GetURL = require('./GetURL');\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\nvar XHRLoader = require('./XHRLoader');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * @classdesc\r\n * The base File class used by all File Types that the Loader can support.\r\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class File\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\r\n */\r\nvar File = new Class({\r\n\r\n initialize:\r\n\r\n function File (loader, fileConfig)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.File#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\r\n *\r\n * @name Phaser.Loader.File#cache\r\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\r\n * @since 3.7.0\r\n */\r\n this.cache = GetFastValue(fileConfig, 'cache', false);\r\n\r\n /**\r\n * The file type string (image, json, etc) for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.File#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(fileConfig, 'type', false);\r\n\r\n if (!this.type)\r\n {\r\n throw new Error('Invalid File type: ' + this.type);\r\n }\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.File#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = GetFastValue(fileConfig, 'key', false);\r\n\r\n var loadKey = this.key;\r\n\r\n if (loader.prefix && loader.prefix !== '')\r\n {\r\n this.key = loader.prefix + loadKey;\r\n }\r\n\r\n if (!this.key)\r\n {\r\n throw new Error('Invalid File key: ' + this.key);\r\n }\r\n\r\n var url = GetFastValue(fileConfig, 'url');\r\n\r\n if (url === undefined)\r\n {\r\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n url = loader.path + url;\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n *\r\n * Automatically has Loader.path prepended to it if a string.\r\n *\r\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {object|string}\r\n * @since 3.0.0\r\n */\r\n this.url = url;\r\n\r\n /**\r\n * The final URL this file will load from, including baseURL and path.\r\n * Set automatically when the Loader calls 'load' on this file.\r\n *\r\n * @name Phaser.Loader.File#src\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.src = '';\r\n\r\n /**\r\n * The merged XHRSettings for this file.\r\n *\r\n * @name Phaser.Loader.File#xhrSettings\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\r\n\r\n if (GetFastValue(fileConfig, 'xhrSettings', false))\r\n {\r\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\r\n }\r\n\r\n /**\r\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\r\n *\r\n * @name Phaser.Loader.File#xhrLoader\r\n * @type {?XMLHttpRequest}\r\n * @since 3.0.0\r\n */\r\n this.xhrLoader = null;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.File#state\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\r\n\r\n /**\r\n * The total size of this file.\r\n * Set by onProgress and only if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesTotal\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bytesTotal = 0;\r\n\r\n /**\r\n * Updated as the file loads.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesLoaded\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.bytesLoaded = -1;\r\n\r\n /**\r\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#percentComplete\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.percentComplete = -1;\r\n\r\n /**\r\n * For CORs based loading.\r\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\r\n *\r\n * @name Phaser.Loader.File#crossOrigin\r\n * @type {(string|undefined)}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = undefined;\r\n\r\n /**\r\n * The processed file data, stored here after the file has loaded.\r\n *\r\n * @name Phaser.Loader.File#data\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.data = undefined;\r\n\r\n /**\r\n * A config object that can be used by file types to store transitional data.\r\n *\r\n * @name Phaser.Loader.File#config\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.config = GetFastValue(fileConfig, 'config', {});\r\n\r\n /**\r\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\r\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\r\n *\r\n * @name Phaser.Loader.File#multiFile\r\n * @type {?Phaser.Loader.MultiFile}\r\n * @since 3.7.0\r\n */\r\n this.multiFile;\r\n\r\n /**\r\n * Does this file have an associated linked file? Such as an image and a normal map.\r\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\r\n * actually bound by data, where-as a linkFile is.\r\n *\r\n * @name Phaser.Loader.File#linkFile\r\n * @type {?Phaser.Loader.File}\r\n * @since 3.7.0\r\n */\r\n this.linkFile;\r\n },\r\n\r\n /**\r\n * Links this File with another, so they depend upon each other for loading and processing.\r\n *\r\n * @method Phaser.Loader.File#setLink\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\r\n */\r\n setLink: function (fileB)\r\n {\r\n this.linkFile = fileB;\r\n\r\n fileB.linkFile = this;\r\n },\r\n\r\n /**\r\n * Resets the XHRLoader instance this file is using.\r\n *\r\n * @method Phaser.Loader.File#resetXHR\r\n * @since 3.0.0\r\n */\r\n resetXHR: function ()\r\n {\r\n if (this.xhrLoader)\r\n {\r\n this.xhrLoader.onload = undefined;\r\n this.xhrLoader.onerror = undefined;\r\n this.xhrLoader.onprogress = undefined;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.File#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\r\n this.loader.nextFile(this, true);\r\n }\r\n else\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n // The creation of this XHRLoader starts the load process going.\r\n // It will automatically call the following, based on the load outcome:\r\n //\r\n // xhr.onload = this.onLoad\r\n // xhr.onerror = this.onError\r\n // xhr.onprogress = this.onProgress\r\n\r\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onLoad\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\r\n */\r\n onLoad: function (xhr, event)\r\n {\r\n var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\r\n {\r\n return xhr.responseURL.indexOf(scheme) === 0;\r\n });\r\n\r\n var localFileOk = (isLocalFile && event.target.status === 0);\r\n\r\n var success = !(event.target && event.target.status !== 200) || localFileOk;\r\n\r\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\r\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\r\n {\r\n success = false;\r\n }\r\n\r\n this.state = CONST.FILE_LOADED;\r\n\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, success);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onError\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\r\n */\r\n onError: function ()\r\n {\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n *\r\n * @param {ProgressEvent} event - The DOM ProgressEvent.\r\n */\r\n onProgress: function (event)\r\n {\r\n if (event.lengthComputable)\r\n {\r\n this.bytesLoaded = event.loaded;\r\n this.bytesTotal = event.total;\r\n\r\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\r\n *\r\n * @method Phaser.Loader.File#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessComplete\r\n * @since 3.7.0\r\n */\r\n onProcessComplete: function ()\r\n {\r\n this.state = CONST.FILE_COMPLETE;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileComplete(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing but it generated an error.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessError\r\n * @since 3.7.0\r\n */\r\n onProcessError: function ()\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\r\n\r\n this.state = CONST.FILE_ERRORED;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileFailed(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Checks if a key matching the one used by this file exists in the target Cache or not.\r\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\r\n * loaded or will conflict.\r\n *\r\n * @method Phaser.Loader.File#hasCacheConflict\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\r\n */\r\n hasCacheConflict: function ()\r\n {\r\n return (this.cache && this.cache.exists(this.key));\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n * This method is often overridden by specific file types.\r\n *\r\n * @method Phaser.Loader.File#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.cache && this.data)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\r\n },\r\n\r\n /**\r\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.File#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.7.0\r\n */\r\n pendingDestroy: function (data)\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n if (data === undefined) { data = this.data; }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this File and any references it holds.\r\n *\r\n * @method Phaser.Loader.File#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.cache = null;\r\n this.xhrSettings = null;\r\n this.multiFile = null;\r\n this.linkFile = null;\r\n this.data = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\r\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\r\n *\r\n * @method Phaser.Loader.File.createObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\r\n * @param {Blob} blob - A Blob object to create an object URL for.\r\n * @param {string} defaultType - Default mime type used if blob type is not available.\r\n */\r\nFile.createObjectURL = function (image, blob, defaultType)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n image.src = URL.createObjectURL(blob);\r\n }\r\n else\r\n {\r\n var reader = new FileReader();\r\n\r\n reader.onload = function ()\r\n {\r\n image.removeAttribute('crossOrigin');\r\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\r\n };\r\n\r\n reader.onerror = image.onerror;\r\n\r\n reader.readAsDataURL(blob);\r\n }\r\n};\r\n\r\n/**\r\n * Static method for releasing an existing object URL which was previously created\r\n * by calling {@link File#createObjectURL} method.\r\n *\r\n * @method Phaser.Loader.File.revokeObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\r\n */\r\nFile.revokeObjectURL = function (image)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n URL.revokeObjectURL(image.src);\r\n }\r\n};\r\n\r\nmodule.exports = File;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n *\r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n *\r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n *\r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n var finalFiles = [];\r\n\r\n // Clean out any potential 'null' or 'undefined' file entries\r\n files.forEach(function (file)\r\n {\r\n if (file)\r\n {\r\n finalFiles.push(file);\r\n }\r\n });\r\n\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {number}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = finalFiles;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.MultiFile#state\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.state = CONST.FILE_PENDING;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {number}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = finalFiles.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < finalFiles.length; i++)\r\n {\r\n finalFiles[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n\r\n // eslint-disable-next-line no-console\r\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\r\n }\r\n },\r\n\r\n /**\r\n * Called once all children of this multi file have been added to their caches and is now\r\n * ready for deletion from the Loader.\r\n *\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.MultiFile#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.60.0\r\n */\r\n pendingDestroy: function ()\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n for (var i = 0; i < this.files.length; i++)\r\n {\r\n this.files[i].pendingDestroy();\r\n }\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this Multi File and any references it holds.\r\n *\r\n * @method Phaser.Loader.MultiFile#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.files = null;\r\n this.config = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {number} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n *\r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n *\r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n *\r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n *\r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n *\r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n *\r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n *\r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing.\r\n *\r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load.\r\n *\r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n *\r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n *\r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n *\r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request.\r\n *\r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19,\r\n\r\n /**\r\n * File is pending being destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING_DESTROY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n FILE_PENDING_DESTROY: 20\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n *\r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n *\r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n *\r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {number} totalComplete - The total number of files that successfully loaded.\r\n * @param {number} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n *\r\n * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n *\r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n *\r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n *\r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n *\r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n *\r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n *\r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n *\r\n * This event is dispatched even if there aren't any files in the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\nvar GetURL = require('../GetURL');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n\r\n this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\r\n\r\n if (this.useImageElementLoad)\r\n {\r\n this.load = this.loadImage;\r\n this.onProcess = this.onProcessImage;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Handles image load processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n onProcessImage: function ()\r\n {\r\n var result = this.state;\r\n\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n if (result === CONST.FILE_LOADED)\r\n {\r\n this.onProcessComplete();\r\n }\r\n else\r\n {\r\n this.onProcessError();\r\n }\r\n },\r\n\r\n /**\r\n * Loads the image using either XHR or an Image tag.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n loadImage: function ()\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n _this.state = CONST.FILE_LOADED;\r\n\r\n _this.loader.nextFile(_this, true);\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n _this.loader.nextFile(_this, false);\r\n };\r\n\r\n this.data.src = this.src;\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n // Check if we have a linked normal map\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile)\r\n {\r\n // We do, but has it loaded?\r\n if (linkFile.state >= CONST.FILE_COMPLETE)\r\n {\r\n // Both files have loaded\r\n if (this.type === 'normalMap')\r\n {\r\n // linkFile.data = Image\r\n // this.data = Normal Map\r\n this.cache.addImage(this.key, linkFile.data, this.data);\r\n }\r\n else\r\n {\r\n // linkFile.data = Normal Map\r\n // this.data = Image\r\n this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n }\r\n\r\n // Nothing to do here, we'll use the linkFile `addToCache` call\r\n // to process this pair\r\n }\r\n else\r\n {\r\n this.cache.addImage(this.key, this.data);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\r\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\r\n * via the Image tag instead.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\r\n *\r\n * @class JSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar JSONFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function JSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n var extension = 'json';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataKey = GetFastValue(config, 'dataKey', dataKey);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'json',\r\n cache: loader.cacheManager.json,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: dataKey\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\r\n if (IsPlainObject(url))\r\n {\r\n if (dataKey)\r\n {\r\n this.data = GetValue(url, dataKey);\r\n }\r\n else\r\n {\r\n this.data = url;\r\n }\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n try\r\n {\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n catch (e)\r\n {\r\n this.onProcessError();\r\n\r\n throw e;\r\n }\r\n\r\n var key = this.config;\r\n\r\n if (typeof key === 'string')\r\n {\r\n this.data = GetValue(json, key, json);\r\n }\r\n else\r\n {\r\n this.data = json;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON file, or array of JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.json({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n *\r\n * ```json\r\n * {\r\n * \"level1\": {\r\n * \"baddies\": {\r\n * \"aliens\": {},\r\n * \"boss\": {}\r\n * }\r\n * },\r\n * \"level2\": {},\r\n * \"level3\": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#json\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new JSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = JSONFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var type = 'text';\r\n var extension = 'txt';\r\n var cache = loader.cacheManager.text;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n type = GetFastValue(config, 'type', type);\r\n cache = GetFastValue(config, 'cache', cache);\r\n }\r\n\r\n var fileConfig = {\r\n type: type,\r\n cache: cache,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {number} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\nvar Class = require('../utils/Class');\r\nvar Matrix4 = require('./Matrix4');\r\nvar NOOP = require('../utils/NOOP');\r\n\r\nvar tempMatrix = new Matrix4();\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Euler\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Euler = new Class({\r\n\r\n initialize:\r\n\r\n function Euler (x, y, z, order)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (z === undefined) { z = 0; }\r\n if (order === undefined) { order = Euler.DefaultOrder; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback = NOOP;\r\n },\r\n\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n order: {\r\n get: function ()\r\n {\r\n return this._order;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._order = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n set: function (x, y, z, order)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n copy: function (euler)\r\n {\r\n return this.set(euler.x, euler.y, euler.z, euler.order);\r\n },\r\n\r\n setFromQuaternion: function (quaternion, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n tempMatrix.fromQuat(quaternion);\r\n\r\n return this.setFromRotationMatrix(tempMatrix, order, update);\r\n },\r\n\r\n setFromRotationMatrix: function (matrix, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n var elements = matrix.val;\r\n\r\n // Upper 3x3 of matrix is un-scaled rotation matrix\r\n var m11 = elements[0];\r\n var m12 = elements[4];\r\n var m13 = elements[8];\r\n var m21 = elements[1];\r\n var m22 = elements[5];\r\n var m23 = elements[9];\r\n var m31 = elements[2];\r\n var m32 = elements[6];\r\n var m33 = elements[10];\r\n\r\n var x = 0;\r\n var y = 0;\r\n var z = 0;\r\n var epsilon = 0.99999;\r\n\r\n switch (order)\r\n {\r\n case 'XYZ':\r\n {\r\n y = Math.asin(Clamp(m13, -1, 1));\r\n\r\n if (Math.abs(m13) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m33);\r\n z = Math.atan2(-m12, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(m32, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n x = Math.asin(-Clamp(m23, -1, 1));\r\n\r\n if (Math.abs(m23) < epsilon)\r\n {\r\n y = Math.atan2(m13, m33);\r\n z = Math.atan2(m21, m22);\r\n }\r\n else\r\n {\r\n y = Math.atan2(-m31, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n x = Math.asin(Clamp(m32, -1, 1));\r\n\r\n if (Math.abs(m32) < epsilon)\r\n {\r\n y = Math.atan2(-m31, m33);\r\n z = Math.atan2(-m12, m22);\r\n }\r\n else\r\n {\r\n z = Math.atan2(m21, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n y = Math.asin(-Clamp(m31, -1, 1));\r\n\r\n if (Math.abs(m31) < epsilon)\r\n {\r\n x = Math.atan2(m32, m33);\r\n z = Math.atan2(m21, m11);\r\n }\r\n else\r\n {\r\n z = Math.atan2(-m12, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n z = Math.asin(Clamp(m21, -1, 1));\r\n\r\n if (Math.abs(m21) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m22);\r\n y = Math.atan2(-m31, m11);\r\n }\r\n else\r\n {\r\n y = Math.atan2(m13, m33);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n z = Math.asin(-Clamp(m12, -1, 1));\r\n\r\n if (Math.abs(m12) < epsilon)\r\n {\r\n x = Math.atan2(m32, m22);\r\n y = Math.atan2(m13, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(-m23, m33);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\r\n\r\nEuler.DefaultOrder = 'XYZ';\r\n\r\nmodule.exports = Euler;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent + min;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {number} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Greg McLean \r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Interpolates two given Vectors and returns a new Vector between them.\r\n *\r\n * Does not modify either of the passed Vectors.\r\n *\r\n * @function Phaser.Math.LinearXY\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\r\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\r\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\r\n */\r\nvar LinearXY = function (vector1, vector2, t)\r\n{\r\n if (t === undefined) { t = 0; }\r\n\r\n return vector1.clone().lerp(vector2, t);\r\n};\r\n\r\nmodule.exports = LinearXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Sets all values of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#setValues\r\n * @since 3.50.0\r\n *\r\n * @param {number} m00 - The m00 value.\r\n * @param {number} m01 - The m01 value.\r\n * @param {number} m02 - The m02 value.\r\n * @param {number} m03 - The m03 value.\r\n * @param {number} m10 - The m10 value.\r\n * @param {number} m11 - The m11 value.\r\n * @param {number} m12 - The m12 value.\r\n * @param {number} m13 - The m13 value.\r\n * @param {number} m20 - The m20 value.\r\n * @param {number} m21 - The m21 value.\r\n * @param {number} m22 - The m22 value.\r\n * @param {number} m23 - The m23 value.\r\n * @param {number} m30 - The m30 value.\r\n * @param {number} m31 - The m31 value.\r\n * @param {number} m32 - The m32 value.\r\n * @param {number} m33 - The m33 value.\r\n *\r\n * @return {this} This Matrix4 instance.\r\n */\r\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = m00;\r\n out[1] = m01;\r\n out[2] = m02;\r\n out[3] = m03;\r\n out[4] = m10;\r\n out[5] = m11;\r\n out[6] = m12;\r\n out[7] = m13;\r\n out[8] = m20;\r\n out[9] = m21;\r\n out[10] = m22;\r\n out[11] = m23;\r\n out[12] = m30;\r\n out[13] = m31;\r\n out[14] = m32;\r\n out[15] = m33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var a = src.val;\r\n\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} a - The array to copy the values from. Must have at least 16 elements.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Generates a transform matrix based on the given position, scale and rotation.\r\n *\r\n * @method Phaser.Math.Matrix4#transform\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {Phaser.Math.Vector3} scale - The scale vector.\r\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transform: function (position, scale, rotation)\r\n {\r\n var rotMatrix = _tempMat1.fromQuat(rotation);\r\n\r\n var rm = rotMatrix.val;\r\n\r\n var sx = scale.x;\r\n var sy = scale.y;\r\n var sz = scale.z;\r\n\r\n return this.setValues(\r\n rm[0] * sx,\r\n rm[1] * sx,\r\n rm[2] * sx,\r\n 0,\r\n\r\n rm[4] * sy,\r\n rm[5] * sy,\r\n rm[6] * sy,\r\n 0,\r\n\r\n rm[8] * sz,\r\n rm[9] * sz,\r\n rm[10] * sz,\r\n 0,\r\n\r\n position.x,\r\n position.y,\r\n position.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies the given Matrix4 into this Matrix and then inverses it.\r\n *\r\n * @method Phaser.Math.Matrix4#getInverse\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n getInverse: function (m)\r\n {\r\n this.copy(m);\r\n\r\n return this.invert();\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return this;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n return this.setValues(\r\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\r\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\r\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\r\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\r\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\r\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\r\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\r\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\r\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\r\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\r\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\r\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\r\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\r\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\r\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\r\n (a20 * b03 - a21 * b01 + a22 * b00) * det\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n return this.setValues(\r\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\r\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\r\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\r\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\r\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\r\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\r\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\r\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\r\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\r\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\r\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\r\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\r\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\r\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\r\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\r\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n return this.setValues(\r\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\r\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\r\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\r\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\r\n\r\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\r\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\r\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\r\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\r\n\r\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\r\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\r\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\r\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\r\n\r\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\r\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\r\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\r\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\r\n );\r\n },\r\n\r\n /**\r\n * Multiplies the given Matrix4 object with this Matrix.\r\n *\r\n * This is the same as calling `multiplyMatrices(m, this)`.\r\n *\r\n * @method Phaser.Math.Matrix4#premultiply\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n premultiply: function (m)\r\n {\r\n return this.multiplyMatrices(m, this);\r\n },\r\n\r\n /**\r\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyMatrices\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\r\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyMatrices: function (a, b)\r\n {\r\n var am = a.val;\r\n var bm = b.val;\r\n\r\n var a11 = am[0];\r\n var a12 = am[4];\r\n var a13 = am[8];\r\n var a14 = am[12];\r\n var a21 = am[1];\r\n var a22 = am[5];\r\n var a23 = am[9];\r\n var a24 = am[13];\r\n var a31 = am[2];\r\n var a32 = am[6];\r\n var a33 = am[10];\r\n var a34 = am[14];\r\n var a41 = am[3];\r\n var a42 = am[7];\r\n var a43 = am[11];\r\n var a44 = am[15];\r\n\r\n var b11 = bm[0];\r\n var b12 = bm[4];\r\n var b13 = bm[8];\r\n var b14 = bm[12];\r\n var b21 = bm[1];\r\n var b22 = bm[5];\r\n var b23 = bm[9];\r\n var b24 = bm[13];\r\n var b31 = bm[2];\r\n var b32 = bm[6];\r\n var b33 = bm[10];\r\n var b34 = bm[14];\r\n var b41 = bm[3];\r\n var b42 = bm[7];\r\n var b43 = bm[11];\r\n var b44 = bm[15];\r\n\r\n return this.setValues(\r\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\r\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\r\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\r\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\r\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\r\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\r\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\r\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\r\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\r\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\r\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\r\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\r\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\r\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\r\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\r\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\r\n );\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n return this.translateXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n return this.scaleXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n return this.setValues(\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n );\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return this;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n return this.setValues(\r\n a00 * b00 + a10 * b01 + a20 * b02,\r\n a01 * b00 + a11 * b01 + a21 * b02,\r\n a02 * b00 + a12 * b01 + a22 * b02,\r\n a03 * b00 + a13 * b01 + a23 * b02,\r\n a00 * b10 + a10 * b11 + a20 * b12,\r\n a01 * b10 + a11 * b11 + a21 * b12,\r\n a02 * b10 + a12 * b11 + a22 * b12,\r\n a03 * b10 + a13 * b11 + a23 * b12,\r\n a00 * b20 + a10 * b21 + a20 * b22,\r\n a01 * b20 + a11 * b21 + a21 * b22,\r\n a02 * b20 + a12 * b21 + a22 * b22,\r\n a03 * b20 + a13 * b21 + a23 * b22,\r\n a30, a31, a32, a33\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n v.x,\r\n v.y,\r\n v.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 0,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n (near * 2) * rl,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (near * 2) * tb,\r\n 0,\r\n 0,\r\n\r\n (right + left) * rl,\r\n (top + bottom) * tb,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (far * near * 2) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n f / aspect,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n f,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (2 * far * near) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n return this.setValues(\r\n (2 * near) / width,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (2 * near) / height,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n -far / (near - far),\r\n 1,\r\n\r\n 0,\r\n 0,\r\n (near * far) / (near - far),\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n return this.setValues(\r\n -2 * lr,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n -2 * bt,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 2 * nf,\r\n 0,\r\n\r\n (left + right) * lr,\r\n (top + bottom) * bt,\r\n (far + near) * nf,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAtRH\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\r\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAtRH: function (eye, target, up)\r\n {\r\n var m = this.val;\r\n\r\n _z.subVectors(eye, target);\r\n\r\n if (_z.getLengthSquared() === 0)\r\n {\r\n // eye and target are in the same position\r\n _z.z = 1;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n\r\n if (_x.getLengthSquared() === 0)\r\n {\r\n // up and z are parallel\r\n\r\n if (Math.abs(up.z) === 1)\r\n {\r\n _z.x += 0.0001;\r\n }\r\n else\r\n {\r\n _z.z += 0.0001;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n }\r\n\r\n _x.normalize();\r\n _y.crossVectors(_z, _x);\r\n\r\n m[0] = _x.x;\r\n m[1] = _x.y;\r\n m[2] = _x.z;\r\n m[4] = _y.x;\r\n m[5] = _y.y;\r\n m[6] = _y.z;\r\n m[8] = _z.x;\r\n m[9] = _z.y;\r\n m[10] = _z.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n return this.setValues(\r\n x0,\r\n y0,\r\n z0,\r\n 0,\r\n\r\n x1,\r\n y1,\r\n z1,\r\n 0,\r\n\r\n x2,\r\n y2,\r\n z2,\r\n 0,\r\n\r\n -(x0 * eyex + x1 * eyey + x2 * eyez),\r\n -(y0 * eyex + y1 * eyey + y2 * eyez),\r\n -(z0 * eyex + z1 * eyey + z2 * eyez),\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyToMat4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\r\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\r\n */\r\n multiplyToMat4: function (src, out)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b03 = b[3];\r\n var b10 = b[4];\r\n var b11 = b[5];\r\n var b12 = b[6];\r\n var b13 = b[7];\r\n var b20 = b[8];\r\n var b21 = b[9];\r\n var b22 = b[10];\r\n var b23 = b[11];\r\n var b30 = b[12];\r\n var b31 = b[13];\r\n var b32 = b[14];\r\n var b33 = b[15];\r\n\r\n return out.setValues(\r\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\r\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\r\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\r\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\r\n\r\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\r\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\r\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\r\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\r\n\r\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\r\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\r\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\r\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\r\n\r\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\r\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\r\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\r\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\r\n );\r\n },\r\n\r\n /**\r\n * Takes the rotation and position vectors and builds this Matrix4 from them.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationXYTranslation: function (rotation, position, translateFirst)\r\n {\r\n var x = position.x;\r\n var y = position.y;\r\n var z = position.z;\r\n\r\n var sx = Math.sin(rotation.x);\r\n var cx = Math.cos(rotation.x);\r\n\r\n var sy = Math.sin(rotation.y);\r\n var cy = Math.cos(rotation.y);\r\n\r\n var a30 = x;\r\n var a31 = y;\r\n var a32 = z;\r\n\r\n // Rotate X\r\n\r\n var b21 = -sx;\r\n\r\n // Rotate Y\r\n\r\n var c01 = 0 - b21 * sy;\r\n\r\n var c02 = 0 - cx * sy;\r\n\r\n var c21 = b21 * cy;\r\n\r\n var c22 = cx * cy;\r\n\r\n // Translate\r\n if (!translateFirst)\r\n {\r\n // a30 = cy * x + 0 * y + sy * z;\r\n a30 = cy * x + sy * z;\r\n a31 = c01 * x + cx * y + c21 * z;\r\n a32 = c02 * x + sx * y + c22 * z;\r\n }\r\n\r\n return this.setValues(\r\n cy,\r\n c01,\r\n c02,\r\n 0,\r\n 0,\r\n cx,\r\n sx,\r\n 0,\r\n sy,\r\n c21,\r\n c22,\r\n 0,\r\n a30,\r\n a31,\r\n a32,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Returns the maximum axis scale from this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\r\n * @since 3.50.0\r\n *\r\n * @return {number} The maximum axis scale.\r\n */\r\n getMaxScaleOnAxis: function ()\r\n {\r\n var m = this.val;\r\n\r\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\r\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\r\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\r\n\r\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat1 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat2 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _x = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _y = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _z = new Vector3();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Vladislav Forsh \r\n * @copyright 2021 RoboWhale\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\r\n * In case of an even number of values, the average of the two middle values is returned.\r\n *\r\n * @function Phaser.Math.Median\r\n * @since 3.54.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The median value.\r\n */\r\nvar Median = function (values)\r\n{\r\n var valuesNum = values.length;\r\n if (valuesNum === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n values.sort(function (a, b) { return a - b; });\r\n\r\n var halfIndex = Math.floor(valuesNum / 2);\r\n\r\n return valuesNum % 2 === 0\r\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\r\n : values[halfIndex];\r\n};\r\n\r\nmodule.exports = Median;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Matrix3 = require('./Matrix3');\r\nvar NOOP = require('../utils/NOOP');\r\nvar Vector3 = require('./Vector3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x component.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=1] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_x\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_y\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_z\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_w\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * This callback is invoked, if set, each time a value in this quaternion is changed.\r\n * The callback is passed one argument, a reference to this quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#onChangeCallback\r\n * @type {function}\r\n * @since 3.50.0\r\n */\r\n this.onChangeCallback = NOOP;\r\n\r\n this.set(x, y, z, w);\r\n },\r\n\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: {\r\n get: function ()\r\n {\r\n return this._w;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._w = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n return this.set(src);\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n * @param {boolean} [update=true] - Call the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w, update)\r\n {\r\n if (update === undefined) { update = true; }\r\n\r\n if (typeof x === 'object')\r\n {\r\n this._x = x.x || 0;\r\n this._y = x.y || 0;\r\n this._z = x.z || 0;\r\n this._w = x.w || 0;\r\n }\r\n else\r\n {\r\n this._x = x || 0;\r\n this._y = y || 0;\r\n this._z = z || 0;\r\n this._w = w || 0;\r\n }\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this._x += v.x;\r\n this._y += v.y;\r\n this._z += v.z;\r\n this._w += v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this._x -= v.x;\r\n this._y -= v.y;\r\n this._z -= v.z;\r\n this._w -= v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this._x *= scale;\r\n this._y *= scale;\r\n this._z *= scale;\r\n this._w *= scale;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this._x = x * len;\r\n this._y = y * len;\r\n this._z = z * len;\r\n this._w = w * len;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n return this.set(\r\n ax + t * (v.x - ax),\r\n ay + t * (v.y - ay),\r\n az + t * (v.z - az),\r\n aw + t * (v.w - aw)\r\n );\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n return this.set(0, 0, 0, 1);\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this._x = tmpvec.x;\r\n this._y = tmpvec.y;\r\n this._z = tmpvec.z;\r\n this._w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n return this.set(0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n return this.set(\r\n s * axis.x,\r\n s * axis.y,\r\n s * axis.z,\r\n Math.cos(rad)\r\n );\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n return this.set(\r\n ax * bw + aw * bx + ay * bz - az * by,\r\n ay * bw + aw * by + az * bx - ax * bz,\r\n az * bw + aw * bz + ax * by - ay * bx,\r\n aw * bw - ax * bx - ay * by - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n return this.set(\r\n scale0 * ax + scale1 * bx,\r\n scale0 * ay + scale1 * by,\r\n scale0 * az + scale1 * bz,\r\n scale0 * aw + scale1 * bw\r\n );\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n return this.set(\r\n -a0 * invDot,\r\n -a1 * invDot,\r\n -a2 * invDot,\r\n a3 * invDot\r\n );\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this._x = -this.x;\r\n this._y = -this.y;\r\n this._z = -this.z;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + aw * bx,\r\n ay * bw + az * bx,\r\n az * bw - ay * bx,\r\n aw * bw - ax * bx\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw - az * by,\r\n ay * bw + aw * by,\r\n az * bw + ax * by,\r\n aw * bw - ay * by\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + ay * bz,\r\n ay * bw - ax * bz,\r\n az * bw + aw * bz,\r\n aw * bw - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set this Quaternion from the given Euler, based on Euler order.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromEuler\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\r\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromEuler: function (euler, update)\r\n {\r\n var x = euler.x / 2;\r\n var y = euler.y / 2;\r\n var z = euler.z / 2;\r\n\r\n var c1 = Math.cos(x);\r\n var c2 = Math.cos(y);\r\n var c3 = Math.cos(z);\r\n\r\n var s1 = Math.sin(x);\r\n var s2 = Math.sin(y);\r\n var s3 = Math.sin(z);\r\n\r\n switch (euler.order)\r\n {\r\n case 'XYZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Quaternion from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromRotationMatrix: function (mat4)\r\n {\r\n var m = mat4.val;\r\n\r\n var m11 = m[0];\r\n var m12 = m[4];\r\n var m13 = m[8];\r\n var m21 = m[1];\r\n var m22 = m[5];\r\n var m23 = m[9];\r\n var m31 = m[2];\r\n var m32 = m[6];\r\n var m33 = m[10];\r\n\r\n var trace = m11 + m22 + m33;\r\n var s;\r\n\r\n if (trace > 0)\r\n {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n this.set(\r\n (m32 - m23) * s,\r\n (m13 - m31) * s,\r\n (m21 - m12) * s,\r\n 0.25 / s\r\n );\r\n }\r\n else if (m11 > m22 && m11 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n this.set(\r\n 0.25 * s,\r\n (m12 + m21) / s,\r\n (m13 + m31) / s,\r\n (m32 - m23) / s\r\n );\r\n }\r\n else if (m22 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n this.set(\r\n (m12 + m21) / s,\r\n 0.25 * s,\r\n (m23 + m32) / s,\r\n (m13 - m31) / s\r\n );\r\n }\r\n else\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n this.set(\r\n (m13 + m31) / s,\r\n (m23 + m32) / s,\r\n 0.25 * s,\r\n (m21 - m12) / s\r\n );\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this._x = (m[7] - m[5]) * fRoot;\r\n this._y = (m[2] - m[6]) * fRoot;\r\n this._z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this._x = tmp[0];\r\n this._y = tmp[1];\r\n this._z = tmp[2];\r\n this._w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {number} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n *\r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n *\r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n *\r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {number} index - The position within the grid to get the x/y value for.\r\n * @param {number} width - The width of the grid.\r\n * @param {number} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n }\r\n\r\n return out.set(x, y);\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y=x] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n },\r\n\r\n /**\r\n * Project this Vector onto another.\r\n *\r\n * @method Phaser.Math.Vector2#project\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n project: function (src)\r\n {\r\n var scalar = this.dot(src) / src.dot(src);\r\n\r\n return this.copy(src).scale(scalar);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.min` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#min\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n min: function (v)\r\n {\r\n this.x = Math.min(this.x, v.x);\r\n this.y = Math.min(this.y, v.y);\r\n this.z = Math.min(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#max\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n max: function (v)\r\n {\r\n this.x = Math.max(this.x, v.x);\r\n this.y = Math.max(this.y, v.y);\r\n this.z = Math.max(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Adds the two given Vector3s and sets the results into this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#addVectors\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addVectors: function (a, b)\r\n {\r\n this.x = a.x + b.x;\r\n this.y = a.y + b.y;\r\n this.z = a.z + b.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the position of the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixPosition\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixPosition: function (m)\r\n {\r\n return this.fromArray(m.val, 12);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the Matrix4 column specified.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixColumn\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\r\n * @param {number} index - The column index.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixColumn: function (mat4, index)\r\n {\r\n return this.fromArray(mat4.val, index * 4);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the given array, based on the offset.\r\n *\r\n * Vector3.x = array[offset]\r\n * Vector3.y = array[offset + 1]\r\n * Vector3.z = array[offset + 2]\r\n *\r\n * @method Phaser.Math.Vector3#fromArray\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} array - The array of values to get this Vector from.\r\n * @param {number} [offset=0] - The offset index into the array.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n fromArray: function (array, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.x = array[offset];\r\n this.y = array[offset + 1];\r\n this.z = array[offset + 2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add the given value to each component of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#addScalar\r\n * @since 3.50.0\r\n *\r\n * @param {number} s - The amount to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScalar: function (s)\r\n {\r\n this.x += s;\r\n this.y += s;\r\n this.z += s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add and scale a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#addScale\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n * @param {number} scale - The amount to scale `v` by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScale: function (v, scale)\r\n {\r\n this.x += v.x * scale;\r\n this.y += v.y * scale;\r\n this.z += v.z * scale || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix3 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix3\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix3: function (mat3)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat3.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6] * z;\r\n this.y = m[1] * x + m[4] * y + m[7] * z;\r\n this.z = m[2] * x + m[5] * y + m[8] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix4 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix4: function (mat4)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat4.val;\r\n\r\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\r\n\r\n this.x = (m[0] * x + m[4] * y + m[8] * z + m[12]) * w;\r\n this.y = (m[1] * x + m[5] * y + m[9] * z + m[13]) * w;\r\n this.z = (m[2] * x + m[6] * y + m[10] * z + m[14]) * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given view and projection matrices.\r\n *\r\n * @method Phaser.Math.Vector3#projectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n projectViewMatrix: function (viewMatrix, projectionMatrix)\r\n {\r\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\r\n *\r\n * @method Phaser.Math.Vector3#unprojectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\r\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\r\n {\r\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max`.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n if (value >= min && value <= max)\r\n {\r\n // Skip modulo if already in range\r\n return value;\r\n }\r\n\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n *\r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n *\r\n * Yes, we undertstand that this should actually be PI * 2, but\r\n * it has been like this for so long we can't change it now.\r\n * If you need PI * 2, use the PI2 constant instead.\r\n *\r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n *\r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n *\r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n *\r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n *\r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Euler: require('./Euler'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n LinearXY: require('./LinearXY'),\r\n MaxAdd: require('./MaxAdd'),\r\n Median: require('./Median'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {number} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n *\r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n *\r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n *\r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar corePlugins = {};\r\n\r\n// Contains the plugins that the dev has loaded into their game\r\n// These are the source objects, not instantiated.\r\nvar customPlugins = {};\r\n\r\nvar PluginCache = {};\r\n\r\n/**\r\n * @namespace Phaser.Plugins.PluginCache\r\n */\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @method Phaser.Plugins.PluginCache.register\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\r\n */\r\nPluginCache.register = function (key, plugin, mapping, custom)\r\n{\r\n if (custom === undefined) { custom = false; }\r\n\r\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\r\n};\r\n\r\n/**\r\n * Stores a custom plugin in the global plugin cache.\r\n * The key must be unique, within the scope of the cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.registerCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {?any} data - A value to be passed to the plugin's `init` method.\r\n */\r\nPluginCache.registerCustom = function (key, plugin, mapping, data)\r\n{\r\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the core plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\r\n */\r\nPluginCache.hasCore = function (key)\r\n{\r\n return corePlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the custom plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\r\n */\r\nPluginCache.hasCustom = function (key)\r\n{\r\n return customPlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Returns the core plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\r\n */\r\nPluginCache.getCore = function (key)\r\n{\r\n return corePlugins[key];\r\n};\r\n\r\n/**\r\n * Returns the custom plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\r\n */\r\nPluginCache.getCustom = function (key)\r\n{\r\n return customPlugins[key];\r\n};\r\n\r\n/**\r\n * Returns an object from the custom cache based on the given key that can be instantiated.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustomClass\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {function} The custom plugin object.\r\n */\r\nPluginCache.getCustomClass = function (key)\r\n{\r\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\r\n};\r\n\r\n/**\r\n * Removes a core plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.remove\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to remove.\r\n */\r\nPluginCache.remove = function (key)\r\n{\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes a custom plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.removeCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to remove.\r\n */\r\nPluginCache.removeCustom = function (key)\r\n{\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Core Plugins.\r\n *\r\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\r\n * So be sure you only call this if you do not wish to run Phaser again.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCorePlugins = function ()\r\n{\r\n for (var key in corePlugins)\r\n {\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Custom Plugins.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCustomPlugins = function ()\r\n{\r\n for (var key in customPlugins)\r\n {\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = PluginCache;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager, pluginKey)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The key under which this plugin was installed into the Scene Systems.\r\n *\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#pluginKey\r\n * @type {string}\r\n * @readonly\r\n * @since 3.54.0\r\n */\r\n this.pluginKey = pluginKey;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n *\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n *\r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n *\r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.ADD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n *\r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n *\r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n *\r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n *\r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n *\r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n *\r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n *\r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n *\r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n *\r\n * @name Phaser.BlendModes.HUE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n *\r\n * @name Phaser.BlendModes.ERASE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n *\r\n * @name Phaser.BlendModes.COPY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n *\r\n * @name Phaser.BlendModes.XOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Modes.\r\n *\r\n * @namespace Phaser.ScaleModes\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScaleModes = {\r\n\r\n /**\r\n * Default Scale Mode (Linear).\r\n *\r\n * @name Phaser.ScaleModes.DEFAULT\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n DEFAULT: 0,\r\n\r\n /**\r\n * Linear Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.LINEAR\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.NEAREST\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n\r\n};\r\n\r\nmodule.exports = ScaleModes;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n *\r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('boot', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#BOOT\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n *\r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n *\r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n *\r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('create', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#CREATE\r\n * @type {string}\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('destroy', listener)`.\r\n *\r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n *\r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n *\r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('pause', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('postupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author samme\r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre-Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_RENDER\r\n * @type {string}\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'prerender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('preupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('ready', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#READY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('render', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n *\r\n * @event Phaser.Scenes.Events#RENDER\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n *\r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('resume', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#RESUME\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('shutdown', listener)`.\r\n *\r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n *\r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n *\r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('sleep', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('start', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioncomplete', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioninit', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n *\r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionout', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n *\r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n *\r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionstart', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionwake', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists and the Scene is in a Running state, otherwise this is skipped.\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('update', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n *\r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('wake', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#WAKE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\r\n BOOT: require('./BOOT_EVENT'),\r\n CREATE: require('./CREATE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n PAUSE: require('./PAUSE_EVENT'),\r\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\r\n RENDER: require('./RENDER_EVENT'),\r\n RESUME: require('./RESUME_EVENT'),\r\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\r\n SLEEP: require('./SLEEP_EVENT'),\r\n START: require('./START_EVENT'),\r\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\r\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\r\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\r\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\r\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\r\n UPDATE: require('./UPDATE_EVENT'),\r\n WAKE: require('./WAKE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Clamp = require('../math/Clamp');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @classdesc\r\n * A Frame is a section of a Texture.\r\n *\r\n * @class Frame\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\r\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n */\r\nvar Frame = new Class({\r\n\r\n initialize:\r\n\r\n function Frame (texture, name, sourceIndex, x, y, width, height)\r\n {\r\n /**\r\n * The Texture this Frame is a part of.\r\n *\r\n * @name Phaser.Textures.Frame#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The name of this Frame.\r\n * The name is unique within the Texture.\r\n *\r\n * @name Phaser.Textures.Frame#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The TextureSource this Frame is part of.\r\n *\r\n * @name Phaser.Textures.Frame#source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @since 3.0.0\r\n */\r\n this.source = texture.source[sourceIndex];\r\n\r\n /**\r\n * The index of the TextureSource in the Texture sources array.\r\n *\r\n * @name Phaser.Textures.Frame#sourceIndex\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.sourceIndex = sourceIndex;\r\n\r\n /**\r\n * A reference to the Texture Source WebGL Texture that this Frame is using.\r\n *\r\n * @name Phaser.Textures.Frame#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this.glTexture = this.source.glTexture;\r\n\r\n /**\r\n * X position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutX;\r\n\r\n /**\r\n * Y position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutY;\r\n\r\n /**\r\n * The width of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutWidth;\r\n\r\n /**\r\n * The height of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutHeight;\r\n\r\n /**\r\n * The X rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The Y rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The rendering width of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width;\r\n\r\n /**\r\n * The rendering height of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height;\r\n\r\n /**\r\n * Half the width, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth;\r\n\r\n /**\r\n * Half the height, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight;\r\n\r\n /**\r\n * The x center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerX;\r\n\r\n /**\r\n * The y center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerY;\r\n\r\n /**\r\n * The horizontal pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotX = 0;\r\n\r\n /**\r\n * The vertical pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotY = 0;\r\n\r\n /**\r\n * Does this Frame have a custom pivot point?\r\n *\r\n * @name Phaser.Textures.Frame#customPivot\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customPivot = false;\r\n\r\n /**\r\n * **CURRENTLY UNSUPPORTED**\r\n *\r\n * Is this frame is rotated or not in the Texture?\r\n * Rotation allows you to use rotated frames in texture atlas packing.\r\n * It has nothing to do with Sprite rotation.\r\n *\r\n * @name Phaser.Textures.Frame#rotated\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rotated = false;\r\n\r\n /**\r\n * Over-rides the Renderer setting.\r\n * -1 = use Renderer Setting\r\n * 0 = No rounding\r\n * 1 = Round\r\n *\r\n * @name Phaser.Textures.Frame#autoRound\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.autoRound = -1;\r\n\r\n /**\r\n * Any Frame specific custom data can be stored here.\r\n *\r\n * @name Phaser.Textures.Frame#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * WebGL UV u0 value.\r\n *\r\n * @name Phaser.Textures.Frame#u0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u0 = 0;\r\n\r\n /**\r\n * WebGL UV v0 value.\r\n *\r\n * @name Phaser.Textures.Frame#v0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v0 = 0;\r\n\r\n /**\r\n * WebGL UV u1 value.\r\n *\r\n * @name Phaser.Textures.Frame#u1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u1 = 0;\r\n\r\n /**\r\n * WebGL UV v1 value.\r\n *\r\n * @name Phaser.Textures.Frame#v1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v1 = 0;\r\n\r\n /**\r\n * The un-modified source frame, trim and UV data.\r\n *\r\n * @name Phaser.Textures.Frame#data\r\n * @type {object}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n cut: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n trim: false,\r\n sourceSize: {\r\n w: 0,\r\n h: 0\r\n },\r\n spriteSourceSize: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n radius: 0,\r\n drawImage: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n }\r\n };\r\n\r\n this.setSize(width, height, x, y);\r\n },\r\n\r\n /**\r\n * Sets the width, height, x and y of this Frame.\r\n *\r\n * This is called automatically by the constructor\r\n * and should rarely be changed on-the-fly.\r\n *\r\n * @method Phaser.Textures.Frame#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {number} width - The width of the frame before being trimmed.\r\n * @param {number} height - The height of the frame before being trimmed.\r\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\r\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setSize: function (width, height, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.cutX = x;\r\n this.cutY = y;\r\n this.cutWidth = width;\r\n this.cutHeight = height;\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width * 0.5);\r\n this.halfHeight = Math.floor(height * 0.5);\r\n\r\n this.centerX = Math.floor(width / 2);\r\n this.centerY = Math.floor(height / 2);\r\n\r\n var data = this.data;\r\n var cut = data.cut;\r\n\r\n cut.x = x;\r\n cut.y = y;\r\n cut.w = width;\r\n cut.h = height;\r\n cut.r = x + width;\r\n cut.b = y + height;\r\n\r\n data.sourceSize.w = width;\r\n data.sourceSize.h = height;\r\n\r\n data.spriteSourceSize.w = width;\r\n data.spriteSourceSize.h = height;\r\n\r\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\r\n\r\n var drawImage = data.drawImage;\r\n\r\n drawImage.x = x;\r\n drawImage.y = y;\r\n drawImage.width = width;\r\n drawImage.height = height;\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\r\n *\r\n * @method Phaser.Textures.Frame#setTrim\r\n * @since 3.0.0\r\n *\r\n * @param {number} actualWidth - The width of the frame before being trimmed.\r\n * @param {number} actualHeight - The height of the frame before being trimmed.\r\n * @param {number} destX - The destination X position of the trimmed frame for display.\r\n * @param {number} destY - The destination Y position of the trimmed frame for display.\r\n * @param {number} destWidth - The destination width of the trimmed frame for display.\r\n * @param {number} destHeight - The destination height of the trimmed frame for display.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\r\n {\r\n var data = this.data;\r\n var ss = data.spriteSourceSize;\r\n\r\n // Store actual values\r\n\r\n data.trim = true;\r\n\r\n data.sourceSize.w = actualWidth;\r\n data.sourceSize.h = actualHeight;\r\n\r\n ss.x = destX;\r\n ss.y = destY;\r\n ss.w = destWidth;\r\n ss.h = destHeight;\r\n ss.r = destX + destWidth;\r\n ss.b = destY + destHeight;\r\n\r\n // Adjust properties\r\n this.x = destX;\r\n this.y = destY;\r\n\r\n this.width = destWidth;\r\n this.height = destHeight;\r\n\r\n this.halfWidth = destWidth * 0.5;\r\n this.halfHeight = destHeight * 0.5;\r\n\r\n this.centerX = Math.floor(destWidth / 2);\r\n this.centerY = Math.floor(destHeight / 2);\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * Takes a crop data object and, based on the rectangular region given, calculates the\r\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\r\n *\r\n * This is called directly by the Game Object Texture Components `setCrop` method.\r\n * Please use that method to crop a Game Object.\r\n *\r\n * @method Phaser.Textures.Frame#setCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\r\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\r\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\r\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\r\n {\r\n // Clamp the input values\r\n\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n var rw = this.realWidth;\r\n var rh = this.realHeight;\r\n\r\n x = Clamp(x, 0, rw);\r\n y = Clamp(y, 0, rh);\r\n\r\n width = Clamp(width, 0, rw - x);\r\n height = Clamp(height, 0, rh - y);\r\n\r\n var ox = cx + x;\r\n var oy = cy + y;\r\n var ow = width;\r\n var oh = height;\r\n\r\n var data = this.data;\r\n\r\n if (data.trim)\r\n {\r\n var ss = data.spriteSourceSize;\r\n\r\n // Need to check for intersection between the cut area and the crop area\r\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\r\n\r\n width = Clamp(width, 0, cw - x);\r\n height = Clamp(height, 0, ch - y);\r\n\r\n var cropRight = x + width;\r\n var cropBottom = y + height;\r\n\r\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\r\n\r\n if (intersects)\r\n {\r\n var ix = Math.max(ss.x, x);\r\n var iy = Math.max(ss.y, y);\r\n var iw = Math.min(ss.r, cropRight) - ix;\r\n var ih = Math.min(ss.b, cropBottom) - iy;\r\n\r\n ow = iw;\r\n oh = ih;\r\n\r\n if (flipX)\r\n {\r\n ox = cx + (cw - (ix - ss.x) - iw);\r\n }\r\n else\r\n {\r\n ox = cx + (ix - ss.x);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - (iy - ss.y) - ih);\r\n }\r\n else\r\n {\r\n oy = cy + (iy - ss.y);\r\n }\r\n\r\n x = ix;\r\n y = iy;\r\n\r\n width = iw;\r\n height = ih;\r\n }\r\n else\r\n {\r\n ox = 0;\r\n oy = 0;\r\n ow = 0;\r\n oh = 0;\r\n }\r\n }\r\n else\r\n {\r\n if (flipX)\r\n {\r\n ox = cx + (cw - x - width);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - y - height);\r\n }\r\n }\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n // Map the given coordinates into UV space, clamping to the 0-1 range.\r\n\r\n crop.u0 = Math.max(0, ox / tw);\r\n crop.v0 = Math.max(0, oy / th);\r\n crop.u1 = Math.min(1, (ox + ow) / tw);\r\n crop.v1 = Math.min(1, (oy + oh) / th);\r\n\r\n crop.x = x;\r\n crop.y = y;\r\n\r\n crop.cx = ox;\r\n crop.cy = oy;\r\n crop.cw = ow;\r\n crop.ch = oh;\r\n\r\n crop.width = width;\r\n crop.height = height;\r\n\r\n crop.flipX = flipX;\r\n crop.flipY = flipY;\r\n\r\n return crop;\r\n },\r\n\r\n /**\r\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\r\n * Called automatically by `setFrame`.\r\n *\r\n * @method Phaser.Textures.Frame#updateCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n updateCropUVs: function (crop, flipX, flipY)\r\n {\r\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\r\n },\r\n\r\n /**\r\n * Directly sets the canvas and WebGL UV data for this frame.\r\n *\r\n * Use this if you need to override the values that are generated automatically\r\n * when the Frame is created.\r\n *\r\n * @method Phaser.Textures.Frame#setUVs\r\n * @since 3.50.0\r\n *\r\n * @param {number} width - Width of this frame for the Canvas data.\r\n * @param {number} height - Height of this frame for the Canvas data.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setUVs: function (width, height, u0, v0, u1, v1)\r\n {\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = width;\r\n cd.height = height;\r\n\r\n // WebGL data\r\n\r\n this.u0 = u0;\r\n this.v0 = v0;\r\n\r\n this.u1 = u1;\r\n this.v1 = v1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache and the drawImage cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVs\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVs: function ()\r\n {\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = cw;\r\n cd.height = ch;\r\n\r\n // WebGL data\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = cx / tw;\r\n this.v0 = cy / th;\r\n\r\n this.u1 = (cx + cw) / tw;\r\n this.v1 = (cy + ch) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVsInverted\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVsInverted: function ()\r\n {\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = (this.cutX + this.cutHeight) / tw;\r\n this.v0 = this.cutY / th;\r\n\r\n this.u1 = this.cutX / tw;\r\n this.v1 = (this.cutY + this.cutWidth) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clones this Frame into a new Frame object.\r\n *\r\n * @method Phaser.Textures.Frame#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} A clone of this Frame.\r\n */\r\n clone: function ()\r\n {\r\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\r\n\r\n clone.cutX = this.cutX;\r\n clone.cutY = this.cutY;\r\n clone.cutWidth = this.cutWidth;\r\n clone.cutHeight = this.cutHeight;\r\n\r\n clone.x = this.x;\r\n clone.y = this.y;\r\n\r\n clone.width = this.width;\r\n clone.height = this.height;\r\n\r\n clone.halfWidth = this.halfWidth;\r\n clone.halfHeight = this.halfHeight;\r\n\r\n clone.centerX = this.centerX;\r\n clone.centerY = this.centerY;\r\n\r\n clone.rotated = this.rotated;\r\n\r\n clone.data = Extend(true, clone.data, this.data);\r\n\r\n clone.updateUVs();\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\r\n *\r\n * @method Phaser.Textures.Frame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.source = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n this.customData = null;\r\n this.data = null;\r\n },\r\n\r\n /**\r\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.w;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.h;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\r\n *\r\n * @name Phaser.Textures.Frame#radius\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.data.radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Frame trimmed or not?\r\n *\r\n * @name Phaser.Textures.Frame#trimmed\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n trimmed: {\r\n\r\n get: function ()\r\n {\r\n return this.data.trim;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Canvas drawImage data object.\r\n *\r\n * @name Phaser.Textures.Frame#canvasData\r\n * @type {object}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canvasData: {\r\n\r\n get: function ()\r\n {\r\n return this.data.drawImage;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Frame;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {boolean} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Tween States.\r\n *\r\n * @namespace Phaser.Tweens.States\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\n/**\r\n * Phaser Tween state constants.\r\n *\r\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.CREATED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n // 1 used to be INIT prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n // 3 used to be OFFSET_DELAY prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_RENDER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_FORWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.HOLD_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.REPEAT_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state. The Tween has been created but has not yet been added to the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING: 20,\r\n\r\n /**\r\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\r\n * or was playing and is currently paused, but in both cases it's still being processed by\r\n * the Tween Manager, so is considered 'active'.\r\n *\r\n * @name Phaser.Tweens.States.ACTIVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 21,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a loop countdown to elapse.\r\n *\r\n * @name Phaser.Tweens.States.LOOP_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a complete delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 23,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a starting delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.START_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n START_DELAY: 24,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_REMOVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state. The Tween has been removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.REMOVED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\r\n * so will not be automatically removed by the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.FINISHED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n FINISHED: 27,\r\n\r\n /**\r\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.DESTROYED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DESTROYED: 28,\r\n\r\n /**\r\n * A large integer value used for 'infinite' style countdowns.\r\n *\r\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\r\n * supported on IE.\r\n *\r\n * @name Phaser.Tweens.States.MAX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n MAX: 999999999999\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @ignore\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @ignore\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * Existing elements in the array are shifted up.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {number} [index=0] - The index in the array where the item will be inserted.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {number} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {number} startIndex - The start index to search from.\r\n * @param {number} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array and flattens it, returning a shallow-copy flattened array.\r\n *\r\n * @function Phaser.Utils.Array.Flatten\r\n * @since 3.60.0\r\n *\r\n * @param {array} array - The array to flatten.\r\n * @param {array} [output] - An array to hold the results in.\r\n *\r\n * @return {array} The flattened output array.\r\n */\r\nvar Flatten = function (array, output)\r\n{\r\n if (output === undefined) { output = []; }\r\n\r\n for (var i = 0; i < array.length; i++)\r\n {\r\n if (Array.isArray(array[i]))\r\n {\r\n Flatten(array[i], output);\r\n }\r\n else\r\n {\r\n output.push(array[i]);\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = Flatten;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element above another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveAbove\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move above base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveAbove = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex > baseIndex)\r\n {\r\n // item1 is already above item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === array.length - 1)\r\n {\r\n array.push(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveAbove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element below another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveBelow\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move below base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveBelow = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex < baseIndex)\r\n {\r\n // item1 is already below item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === 0)\r\n {\r\n array.unshift(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveBelow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {number} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\r\n\r\n/**\r\n * Create an array of numbers (positive and/or negative) progressing from `start`\r\n * up to but not including `end` by advancing by `step`.\r\n *\r\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\r\n *\r\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\r\n * for forward compatibility make sure to pass in actual numbers.\r\n *\r\n * @example\r\n * NumberArrayStep(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * NumberArrayStep(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * NumberArrayStep(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * NumberArrayStep(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * NumberArrayStep(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * NumberArrayStep(0);\r\n * // => []\r\n *\r\n * @function Phaser.Utils.Array.NumberArrayStep\r\n * @since 3.0.0\r\n *\r\n * @param {number} [start=0] - The start of the range.\r\n * @param {number} [end=null] - The end of the range.\r\n * @param {number} [step=1] - The value to increment or decrement by.\r\n *\r\n * @return {number[]} The array of number values.\r\n */\r\nvar NumberArrayStep = function (start, end, step)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (end === undefined) { end = null; }\r\n if (step === undefined) { step = 1; }\r\n\r\n if (end === null)\r\n {\r\n end = start;\r\n start = 0;\r\n }\r\n\r\n var result = [];\r\n\r\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n result.push(start);\r\n start += step;\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArrayStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {number} k - The k-th element index.\r\n * @param {number} [left=0] - The index of the left part of the range.\r\n * @param {number} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = require('../object/GetValue');\r\nvar Shuffle = require('./Shuffle');\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n *\r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n *\r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n *\r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n *\r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n *\r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n *\r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n var removed = [];\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n removed.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return removed;\r\n};\r\n\r\nmodule.exports = Remove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} startIndex - The start index to remove from.\r\n * @param {number} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {number} [start=0] - The array index to start the search from.\r\n * @param {number} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search within.\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The \"rotation\" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The \"rotation\" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n *\r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {number} startIndex - The start index.\r\n * @param {number} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {number} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n","/**\r\n * @author Richard Davey \r\n * @author Angry Bytes (and contributors)\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Device = require('../../device');\r\n\r\n/**\r\n * The comparator function.\r\n *\r\n * @ignore\r\n *\r\n * @param {*} a - The first item to test.\r\n * @param {*} b - The second itemt to test.\r\n *\r\n * @return {boolean} True if they localCompare, otherwise false.\r\n */\r\nfunction Compare (a, b)\r\n{\r\n return String(a).localeCompare(b);\r\n}\r\n\r\n/**\r\n * Process the array contents.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} array - The array to process.\r\n * @param {function} compare - The comparison function.\r\n *\r\n * @return {array} - The processed array.\r\n */\r\nfunction Process (array, compare)\r\n{\r\n // Short-circuit when there's nothing to sort.\r\n var len = array.length;\r\n\r\n if (len <= 1)\r\n {\r\n return array;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n\r\n for (var chk = 1; chk < len; chk *= 2)\r\n {\r\n RunPass(array, compare, chk, buffer);\r\n\r\n var tmp = array;\r\n\r\n array = buffer;\r\n\r\n buffer = tmp;\r\n }\r\n\r\n return array;\r\n}\r\n\r\n/**\r\n * Run a single pass with the given chunk size.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} arr - The array to run the pass on.\r\n * @param {function} comp - The comparison function.\r\n * @param {number} chk - The number of iterations.\r\n * @param {array} result - The array to store the result in.\r\n */\r\nfunction RunPass (arr, comp, chk, result)\r\n{\r\n var len = arr.length;\r\n var i = 0;\r\n\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl)\r\n {\r\n r = l + chk;\r\n e = r + chk;\r\n\r\n if (r > len)\r\n {\r\n r = len;\r\n }\r\n\r\n if (e > len)\r\n {\r\n e = len;\r\n }\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n\r\n while (true)\r\n {\r\n // Compare the chunks.\r\n if (li < r && ri < e)\r\n {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0)\r\n {\r\n result[i++] = arr[li++];\r\n }\r\n else\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n else if (li < r)\r\n {\r\n // Nothing to compare, just flush what's left.\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e)\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n else\r\n {\r\n // Both iterators are at the chunk ends.\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\r\n *\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The input array to be sorted.\r\n * @param {function} [compare] - The comparison function.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar StableSort = function (array, compare)\r\n{\r\n if (compare === undefined) { compare = Compare; }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n if (!array || array.length < 2)\r\n {\r\n return array;\r\n }\r\n\r\n if (Device.features.stableSort)\r\n {\r\n return array.sort(compare);\r\n }\r\n\r\n var result = Process(array, compare);\r\n\r\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\r\n if (result !== array)\r\n {\r\n RunPass(result, null, array.length, array);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = StableSort;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: require('./matrix'),\r\n\r\n Add: require('./Add'),\r\n AddAt: require('./AddAt'),\r\n BringToTop: require('./BringToTop'),\r\n CountAllMatching: require('./CountAllMatching'),\r\n Each: require('./Each'),\r\n EachInRange: require('./EachInRange'),\r\n FindClosestInSorted: require('./FindClosestInSorted'),\r\n Flatten: require('./Flatten'),\r\n GetAll: require('./GetAll'),\r\n GetFirst: require('./GetFirst'),\r\n GetRandom: require('./GetRandom'),\r\n MoveDown: require('./MoveDown'),\r\n MoveTo: require('./MoveTo'),\r\n MoveUp: require('./MoveUp'),\r\n MoveAbove: require('./MoveAbove'),\r\n MoveBelow: require('./MoveBelow'),\r\n NumberArray: require('./NumberArray'),\r\n NumberArrayStep: require('./NumberArrayStep'),\r\n QuickSelect: require('./QuickSelect'),\r\n Range: require('./Range'),\r\n Remove: require('./Remove'),\r\n RemoveAt: require('./RemoveAt'),\r\n RemoveBetween: require('./RemoveBetween'),\r\n RemoveRandomElement: require('./RemoveRandomElement'),\r\n Replace: require('./Replace'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateRight: require('./RotateRight'),\r\n SafeRange: require('./SafeRange'),\r\n SendToBack: require('./SendToBack'),\r\n SetAll: require('./SetAll'),\r\n Shuffle: require('./Shuffle'),\r\n SortByDigits: require('./SortByDigits'),\r\n SpliceOne: require('./SpliceOne'),\r\n StableSort: require('./StableSort'),\r\n Swap: require('./Swap')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = require('../../string/Pad');\r\nvar CheckMatrix = require('./CheckMatrix');\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = require('./CheckMatrix');\r\nvar TransposeMatrix = require('./TransposeMatrix');\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateLeft = require('../RotateLeft');\r\nvar RotateRight = require('../RotateRight');\r\n\r\n/**\r\n * Translates the given Array Matrix by shifting each column and row the\r\n * amount specified.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Translate\r\n * @since 3.50.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to translate.\r\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\r\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\r\n *\r\n * @return {T[][]} The translated matrix.\r\n */\r\nvar TranslateMatrix = function (matrix, x, y)\r\n{\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n // Vertical translation\r\n\r\n if (y !== 0)\r\n {\r\n if (y < 0)\r\n {\r\n // Shift Up\r\n RotateLeft(matrix, Math.abs(y));\r\n }\r\n else\r\n {\r\n // Shift Down\r\n RotateRight(matrix, y);\r\n }\r\n }\r\n\r\n // Horizontal translation\r\n\r\n if (x !== 0)\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n var row = matrix[i];\r\n\r\n if (x < 0)\r\n {\r\n RotateLeft(row, Math.abs(x));\r\n }\r\n else\r\n {\r\n RotateRight(row, x);\r\n }\r\n }\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = TranslateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n *\r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: require('./CheckMatrix'),\r\n MatrixToString: require('./MatrixToString'),\r\n ReverseColumns: require('./ReverseColumns'),\r\n ReverseRows: require('./ReverseRows'),\r\n Rotate180: require('./Rotate180'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateMatrix: require('./RotateMatrix'),\r\n RotateRight: require('./RotateRight'),\r\n Translate: require('./TranslateMatrix'),\r\n TransposeMatrix: require('./TransposeMatrix')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Deep Copy the given object or array.\r\n *\r\n * @function Phaser.Utils.Objects.DeepCopy\r\n * @since 3.50.0\r\n *\r\n * @param {object} obj - The object to deep copy.\r\n *\r\n * @return {object} A deep copy of the original object.\r\n */\r\nvar DeepCopy = function (inObject)\r\n{\r\n var outObject;\r\n var value;\r\n var key;\r\n\r\n if (typeof inObject !== 'object' || inObject === null)\r\n {\r\n // inObject is not an object\r\n return inObject;\r\n }\r\n\r\n // Create an array or object to hold the values\r\n outObject = Array.isArray(inObject) ? [] : {};\r\n\r\n for (key in inObject)\r\n {\r\n value = inObject[key];\r\n\r\n // Recursively (deep) copy for nested objects, including arrays\r\n outObject[key] = DeepCopy(value);\r\n }\r\n\r\n return outObject;\r\n};\r\n\r\nmodule.exports = DeepCopy;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n *\r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n *\r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\r\n *\r\n * The key is a string, which can be split based on the use of the period character.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * const source = {\r\n * lives: 3,\r\n * render: {\r\n * screen: {\r\n * width: 1024\r\n * }\r\n * }\r\n * }\r\n *\r\n * const lives = GetValue(source, 'lives', 1);\r\n * const width = GetValue(source, 'render.screen.width', 800);\r\n * const height = GetValue(source, 'render.screen.height', 600);\r\n * ```\r\n *\r\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\r\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\r\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue, altSource)\r\n{\r\n if ((!source && !altSource) || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source && source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (altSource && altSource.hasOwnProperty(key))\r\n {\r\n return altSource[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parentA = source;\r\n var parentB = altSource;\r\n var valueA = defaultValue;\r\n var valueB = defaultValue;\r\n var valueAFound = true;\r\n var valueBFound = true;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parentA && parentA.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentA has a key property, let's carry on down\r\n valueA = parentA[keys[i]];\r\n parentA = parentA[keys[i]];\r\n }\r\n else\r\n {\r\n valueAFound = false;\r\n }\r\n\r\n if (parentB && parentB.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentB has a key property, let's carry on down\r\n valueB = parentB[keys[i]];\r\n parentB = parentB[keys[i]];\r\n }\r\n else\r\n {\r\n valueBFound = false;\r\n }\r\n }\r\n\r\n if (valueAFound)\r\n {\r\n return valueA;\r\n }\r\n else if (valueBFound)\r\n {\r\n return valueB;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (!obj || typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and pads it out, to the length required, using the character\r\n * specified. For example if you need a string to be 6 characters long, you can call:\r\n *\r\n * `pad('bob', 6, '-', 2)`\r\n *\r\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\r\n *\r\n * You can also use it to pad numbers (they are always returned as strings):\r\n *\r\n * `pad(512, 6, '0', 1)`\r\n *\r\n * Would return: `000512` with the string padded to the left.\r\n *\r\n * If you don't specify a direction it'll pad to both sides:\r\n *\r\n * `pad('c64', 7, '*')`\r\n *\r\n * Would return: `**c64**`\r\n *\r\n * @function Phaser.Utils.String.Pad\r\n * @since 3.0.0\r\n *\r\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\r\n * @param {number} [len=0] - The number of characters to be added.\r\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\r\n * @param {number} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\r\n *\r\n * @return {string} The padded string.\r\n */\r\nvar Pad = function (str, len, pad, dir)\r\n{\r\n if (len === undefined) { len = 0; }\r\n if (pad === undefined) { pad = ' '; }\r\n if (dir === undefined) { dir = 3; }\r\n\r\n str = str.toString();\r\n\r\n var padlen = 0;\r\n\r\n if (len + 1 >= str.length)\r\n {\r\n switch (dir)\r\n {\r\n case 1:\r\n str = new Array(len + 1 - str.length).join(pad) + str;\r\n break;\r\n\r\n case 3:\r\n var right = Math.ceil((padlen = len - str.length) / 2);\r\n var left = padlen - right;\r\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\r\n break;\r\n\r\n default:\r\n str = str + new Array(len + 1 - str.length).join(pad);\r\n break;\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = Pad;\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./SpinePlugin.js\");\n",""],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/spine/dist/SpinePlugin.js b/plugins/spine/dist/SpinePlugin.js index 6f877b5c9..90669f34a 100644 --- a/plugins/spine/dist/SpinePlugin.js +++ b/plugins/spine/dist/SpinePlugin.js @@ -24000,7 +24000,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } @@ -53763,4 +53763,4 @@ module.exports = Pad; /******/ window.SpinePlugin = __webpack_exports__; /******/ /******/ })() -; +; \ No newline at end of file diff --git a/plugins/spine/dist/SpinePluginDebug.js b/plugins/spine/dist/SpinePluginDebug.js index 344374c52..f6bcd0cfa 100644 --- a/plugins/spine/dist/SpinePluginDebug.js +++ b/plugins/spine/dist/SpinePluginDebug.js @@ -24202,7 +24202,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } @@ -54730,4 +54730,4 @@ module.exports = Pad; /******/ /******/ })() ; -//# sourceMappingURL=SpinePluginDebug.js.map +//# sourceMappingURL=SpinePluginDebug.js.map \ No newline at end of file diff --git a/plugins/spine/dist/SpinePluginDebug.js.map b/plugins/spine/dist/SpinePluginDebug.js.map index d8c61fe2b..5d8456520 100644 --- a/plugins/spine/dist/SpinePluginDebug.js.map +++ b/plugins/spine/dist/SpinePluginDebug.js.map @@ -1 +1 @@ -{"version":3,"file":"SpinePluginDebug.js","mappings":";;;;;;;;;;AAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0DAA0D,OAAO;AACjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,SAAS;AACnD;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA,gBAAgB,YAAY;AAC5B;;AAEA;AACA,4DAA4D;AAC5D,gEAAgE;AAChE,oEAAoE;AACpE,wEAAwE;AACxE;AACA,2DAA2D,SAAS;AACpE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,4DAA4D,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;;;AC/UA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,mBAAmB,mBAAO,CAAC,yFAAwC;AACnE,gBAAgB,mBAAO,CAAC,8FAA4C;AACpE,oBAAoB,mBAAO,CAAC,2FAAyC;AACrE,eAAe,mBAAO,CAAC,4FAA2C;AAClE,gBAAgB,mBAAO,CAAC,0EAAkC;AAC1D,eAAe,mBAAO,CAAC,4FAA2C;AAClE;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,kDAAkD;AAC7D,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,mBAAmB;AAC9B,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sFAAsF;AAC7H;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,uCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sGAAsG;AACrH,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC,eAAe,SAAS;AACxB,eAAe,uCAAuC;AACtD,eAAe,uCAAuC;AACtD,eAAe,QAAQ,yDAAyD;AAChF;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;;;;;;;;;;;AC9uCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oBAAoB,qBAAqB;AACzC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,iFAA+B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,gBAAgB;AAC3B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC,8CAAe;AAClC,iBAAiB,mBAAO,CAAC,0DAAqB;AAC9C,WAAW,mBAAO,CAAC,8CAAe;;AAElC;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,8EAAoC;AAC/D,YAAY,mBAAO,CAAC,8DAA4B;AAChD,YAAY,mBAAO,CAAC,gEAA6B;AACjD,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,sBAAsB,mBAAO,CAAC,kGAA8C;AAC5E,qBAAqB,mBAAO,CAAC,gGAA6C;AAC1E,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oCAAoC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,mCAAmC;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;AAC/B;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0DAA0D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtsBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;AACxC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ,qGAAqG;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,0BAA0B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,mBAAmB,+IAA+I;AACpN;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,GAAG,uBAAuB,OAAO;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,kBAAkB;AAChC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,0BAA0B;AACxC,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;AAC9C;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5qBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,wCAAwC;AACxC,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,2BAA2B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,oDAAoD;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAgE;AAC/E;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3OA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,6BAA6B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,4BAA4B;AAC9D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACpTA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC,0CAA0C;AAC1C,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B,+BAA+B;AAC/B,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,oCAAoC;AACpC,sCAAsC;AACtC,yCAAyC;AACzC,mCAAmC;AACnC,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,mCAAmC;AACnC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACrLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,sBAAsB,mBAAO,CAAC,mEAAwB;AACtD,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AChHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,2CAA2C;AAC3C,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,iCAAiC;AACjC,iCAAiC;AACjC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7MA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,mCAAmC;AACnC,qCAAqC;AACrC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjKA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,uCAAuC;AACvC,sCAAsC;AACtC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AChGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,oCAAoC;AACpC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,uCAAuC;AACvC,kCAAkC;AAClC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,2CAAU;AAC9B,gBAAgB,mBAAO,CAAC,mDAAc;AACtC,WAAW,mBAAO,CAAC,yCAAS;AAC5B,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,YAAY,mBAAO,CAAC,2CAAU;AAC9B,iBAAiB,mBAAO,CAAC,qDAAe;AACxC,kBAAkB,mBAAO,CAAC,uDAAgB;AAC1C,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,cAAc,mBAAO,CAAC,+CAAY;AAClC,cAAc,mBAAO,CAAC,+CAAY;AAClC,YAAY,mBAAO,CAAC,2CAAU;AAC9B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,cAAc,mBAAO,CAAC,+CAAY;AAClC,UAAU,mBAAO,CAAC,uCAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,+BAA+B;AAC1C,WAAW,2CAA2C;AACtD;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW,KAAK,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB,KAAK,gBAAgB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,KAAK,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAA0D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,oCAAoC;AACnD,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2DAA2D;AAC1E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACl5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mFAAmF;AACpG;AACA,eAAe,mFAAmF;AAClG;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,4FAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC;AAClD;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,cAAc,mBAAO,CAAC,2CAAW;AACjC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC,oBAAoB,GAAG;AACvB;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC,oBAAoB,GAAG;AACvB;AACA,eAAe,sBAAsB;AACrC,eAAe,QAAQ;AACvB;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA,4GAA4G,sCAAsC;AAClJ,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACr0BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA,eAAe,gCAAgC;AAC/C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpXA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAmE;AAClF;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,iBAAiB,gCAAgC;AACjD,oBAAoB,YAAY;AAChC;AACA,eAAe,gEAAgE;AAC/E,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,kCAAkC;AACjD,eAAe,uCAAuC;AACtD;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,6BAA6B;AAC9C,iBAAiB,0BAA0B;AAC3C,oBAAoB,OAAO;AAC3B;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wDAAwD;AACnF;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,wGAAwG;AACvH;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wGAAwG,UAAU;AACjI,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,SAAS,mBAAO,CAAC,mEAAkB;AACnC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uIAAuI;AACtJ,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,mGAAmG;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uDAAuD;AACtE;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9WA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAkC;AACjD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iDAAiD;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6FAA6F;AAC5G;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAoD;AAC5D;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,sBAAsB;AACtB,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3mBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,sDAAsD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,cAAc;AAC7B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,6DAAS;AAC5B,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,eAAe,mBAAO,CAAC,qEAAa;AACpC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,eAAe,mBAAO,CAAC,qEAAa;AACpC,qBAAqB,mBAAO,CAAC,iFAAmB;AAChD,aAAa,mBAAO,CAAC,iEAAW;AAChC;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,KAAK;AACzB;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACl7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;AACA;AACA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;AACA;AACA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,qBAAqB;AAChC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,qBAAqB;AAChC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,uBAAuB,mBAAO,CAAC,6FAA2B;AAC1D;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,sDAAY;AACnC,gBAAgB,mBAAO,CAAC,wDAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,aAAa,mBAAO,CAAC,kDAAU;AAC/B,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,mBAAmB;AAC9B;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,2DAAY;AACnC,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,WAAW,mBAAO,CAAC,oDAAc;AACjC,aAAa,mBAAO,CAAC,uDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjjBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,uCAAuC;AAClD;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3SA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,uCAAuC;AAClD;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,sCAAsC;AACtC,+BAA+B;AAC/B,8BAA8B;AAC9B,kCAAkC;AAClC,iCAAiC;AACjC,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,4BAA4B;AACvC,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,wDAAwD;AAClJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,oFAAoF,oDAAoD;AACxI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mBAAO,CAAC,4DAAa;AAC9B,cAAc,mBAAO,CAAC,sEAAkB;AACxC,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,uBAAuB,mBAAO,CAAC,wFAA2B;AAC1D,qBAAqB,mBAAO,CAAC,oFAAyB;AACtD,eAAe,mBAAO,CAAC,wEAAmB;AAC1C,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,kBAAkB,mBAAO,CAAC,8EAAsB;AAChD,cAAc,mBAAO,CAAC,sEAAkB;AACxC,WAAW,mBAAO,CAAC,gEAAe;AAClC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D,aAAa,mBAAO,CAAC,gDAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,wDAAwD;AACnE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,gDAAgD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wGAAwG;AACnH,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9VA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,mDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpRA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1vDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,gDAAgD;AAC3D;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AClxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/gCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACthBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,uCAAuC;AAClF;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,iCAAiC;AAC5E;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4CAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,yDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0CAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,0CAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;AACxC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;AAChC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iGAAoC;;;;;;;;;;;ACNpC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,oGAAqC;;;;;;;;;;;ACVrC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;AAClC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;AAC3B;AACA;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;AAC9E;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;AAC1B;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,oDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,8CAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;AACvD;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;AAC1C;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,kDAAkD;AAClD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wCAAwC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;AAC1B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,uCAAuC;AACnG;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,0CAA0C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,4CAA4C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1MA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,yCAAyC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8CAA8C;AACrF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,sDAAsD;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,uDAAuD;AACnI;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,YAAY,mBAAO,CAAC,iEAAgB;AACpC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,cAAc,mBAAO,CAAC,qEAAkB;AACxC,WAAW,mBAAO,CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;AAChC;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1NA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzPA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,oCAAoC;AACpC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,sDAAsD;AACtD,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE,qEAAqE;AACrE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,wBAAwB,mBAAO,CAAC,4EAA8B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,6BAA6B;AAC7B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA,6BAA6B,mBAAmB;AAChD;AACA,4BAA4B,SAAS;AACrC;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA,WAAW,KAAK;AAChB;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAc;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,0DAAU;AAC9B;AACA,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;AAC1B;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,iEAAa;AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;AAChD;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,8CAA8C,cAAc,oBAAoB;AAChF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UCrEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack:///../../../node_modules/eventemitter3/index.js","webpack:///./runtimes/spine-both.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///../../../src/const.js","webpack:///../../../src/data/DataManager.js","webpack:///../../../src/data/events/CHANGE_DATA_EVENT.js","webpack:///../../../src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///../../../src/data/events/DESTROY_EVENT.js","webpack:///../../../src/data/events/REMOVE_DATA_EVENT.js","webpack:///../../../src/data/events/SET_DATA_EVENT.js","webpack:///../../../src/data/events/index.js","webpack:///../../../src/device/Audio.js","webpack:///../../../src/device/Browser.js","webpack:///../../../src/device/CanvasFeatures.js","webpack:///../../../src/device/Features.js","webpack:///../../../src/device/Fullscreen.js","webpack:///../../../src/device/Input.js","webpack:///../../../src/device/OS.js","webpack:///../../../src/device/Video.js","webpack:///../../../src/device/index.js","webpack:///../../../src/display/ColorMatrix.js","webpack:///../../../src/display/canvas/CanvasPool.js","webpack:///../../../src/display/canvas/Smoothing.js","webpack:///../../../src/display/mask/BitmapMask.js","webpack:///../../../src/display/mask/GeometryMask.js","webpack:///../../../src/fx/Barrel.js","webpack:///../../../src/fx/Bloom.js","webpack:///../../../src/fx/Blur.js","webpack:///../../../src/fx/Bokeh.js","webpack:///../../../src/fx/Circle.js","webpack:///../../../src/fx/ColorMatrix.js","webpack:///../../../src/fx/Controller.js","webpack:///../../../src/fx/Displacement.js","webpack:///../../../src/fx/Glow.js","webpack:///../../../src/fx/Gradient.js","webpack:///../../../src/fx/Pixelate.js","webpack:///../../../src/fx/Shadow.js","webpack:///../../../src/fx/Shine.js","webpack:///../../../src/fx/Vignette.js","webpack:///../../../src/fx/Wipe.js","webpack:///../../../src/fx/const.js","webpack:///../../../src/fx/index.js","webpack:///../../../src/gameobjects/BuildGameObject.js","webpack:///../../../src/gameobjects/GameObject.js","webpack:///../../../src/gameobjects/GameObjectFactory.js","webpack:///../../../src/gameobjects/GetCalcMatrix.js","webpack:///../../../src/gameobjects/components/Alpha.js","webpack:///../../../src/gameobjects/components/AlphaSingle.js","webpack:///../../../src/gameobjects/components/BlendMode.js","webpack:///../../../src/gameobjects/components/ComputedSize.js","webpack:///../../../src/gameobjects/components/Crop.js","webpack:///../../../src/gameobjects/components/Depth.js","webpack:///../../../src/gameobjects/components/FX.js","webpack:///../../../src/gameobjects/components/Flip.js","webpack:///../../../src/gameobjects/components/GetBounds.js","webpack:///../../../src/gameobjects/components/Mask.js","webpack:///../../../src/gameobjects/components/Origin.js","webpack:///../../../src/gameobjects/components/PathFollower.js","webpack:///../../../src/gameobjects/components/Pipeline.js","webpack:///../../../src/gameobjects/components/PostPipeline.js","webpack:///../../../src/gameobjects/components/ScrollFactor.js","webpack:///../../../src/gameobjects/components/Size.js","webpack:///../../../src/gameobjects/components/Texture.js","webpack:///../../../src/gameobjects/components/TextureCrop.js","webpack:///../../../src/gameobjects/components/Tint.js","webpack:///../../../src/gameobjects/components/ToJSON.js","webpack:///../../../src/gameobjects/components/Transform.js","webpack:///../../../src/gameobjects/components/TransformMatrix.js","webpack:///../../../src/gameobjects/components/Visible.js","webpack:///../../../src/gameobjects/components/index.js","webpack:///../../../src/gameobjects/container/Container.js","webpack:///../../../src/gameobjects/container/ContainerCanvasRenderer.js","webpack:///../../../src/gameobjects/container/ContainerRender.js","webpack:///../../../src/gameobjects/container/ContainerWebGLRenderer.js","webpack:///../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/DESTROY_EVENT.js","webpack:///../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAYING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STALLED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_TEXTURE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNSUPPORTED_EVENT.js","webpack:///../../../src/gameobjects/events/index.js","webpack:///../../../src/geom/const.js","webpack:///../../../src/geom/line/GetPoint.js","webpack:///../../../src/geom/line/GetPoints.js","webpack:///../../../src/geom/line/Length.js","webpack:///../../../src/geom/line/Line.js","webpack:///../../../src/geom/line/Random.js","webpack:///../../../src/geom/point/Point.js","webpack:///../../../src/geom/rectangle/Contains.js","webpack:///../../../src/geom/rectangle/GetPoint.js","webpack:///../../../src/geom/rectangle/GetPoints.js","webpack:///../../../src/geom/rectangle/Perimeter.js","webpack:///../../../src/geom/rectangle/Random.js","webpack:///../../../src/geom/rectangle/Rectangle.js","webpack:///../../../src/geom/rectangle/Union.js","webpack:///../../../src/loader/File.js","webpack:///../../../src/loader/FileTypesManager.js","webpack:///../../../src/loader/GetURL.js","webpack:///../../../src/loader/MergeXHRSettings.js","webpack:///../../../src/loader/MultiFile.js","webpack:///../../../src/loader/XHRLoader.js","webpack:///../../../src/loader/XHRSettings.js","webpack:///../../../src/loader/const.js","webpack:///../../../src/loader/events/ADD_EVENT.js","webpack:///../../../src/loader/events/COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_EVENT.js","webpack:///../../../src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///../../../src/loader/events/POST_PROCESS_EVENT.js","webpack:///../../../src/loader/events/PROGRESS_EVENT.js","webpack:///../../../src/loader/events/START_EVENT.js","webpack:///../../../src/loader/events/index.js","webpack:///../../../src/loader/filetypes/ImageFile.js","webpack:///../../../src/loader/filetypes/JSONFile.js","webpack:///../../../src/loader/filetypes/TextFile.js","webpack:///../../../src/math/Average.js","webpack:///../../../src/math/Bernstein.js","webpack:///../../../src/math/Between.js","webpack:///../../../src/math/CatmullRom.js","webpack:///../../../src/math/CeilTo.js","webpack:///../../../src/math/Clamp.js","webpack:///../../../src/math/DegToRad.js","webpack:///../../../src/math/Difference.js","webpack:///../../../src/math/Euler.js","webpack:///../../../src/math/Factorial.js","webpack:///../../../src/math/FloatBetween.js","webpack:///../../../src/math/FloorTo.js","webpack:///../../../src/math/FromPercent.js","webpack:///../../../src/math/GetSpeed.js","webpack:///../../../src/math/IsEven.js","webpack:///../../../src/math/IsEvenStrict.js","webpack:///../../../src/math/Linear.js","webpack:///../../../src/math/LinearXY.js","webpack:///../../../src/math/Matrix3.js","webpack:///../../../src/math/Matrix4.js","webpack:///../../../src/math/MaxAdd.js","webpack:///../../../src/math/Median.js","webpack:///../../../src/math/MinSub.js","webpack:///../../../src/math/Percent.js","webpack:///../../../src/math/Quaternion.js","webpack:///../../../src/math/RadToDeg.js","webpack:///../../../src/math/RandomXY.js","webpack:///../../../src/math/RandomXYZ.js","webpack:///../../../src/math/RandomXYZW.js","webpack:///../../../src/math/Rotate.js","webpack:///../../../src/math/RotateAround.js","webpack:///../../../src/math/RotateAroundDistance.js","webpack:///../../../src/math/RotateTo.js","webpack:///../../../src/math/RotateVec3.js","webpack:///../../../src/math/RoundAwayFromZero.js","webpack:///../../../src/math/RoundTo.js","webpack:///../../../src/math/SinCosTableGenerator.js","webpack:///../../../src/math/SmoothStep.js","webpack:///../../../src/math/SmootherStep.js","webpack:///../../../src/math/ToXY.js","webpack:///../../../src/math/TransformXY.js","webpack:///../../../src/math/Vector2.js","webpack:///../../../src/math/Vector3.js","webpack:///../../../src/math/Vector4.js","webpack:///../../../src/math/Within.js","webpack:///../../../src/math/Wrap.js","webpack:///../../../src/math/angle/Between.js","webpack:///../../../src/math/angle/BetweenPoints.js","webpack:///../../../src/math/angle/BetweenPointsY.js","webpack:///../../../src/math/angle/BetweenY.js","webpack:///../../../src/math/angle/CounterClockwise.js","webpack:///../../../src/math/angle/Normalize.js","webpack:///../../../src/math/angle/Random.js","webpack:///../../../src/math/angle/RandomDegrees.js","webpack:///../../../src/math/angle/Reverse.js","webpack:///../../../src/math/angle/RotateTo.js","webpack:///../../../src/math/angle/ShortestBetween.js","webpack:///../../../src/math/angle/Wrap.js","webpack:///../../../src/math/angle/WrapDegrees.js","webpack:///../../../src/math/angle/index.js","webpack:///../../../src/math/const.js","webpack:///../../../src/math/distance/DistanceBetween.js","webpack:///../../../src/math/distance/DistanceBetweenPoints.js","webpack:///../../../src/math/distance/DistanceBetweenPointsSquared.js","webpack:///../../../src/math/distance/DistanceChebyshev.js","webpack:///../../../src/math/distance/DistancePower.js","webpack:///../../../src/math/distance/DistanceSnake.js","webpack:///../../../src/math/distance/DistanceSquared.js","webpack:///../../../src/math/distance/index.js","webpack:///../../../src/math/easing/back/In.js","webpack:///../../../src/math/easing/back/InOut.js","webpack:///../../../src/math/easing/back/Out.js","webpack:///../../../src/math/easing/back/index.js","webpack:///../../../src/math/easing/bounce/In.js","webpack:///../../../src/math/easing/bounce/InOut.js","webpack:///../../../src/math/easing/bounce/Out.js","webpack:///../../../src/math/easing/bounce/index.js","webpack:///../../../src/math/easing/circular/In.js","webpack:///../../../src/math/easing/circular/InOut.js","webpack:///../../../src/math/easing/circular/Out.js","webpack:///../../../src/math/easing/circular/index.js","webpack:///../../../src/math/easing/cubic/In.js","webpack:///../../../src/math/easing/cubic/InOut.js","webpack:///../../../src/math/easing/cubic/Out.js","webpack:///../../../src/math/easing/cubic/index.js","webpack:///../../../src/math/easing/elastic/In.js","webpack:///../../../src/math/easing/elastic/InOut.js","webpack:///../../../src/math/easing/elastic/Out.js","webpack:///../../../src/math/easing/elastic/index.js","webpack:///../../../src/math/easing/expo/In.js","webpack:///../../../src/math/easing/expo/InOut.js","webpack:///../../../src/math/easing/expo/Out.js","webpack:///../../../src/math/easing/expo/index.js","webpack:///../../../src/math/easing/index.js","webpack:///../../../src/math/easing/linear/Linear.js","webpack:///../../../src/math/easing/linear/index.js","webpack:///../../../src/math/easing/quadratic/In.js","webpack:///../../../src/math/easing/quadratic/InOut.js","webpack:///../../../src/math/easing/quadratic/Out.js","webpack:///../../../src/math/easing/quadratic/index.js","webpack:///../../../src/math/easing/quartic/In.js","webpack:///../../../src/math/easing/quartic/InOut.js","webpack:///../../../src/math/easing/quartic/Out.js","webpack:///../../../src/math/easing/quartic/index.js","webpack:///../../../src/math/easing/quintic/In.js","webpack:///../../../src/math/easing/quintic/InOut.js","webpack:///../../../src/math/easing/quintic/Out.js","webpack:///../../../src/math/easing/quintic/index.js","webpack:///../../../src/math/easing/sine/In.js","webpack:///../../../src/math/easing/sine/InOut.js","webpack:///../../../src/math/easing/sine/Out.js","webpack:///../../../src/math/easing/sine/index.js","webpack:///../../../src/math/easing/stepped/Stepped.js","webpack:///../../../src/math/easing/stepped/index.js","webpack:///../../../src/math/fuzzy/Ceil.js","webpack:///../../../src/math/fuzzy/Equal.js","webpack:///../../../src/math/fuzzy/Floor.js","webpack:///../../../src/math/fuzzy/GreaterThan.js","webpack:///../../../src/math/fuzzy/LessThan.js","webpack:///../../../src/math/fuzzy/index.js","webpack:///../../../src/math/index.js","webpack:///../../../src/math/interpolation/BezierInterpolation.js","webpack:///../../../src/math/interpolation/CatmullRomInterpolation.js","webpack:///../../../src/math/interpolation/CubicBezierInterpolation.js","webpack:///../../../src/math/interpolation/LinearInterpolation.js","webpack:///../../../src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///../../../src/math/interpolation/SmoothStepInterpolation.js","webpack:///../../../src/math/interpolation/SmootherStepInterpolation.js","webpack:///../../../src/math/interpolation/index.js","webpack:///../../../src/math/pow2/GetPowerOfTwo.js","webpack:///../../../src/math/pow2/IsSizePowerOfTwo.js","webpack:///../../../src/math/pow2/IsValuePowerOfTwo.js","webpack:///../../../src/math/pow2/index.js","webpack:///../../../src/math/random-data-generator/RandomDataGenerator.js","webpack:///../../../src/math/snap/SnapCeil.js","webpack:///../../../src/math/snap/SnapFloor.js","webpack:///../../../src/math/snap/SnapTo.js","webpack:///../../../src/math/snap/index.js","webpack:///../../../src/plugins/BasePlugin.js","webpack:///../../../src/plugins/PluginCache.js","webpack:///../../../src/plugins/ScenePlugin.js","webpack:///../../../src/renderer/BlendModes.js","webpack:///../../../src/renderer/ScaleModes.js","webpack:///../../../src/scale/events/RESIZE_EVENT.js","webpack:///../../../src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/scene/events/BOOT_EVENT.js","webpack:///../../../src/scene/events/CREATE_EVENT.js","webpack:///../../../src/scene/events/DESTROY_EVENT.js","webpack:///../../../src/scene/events/PAUSE_EVENT.js","webpack:///../../../src/scene/events/POST_UPDATE_EVENT.js","webpack:///../../../src/scene/events/PRE_RENDER_EVENT.js","webpack:///../../../src/scene/events/PRE_UPDATE_EVENT.js","webpack:///../../../src/scene/events/READY_EVENT.js","webpack:///../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/scene/events/RENDER_EVENT.js","webpack:///../../../src/scene/events/RESUME_EVENT.js","webpack:///../../../src/scene/events/SHUTDOWN_EVENT.js","webpack:///../../../src/scene/events/SLEEP_EVENT.js","webpack:///../../../src/scene/events/START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///../../../src/scene/events/UPDATE_EVENT.js","webpack:///../../../src/scene/events/WAKE_EVENT.js","webpack:///../../../src/scene/events/index.js","webpack:///../../../src/textures/Frame.js","webpack:///../../../src/tweens/builders/GetBoolean.js","webpack:///../../../src/tweens/tween/const.js","webpack:///../../../src/utils/Class.js","webpack:///../../../src/utils/NOOP.js","webpack:///../../../src/utils/array/Add.js","webpack:///../../../src/utils/array/AddAt.js","webpack:///../../../src/utils/array/BringToTop.js","webpack:///../../../src/utils/array/CountAllMatching.js","webpack:///../../../src/utils/array/Each.js","webpack:///../../../src/utils/array/EachInRange.js","webpack:///../../../src/utils/array/FindClosestInSorted.js","webpack:///../../../src/utils/array/Flatten.js","webpack:///../../../src/utils/array/GetAll.js","webpack:///../../../src/utils/array/GetFirst.js","webpack:///../../../src/utils/array/GetRandom.js","webpack:///../../../src/utils/array/MoveAbove.js","webpack:///../../../src/utils/array/MoveBelow.js","webpack:///../../../src/utils/array/MoveDown.js","webpack:///../../../src/utils/array/MoveTo.js","webpack:///../../../src/utils/array/MoveUp.js","webpack:///../../../src/utils/array/NumberArray.js","webpack:///../../../src/utils/array/NumberArrayStep.js","webpack:///../../../src/utils/array/QuickSelect.js","webpack:///../../../src/utils/array/Range.js","webpack:///../../../src/utils/array/Remove.js","webpack:///../../../src/utils/array/RemoveAt.js","webpack:///../../../src/utils/array/RemoveBetween.js","webpack:///../../../src/utils/array/RemoveRandomElement.js","webpack:///../../../src/utils/array/Replace.js","webpack:///../../../src/utils/array/RotateLeft.js","webpack:///../../../src/utils/array/RotateRight.js","webpack:///../../../src/utils/array/SafeRange.js","webpack:///../../../src/utils/array/SendToBack.js","webpack:///../../../src/utils/array/SetAll.js","webpack:///../../../src/utils/array/Shuffle.js","webpack:///../../../src/utils/array/SortByDigits.js","webpack:///../../../src/utils/array/SpliceOne.js","webpack:///../../../src/utils/array/StableSort.js","webpack:///../../../src/utils/array/Swap.js","webpack:///../../../src/utils/array/index.js","webpack:///../../../src/utils/array/matrix/CheckMatrix.js","webpack:///../../../src/utils/array/matrix/MatrixToString.js","webpack:///../../../src/utils/array/matrix/ReverseColumns.js","webpack:///../../../src/utils/array/matrix/ReverseRows.js","webpack:///../../../src/utils/array/matrix/Rotate180.js","webpack:///../../../src/utils/array/matrix/RotateLeft.js","webpack:///../../../src/utils/array/matrix/RotateMatrix.js","webpack:///../../../src/utils/array/matrix/RotateRight.js","webpack:///../../../src/utils/array/matrix/TranslateMatrix.js","webpack:///../../../src/utils/array/matrix/TransposeMatrix.js","webpack:///../../../src/utils/array/matrix/index.js","webpack:///../../../src/utils/object/DeepCopy.js","webpack:///../../../src/utils/object/Extend.js","webpack:///../../../src/utils/object/GetAdvancedValue.js","webpack:///../../../src/utils/object/GetFastValue.js","webpack:///../../../src/utils/object/GetValue.js","webpack:///../../../src/utils/object/IsPlainObject.js","webpack:///../../../src/utils/string/Pad.js","webpack:///webpack/bootstrap","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["'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","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Animation = (function () {\r\n function Animation(name, timelines, duration) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (timelines == null)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n Animation.prototype.hasTimeline = function (id) {\r\n return this.timelineIds[id] == true;\r\n };\r\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n var timelines = this.timelines;\r\n for (var i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n };\r\n Animation.binarySearch = function (values, target, step) {\r\n if (step === void 0) { step = 1; }\r\n var low = 0;\r\n var high = values.length / step - 2;\r\n if (high == 0)\r\n return step;\r\n var current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high)\r\n return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n };\r\n Animation.linearSearch = function (values, target, step) {\r\n for (var i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target)\r\n return i;\r\n return -1;\r\n };\r\n return Animation;\r\n }());\r\n spine.Animation = Animation;\r\n var MixBlend;\r\n (function (MixBlend) {\r\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\r\n var MixDirection;\r\n (function (MixDirection) {\r\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n var TimelineType;\r\n (function (TimelineType) {\r\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n var CurveTimeline = (function () {\r\n function CurveTimeline(frameCount) {\r\n if (frameCount <= 0)\r\n throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n CurveTimeline.prototype.getFrameCount = function () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n };\r\n CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n };\r\n CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n };\r\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length)\r\n return CurveTimeline.LINEAR;\r\n var type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR)\r\n return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED)\r\n return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n };\r\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n var x = dfx, y = dfy;\r\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n };\r\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n percent = spine.MathUtils.clamp(percent, 0, 1);\r\n var curves = this.curves;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var type = curves[i];\r\n if (type == CurveTimeline.LINEAR)\r\n return percent;\r\n if (type == CurveTimeline.STEPPED)\r\n return 0;\r\n i++;\r\n var x = 0;\r\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n var prevX = void 0, prevY = void 0;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n }\r\n else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n var y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x);\r\n };\r\n CurveTimeline.LINEAR = 0;\r\n CurveTimeline.STEPPED = 1;\r\n CurveTimeline.BEZIER = 2;\r\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n return CurveTimeline;\r\n }());\r\n spine.CurveTimeline = CurveTimeline;\r\n var RotateTimeline = (function (_super) {\r\n __extends(RotateTimeline, _super);\r\n function RotateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n return _this;\r\n }\r\n RotateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n };\r\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n };\r\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n var r_1 = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r_2 * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r_2 += bone.data.rotation - bone.rotation;\r\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n case MixBlend.add:\r\n bone.rotation += r_2 * alpha;\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n };\r\n RotateTimeline.ENTRIES = 2;\r\n RotateTimeline.PREV_TIME = -2;\r\n RotateTimeline.PREV_ROTATION = -1;\r\n RotateTimeline.ROTATION = 1;\r\n return RotateTimeline;\r\n }(CurveTimeline));\r\n spine.RotateTimeline = RotateTimeline;\r\n var TranslateTimeline = (function (_super) {\r\n __extends(TranslateTimeline, _super);\r\n function TranslateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TranslateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n };\r\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n };\r\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n };\r\n TranslateTimeline.ENTRIES = 3;\r\n TranslateTimeline.PREV_TIME = -3;\r\n TranslateTimeline.PREV_X = -2;\r\n TranslateTimeline.PREV_Y = -1;\r\n TranslateTimeline.X = 1;\r\n TranslateTimeline.Y = 2;\r\n return TranslateTimeline;\r\n }(CurveTimeline));\r\n spine.TranslateTimeline = TranslateTimeline;\r\n var ScaleTimeline = (function (_super) {\r\n __extends(ScaleTimeline, _super);\r\n function ScaleTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ScaleTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n };\r\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n }\r\n else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n }\r\n else {\r\n var bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = spine.MathUtils.signum(x);\r\n by = spine.MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n };\r\n return ScaleTimeline;\r\n }(TranslateTimeline));\r\n spine.ScaleTimeline = ScaleTimeline;\r\n var ShearTimeline = (function (_super) {\r\n __extends(ShearTimeline, _super);\r\n function ShearTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ShearTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n };\r\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n };\r\n return ShearTimeline;\r\n }(TranslateTimeline));\r\n spine.ShearTimeline = ShearTimeline;\r\n var ColorTimeline = (function (_super) {\r\n __extends(ColorTimeline, _super);\r\n function ColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n ColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n };\r\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n };\r\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n var color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n var color = slot.color;\r\n if (blend == MixBlend.setup)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n };\r\n ColorTimeline.ENTRIES = 5;\r\n ColorTimeline.PREV_TIME = -5;\r\n ColorTimeline.PREV_R = -4;\r\n ColorTimeline.PREV_G = -3;\r\n ColorTimeline.PREV_B = -2;\r\n ColorTimeline.PREV_A = -1;\r\n ColorTimeline.R = 1;\r\n ColorTimeline.G = 2;\r\n ColorTimeline.B = 3;\r\n ColorTimeline.A = 4;\r\n return ColorTimeline;\r\n }(CurveTimeline));\r\n spine.ColorTimeline = ColorTimeline;\r\n var TwoColorTimeline = (function (_super) {\r\n __extends(TwoColorTimeline, _super);\r\n function TwoColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TwoColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n };\r\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n };\r\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n }\r\n else {\r\n var light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n };\r\n TwoColorTimeline.ENTRIES = 8;\r\n TwoColorTimeline.PREV_TIME = -8;\r\n TwoColorTimeline.PREV_R = -7;\r\n TwoColorTimeline.PREV_G = -6;\r\n TwoColorTimeline.PREV_B = -5;\r\n TwoColorTimeline.PREV_A = -4;\r\n TwoColorTimeline.PREV_R2 = -3;\r\n TwoColorTimeline.PREV_G2 = -2;\r\n TwoColorTimeline.PREV_B2 = -1;\r\n TwoColorTimeline.R = 1;\r\n TwoColorTimeline.G = 2;\r\n TwoColorTimeline.B = 3;\r\n TwoColorTimeline.A = 4;\r\n TwoColorTimeline.R2 = 5;\r\n TwoColorTimeline.G2 = 6;\r\n TwoColorTimeline.B2 = 7;\r\n return TwoColorTimeline;\r\n }(CurveTimeline));\r\n spine.TwoColorTimeline = TwoColorTimeline;\r\n var AttachmentTimeline = (function () {\r\n function AttachmentTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n AttachmentTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n };\r\n AttachmentTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n };\r\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frameIndex = 0;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n var attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n return AttachmentTimeline;\r\n }());\r\n spine.AttachmentTimeline = AttachmentTimeline;\r\n var zeros = null;\r\n var DeformTimeline = (function (_super) {\r\n __extends(DeformTimeline, _super);\r\n function DeformTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount);\r\n _this.frameVertices = new Array(frameCount);\r\n if (zeros == null)\r\n zeros = spine.Utils.newFloatArray(64);\r\n return _this;\r\n }\r\n DeformTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n };\r\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n };\r\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var slotAttachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\r\n return;\r\n var deformArray = slot.deform;\r\n if (deformArray.length == 0)\r\n blend = MixBlend.setup;\r\n var frameVertices = this.frameVertices;\r\n var vertexCount = frameVertices[0].length;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n var vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n }\r\n else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) {\r\n var lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n }\r\n }\r\n else {\r\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n deform[i_2] += lastVertices[i_2];\r\n }\r\n }\r\n else {\r\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_1 = slotAttachment;\r\n if (vertexAttachment_1.bones == null) {\r\n var setupVertices = vertexAttachment_1.vertices;\r\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n var setup = setupVertices[i_3];\r\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n deform[i_4] = lastVertices[i_4] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n deform[i_7] += lastVertices[i_7] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time);\r\n var prevVertices = frameVertices[frame - 1];\r\n var nextVertices = frameVertices[frame];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n var prev = prevVertices[i_8];\r\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n }\r\n }\r\n else {\r\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n var prev = prevVertices[i_9];\r\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n var prev = prevVertices[i_10];\r\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_2 = slotAttachment;\r\n if (vertexAttachment_2.bones == null) {\r\n var setupVertices = vertexAttachment_2.vertices;\r\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n var prev = prevVertices[i_12];\r\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n var prev = prevVertices[i_13];\r\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n var prev = prevVertices[i_14];\r\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n var prev = prevVertices[i_15];\r\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n return DeformTimeline;\r\n }(CurveTimeline));\r\n spine.DeformTimeline = DeformTimeline;\r\n var EventTimeline = (function () {\r\n function EventTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n EventTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.event << 24;\r\n };\r\n EventTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n };\r\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (firedEvents == null)\r\n return;\r\n var frames = this.frames;\r\n var frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n }\r\n else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n var frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n var frameTime = frames[frame];\r\n while (frame > 0) {\r\n if (frames[frame - 1] != frameTime)\r\n break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n };\r\n return EventTimeline;\r\n }());\r\n spine.EventTimeline = EventTimeline;\r\n var DrawOrderTimeline = (function () {\r\n function DrawOrderTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n DrawOrderTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.drawOrder << 24;\r\n };\r\n DrawOrderTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n };\r\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var drawOrder = skeleton.drawOrder;\r\n var slots = skeleton.slots;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frame = 0;\r\n if (time >= frames[frames.length - 1])\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n var drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n };\r\n return DrawOrderTimeline;\r\n }());\r\n spine.DrawOrderTimeline = DrawOrderTimeline;\r\n var IkConstraintTimeline = (function (_super) {\r\n __extends(IkConstraintTimeline, _super);\r\n function IkConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n IkConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n };\r\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n };\r\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n };\r\n IkConstraintTimeline.ENTRIES = 6;\r\n IkConstraintTimeline.PREV_TIME = -6;\r\n IkConstraintTimeline.PREV_MIX = -5;\r\n IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n IkConstraintTimeline.PREV_COMPRESS = -2;\r\n IkConstraintTimeline.PREV_STRETCH = -1;\r\n IkConstraintTimeline.MIX = 1;\r\n IkConstraintTimeline.SOFTNESS = 2;\r\n IkConstraintTimeline.BEND_DIRECTION = 3;\r\n IkConstraintTimeline.COMPRESS = 4;\r\n IkConstraintTimeline.STRETCH = 5;\r\n return IkConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.IkConstraintTimeline = IkConstraintTimeline;\r\n var TransformConstraintTimeline = (function (_super) {\r\n __extends(TransformConstraintTimeline, _super);\r\n function TransformConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n };\r\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n };\r\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n var data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n };\r\n TransformConstraintTimeline.ENTRIES = 5;\r\n TransformConstraintTimeline.PREV_TIME = -5;\r\n TransformConstraintTimeline.PREV_ROTATE = -4;\r\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n TransformConstraintTimeline.PREV_SCALE = -2;\r\n TransformConstraintTimeline.PREV_SHEAR = -1;\r\n TransformConstraintTimeline.ROTATE = 1;\r\n TransformConstraintTimeline.TRANSLATE = 2;\r\n TransformConstraintTimeline.SCALE = 3;\r\n TransformConstraintTimeline.SHEAR = 4;\r\n return TransformConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n var PathConstraintPositionTimeline = (function (_super) {\r\n __extends(PathConstraintPositionTimeline, _super);\r\n function PathConstraintPositionTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n };\r\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n var position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n };\r\n PathConstraintPositionTimeline.ENTRIES = 2;\r\n PathConstraintPositionTimeline.PREV_TIME = -2;\r\n PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n PathConstraintPositionTimeline.VALUE = 1;\r\n return PathConstraintPositionTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n var PathConstraintSpacingTimeline = (function (_super) {\r\n __extends(PathConstraintSpacingTimeline, _super);\r\n function PathConstraintSpacingTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n var spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n };\r\n return PathConstraintSpacingTimeline;\r\n }(PathConstraintPositionTimeline));\r\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n var PathConstraintMixTimeline = (function (_super) {\r\n __extends(PathConstraintMixTimeline, _super);\r\n function PathConstraintMixTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n };\r\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n };\r\n PathConstraintMixTimeline.ENTRIES = 3;\r\n PathConstraintMixTimeline.PREV_TIME = -3;\r\n PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n PathConstraintMixTimeline.ROTATE = 1;\r\n PathConstraintMixTimeline.TRANSLATE = 2;\r\n return PathConstraintMixTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationState = (function () {\r\n function AnimationState(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new spine.IntSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n this.data = data;\r\n }\r\n AnimationState.prototype.update = function (delta) {\r\n delta *= this.timeScale;\r\n var tracks = this.tracks;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n var currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n var next = current.next;\r\n if (next != null) {\r\n var nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n }\r\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n var from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null)\r\n from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n var from = to.mixingFrom;\r\n if (from == null)\r\n return true;\r\n var finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n };\r\n AnimationState.prototype.apply = function (skeleton) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n var events = this.events;\r\n var tracks = this.tracks;\r\n var applied = false;\r\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\r\n var current = tracks[i_16];\r\n if (current == null || current.delay > 0)\r\n continue;\r\n applied = true;\r\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\r\n var mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n var timelineCount = current.animation.timelines.length;\r\n var timelines = current.animation.timelines;\r\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n else {\r\n var timelineMode = current.timelineMode;\r\n var firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = current.timelinesRotation;\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n var timeline_1 = timelines[ii];\r\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\r\n if (timeline_1 instanceof spine.RotateTimeline) {\r\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n }\r\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\r\n }\r\n else {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n };\r\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n var from = to.mixingFrom;\r\n if (from.mixingFrom != null)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n var mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == spine.MixBlend.first)\r\n blend = spine.MixBlend.setup;\r\n }\r\n else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != spine.MixBlend.first)\r\n blend = from.mixBlend;\r\n }\r\n var events = mix < from.eventThreshold ? this.events : null;\r\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n var timelineCount = from.animation.timelines.length;\r\n var timelines = from.animation.timelines;\r\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == spine.MixBlend.add) {\r\n for (var i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\r\n }\r\n else {\r\n var timelineMode = from.timelineMode;\r\n var timelineHoldMix = from.timelineHoldMix;\r\n var firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = from.timelinesRotation;\r\n from.totalAlpha = 0;\r\n for (var i = 0; i < timelineCount; i++) {\r\n var timeline = timelines[i];\r\n var direction = spine.MixDirection.mixOut;\r\n var timelineBlend = void 0;\r\n var alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = spine.MixBlend.setup;\r\n var holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof spine.RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n spine.Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\r\n direction = spine.MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n };\r\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = timeline.frames;\r\n if (time < frames[0]) {\r\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n };\r\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n };\r\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\r\n return;\r\n }\r\n var rotateTimeline = timeline;\r\n var frames = rotateTimeline.frames;\r\n var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n var r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case spine.MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case spine.MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n }\r\n else {\r\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n else {\r\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n var total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n }\r\n else {\r\n var lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n }\r\n else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n var current = diff > 0, dir = lastTotal >= 0;\r\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * spine.MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n };\r\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n var duration = animationEnd - animationStart;\r\n var trackLastWrapped = entry.trackLast % duration;\r\n var events = this.events;\r\n var i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n var event_1 = events[i];\r\n if (event_1.time < trackLastWrapped)\r\n break;\r\n if (event_1.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event_1);\r\n }\r\n var complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n var event_2 = events[i];\r\n if (event_2.time < animationStart)\r\n continue;\r\n this.queue.event(entry, events[i]);\r\n }\r\n };\r\n AnimationState.prototype.clearTracks = function () {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.clearTrack = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n var current = this.tracks[trackIndex];\r\n if (current == null)\r\n return;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n var entry = current;\r\n while (true) {\r\n var from = entry.mixingFrom;\r\n if (from == null)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n var from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n if (from != null) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n };\r\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n };\r\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var interrupt = true;\r\n var current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n }\r\n else\r\n this.disposeNext(current);\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n };\r\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n };\r\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n }\r\n else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n var duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n }\r\n else\r\n delay = last.trackTime;\r\n }\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n if (delay <= 0)\r\n delay -= mixDuration;\r\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var current = this.tracks[i];\r\n if (current != null)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.expandToIndex = function (index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n };\r\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n var entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = spine.MixBlend.replace;\r\n return entry;\r\n };\r\n AnimationState.prototype.disposeNext = function (entry) {\r\n var next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n };\r\n AnimationState.prototype._animationsChanged = function () {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var entry = this.tracks[i];\r\n if (entry == null)\r\n continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null);\r\n }\r\n };\r\n AnimationState.prototype.computeHold = function (entry) {\r\n var to = entry.mixingTo;\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n var propertyIDs = this.propertyIDs;\r\n if (to != null && to.holdPrevious) {\r\n for (var i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n outer: for (var i = 0; i < timelinesCount; i++) {\r\n var timeline = timelines[i];\r\n var id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\r\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n }\r\n else {\r\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.getCurrent = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n };\r\n AnimationState.prototype.addListener = function (listener) {\r\n if (listener == null)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n };\r\n AnimationState.prototype.removeListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n };\r\n AnimationState.prototype.clearListeners = function () {\r\n this.listeners.length = 0;\r\n };\r\n AnimationState.prototype.clearListenerNotifications = function () {\r\n this.queue.clear();\r\n };\r\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n AnimationState.SUBSEQUENT = 0;\r\n AnimationState.FIRST = 1;\r\n AnimationState.HOLD_SUBSEQUENT = 2;\r\n AnimationState.HOLD_FIRST = 3;\r\n AnimationState.HOLD_MIX = 4;\r\n AnimationState.SETUP = 1;\r\n AnimationState.CURRENT = 2;\r\n return AnimationState;\r\n }());\r\n spine.AnimationState = AnimationState;\r\n var TrackEntry = (function () {\r\n function TrackEntry() {\r\n this.mixBlend = spine.MixBlend.replace;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n TrackEntry.prototype.reset = function () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n };\r\n TrackEntry.prototype.getAnimationTime = function () {\r\n if (this.loop) {\r\n var duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n };\r\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n };\r\n TrackEntry.prototype.isComplete = function () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n };\r\n TrackEntry.prototype.resetRotationDirections = function () {\r\n this.timelinesRotation.length = 0;\r\n };\r\n return TrackEntry;\r\n }());\r\n spine.TrackEntry = TrackEntry;\r\n var EventQueue = (function () {\r\n function EventQueue(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n EventQueue.prototype.start = function (entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.interrupt = function (entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.end = function (entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.dispose = function (entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.complete = function (entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.event = function (entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n };\r\n EventQueue.prototype.drain = function () {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n var objects = this.objects;\r\n var listeners = this.animState.listeners;\r\n for (var i = 0; i < objects.length; i += 2) {\r\n var type = objects[i];\r\n var entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start)\r\n listeners[ii].start(entry);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt)\r\n listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end)\r\n listeners[ii].end(entry);\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose)\r\n listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete)\r\n listeners[ii].complete(entry);\r\n break;\r\n case EventType.event:\r\n var event_3 = objects[i++ + 2];\r\n if (entry.listener != null && entry.listener.event)\r\n entry.listener.event(entry, event_3);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event)\r\n listeners[ii].event(entry, event_3);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n };\r\n EventQueue.prototype.clear = function () {\r\n this.objects.length = 0;\r\n };\r\n return EventQueue;\r\n }());\r\n spine.EventQueue = EventQueue;\r\n var EventType;\r\n (function (EventType) {\r\n EventType[EventType[\"start\"] = 0] = \"start\";\r\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType[EventType[\"end\"] = 2] = \"end\";\r\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n EventType[EventType[\"event\"] = 5] = \"event\";\r\n })(EventType = spine.EventType || (spine.EventType = {}));\r\n var AnimationStateAdapter = (function () {\r\n function AnimationStateAdapter() {\r\n }\r\n AnimationStateAdapter.prototype.start = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.end = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.dispose = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.complete = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.event = function (entry, event) {\r\n };\r\n return AnimationStateAdapter;\r\n }());\r\n spine.AnimationStateAdapter = AnimationStateAdapter;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationStateData = (function () {\r\n function AnimationStateData(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (skeletonData == null)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n var from = this.skeletonData.findAnimation(fromName);\r\n if (from == null)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n var to = this.skeletonData.findAnimation(toName);\r\n if (to == null)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n };\r\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n if (from == null)\r\n throw new Error(\"from cannot be null.\");\r\n if (to == null)\r\n throw new Error(\"to cannot be null.\");\r\n var key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n };\r\n AnimationStateData.prototype.getMix = function (from, to) {\r\n var key = from.name + \".\" + to.name;\r\n var value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n };\r\n return AnimationStateData;\r\n }());\r\n spine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AssetManager = (function () {\r\n function AssetManager(textureLoader, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.rawDataUris = {};\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n }\r\n AssetManager.prototype.downloadText = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(request.responseText);\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.downloadBinary = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(new Uint8Array(request.response));\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.setRawDataURI = function (path, data) {\r\n this.rawDataUris[this.pathPrefix + path] = data;\r\n };\r\n AssetManager.prototype.loadBinary = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadBinary(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadText = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadTexture = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n var storagePath = path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[storagePath] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \".concat(path));\r\n };\r\n if (this.rawDataUris[path])\r\n path = this.rawDataUris[path];\r\n img.src = path;\r\n };\r\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (atlasData) {\r\n var pagesLoaded = { count: 0 };\r\n var atlasPages = new Array();\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\r\n var image = document.createElement(\"img\");\r\n image.width = 16;\r\n image.height = 16;\r\n return new spine.FakeTexture(image);\r\n });\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n return;\r\n }\r\n var _loop_1 = function (atlasPage) {\r\n var pageLoadError = false;\r\n _this.loadTexture(atlasPage, function (imagePath, image) {\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n if (!pageLoadError) {\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\r\n });\r\n _this.assets[path] = atlas;\r\n if (success)\r\n success(path, atlas);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(path));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n }, function (imagePath, errorMessage) {\r\n pageLoadError = true;\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(path));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n });\r\n };\r\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n var atlasPage = atlasPages_1[_i];\r\n _loop_1(atlasPage);\r\n }\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.get = function (path) {\r\n path = this.pathPrefix + path;\r\n return this.assets[path];\r\n };\r\n AssetManager.prototype.remove = function (path) {\r\n path = this.pathPrefix + path;\r\n var asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n this.assets[path] = null;\r\n };\r\n AssetManager.prototype.removeAll = function () {\r\n for (var key in this.assets) {\r\n var asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n };\r\n AssetManager.prototype.isLoadingComplete = function () {\r\n return this.toLoad == 0;\r\n };\r\n AssetManager.prototype.getToLoad = function () {\r\n return this.toLoad;\r\n };\r\n AssetManager.prototype.getLoaded = function () {\r\n return this.loaded;\r\n };\r\n AssetManager.prototype.dispose = function () {\r\n this.removeAll();\r\n };\r\n AssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n AssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return AssetManager;\r\n }());\r\n spine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AtlasAttachmentLoader = (function () {\r\n function AtlasAttachmentLoader(atlas) {\r\n this.atlas = atlas;\r\n }\r\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.RegionAttachment(name);\r\n attachment.setRegion(region);\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n return new spine.BoundingBoxAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n return new spine.PathAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n return new spine.PointAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n return new spine.ClippingAttachment(name);\r\n };\r\n return AtlasAttachmentLoader;\r\n }());\r\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BlendMode;\r\n (function (BlendMode) {\r\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Bone = (function () {\r\n function Bone(data, skeleton, parent) {\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.appliedValid = false;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n Bone.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n Bone.prototype.update = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransform = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n var skeleton = this.skeleton;\r\n var rotationY = rotation + 90 + shearY;\r\n var sx = skeleton.scaleX;\r\n var sy = skeleton.scaleY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case spine.TransformMode.Normal: {\r\n var rotationY = rotation + 90 + shearY;\r\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case spine.TransformMode.OnlyTranslation: {\r\n var rotationY = rotation + 90 + shearY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case spine.TransformMode.NoRotationOrReflection: {\r\n var s = pa * pa + pc * pc;\r\n var prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n }\r\n var rx = rotation + shearX - prx;\r\n var ry = rotation + shearY - prx + 90;\r\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection: {\r\n var cos = spine.MathUtils.cosDeg(rotation);\r\n var sin = spine.MathUtils.sinDeg(rotation);\r\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n var s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == spine.TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n var r = Math.PI / 2 + Math.atan2(zc, za);\r\n var zb = Math.cos(r) * s;\r\n var zd = Math.sin(r) * s;\r\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n };\r\n Bone.prototype.setToSetupPose = function () {\r\n var data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n };\r\n Bone.prototype.getWorldRotationX = function () {\r\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldRotationY = function () {\r\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldScaleX = function () {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n };\r\n Bone.prototype.getWorldScaleY = function () {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n };\r\n Bone.prototype.updateAppliedTransform = function () {\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n this.ax = this.worldX;\r\n this.ay = this.worldY;\r\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n var pid = 1 / (pa * pd - pb * pc);\r\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = (dx * pd * pid - dy * pb * pid);\r\n this.ay = (dy * pa * pid - dx * pc * pid);\r\n var ia = pid * pd;\r\n var id = pid * pa;\r\n var ib = pid * pb;\r\n var ic = pid * pc;\r\n var ra = ia * this.a - ib * this.c;\r\n var rb = ia * this.b - ib * this.d;\r\n var rc = id * this.c - ic * this.a;\r\n var rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n var det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n }\r\n };\r\n Bone.prototype.worldToLocal = function (world) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var invDet = 1 / (a * d - b * c);\r\n var x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n };\r\n Bone.prototype.localToWorld = function (local) {\r\n var x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n };\r\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\r\n };\r\n Bone.prototype.localToWorldRotation = function (localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.rotateWorld = function (degrees) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n };\r\n return Bone;\r\n }());\r\n spine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoneData = (function () {\r\n function BoneData(index, name, parent) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new spine.Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n return BoneData;\r\n }());\r\n spine.BoneData = BoneData;\r\n var TransformMode;\r\n (function (TransformMode) {\r\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ConstraintData = (function () {\r\n function ConstraintData(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n return ConstraintData;\r\n }());\r\n spine.ConstraintData = ConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Event = (function () {\r\n function Event(time, data) {\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n return Event;\r\n }());\r\n spine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var EventData = (function () {\r\n function EventData(name) {\r\n this.name = name;\r\n }\r\n return EventData;\r\n }());\r\n spine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraint = (function () {\r\n function IkConstraint(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n IkConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n IkConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n IkConstraint.prototype.update = function () {\r\n var target = this.target;\r\n var bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n };\r\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var p = bone.parent;\r\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case spine.TransformMode.NoRotationOrReflection:\r\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n var sa = pa / bone.skeleton.scaleX;\r\n var sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\r\n default:\r\n var x = targetX - p.worldX, y = targetY - p.worldY;\r\n var d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n var sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n var s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n };\r\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid)\r\n parent.updateAppliedTransform();\r\n if (!child.appliedValid)\r\n child.updateAppliedTransform();\r\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n var os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n }\r\n else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n }\r\n else\r\n os2 = 0;\r\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n var u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n }\r\n else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n var pp = parent.parent;\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n var dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n var p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer: if (u) {\r\n l2 *= psx;\r\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch)\r\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n }\r\n else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n var c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n var q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) / 2;\r\n var r0 = q / c2, r1 = c / q;\r\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n }\r\n else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n var os = Math.atan2(cy, cx) * s2;\r\n var rotation = parent.arotation;\r\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n };\r\n return IkConstraint;\r\n }());\r\n spine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraintData = (function (_super) {\r\n __extends(IkConstraintData, _super);\r\n function IkConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.bendDirection = 1;\r\n _this.compress = false;\r\n _this.stretch = false;\r\n _this.uniform = false;\r\n _this.mix = 1;\r\n _this.softness = 0;\r\n return _this;\r\n }\r\n return IkConstraintData;\r\n }(spine.ConstraintData));\r\n spine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraint = (function () {\r\n function PathConstraint(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n PathConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n PathConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n PathConstraint.prototype.update = function () {\r\n var attachment = this.target.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n var translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate)\r\n return;\r\n var data = this.data;\r\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\r\n var rotateMode = data.rotateMode;\r\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n var bones = this.bones;\r\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n var spacing = this.spacing;\r\n if (scale || !percentSpacing) {\r\n if (scale)\r\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\r\n for (var i = 0, n = spacesCount - 1; i < n;) {\r\n var bone = bones[i];\r\n var setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = 0;\r\n }\r\n else if (percentSpacing) {\r\n if (scale) {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_1 = Math.sqrt(x * x + y * y);\r\n lengths[i] = length_1;\r\n }\r\n spaces[++i] = spacing;\r\n }\r\n else {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_2 = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length_2;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\r\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n var tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == spine.RotateMode.Chain;\r\n else {\r\n tip = false;\r\n var p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n }\r\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n var bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * translateMix;\r\n bone.worldY += (boneY - bone.worldY) * translateMix;\r\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n var length_3 = lengths[i];\r\n if (length_3 != 0) {\r\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n var length_4 = bone.data.length;\r\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\r\n }\r\n else {\r\n r += offsetRotation;\r\n }\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n };\r\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n var target = this.target;\r\n var position = this.position;\r\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n var closed = path.closed;\r\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n var lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n var pathLength_1 = lengths[curveCount];\r\n if (percentPosition)\r\n position *= pathLength_1;\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength_1;\r\n }\r\n world = spine.Utils.setArraySize(this.world, 8);\r\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength_1;\r\n if (p < 0)\r\n p += pathLength_1;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength_1) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_5 = lengths[curve];\r\n if (p > length_5)\r\n continue;\r\n if (curve == 0)\r\n p /= length_5;\r\n else {\r\n var prev = lengths[curve - 1];\r\n p = (p - prev) / (length_5 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n }\r\n else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n if (closed) {\r\n verticesLength += 2;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n }\r\n else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n var pathLength = 0;\r\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition)\r\n position *= pathLength;\r\n else\r\n position *= pathLength / path.lengths[curveCount - 1];\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n var segments = this.segments;\r\n var curveLength = 0;\r\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_6 = curves[curve];\r\n if (p > length_6)\r\n continue;\r\n if (curve == 0)\r\n p /= length_6;\r\n else {\r\n var prev = curves[curve - 1];\r\n p = (p - prev) / (length_6 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n var ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (;; segment++) {\r\n var length_7 = segments[segment];\r\n if (p > length_7)\r\n continue;\r\n if (segment == 0)\r\n p /= length_7;\r\n else {\r\n var prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length_7 - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n };\r\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 0.001)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n };\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 0.00001;\r\n return PathConstraint;\r\n }());\r\n spine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraintData = (function (_super) {\r\n __extends(PathConstraintData, _super);\r\n function PathConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n return _this;\r\n }\r\n return PathConstraintData;\r\n }(spine.ConstraintData));\r\n spine.PathConstraintData = PathConstraintData;\r\n var PositionMode;\r\n (function (PositionMode) {\r\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n var SpacingMode;\r\n (function (SpacingMode) {\r\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n var RotateMode;\r\n (function (RotateMode) {\r\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Assets = (function () {\r\n function Assets(clientId) {\r\n this.toLoad = new Array();\r\n this.assets = {};\r\n this.clientId = clientId;\r\n }\r\n Assets.prototype.loaded = function () {\r\n var i = 0;\r\n for (var v in this.assets)\r\n i++;\r\n return i;\r\n };\r\n return Assets;\r\n }());\r\n var SharedAssetManager = (function () {\r\n function SharedAssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.clientAssets = {};\r\n this.queuedAssets = {};\r\n this.rawAssets = {};\r\n this.errors = {};\r\n this.pathPrefix = pathPrefix;\r\n }\r\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined) {\r\n clientAssets = new Assets(clientId);\r\n this.clientAssets[clientId] = clientAssets;\r\n }\r\n if (textureLoader !== null)\r\n clientAssets.textureLoader = textureLoader;\r\n clientAssets.toLoad.push(path);\r\n if (this.queuedAssets[path] === path) {\r\n return false;\r\n }\r\n else {\r\n this.queuedAssets[path] = path;\r\n return true;\r\n }\r\n };\r\n SharedAssetManager.prototype.loadText = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = request.responseText;\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(request.status, \", \").concat(request.responseText);\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = JSON.parse(request.responseText);\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(request.status, \", \").concat(request.responseText);\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, textureLoader, path))\r\n return;\r\n var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n if (isWebWorker) {\r\n var options = { mode: \"cors\" };\r\n fetch(path, options).then(function (response) {\r\n if (!response.ok) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n }\r\n return response.blob();\r\n }).then(function (blob) {\r\n return createImageBitmap(blob, {\r\n premultiplyAlpha: 'none',\r\n colorSpaceConversion: 'none'\r\n });\r\n }).then(function (bitmap) {\r\n _this.rawAssets[path] = bitmap;\r\n });\r\n }\r\n else {\r\n var img_1 = new Image();\r\n img_1.crossOrigin = \"anonymous\";\r\n img_1.onload = function (ev) {\r\n _this.rawAssets[path] = img_1;\r\n };\r\n img_1.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n };\r\n img_1.src = path;\r\n }\r\n };\r\n SharedAssetManager.prototype.get = function (clientId, path) {\r\n path = this.pathPrefix + path;\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n return clientAssets.assets[path];\r\n };\r\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n var path = clientAssets.toLoad[i];\r\n var asset = clientAssets.assets[path];\r\n if (asset === null || asset === undefined) {\r\n var rawAsset = this.rawAssets[path];\r\n if (rawAsset === null || rawAsset === undefined)\r\n continue;\r\n if (isWebWorker) {\r\n if (rawAsset instanceof ImageBitmap) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n else {\r\n if (rawAsset instanceof HTMLImageElement) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n this.updateClientAssets(clientAssets);\r\n return clientAssets.toLoad.length == clientAssets.loaded();\r\n };\r\n SharedAssetManager.prototype.dispose = function () {\r\n };\r\n SharedAssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n SharedAssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return SharedAssetManager;\r\n }());\r\n spine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Skeleton = (function () {\r\n function Skeleton(data) {\r\n this._updateCache = new Array();\r\n this.updateCacheReset = new Array();\r\n this.time = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++) {\r\n var boneData = data.bones[i];\r\n var bone = void 0;\r\n if (boneData.parent == null)\r\n bone = new spine.Bone(boneData, this, null);\r\n else {\r\n var parent_1 = this.bones[boneData.parent.index];\r\n bone = new spine.Bone(boneData, this, parent_1);\r\n parent_1.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (var i = 0; i < data.slots.length; i++) {\r\n var slotData = data.slots[i];\r\n var bone = this.bones[slotData.boneData.index];\r\n var slot = new spine.Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (var i = 0; i < data.ikConstraints.length; i++) {\r\n var ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (var i = 0; i < data.transformConstraints.length; i++) {\r\n var transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (var i = 0; i < data.pathConstraints.length; i++) {\r\n var pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n Skeleton.prototype.updateCache = function () {\r\n var updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin != null) {\r\n var skinBones = this.skin.bones;\r\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n var bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n var ikConstraints = this.ikConstraints;\r\n var transformConstraints = this.transformConstraints;\r\n var pathConstraints = this.pathConstraints;\r\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n var constraintCount = ikCount + transformCount + pathCount;\r\n outer: for (var i = 0; i < constraintCount; i++) {\r\n for (var ii = 0; ii < ikCount; ii++) {\r\n var constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < transformCount; ii++) {\r\n var constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < pathCount; ii++) {\r\n var constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n };\r\n Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var target = constraint.target;\r\n this.sortBone(target);\r\n var constrained = constraint.bones;\r\n var parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length > 1) {\r\n var child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var slot = constraint.target;\r\n var slotIndex = slot.data.index;\r\n var slotBone = slot.bone;\r\n if (this.skin != null)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (var i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n };\r\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (var i = 0; i < boneCount; i++) {\r\n var child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n var attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (var key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var pathBones = attachment.bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n var bones = this.bones;\r\n var i = 0;\r\n while (i < pathBones.length) {\r\n var boneCount = pathBones[i++];\r\n for (var n = i + boneCount; i < n; i++) {\r\n var boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n };\r\n Skeleton.prototype.sortBone = function (bone) {\r\n if (bone.sorted)\r\n return;\r\n var parent = bone.parent;\r\n if (parent != null)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n };\r\n Skeleton.prototype.sortReset = function (bones) {\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n };\r\n Skeleton.prototype.updateWorldTransform = function () {\r\n var updateCacheReset = this.updateCacheReset;\r\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n var bone = updateCacheReset[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n var updateCache = this._updateCache;\r\n for (var i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n };\r\n Skeleton.prototype.setToSetupPose = function () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n };\r\n Skeleton.prototype.setBonesToSetupPose = function () {\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n var data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n };\r\n Skeleton.prototype.setSlotsToSetupPose = function () {\r\n var slots = this.slots;\r\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n };\r\n Skeleton.prototype.getRootBone = function () {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n };\r\n Skeleton.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.setSkinByName = function (skinName) {\r\n var skin = this.data.findSkin(skinName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n };\r\n Skeleton.prototype.setSkin = function (newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var name_1 = slot.data.attachmentName;\r\n if (name_1 != null) {\r\n var attachment = newSkin.getAttachment(i, name_1);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n };\r\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n };\r\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n if (attachmentName == null)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin != null)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n };\r\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n var attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n };\r\n Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n if (temp === void 0) { temp = new Array(2); }\r\n if (offset == null)\r\n throw new Error(\"offset cannot be null.\");\r\n if (size == null)\r\n throw new Error(\"size cannot be null.\");\r\n var drawOrder = this.drawOrder;\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var verticesLength = 0;\r\n var vertices = null;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n };\r\n Skeleton.prototype.update = function (delta) {\r\n this.time += delta;\r\n };\r\n return Skeleton;\r\n }());\r\n spine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBinary = (function () {\r\n function SkeletonBinary(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n skeletonData.name = \"\";\r\n var input = new BinaryInput(binary);\r\n skeletonData.hash = input.readString();\r\n skeletonData.version = input.readString();\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n var nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n var n = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n input.strings.push(input.readString());\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var name_2 = input.readString();\r\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n var data = new spine.BoneData(i, name_2, parent_2);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var slotName = input.readString();\r\n var boneData = skeletonData.bones[input.readInt(true)];\r\n var data = new spine.SlotData(i, slotName, boneData);\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n var darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.IkConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.TransformConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n data.scaleMix = input.readFloat();\r\n data.shearMix = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.PathConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin != null) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n var i = skeletonData.skins.length;\r\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++)\r\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n }\r\n n = this.linkedMeshes.length;\r\n for (var i = 0; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_3 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_3);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var data = new spine.EventData(input.readStringRef());\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath != null) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n return skeletonData;\r\n };\r\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n var skin = null;\r\n var slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new spine.Skin(\"default\");\r\n }\r\n else {\r\n skin = new spine.Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (var i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (var i = 0; i < slotCount; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var name_3 = input.readStringRef();\r\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\r\n if (attachment != null)\r\n skin.setAttachment(slotIndex, name_3, attachment);\r\n }\r\n }\r\n return skin;\r\n };\r\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n var scale = this.scale;\r\n var name = input.readStringRef();\r\n if (name == null)\r\n name = attachmentName;\r\n var typeIndex = input.readByte();\r\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n switch (type) {\r\n case spine.AttachmentType.Region: {\r\n var path = input.readStringRef();\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var scaleX = input.readFloat();\r\n var scaleY = input.readFloat();\r\n var width = input.readFloat();\r\n var height = input.readFloat();\r\n var color = input.readInt32();\r\n if (path == null)\r\n path = name;\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n spine.Color.rgba8888ToColor(region.color, color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case spine.AttachmentType.BoundingBox: {\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case spine.AttachmentType.Mesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var vertexCount = input.readInt(true);\r\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n var triangles = this.readShortArray(input);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var hullLength = input.readInt(true);\r\n var edges = null;\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.hullLength = hullLength << 1;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case spine.AttachmentType.LinkedMesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var skinName = input.readStringRef();\r\n var parent_4 = input.readStringRef();\r\n var inheritDeform = input.readBoolean();\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\r\n return mesh;\r\n }\r\n case spine.AttachmentType.Path: {\r\n var closed_1 = input.readBoolean();\r\n var constantSpeed = input.readBoolean();\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n var color = nonessential ? input.readInt32() : 0;\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = closed_1;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case spine.AttachmentType.Point: {\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var color = nonessential ? input.readInt32() : 0;\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case spine.AttachmentType.Clipping: {\r\n var endSlotIndex = input.readInt(true);\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n var verticesLength = vertexCount << 1;\r\n var vertices = new Vertices();\r\n var scale = this.scale;\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n var weights = new Array();\r\n var bonesArray = new Array();\r\n for (var i = 0; i < vertexCount; i++) {\r\n var boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (var ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = spine.Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n };\r\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n var array = new Array(n);\r\n if (scale == 1) {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n }\r\n else {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readShortArray = function (input) {\r\n var n = input.readInt(true);\r\n var array = new Array(n);\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n var timelines = new Array();\r\n var scale = this.scale;\r\n var duration = 0;\r\n var tempColor1 = new spine.Color();\r\n var tempColor2 = new spine.Color();\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.SLOT_ATTACHMENT: {\r\n var timeline = new spine.AttachmentTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_COLOR: {\r\n var timeline = new spine.ColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_TWO_COLOR: {\r\n var timeline = new spine.TwoColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var boneIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.BONE_ROTATE: {\r\n var timeline = new spine.RotateTimeline(frameCount);\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.BONE_TRANSLATE:\r\n case SkeletonBinary.BONE_SCALE:\r\n case SkeletonBinary.BONE_SHEAR: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.BONE_SCALE)\r\n timeline = new spine.ScaleTimeline(frameCount);\r\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n timeline = new spine.ShearTimeline(frameCount);\r\n else {\r\n timeline = new spine.TranslateTimeline(frameCount);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.IkConstraintTimeline(frameCount);\r\n timeline.ikConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.TransformConstraintTimeline(frameCount);\r\n timeline.transformConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.PATH_POSITION:\r\n case SkeletonBinary.PATH_SPACING: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.PATH_MIX: {\r\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var skin = skeletonData.skins[input.readInt(true)];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var slotIndex = input.readInt(true);\r\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.DeformTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n var deform = void 0;\r\n var end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n }\r\n else {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (var v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, time, deform);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n }\r\n }\r\n }\r\n var drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\r\n var slotCount = skeletonData.slots.length;\r\n for (var i = 0; i < drawOrderCount; i++) {\r\n var time = input.readFloat();\r\n var offsetCount = input.readInt(true);\r\n var drawOrder = spine.Utils.newArray(slotCount, 0);\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var ii = 0; ii < offsetCount; ii++) {\r\n var slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n }\r\n var eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n var timeline = new spine.EventTimeline(eventCount);\r\n for (var i = 0; i < eventCount; i++) {\r\n var time = input.readFloat();\r\n var eventData = skeletonData.events[input.readInt(true)];\r\n var event_4 = new spine.Event(time, eventData);\r\n event_4.intValue = input.readInt(false);\r\n event_4.floatValue = input.readFloat();\r\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event_4.data.audioPath != null) {\r\n event_4.volume = input.readFloat();\r\n event_4.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event_4);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n }\r\n return new spine.Animation(name, timelines, duration);\r\n };\r\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n switch (input.readByte()) {\r\n case SkeletonBinary.CURVE_STEPPED:\r\n timeline.setStepped(frameIndex);\r\n break;\r\n case SkeletonBinary.CURVE_BEZIER:\r\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n break;\r\n }\r\n };\r\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n };\r\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\r\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\r\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\r\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\r\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\r\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\r\n SkeletonBinary.BONE_ROTATE = 0;\r\n SkeletonBinary.BONE_TRANSLATE = 1;\r\n SkeletonBinary.BONE_SCALE = 2;\r\n SkeletonBinary.BONE_SHEAR = 3;\r\n SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n SkeletonBinary.SLOT_COLOR = 1;\r\n SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n SkeletonBinary.PATH_POSITION = 0;\r\n SkeletonBinary.PATH_SPACING = 1;\r\n SkeletonBinary.PATH_MIX = 2;\r\n SkeletonBinary.CURVE_LINEAR = 0;\r\n SkeletonBinary.CURVE_STEPPED = 1;\r\n SkeletonBinary.CURVE_BEZIER = 2;\r\n return SkeletonBinary;\r\n }());\r\n spine.SkeletonBinary = SkeletonBinary;\r\n var BinaryInput = (function () {\r\n function BinaryInput(data, strings, index, buffer) {\r\n if (strings === void 0) { strings = new Array(); }\r\n if (index === void 0) { index = 0; }\r\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n BinaryInput.prototype.readByte = function () {\r\n return this.buffer.getInt8(this.index++);\r\n };\r\n BinaryInput.prototype.readShort = function () {\r\n var value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt32 = function () {\r\n var value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt = function (optimizePositive) {\r\n var b = this.readByte();\r\n var result = b & 0x7F;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 7;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 14;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 21;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n };\r\n BinaryInput.prototype.readStringRef = function () {\r\n var index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n };\r\n BinaryInput.prototype.readString = function () {\r\n var byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n var chars = \"\";\r\n var charCount = 0;\r\n for (var i = 0; i < byteCount;) {\r\n var b = this.readByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n };\r\n BinaryInput.prototype.readFloat = function () {\r\n var value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readBoolean = function () {\r\n return this.readByte() != 0;\r\n };\r\n return BinaryInput;\r\n }());\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n var Vertices = (function () {\r\n function Vertices(bones, vertices) {\r\n if (bones === void 0) { bones = null; }\r\n if (vertices === void 0) { vertices = null; }\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n return Vertices;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBounds = (function () {\r\n function SkeletonBounds() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return spine.Utils.newFloatArray(16);\r\n });\r\n }\r\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n var boundingBoxes = this.boundingBoxes;\r\n var polygons = this.polygons;\r\n var polygonPool = this.polygonPool;\r\n var slots = skeleton.slots;\r\n var slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (var i = 0; i < slotCount; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.BoundingBoxAttachment) {\r\n var boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n var polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n }\r\n else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n };\r\n SkeletonBounds.prototype.aabbCompute = function () {\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n var vertices = polygon;\r\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n var x = vertices[ii];\r\n var y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n };\r\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n var minX = this.minX;\r\n var minY = this.minY;\r\n var maxX = this.maxX;\r\n var maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n var m = (y2 - y1) / (x2 - x1);\r\n var y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n var x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n };\r\n SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var prevIndex = nn - 2;\r\n var inside = false;\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var vertexY = vertices[ii + 1];\r\n var prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n var vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n };\r\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var width12 = x1 - x2, height12 = y1 - y2;\r\n var det1 = x1 * y2 - y1 * x2;\r\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n var det2 = x3 * y4 - y3 * x4;\r\n var width34 = x3 - x4, height34 = y3 - y4;\r\n var det3 = width12 * height34 - height12 * width34;\r\n var x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n var y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n };\r\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n if (boundingBox == null)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n var index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n };\r\n SkeletonBounds.prototype.getWidth = function () {\r\n return this.maxX - this.minX;\r\n };\r\n SkeletonBounds.prototype.getHeight = function () {\r\n return this.maxY - this.minY;\r\n };\r\n return SkeletonBounds;\r\n }());\r\n spine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonClipping = (function () {\r\n function SkeletonClipping() {\r\n this.triangulator = new spine.Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n }\r\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n if (this.clipAttachment != null)\r\n return 0;\r\n this.clipAttachment = clip;\r\n var n = clip.worldVerticesLength;\r\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n var clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\r\n var polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n };\r\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n };\r\n SkeletonClipping.prototype.clipEnd = function () {\r\n if (this.clipAttachment == null)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n };\r\n SkeletonClipping.prototype.isClipping = function () {\r\n return this.clipAttachment != null;\r\n };\r\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n var clippedTriangles = this.clippedTriangles;\r\n var polygons = this.clippingPolygons;\r\n var polygonsCount = this.clippingPolygons.length;\r\n var vertexSize = twoColor ? 12 : 8;\r\n var index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer: for (var i = 0; i < trianglesLength; i += 3) {\r\n var vertexOffset = triangles[i] << 1;\r\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (var p = 0; p < polygonsCount; p++) {\r\n var s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n var clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n var clipOutputCount = clipOutputLength >> 1;\r\n var clipOutputItems = this.clipOutput;\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n var c0 = x - x3, c1 = y - y3;\r\n var a = (d0 * c0 + d1 * c1) * d;\r\n var b = (d4 * c0 + d2 * c1) * d;\r\n var c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (var ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + ii);\r\n clippedTrianglesItems[s + 2] = (index + ii + 1);\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n }\r\n else {\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n }\r\n else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + 1);\r\n clippedTrianglesItems[s + 2] = (index + 2);\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n };\r\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n var originalOutput = output;\r\n var clipped = false;\r\n var input = null;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n }\r\n else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n var clippingVertices = clippingArea;\r\n var clippingVerticesLast = clippingArea.length - 4;\r\n for (var i = 0;; i += 2) {\r\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n var inputVertices = input;\r\n var inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n }\r\n else if (side2) {\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n var temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (var i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n }\r\n else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n };\r\n SkeletonClipping.makeClockwise = function (polygon) {\r\n var vertices = polygon;\r\n var verticeslength = polygon.length;\r\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n var x = vertices[i], y = vertices[i + 1];\r\n var other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n };\r\n return SkeletonClipping;\r\n }());\r\n spine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonData = (function () {\r\n function SkeletonData() {\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.fps = 0;\r\n }\r\n SkeletonData.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSkin = function (skinName) {\r\n if (skinName == null)\r\n throw new Error(\"skinName cannot be null.\");\r\n var skins = this.skins;\r\n for (var i = 0, n = skins.length; i < n; i++) {\r\n var skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findEvent = function (eventDataName) {\r\n if (eventDataName == null)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n var events = this.events;\r\n for (var i = 0, n = events.length; i < n; i++) {\r\n var event_5 = events[i];\r\n if (event_5.name == eventDataName)\r\n return event_5;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findAnimation = function (animationName) {\r\n if (animationName == null)\r\n throw new Error(\"animationName cannot be null.\");\r\n var animations = this.animations;\r\n for (var i = 0, n = animations.length; i < n; i++) {\r\n var animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n if (pathConstraintName == null)\r\n throw new Error(\"pathConstraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName)\r\n return i;\r\n return -1;\r\n };\r\n return SkeletonData;\r\n }());\r\n spine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonJson = (function () {\r\n function SkeletonJson(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonJson.prototype.readSkeletonData = function (json) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n var skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (var i = 0; i < root.bones.length; i++) {\r\n var boneMap = root.bones[i];\r\n var parent_5 = null;\r\n var parentName = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent_5 = skeletonData.findBone(parentName);\r\n if (parent_5 == null)\r\n throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (var i = 0; i < root.slots.length; i++) {\r\n var slotMap = root.slots[i];\r\n var slotName = slotMap.name;\r\n var boneName = slotMap.bone;\r\n var boneData = skeletonData.findBone(boneName);\r\n if (boneData == null)\r\n throw new Error(\"Slot bone not found: \" + boneName);\r\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n var color = this.getValue(slotMap, \"color\", null);\r\n if (color != null)\r\n data.color.setFromString(color);\r\n var dark = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new spine.Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (var i = 0; i < root.ik.length; i++) {\r\n var constraintMap = root.ik[i];\r\n var data = new spine.IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"IK target bone not found: \" + targetName);\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (var i = 0; i < root.transform.length; i++) {\r\n var constraintMap = root.transform[i];\r\n var data = new spine.TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (var i = 0; i < root.path.length; i++) {\r\n var constraintMap = root.path[i];\r\n var data = new spine.PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Path target slot not found: \" + targetName);\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (var i = 0; i < root.skins.length; i++) {\r\n var skinMap = root.skins[i];\r\n var skin = new spine.Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null)\r\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (var slotName in skinMap.attachments) {\r\n var slot = skeletonData.findSlot(slotName);\r\n if (slot == null)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n var slotMap = skinMap.attachments[slotName];\r\n for (var entryName in slotMap) {\r\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_6 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_6);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (var eventName in root.events) {\r\n var eventMap = root.events[eventName];\r\n var data = new spine.EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (var animationName in root.animations) {\r\n var animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n };\r\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n var scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n var type = this.getValue(map, \"type\", \"region\");\r\n switch (type) {\r\n case \"region\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n region.color.setFromString(color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n mesh.color.setFromString(color);\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n var parent_7 = this.getValue(map, \"parent\", null);\r\n if (parent_7 != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n var uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n var end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n var slot = skeletonData.findSlot(end);\r\n if (slot == null)\r\n throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n var scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n var vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n var scaledVertices = spine.Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (var i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n var weights = new Array();\r\n var bones = new Array();\r\n for (var i = 0, n = vertices.length; i < n;) {\r\n var boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = spine.Utils.toFloatArray(weights);\r\n };\r\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n var scale = this.scale;\r\n var timelines = new Array();\r\n var duration = 0;\r\n if (map.slots) {\r\n for (var slotName in map.slots) {\r\n var slotMap = map.slots[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n else if (timelineName == \"color\") {\r\n var timeline = new spine.ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var color = new spine.Color();\r\n color.setFromString(valueMap.color);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n }\r\n else if (timelineName == \"twoColor\") {\r\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var light = new spine.Color();\r\n var dark = new spine.Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (var boneName in map.bones) {\r\n var boneMap = map.bones[boneName];\r\n var boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n for (var timelineName in boneMap) {\r\n var timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n var timeline = new spine.RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n var timeline = null;\r\n var timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new spine.ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n }\r\n else if (timelineName === \"shear\")\r\n timeline = new spine.ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new spine.TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (var constraintName in map.ik) {\r\n var constraintMap = map.ik[constraintName];\r\n var constraint = skeletonData.findIkConstraint(constraintName);\r\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.transform) {\r\n for (var constraintName in map.transform) {\r\n var constraintMap = map.transform[constraintName];\r\n var constraint = skeletonData.findTransformConstraint(constraintName);\r\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.path) {\r\n for (var constraintName in map.path) {\r\n var constraintMap = map.path[constraintName];\r\n var index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var timelineName in constraintMap) {\r\n var timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n var timeline = null;\r\n var timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"mix\") {\r\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n if (map.deform) {\r\n for (var deformName in map.deform) {\r\n var deformMap = map.deform[deformName];\r\n var skin = skeletonData.findSkin(deformName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + deformName);\r\n for (var slotName in deformMap) {\r\n var slotMap = deformMap[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n var attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null)\r\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var timeline = new spine.DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n var frameIndex = 0;\r\n for (var j = 0; j < timelineMap.length; j++) {\r\n var valueMap = timelineMap[j];\r\n var deform = void 0;\r\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = this.getValue(valueMap, \"offset\", 0);\r\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (var i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n var drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null)\r\n drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n var slotCount = skeletonData.slots.length;\r\n var frameIndex = 0;\r\n for (var j = 0; j < drawOrderNode.length; j++) {\r\n var drawOrderMap = drawOrderNode[j];\r\n var drawOrder = null;\r\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = spine.Utils.newArray(slotCount, -1);\r\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var i = 0; i < offsets.length; i++) {\r\n var offsetMap = offsets[i];\r\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1)\r\n drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (map.events) {\r\n var timeline = new spine.EventTimeline(map.events.length);\r\n var frameIndex = 0;\r\n for (var i = 0; i < map.events.length; i++) {\r\n var eventMap = map.events[i];\r\n var eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event_6.data.audioPath != null) {\r\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\r\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event_6);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n };\r\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n if (!map.hasOwnProperty(\"curve\"))\r\n return;\r\n if (map.curve == \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n var curve = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n };\r\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n };\r\n SkeletonJson.blendModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.BlendMode.Normal;\r\n if (str == \"additive\")\r\n return spine.BlendMode.Additive;\r\n if (str == \"multiply\")\r\n return spine.BlendMode.Multiply;\r\n if (str == \"screen\")\r\n return spine.BlendMode.Screen;\r\n throw new Error(\"Unknown blend mode: \".concat(str));\r\n };\r\n SkeletonJson.positionModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\")\r\n return spine.PositionMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.PositionMode.Percent;\r\n throw new Error(\"Unknown position mode: \".concat(str));\r\n };\r\n SkeletonJson.spacingModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"length\")\r\n return spine.SpacingMode.Length;\r\n if (str == \"fixed\")\r\n return spine.SpacingMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.SpacingMode.Percent;\r\n throw new Error(\"Unknown position mode: \".concat(str));\r\n };\r\n SkeletonJson.rotateModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\")\r\n return spine.RotateMode.Tangent;\r\n if (str == \"chain\")\r\n return spine.RotateMode.Chain;\r\n if (str == \"chainscale\")\r\n return spine.RotateMode.ChainScale;\r\n throw new Error(\"Unknown rotate mode: \".concat(str));\r\n };\r\n SkeletonJson.transformModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.TransformMode.Normal;\r\n if (str == \"onlytranslation\")\r\n return spine.TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\")\r\n return spine.TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\")\r\n return spine.TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\")\r\n return spine.TransformMode.NoScaleOrReflection;\r\n throw new Error(\"Unknown transform mode: \".concat(str));\r\n };\r\n return SkeletonJson;\r\n }());\r\n spine.SkeletonJson = SkeletonJson;\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkinEntry = (function () {\r\n function SkinEntry(slotIndex, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n return SkinEntry;\r\n }());\r\n spine.SkinEntry = SkinEntry;\r\n var Skin = (function () {\r\n function Skin(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n if (attachment == null)\r\n throw new Error(\"attachment cannot be null.\");\r\n var attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n };\r\n Skin.prototype.addSkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n };\r\n Skin.prototype.copySkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null)\r\n continue;\r\n if (attachment.attachment instanceof spine.MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n };\r\n Skin.prototype.getAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n };\r\n Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n dictionary[name] = null;\r\n };\r\n Skin.prototype.getAttachments = function () {\r\n var entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n var slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (var name_4 in slotAttachments) {\r\n var attachment = slotAttachments[name_4];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name_4, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n };\r\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n var slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (var name_5 in slotAttachments) {\r\n var attachment = slotAttachments[name_5];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\r\n }\r\n }\r\n };\r\n Skin.prototype.clear = function () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n };\r\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n var slotIndex = 0;\r\n for (var i = 0; i < skeleton.slots.length; i++) {\r\n var slot = skeleton.slots[i];\r\n var slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n var dictionary = oldSkin.attachments[slotIndex];\r\n for (var key in dictionary) {\r\n var skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n var attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n };\r\n return Skin;\r\n }());\r\n spine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Slot = (function () {\r\n function Slot(data, bone) {\r\n this.deform = new Array();\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (bone == null)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new spine.Color();\r\n this.darkColor = data.darkColor == null ? null : new spine.Color();\r\n this.setToSetupPose();\r\n }\r\n Slot.prototype.getSkeleton = function () {\r\n return this.bone.skeleton;\r\n };\r\n Slot.prototype.getAttachment = function () {\r\n return this.attachment;\r\n };\r\n Slot.prototype.setAttachment = function (attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n };\r\n Slot.prototype.setAttachmentTime = function (time) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n };\r\n Slot.prototype.getAttachmentTime = function () {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n };\r\n Slot.prototype.setToSetupPose = function () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n };\r\n return Slot;\r\n }());\r\n spine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SlotData = (function () {\r\n function SlotData(index, name, boneData) {\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (boneData == null)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n return SlotData;\r\n }());\r\n spine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Texture = (function () {\r\n function Texture(image) {\r\n this._image = image;\r\n }\r\n Texture.prototype.getImage = function () {\r\n return this._image;\r\n };\r\n Texture.filterFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(\"Unknown texture filter \".concat(text));\r\n }\r\n };\r\n Texture.wrapFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(\"Unknown texture wrap \".concat(text));\r\n }\r\n };\r\n return Texture;\r\n }());\r\n spine.Texture = Texture;\r\n var TextureFilter;\r\n (function (TextureFilter) {\r\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n var TextureWrap;\r\n (function (TextureWrap) {\r\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n var TextureRegion = (function () {\r\n function TextureRegion() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.rotate = false;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n return TextureRegion;\r\n }());\r\n spine.TextureRegion = TextureRegion;\r\n var FakeTexture = (function (_super) {\r\n __extends(FakeTexture, _super);\r\n function FakeTexture() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n FakeTexture.prototype.dispose = function () { };\r\n return FakeTexture;\r\n }(Texture));\r\n spine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TextureAtlas = (function () {\r\n function TextureAtlas(atlasText, textureLoader) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n this.load(atlasText, textureLoader);\r\n }\r\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n var reader = new TextureAtlasReader(atlasText);\r\n var tuple = new Array(4);\r\n var page = null;\r\n while (true) {\r\n var line = reader.readLine();\r\n if (line == null)\r\n break;\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n if (reader.readTuple(tuple) == 2) {\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n reader.readTuple(tuple);\r\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n var direction = reader.readValue();\r\n page.uWrap = spine.TextureWrap.ClampToEdge;\r\n page.vWrap = spine.TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n page.texture = textureLoader(line);\r\n page.texture.setFilters(page.minFilter, page.magFilter);\r\n page.texture.setWraps(page.uWrap, page.vWrap);\r\n page.width = page.texture.getImage().width;\r\n page.height = page.texture.getImage().height;\r\n this.pages.push(page);\r\n }\r\n else {\r\n var region = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n var rotateValue = reader.readValue();\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n region.degrees = 90;\r\n }\r\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n region.degrees = 0;\r\n }\r\n else {\r\n region.degrees = parseFloat(rotateValue);\r\n }\r\n region.rotate = region.degrees == 90;\r\n reader.readTuple(tuple);\r\n var x = parseInt(tuple[0]);\r\n var y = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n var width = parseInt(tuple[0]);\r\n var height = parseInt(tuple[1]);\r\n region.u = x / page.width;\r\n region.v = y / page.height;\r\n if (region.rotate) {\r\n region.u2 = (x + height) / page.width;\r\n region.v2 = (y + width) / page.height;\r\n }\r\n else {\r\n region.u2 = (x + width) / page.width;\r\n region.v2 = (y + height) / page.height;\r\n }\r\n region.x = x;\r\n region.y = y;\r\n region.width = Math.abs(width);\r\n region.height = Math.abs(height);\r\n if (reader.readTuple(tuple) == 4) {\r\n if (reader.readTuple(tuple) == 4) {\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n region.originalWidth = parseInt(tuple[0]);\r\n region.originalHeight = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n region.offsetX = parseInt(tuple[0]);\r\n region.offsetY = parseInt(tuple[1]);\r\n region.index = parseInt(reader.readValue());\r\n region.texture = page.texture;\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n TextureAtlas.prototype.findRegion = function (name) {\r\n for (var i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n };\r\n TextureAtlas.prototype.dispose = function () {\r\n for (var i = 0; i < this.pages.length; i++) {\r\n this.pages[i].texture.dispose();\r\n }\r\n };\r\n return TextureAtlas;\r\n }());\r\n spine.TextureAtlas = TextureAtlas;\r\n var TextureAtlasReader = (function () {\r\n function TextureAtlasReader(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n TextureAtlasReader.prototype.readLine = function () {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n };\r\n TextureAtlasReader.prototype.readValue = function () {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n };\r\n TextureAtlasReader.prototype.readTuple = function (tuple) {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n var i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n var comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1)\r\n break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n };\r\n return TextureAtlasReader;\r\n }());\r\n var TextureAtlasPage = (function () {\r\n function TextureAtlasPage() {\r\n }\r\n return TextureAtlasPage;\r\n }());\r\n spine.TextureAtlasPage = TextureAtlasPage;\r\n var TextureAtlasRegion = (function (_super) {\r\n __extends(TextureAtlasRegion, _super);\r\n function TextureAtlasRegion() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return TextureAtlasRegion;\r\n }(spine.TextureRegion));\r\n spine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraint = (function () {\r\n function TransformConstraint(data, skeleton) {\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.scaleMix = 0;\r\n this.shearMix = 0;\r\n this.temp = new spine.Vector2();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n TransformConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n TransformConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n TransformConstraint.prototype.update = function () {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n }\r\n else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * translateMix;\r\n bone.worldY += (temp.y - bone.worldY) * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n var ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var b = bone.b, d = bone.d;\r\n var by = Math.atan2(d, b);\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * translateMix;\r\n bone.worldY += temp.y * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n var b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n var r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0) {\r\n var r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0)\r\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001)\r\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0)\r\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n return TransformConstraint;\r\n }());\r\n spine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraintData = (function (_super) {\r\n __extends(TransformConstraintData, _super);\r\n function TransformConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.rotateMix = 0;\r\n _this.translateMix = 0;\r\n _this.scaleMix = 0;\r\n _this.shearMix = 0;\r\n _this.offsetRotation = 0;\r\n _this.offsetX = 0;\r\n _this.offsetY = 0;\r\n _this.offsetScaleX = 0;\r\n _this.offsetScaleY = 0;\r\n _this.offsetShearY = 0;\r\n _this.relative = false;\r\n _this.local = false;\r\n return _this;\r\n }\r\n return TransformConstraintData;\r\n }(spine.ConstraintData));\r\n spine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Triangulator = (function () {\r\n function Triangulator() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n }\r\n Triangulator.prototype.triangulate = function (verticesArray) {\r\n var vertices = verticesArray;\r\n var vertexCount = verticesArray.length >> 1;\r\n var indices = this.indicesArray;\r\n indices.length = 0;\r\n for (var i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n var isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (var i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n var triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n var previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer: if (!isConcave[i]) {\r\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n var v = indices[ii] << 1;\r\n var vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n var previousIndex = (vertexCount + i - 1) % vertexCount;\r\n var nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n };\r\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\r\n var vertices = verticesArray;\r\n var convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n var convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n var polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n var polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n var fanBaseIndex = -1, lastWinding = 0;\r\n for (var i = 0, n = triangles.length; i < n; i += 3) {\r\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n var merged = false;\r\n if (fanBaseIndex == t1) {\r\n var o = polygon.length - 4;\r\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n var firstIndex = polygonIndices[0];\r\n var lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n var o = polygon.length - 4;\r\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n var firstX = polygon[0], firstY = polygon[1];\r\n var secondX = polygon[2], secondY = polygon[3];\r\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (var ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n var otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n var otherFirstIndex = otherIndices[0];\r\n var otherSecondIndex = otherIndices[1];\r\n var otherLastIndex = otherIndices[2];\r\n var otherPoly = convexPolygons[ii];\r\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n };\r\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n var current = indices[index] << 1;\r\n var next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n };\r\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n };\r\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n var px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n };\r\n return Triangulator;\r\n }());\r\n spine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IntSet = (function () {\r\n function IntSet() {\r\n this.array = new Array();\r\n }\r\n IntSet.prototype.add = function (value) {\r\n var contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n };\r\n IntSet.prototype.contains = function (value) {\r\n return this.array[value | 0] != undefined;\r\n };\r\n IntSet.prototype.remove = function (value) {\r\n this.array[value | 0] = undefined;\r\n };\r\n IntSet.prototype.clear = function () {\r\n this.array.length = 0;\r\n };\r\n return IntSet;\r\n }());\r\n spine.IntSet = IntSet;\r\n var Color = (function () {\r\n function Color(r, g, b, a) {\r\n if (r === void 0) { r = 0; }\r\n if (g === void 0) { g = 0; }\r\n if (b === void 0) { b = 0; }\r\n if (a === void 0) { a = 0; }\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n Color.prototype.set = function (r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.setFromColor = function (c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n };\r\n Color.prototype.setFromString = function (hex) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n };\r\n Color.prototype.add = function (r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.clamp = function () {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n };\r\n Color.rgba8888ToColor = function (color, value) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.rgb888ToColor = function (color, value) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.WHITE = new Color(1, 1, 1, 1);\r\n Color.RED = new Color(1, 0, 0, 1);\r\n Color.GREEN = new Color(0, 1, 0, 1);\r\n Color.BLUE = new Color(0, 0, 1, 1);\r\n Color.MAGENTA = new Color(1, 0, 1, 1);\r\n return Color;\r\n }());\r\n spine.Color = Color;\r\n var MathUtils = (function () {\r\n function MathUtils() {\r\n }\r\n MathUtils.clamp = function (value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n MathUtils.cosDeg = function (degrees) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.sinDeg = function (degrees) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.signum = function (value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n };\r\n MathUtils.toInt = function (x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n };\r\n MathUtils.cbrt = function (x) {\r\n var y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n };\r\n MathUtils.randomTriangular = function (min, max) {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n };\r\n MathUtils.randomTriangularWith = function (min, max, mode) {\r\n var u = Math.random();\r\n var d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n };\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n MathUtils.degRad = MathUtils.degreesToRadians;\r\n return MathUtils;\r\n }());\r\n spine.MathUtils = MathUtils;\r\n var Interpolation = (function () {\r\n function Interpolation() {\r\n }\r\n Interpolation.prototype.apply = function (start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n };\r\n return Interpolation;\r\n }());\r\n spine.Interpolation = Interpolation;\r\n var Pow = (function (_super) {\r\n __extends(Pow, _super);\r\n function Pow(power) {\r\n var _this = _super.call(this) || this;\r\n _this.power = 2;\r\n _this.power = power;\r\n return _this;\r\n }\r\n Pow.prototype.applyInternal = function (a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n };\r\n return Pow;\r\n }(Interpolation));\r\n spine.Pow = Pow;\r\n var PowOut = (function (_super) {\r\n __extends(PowOut, _super);\r\n function PowOut(power) {\r\n return _super.call(this, power) || this;\r\n }\r\n PowOut.prototype.applyInternal = function (a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n };\r\n return PowOut;\r\n }(Pow));\r\n spine.PowOut = PowOut;\r\n var Utils = (function () {\r\n function Utils() {\r\n }\r\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n };\r\n Utils.setArraySize = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n var oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (var i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n };\r\n Utils.ensureArrayCapacity = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n if (array.length >= size)\r\n return array;\r\n return Utils.setArraySize(array, size, value);\r\n };\r\n Utils.newArray = function (size, defaultValue) {\r\n var array = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n };\r\n Utils.newFloatArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.newShortArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.toFloatArray = function (array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n };\r\n Utils.toSinglePrecision = function (value) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n };\r\n Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n };\r\n Utils.contains = function (array, element, identity) {\r\n if (identity === void 0) { identity = true; }\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] == element)\r\n return true;\r\n }\r\n return false;\r\n };\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n return Utils;\r\n }());\r\n spine.Utils = Utils;\r\n var DebugUtils = (function () {\r\n function DebugUtils() {\r\n }\r\n DebugUtils.logBones = function (skeleton) {\r\n for (var i = 0; i < skeleton.bones.length; i++) {\r\n var bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n };\r\n return DebugUtils;\r\n }());\r\n spine.DebugUtils = DebugUtils;\r\n var Pool = (function () {\r\n function Pool(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n Pool.prototype.obtain = function () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n };\r\n Pool.prototype.free = function (item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n };\r\n Pool.prototype.freeAll = function (items) {\r\n for (var i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n };\r\n Pool.prototype.clear = function () {\r\n this.items.length = 0;\r\n };\r\n return Pool;\r\n }());\r\n spine.Pool = Pool;\r\n var Vector2 = (function () {\r\n function Vector2(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n }\r\n Vector2.prototype.set = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2.prototype.length = function () {\r\n var x = this.x;\r\n var y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n };\r\n Vector2.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n };\r\n return Vector2;\r\n }());\r\n spine.Vector2 = Vector2;\r\n var TimeKeeper = (function () {\r\n function TimeKeeper() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1000;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n TimeKeeper.prototype.update = function () {\r\n var now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n };\r\n return TimeKeeper;\r\n }());\r\n spine.TimeKeeper = TimeKeeper;\r\n var WindowedMean = (function () {\r\n function WindowedMean(windowSize) {\r\n if (windowSize === void 0) { windowSize = 32; }\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n WindowedMean.prototype.hasEnoughData = function () {\r\n return this.addedValues >= this.values.length;\r\n };\r\n WindowedMean.prototype.addValue = function (value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n };\r\n WindowedMean.prototype.getMean = function () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n var mean = 0;\r\n for (var i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n return WindowedMean;\r\n }());\r\n spine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n if (!Math.fround) {\r\n Math.fround = (function (array) {\r\n return function (x) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Attachment = (function () {\r\n function Attachment(name) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n return Attachment;\r\n }());\r\n spine.Attachment = Attachment;\r\n var VertexAttachment = (function (_super) {\r\n __extends(VertexAttachment, _super);\r\n function VertexAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n _this.worldVerticesLength = 0;\r\n _this.deformAttachment = _this;\r\n return _this;\r\n }\r\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n var skeleton = slot.bone.skeleton;\r\n var deformArray = slot.deform;\r\n var vertices = this.vertices;\r\n var bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n var bone = slot.bone;\r\n var x = bone.worldX;\r\n var y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n var v = 0, skip = 0;\r\n for (var i = 0; i < start; i += 2) {\r\n var n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n var skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n else {\r\n var deform = deformArray;\r\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n };\r\n VertexAttachment.prototype.copyTo = function (attachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n }\r\n else\r\n attachment.bones = null;\r\n if (this.vertices != null) {\r\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\r\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n else\r\n attachment.vertices = null;\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n };\r\n VertexAttachment.nextID = 0;\r\n return VertexAttachment;\r\n }(Attachment));\r\n spine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AttachmentType;\r\n (function (AttachmentType) {\r\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoundingBoxAttachment = (function (_super) {\r\n __extends(BoundingBoxAttachment, _super);\r\n function BoundingBoxAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n BoundingBoxAttachment.prototype.copy = function () {\r\n var copy = new BoundingBoxAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return BoundingBoxAttachment;\r\n }(spine.VertexAttachment));\r\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ClippingAttachment = (function (_super) {\r\n __extends(ClippingAttachment, _super);\r\n function ClippingAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n return _this;\r\n }\r\n ClippingAttachment.prototype.copy = function () {\r\n var copy = new ClippingAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return ClippingAttachment;\r\n }(spine.VertexAttachment));\r\n spine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var MeshAttachment = (function (_super) {\r\n __extends(MeshAttachment, _super);\r\n function MeshAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.tempColor = new spine.Color(0, 0, 0, 0);\r\n return _this;\r\n }\r\n MeshAttachment.prototype.updateUVs = function () {\r\n var regionUVs = this.regionUVs;\r\n if (this.uvs == null || this.uvs.length != regionUVs.length)\r\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n var uvs = this.uvs;\r\n var n = this.uvs.length;\r\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof spine.TextureAtlasRegion) {\r\n var region = this.region;\r\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n }\r\n else if (this.region == null) {\r\n u = v = 0;\r\n width = height = 1;\r\n }\r\n else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n };\r\n MeshAttachment.prototype.getParentMesh = function () {\r\n return this.parentMesh;\r\n };\r\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n };\r\n MeshAttachment.prototype.copy = function () {\r\n if (this.parentMesh != null)\r\n return this.newLinkedMesh();\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n };\r\n MeshAttachment.prototype.newLinkedMesh = function () {\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n copy.updateUVs();\r\n return copy;\r\n };\r\n return MeshAttachment;\r\n }(spine.VertexAttachment));\r\n spine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathAttachment = (function (_super) {\r\n __extends(PathAttachment, _super);\r\n function PathAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.closed = false;\r\n _this.constantSpeed = false;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n PathAttachment.prototype.copy = function () {\r\n var copy = new PathAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PathAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PointAttachment = (function (_super) {\r\n __extends(PointAttachment, _super);\r\n function PointAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n return _this;\r\n }\r\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n };\r\n PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n var x = cos * bone.a + sin * bone.b;\r\n var y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n };\r\n PointAttachment.prototype.copy = function () {\r\n var copy = new PointAttachment(this.name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PointAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var RegionAttachment = (function (_super) {\r\n __extends(RegionAttachment, _super);\r\n function RegionAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.scaleX = 1;\r\n _this.scaleY = 1;\r\n _this.rotation = 0;\r\n _this.width = 0;\r\n _this.height = 0;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.offset = spine.Utils.newFloatArray(8);\r\n _this.uvs = spine.Utils.newFloatArray(8);\r\n _this.tempColor = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n RegionAttachment.prototype.updateOffset = function () {\r\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n var localX2 = localX + this.region.width * regionScaleX;\r\n var localY2 = localY + this.region.height * regionScaleY;\r\n var radians = this.rotation * Math.PI / 180;\r\n var cos = Math.cos(radians);\r\n var sin = Math.sin(radians);\r\n var localXCos = localX * cos + this.x;\r\n var localXSin = localX * sin;\r\n var localYCos = localY * cos + this.y;\r\n var localYSin = localY * sin;\r\n var localX2Cos = localX2 * cos + this.x;\r\n var localX2Sin = localX2 * sin;\r\n var localY2Cos = localY2 * cos + this.y;\r\n var localY2Sin = localY2 * sin;\r\n var offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n };\r\n RegionAttachment.prototype.setRegion = function (region) {\r\n this.region = region;\r\n var uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n }\r\n else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n };\r\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n var vertexOffset = this.offset;\r\n var x = bone.worldX, y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n };\r\n RegionAttachment.prototype.copy = function () {\r\n var copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n RegionAttachment.OX1 = 0;\r\n RegionAttachment.OY1 = 1;\r\n RegionAttachment.OX2 = 2;\r\n RegionAttachment.OY2 = 3;\r\n RegionAttachment.OX3 = 4;\r\n RegionAttachment.OY3 = 5;\r\n RegionAttachment.OX4 = 6;\r\n RegionAttachment.OY4 = 7;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n return RegionAttachment;\r\n }(spine.Attachment));\r\n spine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var JitterEffect = (function () {\r\n function JitterEffect(jitterX, jitterY) {\r\n this.jitterX = 0;\r\n this.jitterY = 0;\r\n this.jitterX = jitterX;\r\n this.jitterY = jitterY;\r\n }\r\n JitterEffect.prototype.begin = function (skeleton) {\r\n };\r\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n };\r\n JitterEffect.prototype.end = function () {\r\n };\r\n return JitterEffect;\r\n }());\r\n spine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SwirlEffect = (function () {\r\n function SwirlEffect(radius) {\r\n this.centerX = 0;\r\n this.centerY = 0;\r\n this.radius = 0;\r\n this.angle = 0;\r\n this.worldX = 0;\r\n this.worldY = 0;\r\n this.radius = radius;\r\n }\r\n SwirlEffect.prototype.begin = function (skeleton) {\r\n this.worldX = skeleton.x + this.centerX;\r\n this.worldY = skeleton.y + this.centerY;\r\n };\r\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n var x = position.x - this.worldX;\r\n var y = position.y - this.worldY;\r\n var dist = Math.sqrt(x * x + y * y);\r\n if (dist < this.radius) {\r\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n var cos = Math.cos(theta);\r\n var sin = Math.sin(theta);\r\n position.x = cos * x - sin * y + this.worldX;\r\n position.y = sin * x + cos * y + this.worldY;\r\n }\r\n };\r\n SwirlEffect.prototype.end = function () {\r\n };\r\n SwirlEffect.interpolation = new spine.PowOut(2);\r\n return SwirlEffect;\r\n }());\r\n spine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n canvas.AssetManager = AssetManager;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var CanvasTexture = (function (_super) {\r\n __extends(CanvasTexture, _super);\r\n function CanvasTexture(image) {\r\n return _super.call(this, image) || this;\r\n }\r\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n CanvasTexture.prototype.dispose = function () { };\r\n return CanvasTexture;\r\n }(spine.Texture));\r\n canvas.CanvasTexture = CanvasTexture;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context) {\r\n this.triangleRendering = false;\r\n this.debugRendering = false;\r\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\r\n this.tempColor = new spine.Color();\r\n this.ctx = context;\r\n }\r\n SkeletonRenderer.prototype.draw = function (skeleton) {\r\n if (this.triangleRendering)\r\n this.drawTriangles(skeleton);\r\n else\r\n this.drawImages(skeleton);\r\n };\r\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\r\n var ctx = this.ctx;\r\n var drawOrder = skeleton.drawOrder;\r\n if (this.debugRendering)\r\n ctx.strokeStyle = \"green\";\r\n ctx.save();\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n var regionAttachment = null;\r\n var region = null;\r\n var image = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n regionAttachment = attachment;\r\n region = regionAttachment.region;\r\n image = region.texture.getImage();\r\n }\r\n else\r\n continue;\r\n var skeleton_1 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_1.color;\r\n var slotColor = slot.color;\r\n var regionColor = regionAttachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\r\n var att = attachment;\r\n var bone = slot.bone;\r\n var w = region.width;\r\n var h = region.height;\r\n ctx.save();\r\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n ctx.translate(attachment.offset[0], attachment.offset[1]);\r\n ctx.rotate(attachment.rotation * Math.PI / 180);\r\n var atlasScale = att.width / w;\r\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n ctx.translate(w / 2, h / 2);\r\n if (attachment.region.rotate) {\r\n var t = w;\r\n w = h;\r\n h = t;\r\n ctx.rotate(-Math.PI / 2);\r\n }\r\n ctx.scale(1, -1);\r\n ctx.translate(-w / 2, -h / 2);\r\n ctx.globalAlpha = color.a;\r\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n if (this.debugRendering)\r\n ctx.strokeRect(0, 0, w, h);\r\n ctx.restore();\r\n }\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\r\n var blendMode = null;\r\n var vertices = this.vertices;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n var region = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n region = regionAttachment.region;\r\n texture = region.texture.getImage();\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n vertices = this.computeMeshVertices(slot, mesh, false);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture.getImage();\r\n }\r\n else\r\n continue;\r\n if (texture != null) {\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n }\r\n var skeleton_2 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_2.color;\r\n var slotColor = slot.color;\r\n var attachmentColor = attachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\r\n var ctx = this.ctx;\r\n ctx.globalAlpha = color.a;\r\n for (var j = 0; j < triangles.length; j += 3) {\r\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n if (this.debugRendering) {\r\n ctx.strokeStyle = \"green\";\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x0, y0);\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n }\r\n this.ctx.globalAlpha = 1;\r\n };\r\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n var ctx = this.ctx;\r\n u0 *= img.width;\r\n v0 *= img.height;\r\n u1 *= img.width;\r\n v1 *= img.height;\r\n u2 *= img.width;\r\n v2 *= img.height;\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.closePath();\r\n x1 -= x0;\r\n y1 -= y0;\r\n x2 -= x0;\r\n y2 -= y0;\r\n u1 -= u0;\r\n v1 -= v0;\r\n u2 -= u0;\r\n v2 -= v0;\r\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n ctx.save();\r\n ctx.transform(a, b, c, d, e, f);\r\n ctx.clip();\r\n ctx.drawImage(img, 0, 0);\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = region.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var vertices = this.vertices;\r\n var uvs = region.uvs;\r\n vertices[spine.RegionAttachment.C1R] = color.r;\r\n vertices[spine.RegionAttachment.C1G] = color.g;\r\n vertices[spine.RegionAttachment.C1B] = color.b;\r\n vertices[spine.RegionAttachment.C1A] = color.a;\r\n vertices[spine.RegionAttachment.U1] = uvs[0];\r\n vertices[spine.RegionAttachment.V1] = uvs[1];\r\n vertices[spine.RegionAttachment.C2R] = color.r;\r\n vertices[spine.RegionAttachment.C2G] = color.g;\r\n vertices[spine.RegionAttachment.C2B] = color.b;\r\n vertices[spine.RegionAttachment.C2A] = color.a;\r\n vertices[spine.RegionAttachment.U2] = uvs[2];\r\n vertices[spine.RegionAttachment.V2] = uvs[3];\r\n vertices[spine.RegionAttachment.C3R] = color.r;\r\n vertices[spine.RegionAttachment.C3G] = color.g;\r\n vertices[spine.RegionAttachment.C3B] = color.b;\r\n vertices[spine.RegionAttachment.C3A] = color.a;\r\n vertices[spine.RegionAttachment.U3] = uvs[4];\r\n vertices[spine.RegionAttachment.V3] = uvs[5];\r\n vertices[spine.RegionAttachment.C4R] = color.r;\r\n vertices[spine.RegionAttachment.C4G] = color.g;\r\n vertices[spine.RegionAttachment.C4B] = color.b;\r\n vertices[spine.RegionAttachment.C4A] = color.a;\r\n vertices[spine.RegionAttachment.U4] = uvs[6];\r\n vertices[spine.RegionAttachment.V4] = uvs[7];\r\n return vertices;\r\n };\r\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = mesh.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n var numVertices = mesh.worldVerticesLength / 2;\r\n if (this.vertices.length < mesh.worldVerticesLength) {\r\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\r\n }\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var uvs = mesh.uvs;\r\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\r\n vertices[v++] = color.r;\r\n vertices[v++] = color.g;\r\n vertices[v++] = color.b;\r\n vertices[v++] = color.a;\r\n vertices[v++] = uvs[u++];\r\n vertices[v++] = uvs[u++];\r\n v += 2;\r\n }\r\n return vertices;\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n return SkeletonRenderer;\r\n }());\r\n canvas.SkeletonRenderer = SkeletonRenderer;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(context, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) {\r\n return new spine.webgl.GLTexture(context, image);\r\n }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n webgl.AssetManager = AssetManager;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var OrthoCamera = (function () {\r\n function OrthoCamera(viewportWidth, viewportHeight) {\r\n this.position = new webgl.Vector3(0, 0, 0);\r\n this.direction = new webgl.Vector3(0, 0, -1);\r\n this.up = new webgl.Vector3(0, 1, 0);\r\n this.near = 0;\r\n this.far = 100;\r\n this.zoom = 1;\r\n this.viewportWidth = 0;\r\n this.viewportHeight = 0;\r\n this.projectionView = new webgl.Matrix4();\r\n this.inverseProjectionView = new webgl.Matrix4();\r\n this.projection = new webgl.Matrix4();\r\n this.view = new webgl.Matrix4();\r\n this.tmp = new webgl.Vector3();\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n this.update();\r\n }\r\n OrthoCamera.prototype.update = function () {\r\n var projection = this.projection;\r\n var view = this.view;\r\n var projectionView = this.projectionView;\r\n var inverseProjectionView = this.inverseProjectionView;\r\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\r\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\r\n view.lookAt(this.position, this.direction, this.up);\r\n projectionView.set(projection.values);\r\n projectionView.multiply(view);\r\n inverseProjectionView.set(projectionView.values).invert();\r\n };\r\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\r\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\r\n var tmp = this.tmp;\r\n tmp.x = (2 * x) / screenWidth - 1;\r\n tmp.y = (2 * y) / screenHeight - 1;\r\n tmp.z = (2 * screenCoords.z) - 1;\r\n tmp.project(this.inverseProjectionView);\r\n screenCoords.set(tmp.x, tmp.y, tmp.z);\r\n return screenCoords;\r\n };\r\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n };\r\n return OrthoCamera;\r\n }());\r\n webgl.OrthoCamera = OrthoCamera;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var GLTexture = (function (_super) {\r\n __extends(GLTexture, _super);\r\n function GLTexture(context, image, useMipMaps) {\r\n if (useMipMaps === void 0) { useMipMaps = false; }\r\n var _this = _super.call(this, image) || this;\r\n _this.texture = null;\r\n _this.boundUnit = 0;\r\n _this.useMipMaps = false;\r\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n _this.useMipMaps = useMipMaps;\r\n _this.restore();\r\n _this.context.addRestorable(_this);\r\n return _this;\r\n }\r\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\r\n };\r\n GLTexture.validateMagFilter = function (magFilter) {\r\n switch (magFilter) {\r\n case spine.TextureFilter.MipMap:\r\n case spine.TextureFilter.MipMapLinearLinear:\r\n case spine.TextureFilter.MipMapLinearNearest:\r\n case spine.TextureFilter.MipMapNearestLinear:\r\n case spine.TextureFilter.MipMapNearestNearest:\r\n return spine.TextureFilter.Linear;\r\n default:\r\n return magFilter;\r\n }\r\n };\r\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\r\n };\r\n GLTexture.prototype.update = function (useMipMaps) {\r\n var gl = this.context.gl;\r\n if (!this.texture) {\r\n this.texture = this.context.gl.createTexture();\r\n }\r\n this.bind();\r\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n };\r\n GLTexture.prototype.restore = function () {\r\n this.texture = null;\r\n this.update(this.useMipMaps);\r\n };\r\n GLTexture.prototype.bind = function (unit) {\r\n if (unit === void 0) { unit = 0; }\r\n var gl = this.context.gl;\r\n this.boundUnit = unit;\r\n gl.activeTexture(gl.TEXTURE0 + unit);\r\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\r\n };\r\n GLTexture.prototype.unbind = function () {\r\n var gl = this.context.gl;\r\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\r\n gl.bindTexture(gl.TEXTURE_2D, null);\r\n };\r\n GLTexture.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteTexture(this.texture);\r\n };\r\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\r\n return GLTexture;\r\n }(spine.Texture));\r\n webgl.GLTexture = GLTexture;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n webgl.M00 = 0;\r\n webgl.M01 = 4;\r\n webgl.M02 = 8;\r\n webgl.M03 = 12;\r\n webgl.M10 = 1;\r\n webgl.M11 = 5;\r\n webgl.M12 = 9;\r\n webgl.M13 = 13;\r\n webgl.M20 = 2;\r\n webgl.M21 = 6;\r\n webgl.M22 = 10;\r\n webgl.M23 = 14;\r\n webgl.M30 = 3;\r\n webgl.M31 = 7;\r\n webgl.M32 = 11;\r\n webgl.M33 = 15;\r\n var Matrix4 = (function () {\r\n function Matrix4() {\r\n this.temp = new Float32Array(16);\r\n this.values = new Float32Array(16);\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M11] = 1;\r\n v[webgl.M22] = 1;\r\n v[webgl.M33] = 1;\r\n }\r\n Matrix4.prototype.set = function (values) {\r\n this.values.set(values);\r\n return this;\r\n };\r\n Matrix4.prototype.transpose = function () {\r\n var t = this.temp;\r\n var v = this.values;\r\n t[webgl.M00] = v[webgl.M00];\r\n t[webgl.M01] = v[webgl.M10];\r\n t[webgl.M02] = v[webgl.M20];\r\n t[webgl.M03] = v[webgl.M30];\r\n t[webgl.M10] = v[webgl.M01];\r\n t[webgl.M11] = v[webgl.M11];\r\n t[webgl.M12] = v[webgl.M21];\r\n t[webgl.M13] = v[webgl.M31];\r\n t[webgl.M20] = v[webgl.M02];\r\n t[webgl.M21] = v[webgl.M12];\r\n t[webgl.M22] = v[webgl.M22];\r\n t[webgl.M23] = v[webgl.M32];\r\n t[webgl.M30] = v[webgl.M03];\r\n t[webgl.M31] = v[webgl.M13];\r\n t[webgl.M32] = v[webgl.M23];\r\n t[webgl.M33] = v[webgl.M33];\r\n return this.set(t);\r\n };\r\n Matrix4.prototype.identity = function () {\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M01] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M03] = 0;\r\n v[webgl.M10] = 0;\r\n v[webgl.M11] = 1;\r\n v[webgl.M12] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M21] = 0;\r\n v[webgl.M22] = 1;\r\n v[webgl.M23] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M32] = 0;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.invert = function () {\r\n var v = this.values;\r\n var t = this.temp;\r\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n if (l_det == 0)\r\n throw new Error(\"non-invertible matrix\");\r\n var inv_det = 1.0 / l_det;\r\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\r\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\r\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\r\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\r\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\r\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\r\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\r\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\r\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\r\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\r\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\r\n v[webgl.M00] = t[webgl.M00] * inv_det;\r\n v[webgl.M01] = t[webgl.M01] * inv_det;\r\n v[webgl.M02] = t[webgl.M02] * inv_det;\r\n v[webgl.M03] = t[webgl.M03] * inv_det;\r\n v[webgl.M10] = t[webgl.M10] * inv_det;\r\n v[webgl.M11] = t[webgl.M11] * inv_det;\r\n v[webgl.M12] = t[webgl.M12] * inv_det;\r\n v[webgl.M13] = t[webgl.M13] * inv_det;\r\n v[webgl.M20] = t[webgl.M20] * inv_det;\r\n v[webgl.M21] = t[webgl.M21] * inv_det;\r\n v[webgl.M22] = t[webgl.M22] * inv_det;\r\n v[webgl.M23] = t[webgl.M23] * inv_det;\r\n v[webgl.M30] = t[webgl.M30] * inv_det;\r\n v[webgl.M31] = t[webgl.M31] * inv_det;\r\n v[webgl.M32] = t[webgl.M32] * inv_det;\r\n v[webgl.M33] = t[webgl.M33] * inv_det;\r\n return this;\r\n };\r\n Matrix4.prototype.determinant = function () {\r\n var v = this.values;\r\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n };\r\n Matrix4.prototype.translate = function (x, y, z) {\r\n var v = this.values;\r\n v[webgl.M03] += x;\r\n v[webgl.M13] += y;\r\n v[webgl.M23] += z;\r\n return this;\r\n };\r\n Matrix4.prototype.copy = function () {\r\n return new Matrix4().set(this.values);\r\n };\r\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\r\n this.identity();\r\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\r\n var l_a1 = (far + near) / (near - far);\r\n var l_a2 = (2 * far * near) / (near - far);\r\n var v = this.values;\r\n v[webgl.M00] = l_fd / aspectRatio;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = l_fd;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = l_a1;\r\n v[webgl.M32] = -1;\r\n v[webgl.M03] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M23] = l_a2;\r\n v[webgl.M33] = 0;\r\n return this;\r\n };\r\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\r\n return this.ortho(x, x + width, y, y + height, 0, 1);\r\n };\r\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\r\n this.identity();\r\n var x_orth = 2 / (right - left);\r\n var y_orth = 2 / (top - bottom);\r\n var z_orth = -2 / (far - near);\r\n var tx = -(right + left) / (right - left);\r\n var ty = -(top + bottom) / (top - bottom);\r\n var tz = -(far + near) / (far - near);\r\n var v = this.values;\r\n v[webgl.M00] = x_orth;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = y_orth;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = z_orth;\r\n v[webgl.M32] = 0;\r\n v[webgl.M03] = tx;\r\n v[webgl.M13] = ty;\r\n v[webgl.M23] = tz;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.multiply = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\r\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\r\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\r\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\r\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\r\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\r\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\r\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\r\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\r\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\r\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\r\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\r\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\r\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\r\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\r\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.multiplyLeft = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\r\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\r\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\r\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\r\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\r\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\r\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\r\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\r\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\r\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\r\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\r\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\r\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\r\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\r\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\r\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.lookAt = function (position, direction, up) {\r\n Matrix4.initTemps();\r\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\r\n zAxis.setFrom(direction).normalize();\r\n xAxis.setFrom(direction).normalize();\r\n xAxis.cross(up).normalize();\r\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\r\n this.identity();\r\n var val = this.values;\r\n val[webgl.M00] = xAxis.x;\r\n val[webgl.M01] = xAxis.y;\r\n val[webgl.M02] = xAxis.z;\r\n val[webgl.M10] = yAxis.x;\r\n val[webgl.M11] = yAxis.y;\r\n val[webgl.M12] = yAxis.z;\r\n val[webgl.M20] = -zAxis.x;\r\n val[webgl.M21] = -zAxis.y;\r\n val[webgl.M22] = -zAxis.z;\r\n Matrix4.tmpMatrix.identity();\r\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\r\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\r\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\r\n this.multiply(Matrix4.tmpMatrix);\r\n return this;\r\n };\r\n Matrix4.initTemps = function () {\r\n if (Matrix4.xAxis === null)\r\n Matrix4.xAxis = new webgl.Vector3();\r\n if (Matrix4.yAxis === null)\r\n Matrix4.yAxis = new webgl.Vector3();\r\n if (Matrix4.zAxis === null)\r\n Matrix4.zAxis = new webgl.Vector3();\r\n };\r\n Matrix4.xAxis = null;\r\n Matrix4.yAxis = null;\r\n Matrix4.zAxis = null;\r\n Matrix4.tmpMatrix = new Matrix4();\r\n return Matrix4;\r\n }());\r\n webgl.Matrix4 = Matrix4;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Mesh = (function () {\r\n function Mesh(context, attributes, maxVertices, maxIndices) {\r\n this.attributes = attributes;\r\n this.verticesLength = 0;\r\n this.dirtyVertices = false;\r\n this.indicesLength = 0;\r\n this.dirtyIndices = false;\r\n this.elementsPerVertex = 0;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.elementsPerVertex = 0;\r\n for (var i = 0; i < attributes.length; i++) {\r\n this.elementsPerVertex += attributes[i].numElements;\r\n }\r\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\r\n this.indices = new Uint16Array(maxIndices);\r\n this.context.addRestorable(this);\r\n }\r\n Mesh.prototype.getAttributes = function () { return this.attributes; };\r\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\r\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\r\n Mesh.prototype.setVerticesLength = function (length) {\r\n this.dirtyVertices = true;\r\n this.verticesLength = length;\r\n };\r\n Mesh.prototype.getVertices = function () { return this.vertices; };\r\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\r\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\r\n Mesh.prototype.setIndicesLength = function (length) {\r\n this.dirtyIndices = true;\r\n this.indicesLength = length;\r\n };\r\n Mesh.prototype.getIndices = function () { return this.indices; };\r\n ;\r\n Mesh.prototype.getVertexSizeInFloats = function () {\r\n var size = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attribute = this.attributes[i];\r\n size += attribute.numElements;\r\n }\r\n return size;\r\n };\r\n Mesh.prototype.setVertices = function (vertices) {\r\n this.dirtyVertices = true;\r\n if (vertices.length > this.vertices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\r\n this.vertices.set(vertices, 0);\r\n this.verticesLength = vertices.length;\r\n };\r\n Mesh.prototype.setIndices = function (indices) {\r\n this.dirtyIndices = true;\r\n if (indices.length > this.indices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\r\n this.indices.set(indices, 0);\r\n this.indicesLength = indices.length;\r\n };\r\n Mesh.prototype.draw = function (shader, primitiveType) {\r\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\r\n };\r\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices || this.dirtyIndices)\r\n this.update();\r\n this.bind(shader);\r\n if (this.indicesLength > 0) {\r\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\r\n }\r\n else {\r\n gl.drawArrays(primitiveType, offset, count);\r\n }\r\n this.unbind(shader);\r\n };\r\n Mesh.prototype.bind = function (shader) {\r\n var gl = this.context.gl;\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n var offset = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_1 = shader.getAttributeLocation(attrib.name);\r\n gl.enableVertexAttribArray(location_1);\r\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\r\n offset += attrib.numElements;\r\n }\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n };\r\n Mesh.prototype.unbind = function (shader) {\r\n var gl = this.context.gl;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_2 = shader.getAttributeLocation(attrib.name);\r\n gl.disableVertexAttribArray(location_2);\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\r\n };\r\n Mesh.prototype.update = function () {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices) {\r\n if (!this.verticesBuffer) {\r\n this.verticesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyVertices = false;\r\n }\r\n if (this.dirtyIndices) {\r\n if (!this.indicesBuffer) {\r\n this.indicesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyIndices = false;\r\n }\r\n };\r\n Mesh.prototype.restore = function () {\r\n this.verticesBuffer = null;\r\n this.indicesBuffer = null;\r\n this.update();\r\n };\r\n Mesh.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteBuffer(this.verticesBuffer);\r\n gl.deleteBuffer(this.indicesBuffer);\r\n };\r\n return Mesh;\r\n }());\r\n webgl.Mesh = Mesh;\r\n var VertexAttribute = (function () {\r\n function VertexAttribute(name, type, numElements) {\r\n this.name = name;\r\n this.type = type;\r\n this.numElements = numElements;\r\n }\r\n return VertexAttribute;\r\n }());\r\n webgl.VertexAttribute = VertexAttribute;\r\n var Position2Attribute = (function (_super) {\r\n __extends(Position2Attribute, _super);\r\n function Position2Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\r\n }\r\n return Position2Attribute;\r\n }(VertexAttribute));\r\n webgl.Position2Attribute = Position2Attribute;\r\n var Position3Attribute = (function (_super) {\r\n __extends(Position3Attribute, _super);\r\n function Position3Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\r\n }\r\n return Position3Attribute;\r\n }(VertexAttribute));\r\n webgl.Position3Attribute = Position3Attribute;\r\n var TexCoordAttribute = (function (_super) {\r\n __extends(TexCoordAttribute, _super);\r\n function TexCoordAttribute(unit) {\r\n if (unit === void 0) { unit = 0; }\r\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\r\n }\r\n return TexCoordAttribute;\r\n }(VertexAttribute));\r\n webgl.TexCoordAttribute = TexCoordAttribute;\r\n var ColorAttribute = (function (_super) {\r\n __extends(ColorAttribute, _super);\r\n function ColorAttribute() {\r\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\r\n }\r\n return ColorAttribute;\r\n }(VertexAttribute));\r\n webgl.ColorAttribute = ColorAttribute;\r\n var Color2Attribute = (function (_super) {\r\n __extends(Color2Attribute, _super);\r\n function Color2Attribute() {\r\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\r\n }\r\n return Color2Attribute;\r\n }(VertexAttribute));\r\n webgl.Color2Attribute = Color2Attribute;\r\n var VertexAttributeType;\r\n (function (VertexAttributeType) {\r\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\r\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var PolygonBatcher = (function () {\r\n function PolygonBatcher(context, twoColorTint, maxVertices) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n var attributes = twoColorTint ?\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\r\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n PolygonBatcher.prototype.begin = function (shader) {\r\n var gl = this.context.gl;\r\n if (this.isDrawing)\r\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\r\n this.drawCalls = 0;\r\n this.shader = shader;\r\n this.lastTexture = null;\r\n this.isDrawing = true;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\r\n if (texture != this.lastTexture) {\r\n this.flush();\r\n this.lastTexture = texture;\r\n }\r\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\r\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\r\n this.flush();\r\n }\r\n var indexStart = this.mesh.numVertices();\r\n this.mesh.getVertices().set(vertices, this.verticesLength);\r\n this.verticesLength += vertices.length;\r\n this.mesh.setVerticesLength(this.verticesLength);\r\n var indicesArray = this.mesh.getIndices();\r\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\r\n indicesArray[i] = indices[j] + indexStart;\r\n this.indicesLength += indices.length;\r\n this.mesh.setIndicesLength(this.indicesLength);\r\n };\r\n PolygonBatcher.prototype.flush = function () {\r\n var gl = this.context.gl;\r\n if (this.verticesLength == 0)\r\n return;\r\n this.lastTexture.bind();\r\n this.mesh.draw(this.shader, gl.TRIANGLES);\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.mesh.setVerticesLength(0);\r\n this.mesh.setIndicesLength(0);\r\n this.drawCalls++;\r\n };\r\n PolygonBatcher.prototype.end = function () {\r\n var gl = this.context.gl;\r\n if (!this.isDrawing)\r\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\r\n if (this.verticesLength > 0 || this.indicesLength > 0)\r\n this.flush();\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.isDrawing = false;\r\n gl.disable(gl.BLEND);\r\n };\r\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\r\n PolygonBatcher.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return PolygonBatcher;\r\n }());\r\n webgl.PolygonBatcher = PolygonBatcher;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SceneRenderer = (function () {\r\n function SceneRenderer(canvas, context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.twoColorTint = false;\r\n this.activeRenderer = null;\r\n this.QUAD = [\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n ];\r\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n this.WHITE = new spine.Color(1, 1, 1, 1);\r\n this.canvas = canvas;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.twoColorTint = twoColorTint;\r\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\r\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\r\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\r\n this.shapesShader = webgl.Shader.newColored(this.context);\r\n this.shapes = new webgl.ShapeRenderer(this.context);\r\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\r\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\r\n }\r\n SceneRenderer.prototype.begin = function () {\r\n this.camera.update();\r\n this.enableRenderer(this.batcher);\r\n };\r\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n this.enableRenderer(this.batcher);\r\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\r\n };\r\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n this.enableRenderer(this.shapes);\r\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\r\n };\r\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var worldOriginX = x + pivotX;\r\n var worldOriginY = y + pivotY;\r\n var fx = -pivotX;\r\n var fy = -pivotY;\r\n var fx2 = width - pivotX;\r\n var fy2 = height - pivotY;\r\n var p1x = fx;\r\n var p1y = fy;\r\n var p2x = fx;\r\n var p2y = fy2;\r\n var p3x = fx2;\r\n var p3y = fy2;\r\n var p4x = fx2;\r\n var p4y = fy;\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 0;\r\n var y2 = 0;\r\n var x3 = 0;\r\n var y3 = 0;\r\n var x4 = 0;\r\n var y4 = 0;\r\n if (angle != 0) {\r\n var cos = spine.MathUtils.cosDeg(angle);\r\n var sin = spine.MathUtils.sinDeg(angle);\r\n x1 = cos * p1x - sin * p1y;\r\n y1 = sin * p1x + cos * p1y;\r\n x4 = cos * p2x - sin * p2y;\r\n y4 = sin * p2x + cos * p2y;\r\n x3 = cos * p3x - sin * p3y;\r\n y3 = sin * p3x + cos * p3y;\r\n x2 = x3 + (x1 - x4);\r\n y2 = y3 + (y1 - y4);\r\n }\r\n else {\r\n x1 = p1x;\r\n y1 = p1y;\r\n x4 = p2x;\r\n y4 = p2y;\r\n x3 = p3x;\r\n y3 = p3y;\r\n x2 = p4x;\r\n y2 = p4y;\r\n }\r\n x1 += worldOriginX;\r\n y1 += worldOriginY;\r\n x2 += worldOriginX;\r\n y2 += worldOriginY;\r\n x3 += worldOriginX;\r\n y3 += worldOriginY;\r\n x4 += worldOriginX;\r\n y4 += worldOriginY;\r\n var i = 0;\r\n quad[i++] = x1;\r\n quad[i++] = y1;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x2;\r\n quad[i++] = y2;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x3;\r\n quad[i++] = y3;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x4;\r\n quad[i++] = y4;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.line(x, y, x2, y2, color);\r\n };\r\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\r\n };\r\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\r\n };\r\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rect(filled, x, y, width, height, color);\r\n };\r\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\r\n };\r\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.polygon(polygonVertices, offset, count, color);\r\n };\r\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.circle(filled, x, y, radius, color, segments);\r\n };\r\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\r\n };\r\n SceneRenderer.prototype.end = function () {\r\n if (this.activeRenderer === this.batcher)\r\n this.batcher.end();\r\n else if (this.activeRenderer === this.shapes)\r\n this.shapes.end();\r\n this.activeRenderer = null;\r\n };\r\n SceneRenderer.prototype.resize = function (resizeMode) {\r\n var canvas = this.canvas;\r\n var w = canvas.clientWidth;\r\n var h = canvas.clientHeight;\r\n if (canvas.width != w || canvas.height != h) {\r\n canvas.width = w;\r\n canvas.height = h;\r\n }\r\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\r\n if (resizeMode === ResizeMode.Stretch) {\r\n }\r\n else if (resizeMode === ResizeMode.Expand) {\r\n this.camera.setViewport(w, h);\r\n }\r\n else if (resizeMode === ResizeMode.Fit) {\r\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\r\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\r\n var targetRatio = targetHeight / targetWidth;\r\n var sourceRatio = sourceHeight / sourceWidth;\r\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\r\n this.camera.viewportWidth = sourceWidth * scale;\r\n this.camera.viewportHeight = sourceHeight * scale;\r\n }\r\n this.camera.update();\r\n };\r\n SceneRenderer.prototype.enableRenderer = function (renderer) {\r\n if (this.activeRenderer === renderer)\r\n return;\r\n this.end();\r\n if (renderer instanceof webgl.PolygonBatcher) {\r\n this.batcherShader.bind();\r\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.batcherShader.setUniformi(\"u_texture\", 0);\r\n this.batcher.begin(this.batcherShader);\r\n this.activeRenderer = this.batcher;\r\n }\r\n else if (renderer instanceof webgl.ShapeRenderer) {\r\n this.shapesShader.bind();\r\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.shapes.begin(this.shapesShader);\r\n this.activeRenderer = this.shapes;\r\n }\r\n else {\r\n this.activeRenderer = this.skeletonDebugRenderer;\r\n }\r\n };\r\n SceneRenderer.prototype.dispose = function () {\r\n this.batcher.dispose();\r\n this.batcherShader.dispose();\r\n this.shapes.dispose();\r\n this.shapesShader.dispose();\r\n this.skeletonDebugRenderer.dispose();\r\n };\r\n return SceneRenderer;\r\n }());\r\n webgl.SceneRenderer = SceneRenderer;\r\n var ResizeMode;\r\n (function (ResizeMode) {\r\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\r\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\r\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\r\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Shader = (function () {\r\n function Shader(context, vertexShader, fragmentShader) {\r\n this.vertexShader = vertexShader;\r\n this.fragmentShader = fragmentShader;\r\n this.vs = null;\r\n this.fs = null;\r\n this.program = null;\r\n this.tmp2x2 = new Float32Array(2 * 2);\r\n this.tmp3x3 = new Float32Array(3 * 3);\r\n this.tmp4x4 = new Float32Array(4 * 4);\r\n this.vsSource = vertexShader;\r\n this.fsSource = fragmentShader;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.context.addRestorable(this);\r\n this.compile();\r\n }\r\n Shader.prototype.getProgram = function () { return this.program; };\r\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\r\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\r\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\r\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\r\n Shader.prototype.compile = function () {\r\n var gl = this.context.gl;\r\n try {\r\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\r\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\r\n this.program = this.compileProgram(this.vs, this.fs);\r\n }\r\n catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n };\r\n Shader.prototype.compileShader = function (type, source) {\r\n var gl = this.context.gl;\r\n var shader = gl.createShader(type);\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\r\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\r\n gl.deleteShader(shader);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return shader;\r\n };\r\n Shader.prototype.compileProgram = function (vs, fs) {\r\n var gl = this.context.gl;\r\n var program = gl.createProgram();\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\r\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\r\n gl.deleteProgram(program);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return program;\r\n };\r\n Shader.prototype.restore = function () {\r\n this.compile();\r\n };\r\n Shader.prototype.bind = function () {\r\n this.context.gl.useProgram(this.program);\r\n };\r\n Shader.prototype.unbind = function () {\r\n this.context.gl.useProgram(null);\r\n };\r\n Shader.prototype.setUniformi = function (uniform, value) {\r\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniformf = function (uniform, value) {\r\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\r\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\r\n };\r\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\r\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\r\n };\r\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\r\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\r\n };\r\n Shader.prototype.setUniform2x2f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp2x2.set(value);\r\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\r\n };\r\n Shader.prototype.setUniform3x3f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp3x3.set(value);\r\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\r\n };\r\n Shader.prototype.setUniform4x4f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp4x4.set(value);\r\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\r\n };\r\n Shader.prototype.getUniformLocation = function (uniform) {\r\n var gl = this.context.gl;\r\n var location = gl.getUniformLocation(this.program, uniform);\r\n if (!location && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for uniform \".concat(uniform));\r\n return location;\r\n };\r\n Shader.prototype.getAttributeLocation = function (attribute) {\r\n var gl = this.context.gl;\r\n var location = gl.getAttribLocation(this.program, attribute);\r\n if (location == -1 && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for attribute \".concat(attribute));\r\n return location;\r\n };\r\n Shader.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n if (this.vs) {\r\n gl.deleteShader(this.vs);\r\n this.vs = null;\r\n }\r\n if (this.fs) {\r\n gl.deleteShader(this.fs);\r\n this.fs = null;\r\n }\r\n if (this.program) {\r\n gl.deleteProgram(this.program);\r\n this.program = null;\r\n }\r\n };\r\n Shader.newColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(Shader.MVP_MATRIX, \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(Shader.POSITION, \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\");\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newTwoColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(Shader.MVP_MATRIX, \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_dark = \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(Shader.POSITION, \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\");\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newColored = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(Shader.MVP_MATRIX, \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(Shader.POSITION, \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\");\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.MVP_MATRIX = \"u_projTrans\";\r\n Shader.POSITION = \"a_position\";\r\n Shader.COLOR = \"a_color\";\r\n Shader.COLOR2 = \"a_color2\";\r\n Shader.TEXCOORDS = \"a_texCoords\";\r\n Shader.SAMPLER = \"u_texture\";\r\n return Shader;\r\n }());\r\n webgl.Shader = Shader;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ShapeRenderer = (function () {\r\n function ShapeRenderer(context, maxVertices) {\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shapeType = ShapeType.Filled;\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.vertexIndex = 0;\r\n this.tmp = new spine.Vector2();\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n ShapeRenderer.prototype.begin = function (shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has already been called\");\r\n this.shader = shader;\r\n this.vertexIndex = 0;\r\n this.isDrawing = true;\r\n var gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n ShapeRenderer.prototype.setColor = function (color) {\r\n this.color.setFromColor(color);\r\n };\r\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\r\n this.color.set(r, g, b, a);\r\n };\r\n ShapeRenderer.prototype.point = function (x, y, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Point, 1);\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n };\r\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, 2);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color);\r\n this.vertex(x3, y3, color2);\r\n this.vertex(x3, y3, color);\r\n this.vertex(x, y, color2);\r\n }\r\n };\r\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (color4 === null)\r\n color4 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\r\n };\r\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\r\n if (color === null)\r\n color = this.color;\r\n var t = this.tmp.set(y2 - y1, x1 - x2);\r\n t.normalize();\r\n width *= 0.5;\r\n var tx = t.x * width;\r\n var ty = t.y * width;\r\n if (!filled) {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n else {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.x = function (x, y, size) {\r\n this.line(x - size, y - size, x + size, y + size);\r\n this.line(x - size, y + size, x + size, y - size);\r\n };\r\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n if (count < 3)\r\n throw new Error(\"Polygon must contain at least 3 vertices\");\r\n this.check(ShapeType.Line, count * 2);\r\n if (color === null)\r\n color = this.color;\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n offset <<= 1;\r\n count <<= 1;\r\n var firstX = polygonVertices[offset];\r\n var firstY = polygonVertices[offset + 1];\r\n var last = offset + count;\r\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\r\n var x1 = polygonVertices[i];\r\n var y1 = polygonVertices[i + 1];\r\n var x2 = 0;\r\n var y2 = 0;\r\n if (i + 2 >= last) {\r\n x2 = firstX;\r\n y2 = firstY;\r\n }\r\n else {\r\n x2 = polygonVertices[i + 2];\r\n y2 = polygonVertices[i + 3];\r\n }\r\n this.vertex(x1, y1, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n if (segments === 0)\r\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\r\n if (segments <= 0)\r\n throw new Error(\"segments must be > 0.\");\r\n if (color === null)\r\n color = this.color;\r\n var angle = 2 * spine.MathUtils.PI / segments;\r\n var cos = Math.cos(angle);\r\n var sin = Math.sin(angle);\r\n var cx = radius, cy = 0;\r\n if (!filled) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_1 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_1 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n else {\r\n this.check(ShapeType.Filled, segments * 3 + 3);\r\n segments--;\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n var temp = cx;\r\n cx = radius;\r\n cy = 0;\r\n this.vertex(x + cx, y + cy, color);\r\n };\r\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n if (color === null)\r\n color = this.color;\r\n var subdiv_step = 1 / segments;\r\n var subdiv_step2 = subdiv_step * subdiv_step;\r\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\r\n var pre1 = 3 * subdiv_step;\r\n var pre2 = 3 * subdiv_step2;\r\n var pre4 = 6 * subdiv_step2;\r\n var pre5 = 6 * subdiv_step3;\r\n var tmp1x = x1 - cx1 * 2 + cx2;\r\n var tmp1y = y1 - cy1 * 2 + cy2;\r\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\r\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\r\n var fx = x1;\r\n var fy = y1;\r\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\r\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\r\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\r\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\r\n var dddfx = tmp2x * pre5;\r\n var dddfy = tmp2y * pre5;\r\n while (segments-- > 0) {\r\n this.vertex(fx, fy, color);\r\n fx += dfx;\r\n fy += dfy;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n this.vertex(fx, fy, color);\r\n }\r\n this.vertex(fx, fy, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.vertex = function (x, y, color) {\r\n var idx = this.vertexIndex;\r\n var vertices = this.mesh.getVertices();\r\n vertices[idx++] = x;\r\n vertices[idx++] = y;\r\n vertices[idx++] = color.r;\r\n vertices[idx++] = color.g;\r\n vertices[idx++] = color.b;\r\n vertices[idx++] = color.a;\r\n this.vertexIndex = idx;\r\n };\r\n ShapeRenderer.prototype.end = function () {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n this.flush();\r\n this.context.gl.disable(this.context.gl.BLEND);\r\n this.isDrawing = false;\r\n };\r\n ShapeRenderer.prototype.flush = function () {\r\n if (this.vertexIndex == 0)\r\n return;\r\n this.mesh.setVerticesLength(this.vertexIndex);\r\n this.mesh.draw(this.shader, this.shapeType);\r\n this.vertexIndex = 0;\r\n };\r\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n if (this.shapeType == shapeType) {\r\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\r\n this.flush();\r\n else\r\n return;\r\n }\r\n else {\r\n this.flush();\r\n this.shapeType = shapeType;\r\n }\r\n };\r\n ShapeRenderer.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return ShapeRenderer;\r\n }());\r\n webgl.ShapeRenderer = ShapeRenderer;\r\n var ShapeType;\r\n (function (ShapeType) {\r\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\r\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\r\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\r\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SkeletonDebugRenderer = (function () {\r\n function SkeletonDebugRenderer(context) {\r\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\r\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\r\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\r\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\r\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\r\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\r\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\r\n this.drawBones = true;\r\n this.drawRegionAttachments = true;\r\n this.drawBoundingBoxes = true;\r\n this.drawMeshHull = true;\r\n this.drawMeshTriangles = true;\r\n this.drawPaths = true;\r\n this.drawSkeletonXY = false;\r\n this.drawClipping = true;\r\n this.premultipliedAlpha = false;\r\n this.scale = 1;\r\n this.boneWidth = 2;\r\n this.bounds = new spine.SkeletonBounds();\r\n this.temp = new Array();\r\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n }\r\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n var skeletonX = skeleton.x;\r\n var skeletonY = skeleton.y;\r\n var gl = this.context.gl;\r\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\r\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\r\n var bones = skeleton.bones;\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneLineColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n if (bone.parent == null)\r\n continue;\r\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\r\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\r\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\r\n }\r\n if (this.drawSkeletonXY)\r\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\r\n }\r\n if (this.drawRegionAttachments) {\r\n shapes.setColor(this.attachmentLineColor);\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n var vertices = this.vertices;\r\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\r\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\r\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\r\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\r\n }\r\n }\r\n }\r\n if (this.drawMeshHull || this.drawMeshTriangles) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.MeshAttachment))\r\n continue;\r\n var mesh = attachment;\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\r\n var triangles = mesh.triangles;\r\n var hullLength = mesh.hullLength;\r\n if (this.drawMeshTriangles) {\r\n shapes.setColor(this.triangleLineColor);\r\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\r\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\r\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\r\n }\r\n }\r\n if (this.drawMeshHull && hullLength > 0) {\r\n shapes.setColor(this.attachmentLineColor);\r\n hullLength = (hullLength >> 1) * 2;\r\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\r\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n shapes.line(x, y, lastX, lastY);\r\n lastX = x;\r\n lastY = y;\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawBoundingBoxes) {\r\n var bounds = this.bounds;\r\n bounds.update(skeleton, true);\r\n shapes.setColor(this.aabbColor);\r\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\r\n var polygons = bounds.polygons;\r\n var boxes = bounds.boundingBoxes;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n shapes.setColor(boxes[i].color);\r\n shapes.polygon(polygon, 0, polygon.length);\r\n }\r\n }\r\n if (this.drawPaths) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n continue;\r\n var path = attachment;\r\n var nn = path.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n var color = this.pathColor;\r\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\r\n if (path.closed) {\r\n shapes.setColor(color);\r\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\r\n x2 = world[nn - 4];\r\n y2 = world[nn - 3];\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n }\r\n nn -= 4;\r\n for (var ii = 4; ii < nn; ii += 6) {\r\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\r\n x2 = world[ii + 4];\r\n y2 = world[ii + 5];\r\n shapes.setColor(color);\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n }\r\n }\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneOriginColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\r\n }\r\n }\r\n if (this.drawClipping) {\r\n var slots = skeleton.slots;\r\n shapes.setColor(this.clipColor);\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.ClippingAttachment))\r\n continue;\r\n var clip = attachment;\r\n var nn = clip.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\r\n var x = world[i_17];\r\n var y = world[i_17 + 1];\r\n var x2 = world[(i_17 + 2) % world.length];\r\n var y2 = world[(i_17 + 3) % world.length];\r\n shapes.line(x, y, x2, y2);\r\n }\r\n }\r\n }\r\n };\r\n SkeletonDebugRenderer.prototype.dispose = function () {\r\n };\r\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\r\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\r\n return SkeletonDebugRenderer;\r\n }());\r\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Renderable = (function () {\r\n function Renderable(vertices, numVertices, numFloats) {\r\n this.vertices = vertices;\r\n this.numVertices = numVertices;\r\n this.numFloats = numFloats;\r\n }\r\n return Renderable;\r\n }());\r\n ;\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.premultipliedAlpha = false;\r\n this.vertexEffect = null;\r\n this.tempColor = new spine.Color();\r\n this.tempColor2 = new spine.Color();\r\n this.vertexSize = 2 + 2 + 4;\r\n this.twoColorTint = false;\r\n this.renderable = new Renderable(null, 0, 0);\r\n this.clipper = new spine.SkeletonClipping();\r\n this.temp = new spine.Vector2();\r\n this.temp2 = new spine.Vector2();\r\n this.temp3 = new spine.Color();\r\n this.temp4 = new spine.Color();\r\n this.twoColorTint = twoColorTint;\r\n if (twoColorTint)\r\n this.vertexSize += 4;\r\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\r\n }\r\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n var clipper = this.clipper;\r\n var premultipliedAlpha = this.premultipliedAlpha;\r\n var twoColorTint = this.twoColorTint;\r\n var blendMode = null;\r\n var tempPos = this.temp;\r\n var tempUv = this.temp2;\r\n var tempLight = this.temp3;\r\n var tempDark = this.temp4;\r\n var renderable = this.renderable;\r\n var uvs = null;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n var attachmentColor = null;\r\n var skeletonColor = skeleton.color;\r\n var vertexSize = twoColorTint ? 12 : 8;\r\n var inRange = false;\r\n if (slotRangeStart == -1)\r\n inRange = true;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\r\n inRange = true;\r\n }\r\n if (!inRange) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\r\n inRange = false;\r\n }\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var region = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = 4;\r\n renderable.numFloats = clippedVertexSize << 2;\r\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n uvs = region.uvs;\r\n texture = region.region.renderObject.texture;\r\n attachmentColor = region.color;\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\r\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\r\n if (renderable.numFloats > renderable.vertices.length) {\r\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\r\n }\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture;\r\n uvs = mesh.uvs;\r\n attachmentColor = mesh.color;\r\n }\r\n else if (attachment instanceof spine.ClippingAttachment) {\r\n var clip = (attachment);\r\n clipper.clipStart(slot, clip);\r\n continue;\r\n }\r\n else {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (texture != null) {\r\n var slotColor = slot.color;\r\n var finalColor = this.tempColor;\r\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\r\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\r\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\r\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n if (premultipliedAlpha) {\r\n finalColor.r *= finalColor.a;\r\n finalColor.g *= finalColor.a;\r\n finalColor.b *= finalColor.a;\r\n }\r\n var darkColor = this.tempColor2;\r\n if (slot.darkColor == null)\r\n darkColor.set(0, 0, 0, 1.0);\r\n else {\r\n if (premultipliedAlpha) {\r\n darkColor.r = slot.darkColor.r * finalColor.a;\r\n darkColor.g = slot.darkColor.g * finalColor.a;\r\n darkColor.b = slot.darkColor.b * finalColor.a;\r\n }\r\n else {\r\n darkColor.setFromColor(slot.darkColor);\r\n }\r\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\r\n }\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\r\n }\r\n if (clipper.isClipping()) {\r\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\r\n var clippedVertices = new Float32Array(clipper.clippedVertices);\r\n var clippedTriangles = clipper.clippedTriangles;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n var verts = clippedVertices;\r\n if (!twoColorTint) {\r\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n batcher.draw(texture, clippedVertices, clippedTriangles);\r\n }\r\n else {\r\n var verts = renderable.vertices;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n if (!twoColorTint) {\r\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.setFromColor(darkColor);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n else {\r\n if (!twoColorTint) {\r\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n }\r\n }\r\n else {\r\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n verts[v + 6] = darkColor.r;\r\n verts[v + 7] = darkColor.g;\r\n verts[v + 8] = darkColor.b;\r\n verts[v + 9] = darkColor.a;\r\n }\r\n }\r\n }\r\n var view = renderable.vertices.subarray(0, renderable.numFloats);\r\n batcher.draw(texture, view, triangles);\r\n }\r\n }\r\n clipper.clipEndWithSlot(slot);\r\n }\r\n clipper.clipEnd();\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n return SkeletonRenderer;\r\n }());\r\n webgl.SkeletonRenderer = SkeletonRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Vector3 = (function () {\r\n function Vector3(x, y, z) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n if (z === void 0) { z = 0; }\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n Vector3.prototype.setFrom = function (v) {\r\n this.x = v.x;\r\n this.y = v.y;\r\n this.z = v.z;\r\n return this;\r\n };\r\n Vector3.prototype.set = function (x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n };\r\n Vector3.prototype.add = function (v) {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n return this;\r\n };\r\n Vector3.prototype.sub = function (v) {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n return this;\r\n };\r\n Vector3.prototype.scale = function (s) {\r\n this.x *= s;\r\n this.y *= s;\r\n this.z *= s;\r\n return this;\r\n };\r\n Vector3.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len == 0)\r\n return this;\r\n len = 1 / len;\r\n this.x *= len;\r\n this.y *= len;\r\n this.z *= len;\r\n return this;\r\n };\r\n Vector3.prototype.cross = function (v) {\r\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\r\n };\r\n Vector3.prototype.multiply = function (matrix) {\r\n var l_mat = matrix.values;\r\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\r\n };\r\n Vector3.prototype.project = function (matrix) {\r\n var l_mat = matrix.values;\r\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\r\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\r\n };\r\n Vector3.prototype.dot = function (v) {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n };\r\n Vector3.prototype.length = function () {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n };\r\n Vector3.prototype.distance = function (v) {\r\n var a = v.x - this.x;\r\n var b = v.y - this.y;\r\n var c = v.z - this.z;\r\n return Math.sqrt(a * a + b * b + c * c);\r\n };\r\n return Vector3;\r\n }());\r\n webgl.Vector3 = Vector3;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ManagedWebGLRenderingContext = (function () {\r\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\r\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\r\n this.restorables = new Array();\r\n if (!((canvasOrContext instanceof WebGLRenderingContext) || (canvasOrContext instanceof WebGL2RenderingContext))) {\r\n this.setupCanvas(canvasOrContext, contextConfig);\r\n }\r\n else {\r\n this.gl = canvasOrContext;\r\n this.canvas = this.gl.canvas;\r\n }\r\n }\r\n ManagedWebGLRenderingContext.prototype.setupCanvas = function (canvas, contextConfig) {\r\n var _this = this;\r\n this.gl = (canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig));\r\n this.canvas = canvas;\r\n canvas.addEventListener(\"webglcontextlost\", function (e) {\r\n var event = e;\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n });\r\n canvas.addEventListener(\"webglcontextrestored\", function (e) {\r\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\r\n _this.restorables[i].restore();\r\n }\r\n });\r\n };\r\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\r\n this.restorables.push(restorable);\r\n };\r\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\r\n var index = this.restorables.indexOf(restorable);\r\n if (index > -1)\r\n this.restorables.splice(index, 1);\r\n };\r\n return ManagedWebGLRenderingContext;\r\n }());\r\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\r\n var WebGLBlendModeConverter = (function () {\r\n function WebGLBlendModeConverter() {\r\n }\r\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.ZERO = 0;\r\n WebGLBlendModeConverter.ONE = 1;\r\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\r\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\r\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\r\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\r\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\r\n return WebGLBlendModeConverter;\r\n }());\r\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-both.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\r\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\r\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\r\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\r\nvar MultiFile = require('../../../src/loader/MultiFile.js');\r\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\r\n\r\n/**\r\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\r\n *\r\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Spine File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\r\n *\r\n * @class SpineFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar SpineFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\r\n {\r\n var i;\r\n var json;\r\n var atlas;\r\n var files = [];\r\n var cache = loader.cacheManager.custom.spine;\r\n\r\n // atlas can be an array of atlas files, not just a single one\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n json = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'jsonURL'),\r\n extension: GetFastValue(config, 'jsonExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\r\n });\r\n\r\n atlasURL = GetFastValue(config, 'atlasURL');\r\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, {\r\n key: key + '!' + i,\r\n url: atlasURL[i],\r\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n else\r\n {\r\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, key + '!' + i, atlasURL[i], atlasXhrSettings);\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n\r\n files.unshift(json);\r\n\r\n MultiFile.call(this, loader, 'spine', key, files);\r\n\r\n this.config.preMultipliedAlpha = preMultipliedAlpha;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'text')\r\n {\r\n // Inspect the data for the files to now load\r\n var content = file.data.split('\\n');\r\n\r\n // Extract the textures\r\n var textures = [];\r\n\r\n for (var t = 0; t < content.length; t++)\r\n {\r\n var line = content[t];\r\n\r\n if (line.trim() === '' && t < content.length - 1)\r\n {\r\n line = content[t + 1];\r\n\r\n textures.push(line);\r\n }\r\n }\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\r\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\r\n var prefix = GetFastValue(config, 'prefix', this.prefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n var textureURL = textures[i];\r\n\r\n var key = this.key + ':' + textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n if (!loader.keyExists(image))\r\n {\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\r\n * @since 3.19.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var atlasCache;\r\n var atlasKey = '';\r\n var combinedAtlasData = '';\r\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\r\n var textureManager = this.loader.textureManager;\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'text')\r\n {\r\n atlasKey = file.key.replace(/![\\d]$/, '');\r\n\r\n atlasCache = file.cache;\r\n\r\n combinedAtlasData = combinedAtlasData.concat(file.data);\r\n }\r\n else\r\n {\r\n var src = file.key.trim();\r\n var pos = src.indexOf('!');\r\n var key = src.substr(pos + 1);\r\n\r\n if (!textureManager.exists(key))\r\n {\r\n textureManager.addImage(key, file.data);\r\n }\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetValue = require('../../../src/utils/object/GetValue');\r\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\r\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\r\nvar Spine = require('Spine');\r\nvar SpineFile = require('./SpineFile');\r\nvar SpineGameObject = require('./gameobject/SpineGameObject');\r\nvar SpineContainer = require('./container/SpineContainer');\r\nvar NOOP = require('../../../src/utils/NOOP');\r\n\r\n/**\r\n * @classdesc\r\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\r\n *\r\n * Find more details about Spine itself at http://esotericsoftware.com/.\r\n *\r\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\r\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\r\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\r\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\r\n *\r\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\r\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\r\n *\r\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\r\n *\r\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\r\n *\r\n * ```javascript\r\n * import * as SpinePlugin from './SpinePlugin.js';\r\n * ```\r\n *\r\n * and then adding it to your Phaser Game configuration:\r\n *\r\n * ```javascript\r\n * plugins: {\r\n * scene: [\r\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\r\n * ]\r\n * }\r\n * ```\r\n *\r\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\r\n * Game Configuration object, like this:\r\n *\r\n * ```javascript\r\n * scene: {\r\n * preload: preload,\r\n * create: create,\r\n * pack: {\r\n * files: [\r\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\r\n * ]\r\n * }\r\n * }\r\n * ```\r\n *\r\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\r\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\r\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\r\n * subsequent Scenes.\r\n *\r\n * ## A note about inlined data:\r\n *\r\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\r\n * at all. Instead, call the functions directly as required:\r\n *\r\n * scene.cache.json.add\r\n * scene.cache.custom.spine.add\r\n * scene.textures.addBase64\r\n *\r\n * ## Using the plugin\r\n *\r\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\r\n *\r\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\r\n * Spine files directly, i.e.:\r\n *\r\n * ```javascript\r\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\r\n * ```\r\n *\r\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\r\n * and Spine Containers:\r\n *\r\n * ```javascript\r\n * const man = this.add.spine(512, 650, 'stretchyman');\r\n *\r\n * const container = this.add.spineContainer();\r\n *\r\n * container.add(man);\r\n * ```\r\n *\r\n * The first argument is the key which you used when importing the Spine data. There are lots of\r\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\r\n * see the respective documentation and examples for further details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\r\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\r\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\r\n * load arguments, or you may see black outlines around skeleton textures.\r\n *\r\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\r\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\r\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\r\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\r\n * game, regardless if the Scene loaded the Spine data or not.\r\n *\r\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\r\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\r\n *\r\n * ```javascript\r\n * this.plugins.removeScenePlugin('SpinePlugin');\r\n * ```\r\n *\r\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\r\n *\r\n * @class SpinePlugin\r\n * @extends Phaser.Plugins.ScenePlugin\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar SpinePlugin = new Class({\r\n\r\n Extends: ScenePlugin,\r\n\r\n initialize:\r\n\r\n function SpinePlugin (scene, pluginManager, pluginKey)\r\n {\r\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\r\n\r\n var game = pluginManager.game;\r\n\r\n /**\r\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\r\n *\r\n * @name SpinePlugin#isWebGL\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isWebGL = (game.config.renderType === 2);\r\n\r\n /**\r\n * A custom cache that stores the Spine atlas data.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.cache = game.cache.addCustom('spine');\r\n\r\n /**\r\n * A custom cache that stores the Spine Textures.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#spineTextures\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.spineTextures = game.cache.addCustom('spineTextures');\r\n\r\n /**\r\n * A reference to the global JSON Cache.\r\n *\r\n * @name SpinePlugin#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.json = game.cache.json;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name SpinePlugin#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.19.0\r\n */\r\n this.textures = game.textures;\r\n\r\n /**\r\n * A flag that sets if the Skeleton Renderers will render debug information over the top\r\n * of the skeleton or not.\r\n *\r\n * @name SpinePlugin#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The underlying WebGL context of the Phaser renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.19.0\r\n */\r\n this.gl;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name SpinePlugin#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.renderer;\r\n\r\n /**\r\n * An instance of the Spine WebGL Scene Renderer.\r\n *\r\n * There is only one instance of the Scene Renderer shared across the whole plugin.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#sceneRenderer\r\n * @type {spine.webgl.SceneRenderer}\r\n * @since 3.19.0\r\n */\r\n this.sceneRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Renderer.\r\n *\r\n * @name SpinePlugin#skeletonRenderer\r\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.skeletonRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Debug Renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#skeletonDebugRenderer\r\n * @type {spine.webgl.skeletonDebugRenderer}\r\n * @since 3.19.0\r\n */\r\n this.skeletonDebugRenderer;\r\n\r\n /**\r\n * A reference to the Spine runtime.\r\n * This is the runtime created by Esoteric Software.\r\n *\r\n * @name SpinePlugin#plugin\r\n * @type {spine}\r\n * @since 3.19.0\r\n */\r\n this.plugin = Spine;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp1\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp1;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp2\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp2;\r\n\r\n if (this.isWebGL)\r\n {\r\n this.runtime = Spine.webgl;\r\n\r\n this.renderer = game.renderer;\r\n this.gl = game.renderer.gl;\r\n\r\n this.getAtlas = this.getAtlasWebGL;\r\n }\r\n else\r\n {\r\n this.runtime = Spine.canvas;\r\n\r\n this.renderer = game.renderer;\r\n\r\n this.getAtlas = this.getAtlasCanvas;\r\n }\r\n\r\n // Headless mode?\r\n if (!this.renderer)\r\n {\r\n this.renderer = {\r\n width: game.scale.width,\r\n height: game.scale.height,\r\n preRender: NOOP,\r\n postRender: NOOP,\r\n render: NOOP,\r\n destroy: NOOP\r\n };\r\n }\r\n\r\n var isWebGL = this.isWebGL;\r\n\r\n var add = function (x, y, key, animationName, loop)\r\n {\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.clear();\r\n }\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, x, y, key, animationName, loop);\r\n\r\n this.displayList.add(spineGO);\r\n this.updateList.add(spineGO);\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.rebind();\r\n }\r\n\r\n return spineGO;\r\n };\r\n\r\n var make = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.clear();\r\n }\r\n\r\n var key = GetValue(config, 'key', null);\r\n var animationName = GetValue(config, 'animationName', null);\r\n var loop = GetValue(config, 'loop', false);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 0, 0, key, animationName, loop);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, spineGO, config);\r\n\r\n // Spine specific\r\n var skinName = GetValue(config, 'skinName', false);\r\n\r\n if (skinName)\r\n {\r\n spineGO.setSkinByName(skinName);\r\n }\r\n\r\n var slotName = GetValue(config, 'slotName', false);\r\n var attachmentName = GetValue(config, 'attachmentName', null);\r\n\r\n if (slotName)\r\n {\r\n spineGO.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.rebind();\r\n }\r\n\r\n return spineGO.refresh();\r\n };\r\n\r\n var addContainer = function (x, y, children)\r\n {\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n this.displayList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var makeContainer = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetValue(config, 'x', 0);\r\n var y = GetValue(config, 'y', 0);\r\n var children = GetValue(config, 'children', null);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var container = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n\r\n return container;\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\r\n },\r\n\r\n /**\r\n * Internal boot handler.\r\n *\r\n * @method SpinePlugin#boot\r\n * @private\r\n * @since 3.19.0\r\n */\r\n boot: function ()\r\n {\r\n if (this.isWebGL)\r\n {\r\n this.bootWebGL();\r\n this.onResize();\r\n this.game.scale.on(ResizeEvent, this.onResize, this);\r\n }\r\n else\r\n {\r\n this.bootCanvas();\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n eventEmitter.once('destroy', this.destroy, this);\r\n\r\n this.game.events.once('destroy', this.gameDestroy, this);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the Canvas Renderer.\r\n *\r\n * @method SpinePlugin#bootCanvas\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootCanvas: function ()\r\n {\r\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the WebGL Renderer.\r\n *\r\n * @method SpinePlugin#bootWebGL\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootWebGL: function ()\r\n {\r\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\r\n\r\n var setBlendMode = function (srcBlend, dstBlend)\r\n {\r\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\r\n {\r\n var gl = this.context.gl;\r\n\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n\r\n if (this.isDrawing)\r\n {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n }\r\n };\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (!sceneRenderer)\r\n {\r\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n sceneRenderer.batcher.setBlendMode = setBlendMode;\r\n sceneRenderer.shapes.setBlendMode = setBlendMode;\r\n\r\n this.renderer.spineSceneRenderer = sceneRenderer;\r\n }\r\n\r\n // All scene share the same instance\r\n this.sceneRenderer = sceneRenderer;\r\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer;\r\n\r\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\r\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasCanvas\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasCanvas: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage());\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasWebGL\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasWebGL: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n var gl = this.sceneRenderer.context.gl;\r\n\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage(), false);\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\r\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\r\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\r\n * outlines around skeleton textures.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\r\n * Loading a file using a key that is already taken will result in a warning.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.spine({\r\n * key: 'mainmenu',\r\n * jsonURL: 'boy.json',\r\n * atlasURL: 'boy.atlas',\r\n * preMultipliedAlpha: true\r\n * });\r\n * ```\r\n *\r\n * If you need to load multiple Spine atlas files, provide them as an array:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\r\n * }\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the data from the Spine plugin.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spine\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.19.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {object} [settings] - An external Settings configuration object { prefix: '' }\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\r\n {\r\n var multifile;\r\n settings = settings || {};\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new SpineFile(this, key[i]);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#worldToLocal\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The screen space x coordinate to convert.\r\n * @param {number} y - The screen space y coordinate to convert.\r\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\r\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\r\n *\r\n * @return {spine.Vector2} A Vector2 containing the translated point.\r\n */\r\n worldToLocal: function (x, y, skeleton, bone)\r\n {\r\n var temp1 = this.temp1;\r\n var temp2 = this.temp2;\r\n var camera = this.sceneRenderer.camera;\r\n\r\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\r\n\r\n var width = camera.viewportWidth;\r\n var height = camera.viewportHeight;\r\n\r\n camera.screenToWorld(temp1, width, height);\r\n\r\n if (bone && bone.parent !== null)\r\n {\r\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\r\n\r\n return new Spine.Vector2(temp2.x, temp2.y);\r\n }\r\n else if (bone)\r\n {\r\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\r\n }\r\n else\r\n {\r\n return new Spine.Vector2(temp1.x, temp1.y);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x and y values.\r\n *\r\n * @method SpinePlugin#getVector2\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector2: function (x, y)\r\n {\r\n return new Spine.Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x, y and z values.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#getVector3\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n * @param {number} z - The Vector z value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector3: function (x, y, z)\r\n {\r\n return new Spine.webgl.Vector3(x, y, z);\r\n },\r\n\r\n /**\r\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBones\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBones: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBones = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugRegionAttachments\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugRegionAttachments: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawRegionAttachments = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBoundingBoxes\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBoundingBoxes: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshHull\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshHull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshHull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshTriangles\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshTriangles: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshTriangles = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugPaths\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugPaths: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawPaths = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugSkeletonXY\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugSkeletonXY: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawSkeletonXY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugClipping\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugClipping: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawClipping = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the given vertex effect on the Spine Skeleton Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setEffect\r\n * @since 3.19.0\r\n *\r\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setEffect: function (effect)\r\n {\r\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\r\n *\r\n * The Skeleton data should have already been loaded before calling this method.\r\n *\r\n * @method SpinePlugin#createSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\r\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\r\n *\r\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\r\n */\r\n createSkeleton: function (key, skeletonJSON)\r\n {\r\n var atlasKey = key;\r\n var jsonKey = key;\r\n var split = (key.indexOf('.') !== -1);\r\n\r\n if (split)\r\n {\r\n var parts = key.split('.');\r\n\r\n atlasKey = parts.shift();\r\n jsonKey = parts.join('.');\r\n }\r\n\r\n var atlasData = this.cache.get(atlasKey);\r\n var atlas = this.getAtlas(atlasKey);\r\n\r\n if (!atlas)\r\n {\r\n return null;\r\n }\r\n\r\n if (!this.spineTextures.has(atlasKey))\r\n {\r\n this.spineTextures.add(atlasKey, atlas);\r\n }\r\n\r\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\r\n\r\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\r\n\r\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\r\n\r\n var data;\r\n\r\n if (skeletonJSON)\r\n {\r\n data = skeletonJSON;\r\n }\r\n else\r\n {\r\n var json = this.json.get(atlasKey);\r\n\r\n data = (split) ? GetValue(json, jsonKey) : json;\r\n }\r\n\r\n if (data)\r\n {\r\n var skeletonData = skeletonJson.readSkeletonData(data);\r\n\r\n var skeleton = new Spine.Skeleton(skeletonData);\r\n\r\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Animation State and Animation State Data for the given skeleton.\r\n *\r\n * The returned object contains two properties: `state` and `stateData` respectively.\r\n *\r\n * @method SpinePlugin#createAnimationState\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\r\n *\r\n * @return {any} An object containing the Animation State and Animation State Data instances.\r\n */\r\n createAnimationState: function (skeleton)\r\n {\r\n var stateData = new Spine.AnimationStateData(skeleton.data);\r\n\r\n var state = new Spine.AnimationState(stateData);\r\n\r\n return { stateData: stateData, state: state };\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpinePlugin#getBounds\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function (skeleton)\r\n {\r\n var offset = new Spine.Vector2();\r\n var size = new Spine.Vector2();\r\n\r\n skeleton.getBounds(offset, size, []);\r\n\r\n return { offset: offset, size: size };\r\n },\r\n\r\n /**\r\n * Internal handler for when the renderer resizes.\r\n *\r\n * Only called if running in WebGL.\r\n *\r\n * @method SpinePlugin#onResize\r\n * @since 3.19.0\r\n */\r\n onResize: function ()\r\n {\r\n var renderer = this.renderer;\r\n var sceneRenderer = this.sceneRenderer;\r\n\r\n var viewportWidth = renderer.width;\r\n var viewportHeight = renderer.height;\r\n\r\n sceneRenderer.camera.position.x = viewportWidth / 2;\r\n sceneRenderer.camera.position.y = viewportHeight / 2;\r\n\r\n sceneRenderer.camera.setViewport(viewportWidth, viewportHeight);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n *\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method SpinePlugin#shutdown\r\n * @private\r\n * @since 3.19.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n if (this.isWebGL)\r\n {\r\n this.game.scale.off(ResizeEvent, this.onResize, this);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n *\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method SpinePlugin#destroy\r\n * @private\r\n * @since 3.19.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.cache = null;\r\n this.spineTextures = null;\r\n this.json = null;\r\n this.textures = null;\r\n this.skeletonRenderer = null;\r\n this.gl = null;\r\n },\r\n\r\n /**\r\n * The Game that owns this plugin is being destroyed.\r\n *\r\n * Dispose of the Scene Renderer and remove the Game Objects.\r\n *\r\n * @method SpinePlugin#gameDestroy\r\n * @private\r\n * @since 3.50.0\r\n */\r\n gameDestroy: function ()\r\n {\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n this.pluginManager.removeGameObject('spineContainer', true, true);\r\n\r\n this.pluginManager = null;\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (sceneRenderer)\r\n {\r\n sceneRenderer.dispose();\r\n }\r\n\r\n this.renderer.spineSceneRenderer = null;\r\n this.sceneRenderer = null;\r\n }\r\n\r\n});\r\n\r\nSpinePlugin.SpineGameObject = SpineGameObject;\r\nSpinePlugin.SpineContainer = SpineContainer;\r\n\r\n/**\r\n * Creates a new Spine Game Object and adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\r\n *\r\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\r\n *\r\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\r\n * name, then use `SpinePlugin.make` instead.\r\n *\r\n * @method SpinePlugin#add\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\n/**\r\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 500, y: 500, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-idle', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * @method SpinePlugin#make\r\n * @since 3.19.0\r\n *\r\n * @param {any} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\nmodule.exports = SpinePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../../src/utils/Class');\r\nvar Container = require('../../../../src/gameobjects/container/Container');\r\nvar SpineContainerRender = require('./SpineContainerRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\r\n *\r\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\r\n * for Spine Game Objects. You must only add ever Spine Game Objects, or other Spine Containers, to this type of Container.\r\n * Although Phaser will not prevent you from adding other types, they will not render and are likely to throw runtime errors.\r\n *\r\n * To create one in a Scene, use the factory methods:\r\n *\r\n * ```javascript\r\n * this.add.spineContainer();\r\n * ```\r\n *\r\n * or\r\n *\r\n * ```javascript\r\n * this.make.spineContainer();\r\n * ```\r\n *\r\n * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\r\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\r\n * Spine Containers. In short, if you need masking, don't mix and match the types.\r\n *\r\n * See the Container documentation for further details about what Containers can do.\r\n *\r\n * @class SpineContainer\r\n * @extends Phaser.GameObjects.Container\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\r\n */\r\nvar SpineContainer = new Class({\r\n\r\n Extends: Container,\r\n\r\n Mixins: [\r\n SpineContainerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineContainer (scene, plugin, x, y, children)\r\n {\r\n Container.call(this, scene, x, y, children);\r\n\r\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\r\n this.type = 'Spine';\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineContainer#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.50.0\r\n */\r\n this.plugin = plugin;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineContainer#preDestroy\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineContainer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n camera.addToRenderList(container);\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = SpineContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineContainerWebGLRenderer#renderWebGL\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineContainer} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n var plugin = container.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n }\r\n\r\n return;\r\n }\r\n\r\n camera.addToRenderList(container);\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var rendererNextType = renderer.nextTypeMatch;\r\n\r\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\r\n renderer.nextTypeMatch = true;\r\n renderer.newType = false;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (child.willRender(camera, container))\r\n {\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.preRenderWebGL(renderer, child, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.postRenderWebGL(renderer, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n }\r\n }\r\n\r\n renderer.nextTypeMatch = rendererNextType;\r\n\r\n if (!rendererNextType || container.mask)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineContainerWebGLRenderer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AngleBetween = require('../../../../src/math/angle/Between');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar Class = require('../../../../src/utils/Class');\r\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\r\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\r\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\r\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\r\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\r\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar DegToRad = require('../../../../src/math/DegToRad');\r\nvar GameObject = require('../../../../src/gameobjects/GameObject');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar SpineEvents = require('../events/');\r\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\r\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\r\n * easily change the skin, slot attachment, bone positions and more.\r\n *\r\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\r\n * You can only create them if the Spine plugin has been loaded into Phaser.\r\n *\r\n * The quickest way is the Game Object Factory:\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\r\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\r\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\r\n * animation to loop. Look at the documentation for further details on each of these options.\r\n *\r\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\r\n * Configuration object:\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 512, y: 550, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-think', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\r\n * overall scale.\r\n *\r\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\r\n * update and render, it must be added to the display and update lists of your Scene:\r\n *\r\n * ```javascript\r\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\r\n * this.sys.displayList.add(jelly);\r\n * this.sys.updateList.add(jelly);\r\n * ```\r\n *\r\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\r\n * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup\r\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\r\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\r\n * input shape being created. If it's not suitable, provide your own shape to the `setInteractive` method.\r\n *\r\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\r\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\r\n * Object position with it. See the examples for further details.\r\n *\r\n * If your Spine Game Object has black outlines around the different parts of the texture when it\r\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\r\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\r\n *\r\n * @class SpineGameObject\r\n * @extends Phaser.GameObjects.GameObject\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n */\r\nvar SpineGameObject = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsComputedSize,\r\n ComponentsDepth,\r\n ComponentsFlip,\r\n ComponentsScrollFactor,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n SpineGameObjectRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\r\n {\r\n GameObject.call(this, scene, 'Spine');\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineGameObject#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.19.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The Spine Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeleton\r\n * @type {spine.Skeleton}\r\n * @since 3.19.0\r\n */\r\n this.skeleton = null;\r\n\r\n /**\r\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeletonData\r\n * @type {spine.SkeletonData}\r\n * @since 3.19.0\r\n */\r\n this.skeletonData = null;\r\n\r\n /**\r\n * The Spine Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#state\r\n * @type {spine.AnimationState}\r\n * @since 3.19.0\r\n */\r\n this.state = null;\r\n\r\n /**\r\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#stateData\r\n * @type {spine.AnimationStateData}\r\n * @since 3.19.0\r\n */\r\n this.stateData = null;\r\n\r\n /**\r\n * A reference to the root bone of the Skeleton.\r\n *\r\n * @name SpineGameObject#root\r\n * @type {spine.Bone}\r\n * @since 3.19.0\r\n */\r\n this.root = null;\r\n\r\n /**\r\n * This object holds the calculated bounds of the current\r\n * pose, as set when a new Skeleton is applied.\r\n *\r\n * @name SpineGameObject#bounds\r\n * @type {any}\r\n * @since 3.19.0\r\n */\r\n this.bounds = null;\r\n\r\n /**\r\n * A Game Object level flag that allows you to enable debug drawing\r\n * to the Skeleton Debug Renderer by toggling it.\r\n *\r\n * @name SpineGameObject#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The factor to scale the Animation update time by.\r\n *\r\n * @name SpineGameObject#timeScale\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginX\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginY\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * A flag that stores if the texture associated with the current\r\n * Skin being used by this Game Object, has its alpha pre-multiplied\r\n * into it, or not.\r\n *\r\n * @name SpineGameObject#preMultipliedAlpha\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.preMultipliedAlpha = false;\r\n\r\n /**\r\n * A default Blend Mode. You cannot change the blend mode of a\r\n * Spine Game Object.\r\n *\r\n * @name SpineGameObject#blendMode\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.blendMode = -1;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key)\r\n {\r\n this.setSkeleton(key, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Returns `true` if this Spine Game Object both has a skeleton and\r\n * also passes the render tests for the given Camera.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n *\r\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function (camera, container)\r\n {\r\n var GameObjectRenderMask = 15;\r\n\r\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\r\n\r\n if (!container && !result && this.parentContainer)\r\n {\r\n var plugin = this.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\r\n {\r\n sceneRenderer.end();\r\n\r\n plugin.renderer.pipelines.rebind();\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Set the Alpha level for the whole Skeleton of this Game Object.\r\n *\r\n * The alpha controls the opacity of the Game Object as it renders.\r\n *\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method SpineGameObject#setAlpha\r\n * @since 3.19.0\r\n *\r\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value, slotName)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n slot.color.a = Clamp(value, 0, 1);\r\n }\r\n }\r\n else\r\n {\r\n this.alpha = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#alpha\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.a = v;\r\n }\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~2;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 2;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of red used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#red\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.r = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of green used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#green\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.g = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of blue used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#blue\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.b = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\r\n *\r\n * @method SpineGameObject#setColor\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\r\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setColor: function (color, slotName)\r\n {\r\n if (color === undefined) { color = 0xffffff; }\r\n\r\n var red = (color >> 16 & 0xFF) / 255;\r\n var green = (color >> 8 & 0xFF) / 255;\r\n var blue = (color & 0xFF) / 255;\r\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\r\n\r\n var target = this.skeleton;\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n target = slot;\r\n }\r\n }\r\n\r\n target.color.r = red;\r\n target.color.g = green;\r\n target.color.b = blue;\r\n\r\n if (alpha !== null)\r\n {\r\n target.color.a = alpha;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\r\n * that contains the Skeleton data.\r\n *\r\n * @method SpineGameObject#setSkeletonFromJSON\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\r\n {\r\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on its cache key.\r\n *\r\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\r\n * or slot attachment, or any other property to adjust it.\r\n *\r\n * @method SpineGameObject#setSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\r\n\r\n this.skeletonData = data.skeletonData;\r\n\r\n this.preMultipliedAlpha = data.preMultipliedAlpha;\r\n\r\n var skeleton = data.skeleton;\r\n\r\n skeleton.setSkin();\r\n skeleton.setToSetupPose();\r\n\r\n this.skeleton = skeleton;\r\n\r\n // AnimationState\r\n data = this.plugin.createAnimationState(skeleton);\r\n\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.state = data.state;\r\n this.stateData = data.stateData;\r\n\r\n this.state.addListener({\r\n event: this.onEvent.bind(this),\r\n complete: this.onComplete.bind(this),\r\n start: this.onStart.bind(this),\r\n end: this.onEnd.bind(this),\r\n dispose: this.onDispose.bind(this),\r\n interrupted: this.onInterrupted.bind(this)\r\n });\r\n\r\n if (animationName)\r\n {\r\n this.setAnimation(0, animationName, loop);\r\n }\r\n\r\n this.root = this.getRootBone();\r\n\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.state.apply(skeleton);\r\n\r\n skeleton.updateCache();\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onComplete event via this Game Object.\r\n *\r\n * @method SpineGameObject#onComplete\r\n * @fires SpinePluginEvents#COMPLETE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onComplete: function (entry)\r\n {\r\n this.emit(SpineEvents.COMPLETE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onDispose event via this Game Object.\r\n *\r\n * @method SpineGameObject#onDispose\r\n * @fires SpinePluginEvents#DISPOSE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onDispose: function (entry)\r\n {\r\n this.emit(SpineEvents.DISPOSE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onEnd event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEnd\r\n * @fires SpinePluginEvents#END\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onEnd: function (entry)\r\n {\r\n this.emit(SpineEvents.END, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine Event event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEvent\r\n * @fires SpinePluginEvents#EVENT\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n * @param {spine.Event} event - The Spine event.\r\n */\r\n onEvent: function (entry, event)\r\n {\r\n this.emit(SpineEvents.EVENT, entry, event);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\r\n *\r\n * @method SpineGameObject#onInterrupted\r\n * @fires SpinePluginEvents#INTERRUPTED\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onInterrupted: function (entry)\r\n {\r\n this.emit(SpineEvents.INTERRUPTED, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onStart event via this Game Object.\r\n *\r\n * @method SpineGameObject#onStart\r\n * @fires SpinePluginEvents#START\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onStart: function (entry)\r\n {\r\n this.emit(SpineEvents.START, entry);\r\n },\r\n\r\n /**\r\n * Refreshes the data about the current Skeleton.\r\n *\r\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\r\n *\r\n * Call this method if you need to access the Skeleton data directly, and it may have changed\r\n * recently.\r\n *\r\n * @method SpineGameObject#refresh\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n refresh: function ()\r\n {\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.updateSize();\r\n\r\n this.skeleton.updateCache();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n *\r\n * If no arguments are given it uses the current skeleton data dimensions.\r\n *\r\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\r\n * when the skeleton data doesn't match what is required in-game.\r\n *\r\n * @method SpineGameObject#setSize\r\n * @since 3.19.0\r\n *\r\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\r\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSize: function (width, height, offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (width === undefined) { width = skeleton.data.width; }\r\n if (height === undefined) { height = skeleton.data.height; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of this Game Object from the Skeleton position.\r\n *\r\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\r\n *\r\n * @method SpineGameObject#setOffset\r\n * @since 3.19.0\r\n *\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setOffset: function (offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\r\n * It then syncs the skeleton bounds back to this Game Object.\r\n *\r\n * This method is called automatically as needed internally, however, it's also exposed should\r\n * you require overriding the size settings.\r\n *\r\n * @method SpineGameObject#updateSize\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n updateSize: function ()\r\n {\r\n var skeleton = this.skeleton;\r\n var renderer = this.plugin.renderer;\r\n\r\n var height = renderer.height;\r\n\r\n var oldScaleX = this.scaleX;\r\n var oldScaleY = this.scaleY;\r\n\r\n skeleton.x = this.x;\r\n skeleton.y = height - this.y;\r\n skeleton.scaleX = 1;\r\n skeleton.scaleY = 1;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n var bounds = this.getBounds();\r\n\r\n this.width = bounds.size.x;\r\n this.height = bounds.size.y;\r\n\r\n this.displayOriginX = this.x - bounds.offset.x;\r\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\r\n\r\n skeleton.scaleX = oldScaleX;\r\n skeleton.scaleY = oldScaleY;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the bones in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getBoneList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\r\n */\r\n getBoneList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.bones.length; i++)\r\n {\r\n output.push(skeletonData.bones[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the skins in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getSkinList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\r\n */\r\n getSkinList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.skins.length; i++)\r\n {\r\n output.push(skeletonData.skins[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the slots in the Skeleton.\r\n *\r\n * @method SpineGameObject#getSlotList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\r\n */\r\n getSlotList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeleton = this.skeleton;\r\n\r\n for (var i = 0; i < skeleton.slots.length; i++)\r\n {\r\n output.push(skeleton.slots[i].data.name);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the animations in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getAnimationList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\r\n */\r\n getAnimationList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.animations.length; i++)\r\n {\r\n output.push(skeletonData.animations[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the current animation being played on the given track, if any.\r\n *\r\n * @method SpineGameObject#getCurrentAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\r\n *\r\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\r\n */\r\n getCurrentAnimation: function (trackIndex)\r\n {\r\n if (trackIndex === undefined) { trackIndex = 0; }\r\n\r\n var current = this.state.getCurrent(trackIndex);\r\n\r\n if (current)\r\n {\r\n return current.animation;\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#play\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\r\n */\r\n play: function (animationName, loop, ignoreIfPlaying)\r\n {\r\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#setAnimation\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to play the animation on.\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n\r\n if (ignoreIfPlaying && this.state)\r\n {\r\n var currentTrack = this.state.getCurrent(trackIndex);\r\n\r\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (this.findAnimation(animationName))\r\n {\r\n return this.state.setAnimation(trackIndex, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an animation to be played after the current or last queued animation for a track.\r\n * If the track is empty, it is equivalent to calling setAnimation.\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\r\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\r\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\r\n * If the previous entry is looping, its next loop completion is used instead of its duration.\r\n *\r\n * @method SpineGameObject#addAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {string} animationName - The string-based key of the animation to add.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n addAnimation: function (trackIndex, animationName, loop, delay)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (delay === undefined) { delay = 0; }\r\n\r\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\r\n },\r\n\r\n /**\r\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\r\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n *\r\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\r\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\r\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\r\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\r\n * A mix duration of 0 still mixes out over one frame.\r\n *\r\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\r\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\r\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\r\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\r\n * property to the value keyed in the new animation.\r\n *\r\n * @method SpineGameObject#setEmptyAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {spine.TrackEntry} The returned Track Entry.\r\n */\r\n setEmptyAnimation: function (trackIndex, mixDuration)\r\n {\r\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\r\n },\r\n\r\n /**\r\n * Removes all animations from the track, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTrack\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTrack: function (trackIndex)\r\n {\r\n this.state.clearTrack(trackIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all animations from all tracks, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTracks\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTracks: function ()\r\n {\r\n this.state.clearTracks();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkinByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to set.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkinByName: function (skinName)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkinByName(skinName);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkin\r\n * @since 3.19.0\r\n *\r\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkin: function (newSkin)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkin(newSkin);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mix duration when changing from the specified animation to the other.\r\n *\r\n * @method SpineGameObject#setMix\r\n * @since 3.19.0\r\n *\r\n * @param {string} fromName - The animation to mix from.\r\n * @param {string} toName - The animation to mix to.\r\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMix: function (fromName, toName, duration)\r\n {\r\n this.stateData.setMix(fromName, toName, duration);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot\r\n * index and attachment name. First the skin is checked and if the attachment was not found,\r\n * the default skin is checked.\r\n *\r\n * @method SpineGameObject#getAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {integer} slotIndex - The slot index to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachment: function (slotIndex, attachmentName)\r\n {\r\n return this.skeleton.getAttachment(slotIndex, attachmentName);\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\r\n *\r\n * @method SpineGameObject#getAttachmentByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachmentByName: function (slotName, attachmentName)\r\n {\r\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n },\r\n\r\n /**\r\n * A convenience method to set an attachment by finding the slot with findSlot,\r\n * finding the attachment with getAttachment, then setting the slot's attachment.\r\n *\r\n * @method SpineGameObject#setAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to add the attachment to.\r\n * @param {string} attachmentName - The attachment name to add.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAttachment: function (slotName, attachmentName)\r\n {\r\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\r\n {\r\n for (var i = 0; i < slotName.length; i++)\r\n {\r\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\r\n }\r\n }\r\n else\r\n {\r\n this.skeleton.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setToSetupPose: function ()\r\n {\r\n this.skeleton.setToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the slots and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setSlotsToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSlotsToSetupPose: function ()\r\n {\r\n this.skeleton.setSlotsToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones and constraints to their setup pose values.\r\n *\r\n * @method SpineGameObject#setBonesToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBonesToSetupPose: function ()\r\n {\r\n this.skeleton.setBonesToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the root bone, or null.\r\n *\r\n * @method SpineGameObject#getRootBone\r\n * @since 3.19.0\r\n *\r\n * @return {spine.Bone} The root bone, or null.\r\n */\r\n getRootBone: function ()\r\n {\r\n return this.skeleton.getRootBone();\r\n },\r\n\r\n /**\r\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\r\n * towards the given position. You can set an optional angle offset, should the bone be\r\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\r\n *\r\n * @method SpineGameObject#angleBoneToXY\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\r\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\r\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\r\n * @param {number} [offset=0] - An offset to add to the rotation angle.\r\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\r\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n if (minAngle === undefined) { minAngle = 0; }\r\n if (maxAngle === undefined) { maxAngle = 360; }\r\n\r\n var renderer = this.plugin.renderer;\r\n var height = renderer.height;\r\n\r\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\r\n\r\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBone\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {spine.Bone} The bone, or null.\r\n */\r\n findBone: function (boneName)\r\n {\r\n return this.skeleton.findBone(boneName);\r\n },\r\n\r\n /**\r\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBoneIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {integer} The bone index. Or -1 if the bone was not found.\r\n */\r\n findBoneIndex: function (boneName)\r\n {\r\n return this.skeleton.findBoneIndex(boneName);\r\n },\r\n\r\n /**\r\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlot\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {spine.Slot} The Slot. May be null.\r\n */\r\n findSlot: function (slotName)\r\n {\r\n return this.skeleton.findSlot(slotName);\r\n },\r\n\r\n /**\r\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlotIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {integer} The slot index. Or -1 if the Slot was not found.\r\n */\r\n findSlotIndex: function (slotName)\r\n {\r\n return this.skeleton.findSlotIndex(slotName);\r\n },\r\n\r\n /**\r\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\r\n * this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSkin\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to find.\r\n *\r\n * @return {spine.Skin} The Skin. May be null.\r\n */\r\n findSkin: function (skinName)\r\n {\r\n return this.skeletonData.findSkin(skinName);\r\n },\r\n\r\n /**\r\n * Finds an event by comparing each events's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findEvent\r\n * @since 3.19.0\r\n *\r\n * @param {string} eventDataName - The name of the event to find.\r\n *\r\n * @return {spine.EventData} The Event Data. May be null.\r\n */\r\n findEvent: function (eventDataName)\r\n {\r\n return this.skeletonData.findEvent(eventDataName);\r\n },\r\n\r\n /**\r\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The name of the animation to find.\r\n *\r\n * @return {spine.Animation} The Animation. May be null.\r\n */\r\n findAnimation: function (animationName)\r\n {\r\n return this.skeletonData.findAnimation(animationName);\r\n },\r\n\r\n /**\r\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findIkConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.IkConstraintData} The IK constraint. May be null.\r\n */\r\n findIkConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findIkConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds an transform constraint by comparing each transform constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findTransformConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\r\n */\r\n findTransformConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findTransformConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.PathConstraintData} The path constraint. May be null.\r\n */\r\n findPathConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds the index of a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraintIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\r\n */\r\n findPathConstraintIndex: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraintIndex(constraintName);\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpineGameObject#getBounds\r\n * @since 3.19.0\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function ()\r\n {\r\n return this.plugin.getBounds(this.skeleton);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method SpineGameObject#preUpdate\r\n * @protected\r\n * @since 3.19.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n this.state.update((delta / 1000) * this.timeScale);\r\n\r\n this.state.apply(skeleton);\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineGameObject#preDestroy\r\n * @protected\r\n * @since 3.19.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.plugin = null;\r\n\r\n this.skeleton = null;\r\n this.skeletonData = null;\r\n\r\n this.state = null;\r\n this.stateData = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderCanvas\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatrix)\r\n{\r\n var context = renderer.currentContext;\r\n\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var skeletonRenderer = plugin.skeletonRenderer;\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n camera.addToRenderList(src);\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n\r\n // Inverse or we get upside-down skeletons\r\n skeleton.scaleY = calcMatrix.scaleY * -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n if (camera.renderToTexture)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n skeletonRenderer.ctx = context;\r\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\r\n\r\n context.save();\r\n\r\n skeletonRenderer.draw(skeleton);\r\n\r\n context.restore();\r\n};\r\n\r\nmodule.exports = SpineGameObjectCanvasRenderer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Directly renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderDirect\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n }\r\n\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLDirect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderWebGL\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n\r\n // The Spine debug draw has reset the batcher, so we need to do this regardless:\r\n sceneRenderer.end();\r\n renderer.pipelines.rebind();\r\n }\r\n else if (!renderer.nextTypeMatch)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Global constants.\r\n *\r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Phaser Release Version\r\n *\r\n * @name Phaser.VERSION\r\n * @const\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n VERSION: '3.60.0',\r\n\r\n BlendModes: require('./renderer/BlendModes'),\r\n\r\n ScaleModes: require('./renderer/ScaleModes'),\r\n\r\n /**\r\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\r\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\r\n *\r\n * @name Phaser.AUTO\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n AUTO: 0,\r\n\r\n /**\r\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\r\n * WebGL or not.\r\n *\r\n * @name Phaser.CANVAS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n CANVAS: 1,\r\n\r\n /**\r\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\r\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\r\n * message to the user.\r\n *\r\n * @name Phaser.WEBGL\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n WEBGL: 2,\r\n\r\n /**\r\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\r\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\r\n * not for running Phaser on the server, which is something you really shouldn't do.\r\n *\r\n * @name Phaser.HEADLESS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n HEADLESS: 3,\r\n\r\n /**\r\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\r\n * to help you remember what the value is doing in your code.\r\n *\r\n * @name Phaser.FOREVER\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FOREVER: -1,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.NONE\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n NONE: 4,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.UP\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n UP: 5,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.DOWN\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DOWN: 6,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.LEFT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LEFT: 7,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.RIGHT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 8\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n *\r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once(Events.DESTROY, this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n *\r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {number} [data=1] - The amount to increase the given key by. Pass a negative value to decrease the key.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n\r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n *\r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n *\r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n *\r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.on('changedata', listener)`.\r\n *\r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Data Manager Destroy Event.\r\n *\r\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\r\n *\r\n * @event Phaser.Data.Events#DESTROY\r\n * @type {string}\r\n * @since 3.50.0\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.audio` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Audio\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} audioData - Can this device play HTML Audio tags?\r\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\r\n * @property {boolean} m4a - Can this device can play m4a files.\r\n * @property {boolean} aac - Can this device can play aac files.\r\n * @property {boolean} flac - Can this device can play flac files.\r\n * @property {boolean} mp3 - Can this device play mp3 files?\r\n * @property {boolean} ogg - Can this device play ogg files?\r\n * @property {boolean} opus - Can this device play opus files?\r\n * @property {boolean} wav - Can this device play wav files?\r\n * @property {boolean} webAudio - Does this device have the Web Audio API?\r\n * @property {boolean} webm - Can this device play webm files?\r\n */\r\nvar Audio = {\r\n\r\n flac: false,\r\n aac: false,\r\n audioData: false,\r\n dolby: false,\r\n m4a: false,\r\n mp3: false,\r\n ogg: false,\r\n opus: false,\r\n wav: false,\r\n webAudio: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Audio;\r\n }\r\n\r\n Audio.audioData = !!(window['Audio']);\r\n\r\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\r\n\r\n var audioElement = document.createElement('audio');\r\n var result = !!audioElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n var CanPlay = function (type1, type2)\r\n {\r\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\r\n\r\n if (type2)\r\n {\r\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\r\n }\r\n else\r\n {\r\n return Boolean(canPlayType1);\r\n }\r\n };\r\n\r\n // wav Mimetypes accepted:\r\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\r\n\r\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\r\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\r\n Audio.mp3 = CanPlay('mpeg');\r\n Audio.wav = CanPlay('wav');\r\n Audio.m4a = CanPlay('x-m4a');\r\n Audio.aac = CanPlay('aac');\r\n Audio.flac = CanPlay('flac', 'x-flac');\r\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\r\n\r\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\r\n {\r\n if (Browser.edge)\r\n {\r\n Audio.dolby = true;\r\n }\r\n else if (Browser.safari && Browser.safariVersion >= 9)\r\n {\r\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\r\n {\r\n var major = parseInt(RegExp.$1, 10);\r\n var minor = parseInt(RegExp.$2, 10);\r\n\r\n if ((major === 10 && minor >= 11) || major > 10)\r\n {\r\n Audio.dolby = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do here\r\n }\r\n\r\n return Audio;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\n\r\n/**\r\n * Determines the browser type and version running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.browser` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Browser\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} chrome - Set to true if running in Chrome.\r\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\r\n * @property {boolean} firefox - Set to true if running in Firefox.\r\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\r\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\r\n * @property {boolean} opera - Set to true if running in Opera.\r\n * @property {boolean} safari - Set to true if running in Safari.\r\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\r\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\r\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\r\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\r\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\r\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\r\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\r\n */\r\nvar Browser = {\r\n\r\n chrome: false,\r\n chromeVersion: 0,\r\n edge: false,\r\n firefox: false,\r\n firefoxVersion: 0,\r\n ie: false,\r\n ieVersion: 0,\r\n mobileSafari: false,\r\n opera: false,\r\n safari: false,\r\n safariVersion: 0,\r\n silk: false,\r\n trident: false,\r\n tridentVersion: 0,\r\n es2019: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Edg\\/\\d+/).test(ua))\r\n {\r\n Browser.edge = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/OPR/).test(ua))\r\n {\r\n Browser.opera = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.chrome = true;\r\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.chromeVersion > 69);\r\n }\r\n else if ((/Firefox\\D+(\\d+)/).test(ua))\r\n {\r\n Browser.firefox = true;\r\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.firefoxVersion > 10);\r\n }\r\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\r\n {\r\n Browser.mobileSafari = true;\r\n }\r\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.ieVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.safari = true;\r\n Browser.safariVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.safariVersion > 10);\r\n }\r\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.trident = true;\r\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\r\n Browser.ieVersion = parseInt(RegExp.$3, 10);\r\n }\r\n\r\n // Silk gets its own if clause because its ua also contains 'Safari'\r\n if ((/Silk/).test(ua))\r\n {\r\n Browser.silk = true;\r\n }\r\n\r\n return Browser;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the canvas features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.CanvasFeatures\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\r\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\r\n */\r\nvar CanvasFeatures = {\r\n\r\n supportInverseAlpha: false,\r\n supportNewBlendModes: false\r\n\r\n};\r\n\r\nfunction checkBlendMode ()\r\n{\r\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\r\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\r\n\r\n var magenta = new Image();\r\n\r\n magenta.onload = function ()\r\n {\r\n var yellow = new Image();\r\n\r\n yellow.onload = function ()\r\n {\r\n var canvas = CanvasPool.create2D(yellow, 6);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.globalCompositeOperation = 'multiply';\r\n\r\n context.drawImage(magenta, 0, 0);\r\n context.drawImage(yellow, 2, 0);\r\n\r\n if (!context.getImageData(2, 0, 1, 1))\r\n {\r\n return false;\r\n }\r\n\r\n var data = context.getImageData(2, 0, 1, 1).data;\r\n\r\n CanvasPool.remove(yellow);\r\n\r\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\r\n };\r\n\r\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\r\n };\r\n\r\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\r\n\r\n return false;\r\n}\r\n\r\nfunction checkInverseAlpha ()\r\n{\r\n var canvas = CanvasPool.create2D(this, 2);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\r\n\r\n // Draw a single pixel\r\n context.fillRect(0, 0, 1, 1);\r\n\r\n // Get the color values\r\n var s1 = context.getImageData(0, 0, 1, 1);\r\n\r\n if (s1 === null)\r\n {\r\n return false;\r\n }\r\n\r\n // Plot them to x2\r\n context.putImageData(s1, 1, 0);\r\n\r\n // Get those values\r\n var s2 = context.getImageData(1, 0, 1, 1);\r\n\r\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\r\n\r\n CanvasPool.remove(this);\r\n\r\n // Compare and return\r\n return result;\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts !== 'function' && document !== undefined)\r\n {\r\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\r\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\r\n }\r\n\r\n return CanvasFeatures;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\nvar Browser = require('./Browser');\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.features` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Features\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} canvas - Is canvas available?\r\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\r\n * @property {boolean} file - Is file available?\r\n * @property {boolean} fileSystem - Is fileSystem available?\r\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\r\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\r\n * @property {boolean} localStorage - Is localStorage available?\r\n * @property {boolean} pointerLock - Is Pointer Lock available?\r\n * @property {boolean} stableSort - Is Array.sort stable?\r\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\r\n * @property {boolean} vibration - Does the device support the Vibration API?\r\n * @property {boolean} webGL - Is webGL available?\r\n * @property {boolean} worker - Is worker available?\r\n */\r\nvar Features = {\r\n\r\n canvas: false,\r\n canvasBitBltShift: null,\r\n file: false,\r\n fileSystem: false,\r\n getUserMedia: true,\r\n littleEndian: false,\r\n localStorage: false,\r\n pointerLock: false,\r\n stableSort: false,\r\n support32bit: false,\r\n vibration: false,\r\n webGL: false,\r\n worker: false\r\n\r\n};\r\n\r\n// Check Little or Big Endian system.\r\n// @author Matt DesLauriers (@mattdesl)\r\nfunction checkIsLittleEndian ()\r\n{\r\n var a = new ArrayBuffer(4);\r\n var b = new Uint8Array(a);\r\n var c = new Uint32Array(a);\r\n\r\n b[0] = 0xa1;\r\n b[1] = 0xb2;\r\n b[2] = 0xc3;\r\n b[3] = 0xd4;\r\n\r\n if (c[0] === 0xd4c3b2a1)\r\n {\r\n return true;\r\n }\r\n\r\n if (c[0] === 0xa1b2c3d4)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n // Could not determine endianness\r\n return null;\r\n }\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Features;\r\n }\r\n\r\n Features.canvas = !!window['CanvasRenderingContext2D'];\r\n\r\n try\r\n {\r\n Features.localStorage = !!localStorage.getItem;\r\n }\r\n catch (error)\r\n {\r\n Features.localStorage = false;\r\n }\r\n\r\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\r\n Features.fileSystem = !!window['requestFileSystem'];\r\n\r\n var isUint8 = false;\r\n\r\n var testWebGL = function ()\r\n {\r\n if (window['WebGLRenderingContext'])\r\n {\r\n try\r\n {\r\n var canvas = CanvasPool.createWebGL(this);\r\n\r\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\r\n\r\n var canvas2D = CanvasPool.create2D(this);\r\n\r\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\r\n\r\n // Can't be done on a webgl context\r\n var image = ctx2D.createImageData(1, 1);\r\n\r\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\r\n // @author Matt DesLauriers (@mattdesl)\r\n isUint8 = image.data instanceof Uint8ClampedArray;\r\n\r\n CanvasPool.remove(canvas);\r\n CanvasPool.remove(canvas2D);\r\n\r\n return !!ctx;\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n Features.webGL = testWebGL();\r\n\r\n Features.worker = !!window['Worker'];\r\n\r\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\r\n\r\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\r\n\r\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\r\n\r\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\r\n\r\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\r\n if (Browser.firefox && Browser.firefoxVersion < 21)\r\n {\r\n Features.getUserMedia = false;\r\n }\r\n\r\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\r\n // is safer to not try and use the fast copy-over method.\r\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\r\n {\r\n Features.canvasBitBltShift = true;\r\n }\r\n\r\n // Known not to work\r\n if (Browser.safari || Browser.mobileSafari)\r\n {\r\n Features.canvasBitBltShift = false;\r\n }\r\n\r\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\r\n\r\n if (navigator.vibrate)\r\n {\r\n Features.vibration = true;\r\n }\r\n\r\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\r\n {\r\n Features.littleEndian = checkIsLittleEndian();\r\n }\r\n\r\n Features.support32bit = (\r\n typeof ArrayBuffer !== 'undefined' &&\r\n typeof Uint8ClampedArray !== 'undefined' &&\r\n typeof Int32Array !== 'undefined' &&\r\n Features.littleEndian !== null &&\r\n isUint8\r\n );\r\n\r\n return Features;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the full screen support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.fullscreen` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Fullscreen\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} available - Does the browser support the Full Screen API?\r\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\r\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\r\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\r\n */\r\nvar Fullscreen = {\r\n\r\n available: false,\r\n cancel: '',\r\n keyboard: false,\r\n request: ''\r\n\r\n};\r\n\r\n/**\r\n* Checks for support of the Full Screen API.\r\n*\r\n* @ignore\r\n*/\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Fullscreen;\r\n }\r\n\r\n var i;\r\n\r\n var suffix1 = 'Fullscreen';\r\n var suffix2 = 'FullScreen';\r\n\r\n var fs = [\r\n 'request' + suffix1,\r\n 'request' + suffix2,\r\n 'webkitRequest' + suffix1,\r\n 'webkitRequest' + suffix2,\r\n 'msRequest' + suffix1,\r\n 'msRequest' + suffix2,\r\n 'mozRequest' + suffix2,\r\n 'mozRequest' + suffix1\r\n ];\r\n\r\n for (i = 0; i < fs.length; i++)\r\n {\r\n if (document.documentElement[fs[i]])\r\n {\r\n Fullscreen.available = true;\r\n Fullscreen.request = fs[i];\r\n break;\r\n }\r\n }\r\n\r\n var cfs = [\r\n 'cancel' + suffix2,\r\n 'exit' + suffix1,\r\n 'webkitCancel' + suffix2,\r\n 'webkitExit' + suffix1,\r\n 'msCancel' + suffix2,\r\n 'msExit' + suffix1,\r\n 'mozCancel' + suffix2,\r\n 'mozExit' + suffix1\r\n ];\r\n\r\n if (Fullscreen.available)\r\n {\r\n for (i = 0; i < cfs.length; i++)\r\n {\r\n if (document[cfs[i]])\r\n {\r\n Fullscreen.cancel = cfs[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Keyboard Input?\r\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\r\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\r\n {\r\n Fullscreen.keyboard = true;\r\n }\r\n\r\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\r\n\r\n return Fullscreen;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the input support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.input` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Input\r\n * @since 3.0.0\r\n *\r\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\r\n * @property {boolean} gamepads - Is navigator.getGamepads available?\r\n * @property {boolean} mspointer - Is mspointer available?\r\n * @property {boolean} touch - Is touch available?\r\n */\r\nvar Input = {\r\n\r\n gamepads: false,\r\n mspointer: false,\r\n touch: false,\r\n wheelEvent: null\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Input;\r\n }\r\n\r\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\r\n {\r\n Input.touch = true;\r\n }\r\n\r\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\r\n {\r\n Input.mspointer = true;\r\n }\r\n\r\n if (navigator.getGamepads)\r\n {\r\n Input.gamepads = true;\r\n }\r\n\r\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\r\n {\r\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\r\n Input.wheelEvent = 'wheel';\r\n }\r\n else if ('onmousewheel' in window)\r\n {\r\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\r\n Input.wheelEvent = 'mousewheel';\r\n }\r\n else if (Browser.firefox && 'MouseScrollEvent' in window)\r\n {\r\n // FF prior to 17. This should probably be scrubbed.\r\n Input.wheelEvent = 'DOMMouseScroll';\r\n }\r\n\r\n return Input;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the operating system of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.os` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.OS\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} android - Is running on android?\r\n * @property {boolean} chromeOS - Is running on chromeOS?\r\n * @property {boolean} cordova - Is the game running under Apache Cordova?\r\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\r\n * @property {boolean} desktop - Is running on a desktop?\r\n * @property {boolean} ejecta - Is the game running under Ejecta?\r\n * @property {boolean} electron - Is the game running under GitHub Electron?\r\n * @property {boolean} iOS - Is running on iOS?\r\n * @property {boolean} iPad - Is running on iPad?\r\n * @property {boolean} iPhone - Is running on iPhone?\r\n * @property {boolean} kindle - Is running on an Amazon Kindle?\r\n * @property {boolean} linux - Is running on linux?\r\n * @property {boolean} macOS - Is running on macOS?\r\n * @property {boolean} node - Is the game running under Node.js?\r\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\r\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\r\n * @property {boolean} windows - Is running on windows?\r\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\r\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\r\n * @property {number} pixelRatio - PixelRatio of the host device?\r\n */\r\nvar OS = {\r\n\r\n android: false,\r\n chromeOS: false,\r\n cordova: false,\r\n crosswalk: false,\r\n desktop: false,\r\n ejecta: false,\r\n electron: false,\r\n iOS: false,\r\n iOSVersion: 0,\r\n iPad: false,\r\n iPhone: false,\r\n kindle: false,\r\n linux: false,\r\n macOS: false,\r\n node: false,\r\n nodeWebkit: false,\r\n pixelRatio: 1,\r\n webApp: false,\r\n windows: false,\r\n windowsPhone: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return OS;\r\n }\r\n\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Windows/).test(ua))\r\n {\r\n OS.windows = true;\r\n }\r\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\r\n {\r\n // Because iOS 13 identifies as Mac OS:\r\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\r\n {\r\n OS.iOS = true;\r\n OS.iPad = true;\r\n\r\n (navigator.appVersion).match(/Version\\/(\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else\r\n {\r\n OS.macOS = true;\r\n }\r\n }\r\n else if ((/Android/).test(ua))\r\n {\r\n OS.android = true;\r\n }\r\n else if ((/Linux/).test(ua))\r\n {\r\n OS.linux = true;\r\n }\r\n else if ((/iP[ao]d|iPhone/i).test(ua))\r\n {\r\n OS.iOS = true;\r\n\r\n (navigator.appVersion).match(/OS (\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n\r\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\r\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\r\n }\r\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\r\n {\r\n OS.kindle = true;\r\n\r\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\r\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\r\n }\r\n else if ((/CrOS/).test(ua))\r\n {\r\n OS.chromeOS = true;\r\n }\r\n\r\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\r\n {\r\n OS.android = false;\r\n OS.iOS = false;\r\n OS.macOS = false;\r\n OS.windows = true;\r\n OS.windowsPhone = true;\r\n }\r\n\r\n var silk = (/Silk/).test(ua);\r\n\r\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\r\n {\r\n OS.desktop = true;\r\n }\r\n\r\n // Windows Phone / Table reset\r\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\r\n {\r\n OS.desktop = false;\r\n }\r\n\r\n // WebApp mode in iOS\r\n if (navigator.standalone)\r\n {\r\n OS.webApp = true;\r\n }\r\n\r\n if (typeof importScripts !== 'function')\r\n {\r\n if (window.cordova !== undefined)\r\n {\r\n OS.cordova = true;\r\n }\r\n\r\n if (window.ejecta !== undefined)\r\n {\r\n OS.ejecta = true;\r\n }\r\n }\r\n\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\r\n {\r\n OS.node = true;\r\n }\r\n\r\n if (OS.node && typeof process.versions === 'object')\r\n {\r\n OS.nodeWebkit = !!process.versions['node-webkit'];\r\n\r\n OS.electron = !!process.versions.electron;\r\n }\r\n\r\n if ((/Crosswalk/).test(ua))\r\n {\r\n OS.crosswalk = true;\r\n }\r\n\r\n OS.pixelRatio = window['devicePixelRatio'] || 1;\r\n\r\n return OS;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\n\r\n/**\r\n * Determines the video support of the browser running this Phaser Game instance.\r\n *\r\n * These values are read-only and populated during the boot sequence of the game.\r\n *\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.video` from within any Scene.\r\n *\r\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\r\n *\r\n * @typedef {object} Phaser.Device.Video\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\r\n * @property {boolean} hls - Can this device play hls video files?\r\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\r\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\r\n * @property {boolean} ogg - Can this device play ogg video files?\r\n * @property {boolean} vp9 - Can this device play vp9 video files?\r\n * @property {boolean} webm - Can this device play webm video files?\r\n * @property {function} getVideoURL - Returns the first video URL that can be played by this browser.\r\n */\r\nvar Video = {\r\n\r\n h264: false,\r\n hls: false,\r\n mp4: false,\r\n m4v: false,\r\n ogg: false,\r\n vp9: false,\r\n webm: false,\r\n hasRequestVideoFrame: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Video;\r\n }\r\n\r\n var videoElement = document.createElement('video');\r\n var result = !!videoElement.canPlayType;\r\n var no = /^no$/;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\r\n {\r\n Video.ogg = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\r\n Video.h264 = true;\r\n Video.mp4 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\r\n {\r\n Video.m4v = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\r\n {\r\n Video.webm = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\r\n {\r\n Video.vp9 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n Video.hls = true;\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do\r\n }\r\n\r\n if (videoElement.parentNode)\r\n {\r\n videoElement.parentNode.removeChild(videoElement);\r\n }\r\n\r\n Video.getVideoURL = function (urls)\r\n {\r\n if (!Array.isArray(urls))\r\n {\r\n urls = [ urls ];\r\n }\r\n\r\n for (var i = 0; i < urls.length; i++)\r\n {\r\n var url = GetFastValue(urls[i], 'url', urls[i]);\r\n\r\n if (url.indexOf('blob:') === 0)\r\n {\r\n return {\r\n url: url,\r\n type: ''\r\n };\r\n }\r\n\r\n var videoType;\r\n\r\n if (url.indexOf('data:') === 0)\r\n {\r\n videoType = url.split(',')[0].match(/\\/(.*?);/);\r\n }\r\n else\r\n {\r\n videoType = url.match(/\\.([a-zA-Z0-9]+)($|\\?)/);\r\n }\r\n\r\n videoType = GetFastValue(urls[i], 'type', (videoType) ? videoType[1] : '').toLowerCase();\r\n\r\n if (Video[videoType])\r\n {\r\n return {\r\n url: url,\r\n type: videoType\r\n };\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n return Video;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// This singleton is instantiated as soon as Phaser loads,\r\n// before a Phaser.Game instance has even been created.\r\n// Which means all instances of Phaser Games can share it,\r\n// without having to re-poll the device all over again\r\n\r\n/**\r\n * @namespace Phaser.Device\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.DeviceConf\r\n *\r\n * @property {Phaser.Device.OS} os - The OS Device functions.\r\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\r\n * @property {Phaser.Device.Features} features - The Features Device functions.\r\n * @property {Phaser.Device.Input} input - The Input Device functions.\r\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\r\n * @property {Phaser.Device.Video} video - The Video Device functions.\r\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\r\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\r\n */\r\n\r\nmodule.exports = {\r\n\r\n os: require('./OS'),\r\n browser: require('./Browser'),\r\n features: require('./Features'),\r\n input: require('./Input'),\r\n audio: require('./Audio'),\r\n video: require('./Video'),\r\n fullscreen: require('./Fullscreen'),\r\n canvasFeatures: require('./CanvasFeatures')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar tempMatrix = new Float32Array(20);\r\n\r\n/**\r\n * @classdesc\r\n * The ColorMatrix class creates a 5x4 matrix that can be used in shaders and graphics\r\n * operations. It provides methods required to modify the color values, such as adjusting\r\n * the brightness, setting a sepia tone, hue rotation and more.\r\n *\r\n * Use the method `getData` to return a Float32Array containing the current color values.\r\n *\r\n * @class ColorMatrix\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.50.0\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function ColorMatrix ()\r\n {\r\n /**\r\n * Internal ColorMatrix array.\r\n *\r\n * @name Phaser.Display.ColorMatrix#_matrix\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._matrix = new Float32Array(20);\r\n\r\n /**\r\n * The value that determines how much of the original color is used\r\n * when mixing the colors. A value between 0 (all original) and 1 (all final)\r\n *\r\n * @name Phaser.Display.ColorMatrix#alpha\r\n * @type {number}\r\n * @since 3.50.0\r\n */\r\n this.alpha = 1;\r\n\r\n /**\r\n * Is the ColorMatrix array dirty?\r\n *\r\n * @name Phaser.Display.ColorMatrix#_dirty\r\n * @type {boolean}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._dirty = true;\r\n\r\n /**\r\n * The matrix data as a Float32Array.\r\n *\r\n * Returned by the `getData` method.\r\n *\r\n * @name Phaser.Display.ColorMatrix#data\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._data = new Float32Array(20);\r\n\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix from the given array of color values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#set\r\n * @since 3.50.0\r\n *\r\n * @param {(number[]|Float32Array)} value - The ColorMatrix values to set. Must have 20 elements.\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n set: function (value)\r\n {\r\n this._matrix.set(value);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the ColorMatrix to default values and also resets\r\n * the `alpha` property back to 1.\r\n *\r\n * @method Phaser.Display.ColorMatrix#reset\r\n * @since 3.50.0\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n reset: function ()\r\n {\r\n var m = this._matrix;\r\n\r\n m.fill(0);\r\n\r\n m[0] = 1;\r\n m[6] = 1;\r\n m[12] = 1;\r\n m[18] = 1;\r\n\r\n this.alpha = 1;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the ColorMatrix as a Float32Array.\r\n *\r\n * Can be used directly as a 1fv shader uniform value.\r\n *\r\n * @method Phaser.Display.ColorMatrix#getData\r\n * @since 3.50.0\r\n *\r\n * @return {Float32Array} The ColorMatrix as a Float32Array.\r\n */\r\n getData: function ()\r\n {\r\n var data = this._data;\r\n\r\n if (this._dirty)\r\n {\r\n data.set(this._matrix);\r\n\r\n data[4] /= 255;\r\n data[9] /= 255;\r\n data[14] /= 255;\r\n data[19] /= 255;\r\n\r\n this._dirty = false;\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Changes the brightness of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brightness\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of brightness to apply to this ColorMatrix. Between 0 (black) and 1.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brightness: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var b = value;\r\n\r\n return this.multiply([\r\n b, 0, 0, 0, 0,\r\n 0, b, 0, 0, 0,\r\n 0, 0, b, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Changes the saturation of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturate\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of saturation to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n saturate: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var x = (value * 2 / 3) + 1;\r\n var y = ((x - 1) * -0.5);\r\n\r\n return this.multiply([\r\n x, y, y, 0, 0,\r\n y, x, y, 0, 0,\r\n y, y, x, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Desaturates this ColorMatrix (removes color from it).\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturation\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturate: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-1, multiply);\r\n },\r\n\r\n /**\r\n * Rotates the hues of this ColorMatrix by the value given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#hue\r\n * @since 3.50.0\r\n *\r\n * @param {number} [rotation=0] - The amount of hue rotation to apply to this ColorMatrix, in degrees.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n hue: function (rotation, multiply)\r\n {\r\n if (rotation === undefined) { rotation = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n rotation = rotation / 180 * Math.PI;\r\n\r\n var cos = Math.cos(rotation);\r\n var sin = Math.sin(rotation);\r\n var lumR = 0.213;\r\n var lumG = 0.715;\r\n var lumB = 0.072;\r\n\r\n return this.multiply([\r\n lumR + cos * (1 - lumR) + sin * (-lumR),lumG + cos * (-lumG) + sin * (-lumG),lumB + cos * (-lumB) + sin * (1 - lumB), 0, 0,\r\n lumR + cos * (-lumR) + sin * (0.143),lumG + cos * (1 - lumG) + sin * (0.140),lumB + cos * (-lumB) + sin * (-0.283), 0, 0,\r\n lumR + cos * (-lumR) + sin * (-(1 - lumR)),lumG + cos * (-lumG) + sin * (lumG),lumB + cos * (1 - lumB) + sin * (lumB), 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be grayscale.\r\n *\r\n * @method Phaser.Display.ColorMatrix#grayscale\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=1] - The grayscale scale (0 is black).\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n grayscale: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-value, multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be black and white.\r\n *\r\n * @method Phaser.Display.ColorMatrix#blackWhite\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n blackWhite: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BLACK_WHITE, multiply);\r\n },\r\n\r\n /**\r\n * Change the contrast of this ColorMatrix by the amount given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#contrast\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of contrast to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n contrast: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var v = value + 1;\r\n var o = -0.5 * (v - 1);\r\n\r\n return this.multiply([\r\n v, 0, 0, 0, o,\r\n 0, v, 0, 0, o,\r\n 0, 0, v, 0, o,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Converts this ColorMatrix to have negative values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#negative\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n negative: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.NEGATIVE, multiply);\r\n },\r\n\r\n /**\r\n * Apply a desaturated luminance to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#desaturateLuminance\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturateLuminance: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.DESATURATE_LUMINANCE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a sepia tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#sepia\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n sepia: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SEPIA, multiply);\r\n },\r\n\r\n /**\r\n * Applies a night vision tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#night\r\n * @since 3.50.0\r\n *\r\n * @param {number} [intensity=0.1] - The intensity of this effect.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n night: function (intensity, multiply)\r\n {\r\n if (intensity === undefined) { intensity = 0.1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply([\r\n intensity * (-2.0), -intensity, 0, 0, 0,\r\n -intensity, 0, intensity, 0, 0,\r\n 0, intensity, intensity * 2.0, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Applies a trippy color tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#lsd\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n lsd: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.LSD, multiply);\r\n },\r\n\r\n /**\r\n * Applies a brown tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brown\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brown: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BROWN, multiply);\r\n },\r\n\r\n /**\r\n * Applies a vintage pinhole color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#vintagePinhole\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n vintagePinhole: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.VINTAGE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a kodachrome color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#kodachrome\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n kodachrome: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.KODACHROME, multiply);\r\n },\r\n\r\n /**\r\n * Applies a technicolor color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#technicolor\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n technicolor: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.TECHNICOLOR, multiply);\r\n },\r\n\r\n /**\r\n * Applies a polaroid color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#polaroid\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n polaroid: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.POLAROID, multiply);\r\n },\r\n\r\n /**\r\n * Shifts the values of this ColorMatrix into BGR order.\r\n *\r\n * @method Phaser.Display.ColorMatrix#shiftToBGR\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n shiftToBGR: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SHIFT_BGR, multiply);\r\n },\r\n\r\n /**\r\n * Multiplies the two given matrices.\r\n *\r\n * @method Phaser.Display.ColorMatrix#multiply\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} a - The 5x4 array to multiply with ColorMatrix._matrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n multiply: function (a, multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n // Duplicate _matrix into c\r\n\r\n if (!multiply)\r\n {\r\n this.reset();\r\n }\r\n\r\n var m = this._matrix;\r\n var c = tempMatrix;\r\n\r\n // copy _matrix to tempMatrox\r\n c.set(m);\r\n\r\n m.set([\r\n // R\r\n (c[0] * a[0]) + (c[1] * a[5]) + (c[2] * a[10]) + (c[3] * a[15]),\r\n (c[0] * a[1]) + (c[1] * a[6]) + (c[2] * a[11]) + (c[3] * a[16]),\r\n (c[0] * a[2]) + (c[1] * a[7]) + (c[2] * a[12]) + (c[3] * a[17]),\r\n (c[0] * a[3]) + (c[1] * a[8]) + (c[2] * a[13]) + (c[3] * a[18]),\r\n (c[0] * a[4]) + (c[1] * a[9]) + (c[2] * a[14]) + (c[3] * a[19]) + c[4],\r\n\r\n // G\r\n (c[5] * a[0]) + (c[6] * a[5]) + (c[7] * a[10]) + (c[8] * a[15]),\r\n (c[5] * a[1]) + (c[6] * a[6]) + (c[7] * a[11]) + (c[8] * a[16]),\r\n (c[5] * a[2]) + (c[6] * a[7]) + (c[7] * a[12]) + (c[8] * a[17]),\r\n (c[5] * a[3]) + (c[6] * a[8]) + (c[7] * a[13]) + (c[8] * a[18]),\r\n (c[5] * a[4]) + (c[6] * a[9]) + (c[7] * a[14]) + (c[8] * a[19]) + c[9],\r\n\r\n // B\r\n (c[10] * a[0]) + (c[11] * a[5]) + (c[12] * a[10]) + (c[13] * a[15]),\r\n (c[10] * a[1]) + (c[11] * a[6]) + (c[12] * a[11]) + (c[13] * a[16]),\r\n (c[10] * a[2]) + (c[11] * a[7]) + (c[12] * a[12]) + (c[13] * a[17]),\r\n (c[10] * a[3]) + (c[11] * a[8]) + (c[12] * a[13]) + (c[13] * a[18]),\r\n (c[10] * a[4]) + (c[11] * a[9]) + (c[12] * a[14]) + (c[13] * a[19]) + c[14],\r\n\r\n // A\r\n (c[15] * a[0]) + (c[16] * a[5]) + (c[17] * a[10]) + (c[18] * a[15]),\r\n (c[15] * a[1]) + (c[16] * a[6]) + (c[17] * a[11]) + (c[18] * a[16]),\r\n (c[15] * a[2]) + (c[16] * a[7]) + (c[17] * a[12]) + (c[18] * a[17]),\r\n (c[15] * a[3]) + (c[16] * a[8]) + (c[17] * a[13]) + (c[18] * a[18]),\r\n (c[15] * a[4]) + (c[16] * a[9]) + (c[17] * a[14]) + (c[18] * a[19]) + c[19]\r\n\r\n ]);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for black_white operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BLACK_WHITE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BLACK_WHITE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for negative operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.NEGATIVE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.NEGATIVE = [ -1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for desatured luminance operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.DESATURATE_LUMINANCE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.DESATURATE_LUMINANCE = [ 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for sepia operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SEPIA\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SEPIA = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for lsd operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.LSD\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.LSD = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for brown operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BROWN\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BROWN = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for vintage pinhole operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.VINTAGE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.VINTAGE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for kodachrome operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.KODACHROME\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.KODACHROME = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for technicolor operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.TECHNICOLOR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.TECHNICOLOR = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for polaroid shift operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.POLAROID\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.POLAROID = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for shift BGR operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SHIFT_BGR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SHIFT_BGR = [ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0 ];\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../../const');\r\nvar Smoothing = require('./Smoothing');\r\n\r\n// The pool into which the canvas elements are placed.\r\nvar pool = [];\r\n\r\n// Automatically apply smoothing(false) to created Canvas elements\r\nvar _disableContextSmoothing = false;\r\n\r\n/**\r\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\r\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\r\n * which is useless for some of the Phaser pipelines / renderer.\r\n *\r\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\r\n * Which means all instances of Phaser Games on the same page can share the one single pool.\r\n *\r\n * @namespace Phaser.Display.Canvas.CanvasPool\r\n * @since 3.0.0\r\n */\r\nvar CanvasPool = function ()\r\n{\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\r\n *\r\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\r\n */\r\n var create = function (parent, width, height, canvasType, selfParent)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = 1; }\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n if (selfParent === undefined) { selfParent = false; }\r\n\r\n var canvas;\r\n var container = first(canvasType);\r\n\r\n if (container === null)\r\n {\r\n container = {\r\n parent: parent,\r\n canvas: document.createElement('canvas'),\r\n type: canvasType\r\n };\r\n\r\n if (canvasType === CONST.CANVAS)\r\n {\r\n pool.push(container);\r\n }\r\n\r\n canvas = container.canvas;\r\n }\r\n else\r\n {\r\n container.parent = parent;\r\n\r\n canvas = container.canvas;\r\n }\r\n\r\n if (selfParent)\r\n {\r\n container.parent = canvas;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\r\n {\r\n Smoothing.disable(canvas.getContext('2d', { willReadFrequently: false }));\r\n }\r\n\r\n return canvas;\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create2D\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created canvas.\r\n */\r\n var create2D = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.CANVAS);\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created WebGL canvas.\r\n */\r\n var createWebGL = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.WEBGL);\r\n };\r\n\r\n /**\r\n * Gets the first free canvas index from the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.first\r\n * @since 3.0.0\r\n *\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n *\r\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\r\n */\r\n var first = function (canvasType)\r\n {\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n\r\n if (canvasType === CONST.WEBGL)\r\n {\r\n return null;\r\n }\r\n\r\n for (var i = 0; i < pool.length; i++)\r\n {\r\n var container = pool[i];\r\n\r\n if (!container.parent && container.type === canvasType)\r\n {\r\n return container;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\r\n * The canvas has its width and height set to 1, and its parent attribute nulled.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.remove\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The canvas or the parent of the canvas to free.\r\n */\r\n var remove = function (parent)\r\n {\r\n // Check to see if the parent is a canvas object\r\n var isCanvas = parent instanceof HTMLCanvasElement;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\r\n {\r\n container.parent = null;\r\n container.canvas.width = 1;\r\n container.canvas.height = 1;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the total number of used canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.total\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of used canvases.\r\n */\r\n var total = function ()\r\n {\r\n var c = 0;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if (container.parent)\r\n {\r\n c++;\r\n }\r\n });\r\n\r\n return c;\r\n };\r\n\r\n /**\r\n * Gets the total number of free canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.free\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of free canvases.\r\n */\r\n var free = function ()\r\n {\r\n return pool.length - total();\r\n };\r\n\r\n /**\r\n * Disable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\r\n * @since 3.0.0\r\n */\r\n var disableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = true;\r\n };\r\n\r\n /**\r\n * Enable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\r\n * @since 3.0.0\r\n */\r\n var enableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = false;\r\n };\r\n\r\n return {\r\n create2D: create2D,\r\n create: create,\r\n createWebGL: createWebGL,\r\n disableSmoothing: disableSmoothing,\r\n enableSmoothing: enableSmoothing,\r\n first: first,\r\n free: free,\r\n pool: pool,\r\n remove: remove,\r\n total: total\r\n };\r\n};\r\n\r\n// If we export the called function here, it'll only be invoked once (not every time it's required).\r\nmodule.exports = CanvasPool();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Browser specific prefix, so not going to change between contexts, only between browsers\r\nvar prefix = '';\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.Smoothing\r\n * @since 3.0.0\r\n */\r\nvar Smoothing = function ()\r\n{\r\n /**\r\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\r\n *\r\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\r\n */\r\n var getPrefix = function (context)\r\n {\r\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\r\n\r\n for (var i = 0; i < vendors.length; i++)\r\n {\r\n var s = vendors[i] + 'mageSmoothingEnabled';\r\n\r\n if (s in context)\r\n {\r\n return s;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.enable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var enable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = true;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.disable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var disable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = false;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\r\n * Returns null if no smoothing prefix is available.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\r\n *\r\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\r\n */\r\n var isEnabled = function (context)\r\n {\r\n return (prefix !== null) ? context[prefix] : null;\r\n };\r\n\r\n return {\r\n disable: disable,\r\n enable: enable,\r\n getPrefix: getPrefix,\r\n isEnabled: isEnabled\r\n };\r\n\r\n};\r\n\r\nmodule.exports = Smoothing();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object or Dynamic Texture to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects.\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this mask is being added.\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, maskObject, x, y, texture, frame)\r\n {\r\n if (!maskObject)\r\n {\r\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\r\n }\r\n\r\n /**\r\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = maskObject;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel.\r\n *\r\n * Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask? This is false by default and should not be changed.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n },\r\n\r\n /**\r\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\r\n *\r\n * If a Game Object it must have a texture, such as a Sprite.\r\n *\r\n * You can update the source of the mask as often as you like.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\r\n */\r\n setBitmap: function (maskObject)\r\n {\r\n this.bitmapMask = maskObject;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\r\n */\r\n postRenderWebGL: function (renderer, camera, renderTarget)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object, or Dynamic Texture, to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\r\n * @since 3.60.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\r\n */\r\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\r\n{\r\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level. This can change dynamically at runtime\r\n * and is set in the applyStencil method.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n *\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n var mask = 0xff;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n\r\n // Do this _after_ we set the stencilFunc\r\n level++;\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n this.level = level;\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, mask);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var current = renderer.currentMask;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n current.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n current.mask = prev.mask;\r\n current.camera = prev.camera;\r\n }\r\n else\r\n {\r\n current.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Barrel FX Controller.\r\n *\r\n * This FX controller manages the barrel distortion effect for a Game Object.\r\n *\r\n * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to\r\n * a Game Object. The amount of the effect can be modified in real-time.\r\n *\r\n * A Barrel effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBarrel();\r\n * sprite.postFX.addBarrel();\r\n * ```\r\n *\r\n * @class Barrel\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n */\r\nvar Barrel = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Barrel (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.BARREL, gameObject);\r\n\r\n /**\r\n * The amount of distortion applied to the barrel effect.\r\n *\r\n * Typically keep this within the range 1 (no distortion) to +- 1.\r\n *\r\n * @name Phaser.FX.Barrel#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Barrel;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Bloom FX Controller.\r\n *\r\n * This FX controller manages the bloom effect for a Game Object.\r\n *\r\n * Bloom is an effect used to reproduce an imaging artifact of real-world cameras.\r\n * The effect produces fringes of light extending from the borders of bright areas in an image,\r\n * contributing to the illusion of an extremely bright light overwhelming the\r\n * camera or eye capturing the scene.\r\n *\r\n * A Bloom effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBloom();\r\n * sprite.postFX.addBloom();\r\n * ```\r\n *\r\n * @class Bloom\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color=0xffffff] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n */\r\nvar Bloom = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bloom (gameObject, color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n if (offsetX === undefined) { offsetX = 1; }\r\n if (offsetY === undefined) { offsetY = 1; }\r\n if (blurStrength === undefined) { blurStrength = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLOOM, gameObject);\r\n\r\n /**\r\n * The number of steps to run the Bloom effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the Bloom,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Bloom#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The horizontal offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetX = offsetX;\r\n\r\n /**\r\n * The vertical offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetY = offsetY;\r\n\r\n /**\r\n * The strength of the blur process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#blurStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurStrength = blurStrength;\r\n\r\n /**\r\n * The strength of the blend process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Bloom#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the bloom as a number value.\r\n *\r\n * @name Phaser.FX.Bloom#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bloom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Blur FX Controller.\r\n *\r\n * This FX controller manages the blur effect for a Game Object.\r\n *\r\n * A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect,\r\n * typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a\r\n * smooth blur resembling that of viewing the image through a translucent screen, distinctly different\r\n * from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.\r\n *\r\n * A Blur effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBlur();\r\n * sprite.postFX.addBlur();\r\n * ```\r\n *\r\n * @class Blur\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n */\r\nvar Blur = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Blur (gameObject, quality, x, y, strength, color, steps)\r\n {\r\n if (quality === undefined) { quality = 0; }\r\n if (x === undefined) { x = 2; }\r\n if (y === undefined) { y = 2; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLUR, gameObject);\r\n\r\n /**\r\n * The quality of the blur effect.\r\n *\r\n * This can be:\r\n *\r\n * 0 for Low Quality\r\n * 1 for Medium Quality\r\n * 2 for High Quality\r\n *\r\n * The higher the quality, the more complex shader is used\r\n * and the more processing time is spent on the GPU calculating\r\n * the final blur. This value is used in conjunction with the\r\n * `steps` value, as one has a direct impact on the other.\r\n *\r\n * Keep this value as low as you can, while still achieving the\r\n * desired effect you need for your game.\r\n *\r\n * @name Phaser.FX.Blur#quality\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.quality = 0;\r\n\r\n /**\r\n * The horizontal offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The number of steps to run the Blur effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the blur,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Blur#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The strength of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Blur#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the blur as a number value.\r\n *\r\n * @name Phaser.FX.Blur#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Blur;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Bokeh FX Controller.\r\n *\r\n * This FX controller manages the bokeh effect for a Game Object.\r\n *\r\n * Bokeh refers to a visual effect that mimics the photographic technique of creating a shallow depth of field.\r\n * This effect is used to emphasize the game's main subject or action, by blurring the background or foreground\r\n * elements, resulting in a more immersive and visually appealing experience. It is achieved through rendering\r\n * techniques that simulate the out-of-focus areas, giving a sense of depth and realism to the game's graphics.\r\n *\r\n * This effect can also be used to generate a Tilt Shift effect, which is a technique used to create a miniature\r\n * effect by blurring everything except a small area of the image. This effect is achieved by blurring the\r\n * top and bottom elements, while keeping the center area in focus.\r\n *\r\n * A Bokeh effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBokeh();\r\n * sprite.postFX.addBokeh();\r\n * ```\r\n *\r\n * @class Bokeh\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {boolean} [isTiltShift=false] - Is this a bokeh or Tile Shift effect?\r\n * @param {number} [blurX=1] - If Tilt Shift, the amount of horizontal blur.\r\n * @param {number} [blurY=1] - If Tilt Shift, the amount of vertical blur.\r\n * @param {number} [strength=1] - If Tilt Shift, the strength of the blur.\r\n */\r\nvar Bokeh = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bokeh (gameObject, radius, amount, contrast, isTiltShift, blurX, blurY, strength)\r\n {\r\n if (radius === undefined) { radius = 0.5; }\r\n if (amount === undefined) { amount = 1; }\r\n if (contrast === undefined) { contrast = 0.2; }\r\n if (isTiltShift === undefined) { isTiltShift = false; }\r\n if (blurX === undefined) { blurX = 1; }\r\n if (blurY === undefined) { blurY = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n\r\n Controller.call(this, FX_CONST.BOKEH, gameObject);\r\n\r\n /**\r\n * The radius of the bokeh effect.\r\n *\r\n * This is a float value, where a radius of 0 will result in no effect being applied,\r\n * and a radius of 1 will result in a strong bokeh. However, you can exceed this value\r\n * for even stronger effects.\r\n *\r\n * @name Phaser.FX.Bokeh#radius\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The amount, or strength, of the bokeh effect. Defaults to 1.\r\n *\r\n * @name Phaser.FX.Bokeh#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n\r\n /**\r\n * The color contrast, or brightness, of the bokeh effect. Defaults to 0.2.\r\n *\r\n * @name Phaser.FX.Bokeh#contrast\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.contrast = contrast;\r\n\r\n /**\r\n * Is this a Tilt Shift effect or a standard bokeh effect?\r\n *\r\n * @name Phaser.FX.Bokeh#isTiltShift\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.isTiltShift = isTiltShift;\r\n\r\n /**\r\n * If a Tilt Shift effect this controls the strength of the blur.\r\n *\r\n * Setting this value on a non-Tilt Shift effect will have no effect.\r\n *\r\n * @name Phaser.FX.Bokeh#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * If a Tilt Shift effect this controls the amount of horizontal blur.\r\n *\r\n * Setting this value on a non-Tilt Shift effect will have no effect.\r\n *\r\n * @name Phaser.FX.Bokeh#blurX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurX = blurX;\r\n\r\n /**\r\n * If a Tilt Shift effect this controls the amount of vertical blur.\r\n *\r\n * Setting this value on a non-Tilt Shift effect will have no effect.\r\n *\r\n * @name Phaser.FX.Bokeh#blurY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurY = blurY;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bokeh;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Circle FX Controller.\r\n *\r\n * This FX controller manages the circle effect for a Game Object.\r\n *\r\n * This effect will draw a circle around the texture of the Game Object, effectively masking off\r\n * any area outside of the circle without the need for an actual mask. You can control the thickness\r\n * of the circle, the color of the circle and the color of the background, should the texture be\r\n * transparent. You can also control the feathering applied to the circle, allowing for a harsh or soft edge.\r\n *\r\n * Please note that adding this effect to a Game Object will not change the input area or physics body of\r\n * the Game Object, should it have one.\r\n *\r\n * A Circle effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addCircle();\r\n * sprite.postFX.addCircle();\r\n * ```\r\n *\r\n * @class Circle\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=0xfeedb6] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n */\r\nvar Circle = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Circle (gameObject, thickness, color, backgroundColor, scale, feather)\r\n {\r\n if (thickness === undefined) { thickness = 8; }\r\n if (scale === undefined) { scale = 1; }\r\n if (feather === undefined) { feather = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.CIRCLE, gameObject);\r\n\r\n /**\r\n * The scale of the circle. The default scale is 1, which is a circle\r\n * the full size of the underlying texture. Reduce this value to create\r\n * a smaller circle, or increase it to create a circle that extends off\r\n * the edges of the texture.\r\n *\r\n * @name Phaser.FX.Circle#scale\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.scale = scale;\r\n\r\n /**\r\n * The amount of feathering to apply to the circle from the ring,\r\n * extending into the middle of the circle. The default is 0.005,\r\n * which is a very low amount of feathering just making sure the ring\r\n * has a smooth edge. Increase this amount to a value such as 0.5\r\n * or 0.025 for larger amounts of feathering.\r\n *\r\n * @name Phaser.FX.Circle#feather\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.feather = feather;\r\n\r\n /**\r\n * The width of the circle around the texture, in pixels. This value\r\n * doesn't factor in the feather, which can extend the thickness\r\n * internally depending on its value.\r\n *\r\n * @name Phaser.FX.Circle#thickness\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.thickness = thickness;\r\n\r\n /**\r\n * The internal gl color array for the ring color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 0.2, 0.7 ];\r\n\r\n /**\r\n * The internal gl color array for the background color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 1, 0, 0, 0.4 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n\r\n if (backgroundColor !== undefined && backgroundColor !== null)\r\n {\r\n this.backgroundColor = backgroundColor;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the circular ring, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of the background, behind the texture, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#backgroundColor\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n backgroundColor: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Circle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar BaseColorMatrix = require('../display/ColorMatrix');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The ColorMatrix FX Controller.\r\n *\r\n * This FX controller manages the color matrix effect for a Game Object.\r\n *\r\n * The color matrix effect is a visual technique that involves manipulating the colors of an image\r\n * or scene using a mathematical matrix. This process can adjust hue, saturation, brightness, and contrast,\r\n * allowing developers to create various stylistic appearances or mood settings within the game.\r\n * Common applications include simulating different lighting conditions, applying color filters,\r\n * or achieving a specific visual style.\r\n *\r\n * A ColorMatrix effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addColorMatrix();\r\n * sprite.postFX.addColorMatrix();\r\n * ```\r\n *\r\n * @class ColorMatrix\r\n * @extends Phaser.Display.ColorMatrix\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n Extends: BaseColorMatrix,\r\n\r\n initialize:\r\n\r\n function ColorMatrix (gameObject)\r\n {\r\n BaseColorMatrix.call(this);\r\n\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = FX_CONST.COLOR_MATRIX;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * @name Phaser.FX.ColorMatrix#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this._matrix = null;\r\n this._data = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * FX Controller is the base class that all built-in FX use.\r\n *\r\n * You should not normally create an instance of this class directly, but instead use one of the built-in FX that extend it.\r\n *\r\n * @class Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {number} type - The FX Type constant.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar Controller = new Class({\r\n\r\n initialize:\r\n\r\n function Controller (type, gameObject)\r\n {\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.Controller#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.Controller#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * Only works for Pre FX.\r\n *\r\n * Post FX are always active.\r\n *\r\n * @name Phaser.FX.Controller#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n /**\r\n * Sets the active state of this FX Controller.\r\n *\r\n * A disabled FX Controller will not be updated.\r\n *\r\n * @method Phaser.FX.Controller#setActive\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} value - `true` to enable this FX Controller, or `false` to disable it.\r\n *\r\n * @return {this} This FX Controller instance.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this FX Controller.\r\n *\r\n * @method Phaser.FX.Controller#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this.active = false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Controller;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Displacement FX Controller.\r\n *\r\n * This FX controller manages the displacement effect for a Game Object.\r\n *\r\n * The displacement effect is a visual technique that alters the position of pixels in an image\r\n * or texture based on the values of a displacement map. This effect is used to create the illusion\r\n * of depth, surface irregularities, or distortion in otherwise flat elements. It can be applied to\r\n * characters, objects, or backgrounds to enhance realism, convey movement, or achieve various\r\n * stylistic appearances.\r\n *\r\n * A Displacement effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addDisplacement();\r\n * sprite.postFX.addDisplacement();\r\n * ```\r\n *\r\n * @class Displacement\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply. A very small float number, such as 0.005.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply. A very small float number, such as 0.005.\r\n */\r\nvar Displacement = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Displacement (gameObject, texture, x, y)\r\n {\r\n if (texture === undefined) { texture = '__WHITE'; }\r\n if (x === undefined) { x = 0.005; }\r\n if (y === undefined) { y = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.DISPLACEMENT, gameObject);\r\n\r\n /**\r\n * The amount of horizontal displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The amount of vertical displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The underlying WebGLTexture used for displacement.\r\n *\r\n * @name Phaser.FX.Displacement#glTexture\r\n * @type {WebGLTexture}\r\n * @since 3.60.0\r\n */\r\n this.glTexture;\r\n\r\n this.setTexture(texture);\r\n },\r\n\r\n /**\r\n * Sets the Texture to be used for the displacement effect.\r\n *\r\n * You can only use a whole texture, not a frame from a texture atlas or sprite sheet.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setTexture\r\n * @since 3.60.0\r\n *\r\n * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n *\r\n * @return {this} This FX Controller.\r\n */\r\n setTexture: function (texture)\r\n {\r\n var phaserTexture = this.gameObject.scene.sys.textures.getFrame(texture);\r\n\r\n if (phaserTexture)\r\n {\r\n this.glTexture = phaserTexture.glTexture;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Displacement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Glow FX Controller.\r\n *\r\n * This FX controller manages the glow effect for a Game Object.\r\n *\r\n * The glow effect is a visual technique that creates a soft, luminous halo around game objects,\r\n * characters, or UI elements. This effect is used to emphasize importance, enhance visual appeal,\r\n * or convey a sense of energy, magic, or otherworldly presence. The effect can also be set on\r\n * the inside of the Game Object. The color and strength of the glow can be modified.\r\n *\r\n * A Glow effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addGlow();\r\n * sprite.postFX.addGlow();\r\n * ```\r\n *\r\n * @class Glow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n */\r\nvar Glow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Glow (gameObject, color, outerStrength, innerStrength, knockout)\r\n {\r\n if (outerStrength === undefined) { outerStrength = 4; }\r\n if (innerStrength === undefined) { innerStrength = 0; }\r\n if (knockout === undefined) { knockout = false; }\r\n\r\n Controller.call(this, FX_CONST.GLOW, gameObject);\r\n\r\n /**\r\n * The strength of the glow outward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#outerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.outerStrength = outerStrength;\r\n\r\n /**\r\n * The strength of the glow inward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#innerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.innerStrength = innerStrength;\r\n\r\n /**\r\n * If `true` only the glow is drawn, not the texture itself.\r\n *\r\n * @name Phaser.FX.Glow#knockout\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.knockout = knockout;\r\n\r\n /**\r\n * A 4 element array of gl color values.\r\n *\r\n * @name Phaser.FX.Glow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1, 1 ];\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the glow as a number value.\r\n *\r\n * @name Phaser.FX.Glow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Glow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Gradient FX Controller.\r\n *\r\n * This FX controller manages the gradient effect for a Game Object.\r\n *\r\n * The gradient overlay effect is a visual technique where a smooth color transition is applied over Game Objects,\r\n * such as sprites or UI components. This effect is used to enhance visual appeal, emphasize depth, or create\r\n * stylistic and atmospheric variations. It can also be utilized to convey information, such as representing\r\n * progress or health status through color changes.\r\n *\r\n * A Gradient effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addGradient();\r\n * sprite.postFX.addGradient();\r\n * ```\r\n *\r\n * @class Gradient\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n */\r\nvar Gradient = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Gradient (gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n if (alpha === undefined) { alpha = 0.2; }\r\n if (fromX === undefined) { fromX = 0; }\r\n if (fromY === undefined) { fromY = 0; }\r\n if (toX === undefined) { toX = 0; }\r\n if (toY === undefined) { toY = 1; }\r\n if (size === undefined) { size = 0; }\r\n\r\n Controller.call(this, FX_CONST.GRADIENT, gameObject);\r\n\r\n /**\r\n * The alpha value of the gradient effect.\r\n *\r\n * @name Phaser.FX.Gradient#alpha\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.alpha = alpha;\r\n\r\n /**\r\n * Sets how many 'chunks' the gradient is divided in to, as spread over the\r\n * entire height of the texture. Leave this at zero for a smooth gradient,\r\n * or set to a higher number to split the gradient into that many sections, giving\r\n * a more banded 'retro' effect.\r\n *\r\n * @name Phaser.FX.Gradient#size\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.size = size;\r\n\r\n /**\r\n * The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromX = fromX;\r\n\r\n /**\r\n * The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromY = fromY;\r\n\r\n /**\r\n * The horizontal position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toX = toX;\r\n\r\n /**\r\n * The vertical position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toY = toY;\r\n\r\n /**\r\n * The internal gl color array for the starting color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor1\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor1 = [ 255, 0, 0 ];\r\n\r\n /**\r\n * The internal gl color array for the ending color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 0, 255, 0 ];\r\n\r\n if (color1 !== undefined && color1 !== null)\r\n {\r\n this.color1 = color1;\r\n }\r\n\r\n if (color2 !== undefined && color2 !== null)\r\n {\r\n this.color2 = color2;\r\n }\r\n },\r\n\r\n /**\r\n * The first gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color1\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color1: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor1;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor1;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The second gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color2\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color2: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Gradient;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Pixelate FX Controller.\r\n *\r\n * This FX controller manages the pixelate effect for a Game Object.\r\n *\r\n * The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image,\r\n * creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic\r\n * purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as\r\n * during a transition or to censor specific content.\r\n *\r\n * A Pixelate effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addPixelate();\r\n * sprite.postFX.addPixelate();\r\n * ```\r\n *\r\n * @class Pixelate\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n */\r\nvar Pixelate = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Pixelate (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.PIXELATE, gameObject);\r\n\r\n /**\r\n * The amount of pixelation to apply.\r\n *\r\n * @name Phaser.FX.Pixelate#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pixelate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Shadow FX Controller.\r\n *\r\n * This FX controller manages the shadow effect for a Game Object.\r\n *\r\n * The shadow effect is a visual technique used to create the illusion of depth and realism by adding darker,\r\n * offset silhouettes or shapes beneath game objects, characters, or environments. These simulated shadows\r\n * help to enhance the visual appeal and immersion, making the 2D game world appear more dynamic and three-dimensional.\r\n *\r\n * A Shadow effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addShadow();\r\n * sprite.postFX.addShadow();\r\n * ```\r\n *\r\n * @class Shadow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n */\r\nvar Shadow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shadow (gameObject, x, y, decay, power, color, samples, intensity)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (decay === undefined) { decay = 0.1; }\r\n if (power === undefined) { power = 1; }\r\n if (samples === undefined) { samples = 6; }\r\n if (intensity === undefined) { intensity = 1; }\r\n\r\n Controller.call(this, FX_CONST.SHADOW, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The amount of decay for the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#decay\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.decay = decay;\r\n\r\n /**\r\n * The power of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#power\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.power = power;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Shadow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 0, 0, 0, 1 ];\r\n\r\n /**\r\n * The number of samples that the shadow effect will run for.\r\n *\r\n * This should be an integer with a minimum value of 1 and a maximum of 12.\r\n *\r\n * @name Phaser.FX.Shadow#samples\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.samples = samples;\r\n\r\n /**\r\n * The intensity of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#intensity\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.intensity = intensity;\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the shadow.\r\n *\r\n * @name Phaser.FX.Shadow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shadow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Shine FX Controller.\r\n *\r\n * This FX controller manages the shift effect for a Game Object.\r\n *\r\n * The shine effect is a visual technique that simulates the appearance of reflective\r\n * or glossy surfaces by passing a light beam across a Game Object. This effect is used to\r\n * enhance visual appeal, emphasize certain features, and create a sense of depth or\r\n * material properties.\r\n *\r\n * A Shine effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addShine();\r\n * sprite.postFX.addShine();\r\n * ```\r\n *\r\n * @class Shine\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n */\r\nvar Shine = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shine (gameObject, speed, lineWidth, gradient, reveal)\r\n {\r\n if (speed === undefined) { speed = 0.5; }\r\n if (lineWidth === undefined) { lineWidth = 0.5; }\r\n if (gradient === undefined) { gradient = 3; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.SHINE, gameObject);\r\n\r\n /**\r\n * The speed of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#speed\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.speed = speed;\r\n\r\n /**\r\n * The line width of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#lineWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.lineWidth = lineWidth;\r\n\r\n /**\r\n * The gradient of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#gradient\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.gradient = gradient;\r\n\r\n /**\r\n * Does this Shine effect reveal or get added to its target?\r\n *\r\n * @name Phaser.FX.Shine#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shine;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Vignette FX Controller.\r\n *\r\n * This FX controller manages the vignette effect for a Game Object.\r\n *\r\n * The vignette effect is a visual technique where the edges of the screen, or a Game Object, gradually darken or blur,\r\n * creating a frame-like appearance. This effect is used to draw the player's focus towards the central action or subject,\r\n * enhance immersion, and provide a cinematic or artistic quality to the game's visuals.\r\n *\r\n * A Vignette effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addVignette();\r\n * sprite.postFX.addVignette();\r\n * ```\r\n *\r\n * @class Vignette\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n */\r\nvar Vignette = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Vignette (gameObject, x, y, radius, strength)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = 0.5; }\r\n if (radius === undefined) { radius = 0.5; }\r\n if (strength === undefined) { strength = 0.5; }\r\n\r\n Controller.call(this, FX_CONST.VIGNETTE, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#radius\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The strength of the vignette effect.\r\n *\r\n * @name Phaser.FX.Vignette#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Vignette;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Wipe FX Controller.\r\n *\r\n * This FX controller manages the wipe effect for a Game Object.\r\n *\r\n * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements\r\n * in the game, such as images, text, or scene transitions. This effect is often used to create\r\n * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition\r\n * between game states.\r\n *\r\n * You can set both the direction and the axis of the wipe effect. The following combinations are possible:\r\n *\r\n * * left to right: direction 0, axis 0\r\n * * right to left: direction 1, axis 0\r\n * * top to bottom: direction 1, axis 1\r\n * * bottom to top: direction 1, axis 0\r\n *\r\n * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect.\r\n *\r\n * A Wipe effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addWipe();\r\n * sprite.postFX.addWipe();\r\n * sprite.preFX.addReveal();\r\n * sprite.postFX.addReveal();\r\n * ```\r\n *\r\n * @class Wipe\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n * @param {boolean} [reveal=false] - Is this a reveal (true) or a fade (false) effect?\r\n */\r\nvar Wipe = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Wipe (gameObject, wipeWidth, direction, axis, reveal)\r\n {\r\n if (wipeWidth === undefined) { wipeWidth = 0.1; }\r\n if (direction === undefined) { direction = 0; }\r\n if (axis === undefined) { axis = 0; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.WIPE, gameObject);\r\n\r\n /**\r\n * The progress of the Wipe effect. This value is normalized to the range 0 to 1.\r\n *\r\n * Adjust this value to make the wipe transition (i.e. via a Tween)\r\n *\r\n * @name Phaser.FX.Wipe#progress\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Wipe#wipeWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.wipeWidth = wipeWidth;\r\n\r\n /**\r\n * The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n *\r\n * @name Phaser.FX.Wipe#direction\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.direction = direction;\r\n\r\n /**\r\n * The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @name Phaser.FX.Wipe#axis\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.axis = axis;\r\n\r\n /**\r\n * Is this a reveal (true) or a fade (false) effect?\r\n *\r\n * @name Phaser.FX.Wipe#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Wipe;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FX_CONST = {\r\n\r\n /**\r\n * The Glow FX.\r\n *\r\n * @name Phaser.FX.GLOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GLOW: 4,\r\n\r\n /**\r\n * The Shadow FX.\r\n *\r\n * @name Phaser.FX.SHADOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHADOW: 5,\r\n\r\n /**\r\n * The Pixelate FX.\r\n *\r\n * @name Phaser.FX.PIXELATE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n PIXELATE: 6,\r\n\r\n /**\r\n * The Vignette FX.\r\n *\r\n * @name Phaser.FX.VIGNETTE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n VIGNETTE: 7,\r\n\r\n /**\r\n * The Shine FX.\r\n *\r\n * @name Phaser.FX.SHINE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHINE: 8,\r\n\r\n /**\r\n * The Blur FX.\r\n *\r\n * @name Phaser.FX.BLUR\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLUR: 9, // uses 3 shaders, slots 9, 10 and 11\r\n\r\n /**\r\n * The Gradient FX.\r\n *\r\n * @name Phaser.FX.GRADIENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GRADIENT: 12,\r\n\r\n /**\r\n * The Bloom FX.\r\n *\r\n * @name Phaser.FX.BLOOM\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLOOM: 13,\r\n\r\n /**\r\n * The Color Matrix FX.\r\n *\r\n * @name Phaser.FX.COLOR_MATRIX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n COLOR_MATRIX: 14,\r\n\r\n /**\r\n * The Circle FX.\r\n *\r\n * @name Phaser.FX.CIRCLE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n CIRCLE: 15,\r\n\r\n /**\r\n * The Barrel FX.\r\n *\r\n * @name Phaser.FX.BARREL\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BARREL: 16,\r\n\r\n /**\r\n * The Displacement FX.\r\n *\r\n * @name Phaser.FX.DISPLACEMENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DISPLACEMENT: 17,\r\n\r\n /**\r\n * The Wipe FX.\r\n *\r\n * @name Phaser.FX.WIPE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n WIPE: 18,\r\n\r\n /**\r\n * The Bokeh and Tilt Shift FX.\r\n *\r\n * @name Phaser.FX.BOKEH\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BOKEH: 19\r\n\r\n};\r\n\r\nmodule.exports = FX_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @namespace Phaser.FX\r\n */\r\n\r\nvar FX = {\r\n\r\n Barrel: require('./Barrel'),\r\n Controller: require('./Controller'),\r\n Bloom: require('./Bloom'),\r\n Blur: require('./Blur'),\r\n Bokeh: require('./Bokeh'),\r\n Circle: require('./Circle'),\r\n ColorMatrix: require('./ColorMatrix'),\r\n Displacement: require('./Displacement'),\r\n Glow: require('./Glow'),\r\n Gradient: require('./Gradient'),\r\n Pixelate: require('./Pixelate'),\r\n Shadow: require('./Shadow'),\r\n Shine: require('./Shine'),\r\n Vignette: require('./Vignette'),\r\n Wipe: require('./Wipe')\r\n\r\n};\r\n\r\nFX = Extend(false, FX, FX_CONST);\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar ComponentsToJSON = require('./components/ToJSON');\r\nvar DataManager = require('../data/DataManager');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The base class that all Game Objects extend.\r\n * You don't create GameObjects directly and they cannot be added to the display list.\r\n * Instead, use them as the base for your own custom classes.\r\n *\r\n * @class GameObject\r\n * @memberof Phaser.GameObjects\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\r\n */\r\nvar GameObject = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GameObject (scene, type)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene to which this Game Object belongs.\r\n *\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * You should consider this property as being read-only. You cannot move a\r\n * Game Object to another Scene by simply changing it.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Holds a reference to the Display List that contains this Game Object.\r\n *\r\n * This is set automatically when this Game Object is added to a Scene or Layer.\r\n *\r\n * You should treat this property as being read-only.\r\n *\r\n * @name Phaser.GameObjects.GameObject#displayList\r\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\r\n * @default null\r\n * @since 3.50.0\r\n */\r\n this.displayList = null;\r\n\r\n /**\r\n * A textual representation of this Game Object, i.e. `sprite`.\r\n * Used internally by Phaser but is available for your own custom classes to populate.\r\n *\r\n * @name Phaser.GameObjects.GameObject#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The current state of this Game Object.\r\n *\r\n * Phaser itself will never modify this value, although plugins may do so.\r\n *\r\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\r\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\r\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @name Phaser.GameObjects.GameObject#state\r\n * @type {(number|string)}\r\n * @since 3.16.0\r\n */\r\n this.state = 0;\r\n\r\n /**\r\n * The parent Container of this Game Object, if it has one.\r\n *\r\n * @name Phaser.GameObjects.GameObject#parentContainer\r\n * @type {Phaser.GameObjects.Container}\r\n * @since 3.4.0\r\n */\r\n this.parentContainer = null;\r\n\r\n /**\r\n * The name of this Game Object.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.GameObject#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The active state of this Game Object.\r\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\r\n * An active object is one which is having its logic and internal systems updated.\r\n *\r\n * @name Phaser.GameObjects.GameObject#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The Tab Index of the Game Object.\r\n * Reserved for future use by plugins and the Input Manager.\r\n *\r\n * @name Phaser.GameObjects.GameObject#tabIndex\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.tabIndex = -1;\r\n\r\n /**\r\n * A Data Manager.\r\n * It allows you to store, query and get key/value paired information specific to this Game Object.\r\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#data\r\n * @type {Phaser.Data.DataManager}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.data = null;\r\n\r\n /**\r\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\r\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\r\n * If those components are not used by your custom class then you can use this bitmask as you wish.\r\n *\r\n * @name Phaser.GameObjects.GameObject#renderFlags\r\n * @type {number}\r\n * @default 15\r\n * @since 3.0.0\r\n */\r\n this.renderFlags = 15;\r\n\r\n /**\r\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\r\n * Not usually set directly, instead call `Camera.ignore`, however you can\r\n * set this property directly using the Camera.id property:\r\n *\r\n * @example\r\n * this.cameraFilter |= camera.id\r\n *\r\n * @name Phaser.GameObjects.GameObject#cameraFilter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cameraFilter = 0;\r\n\r\n /**\r\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\r\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#input\r\n * @type {?Phaser.Types.Input.InteractiveObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.input = null;\r\n\r\n /**\r\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\r\n * This includes calls that may come from a Group, Container or the Scene itself.\r\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\r\n * responsible for managing references to and from this Game Object.\r\n *\r\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.ignoreDestroy = false;\r\n\r\n this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\r\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\r\n\r\n // Tell the Scene to re-sort the children\r\n scene.sys.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\r\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\r\n * The `name` property is not populated by Phaser and is presented for your own use.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The name to be given to this Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setName: function (value)\r\n {\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current state of this Game Object.\r\n *\r\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\r\n *\r\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\r\n * The state value should typically be an integer (ideally mapped to a constant\r\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setState\r\n * @since 3.16.0\r\n *\r\n * @param {(number|string)} value - The state of the Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setState: function (value)\r\n {\r\n this.state = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a Data Manager component to this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setDataEnabled\r\n * @since 3.0.0\r\n * @see Phaser.Data.DataManager\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setDataEnabled: function ()\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Allows you to store a key value pair within this Game Objects Data Manager.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * sprite.setData('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `getData`:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setData\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.set(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#incData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n incData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.inc(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toggleData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n toggleData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.toggle(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * sprite.getData([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n getData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this.data.get(key);\r\n },\r\n\r\n /**\r\n * Pass this Game Object to the Input Manager to enable it for Input.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @example\r\n * sprite.setInteractive();\r\n *\r\n * @example\r\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\r\n *\r\n * @example\r\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\r\n *\r\n * @method Phaser.GameObjects.GameObject#setInteractive\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\r\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will disable it.\r\n *\r\n * An object that is disabled for input stops processing or being considered for\r\n * input events, but can be turned back on again at any time by simply calling\r\n * `setInteractive()` with no arguments provided.\r\n *\r\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#disableInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n disableInteractive: function ()\r\n {\r\n this.scene.sys.input.disable(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will queue it\r\n * for removal, causing it to no longer be interactive. The removal happens on\r\n * the next game step, it is not immediate.\r\n *\r\n * The Interactive Object that was assigned to this Game Object will be destroyed,\r\n * removed from the Input Manager and cleared from this Game Object.\r\n *\r\n * If you wish to re-enable this Game Object at a later date you will need to\r\n * re-create its InteractiveObject by calling `setInteractive` again.\r\n *\r\n * If you wish to only temporarily stop an object from receiving input then use\r\n * `disableInteractive` instead, as that toggles the interactive state, where-as\r\n * this erases it completely.\r\n *\r\n * If you wish to resize a hit area, don't remove and then set it as being\r\n * interactive. Instead, access the hitarea object directly and resize the shape\r\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\r\n * shape is a Rectangle, which it is by default.)\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n removeInteractive: function ()\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is added to a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to add themselves into the Update List.\r\n *\r\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addedToScene\r\n * @since 3.50.0\r\n */\r\n addedToScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is removed from a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to removed themselves from the Update List.\r\n *\r\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removedFromScene\r\n * @since 3.50.0\r\n */\r\n removedFromScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\r\n *\r\n * @method Phaser.GameObjects.GameObject#update\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - args\r\n */\r\n update: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Returns a JSON representation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n return ComponentsToJSON(this);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.GameObject#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\r\n\r\n return !(!listWillRender || GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n },\r\n\r\n /**\r\n * Returns an array containing the display list index of either this Game Object, or if it has one,\r\n * its parent Container. It then iterates up through all of the parent containers until it hits the\r\n * root of the display list (which is index 0 in the returned array).\r\n *\r\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\r\n * this Game Object and all of its ancestors.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getIndexList\r\n * @since 3.4.0\r\n *\r\n * @return {number[]} An array of display list position indexes.\r\n */\r\n getIndexList: function ()\r\n {\r\n // eslint-disable-next-line consistent-this\r\n var child = this;\r\n var parent = this.parentContainer;\r\n\r\n var indexes = [];\r\n\r\n while (parent)\r\n {\r\n indexes.unshift(parent.getIndex(child));\r\n\r\n child = parent;\r\n\r\n if (!parent.parentContainer)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n parent = parent.parentContainer;\r\n }\r\n }\r\n\r\n if (this.displayList)\r\n {\r\n indexes.unshift(this.displayList.getIndex(child));\r\n }\r\n else\r\n {\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n }\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the given Display List.\r\n *\r\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\r\n * this Game Object belongs.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\r\n *\r\n * If this Game Object is already on another Display List when this method is called, it will first\r\n * be removed from it, before being added to the new list.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToDisplayList\r\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToDisplayList: function (displayList)\r\n {\r\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\r\n\r\n if (this.displayList && this.displayList !== displayList)\r\n {\r\n this.removeFromDisplayList();\r\n }\r\n\r\n // Don't repeat if it's already on this list\r\n if (!displayList.exists(this))\r\n {\r\n this.displayList = displayList;\r\n\r\n displayList.add(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the Update List belonging to the Scene.\r\n *\r\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\r\n * every game frame. This method is passed two parameters: `delta` and `time`.\r\n *\r\n * If you wish to run your own logic within `preUpdate` then you should always call\r\n * `super.preUpdate(delta, time)` within it, or it may fail to process required operations,\r\n * such as Sprite animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Display List it is currently on.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\r\n * and added back at a later stage.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\r\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromDisplayList: function ()\r\n {\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n if (displayList && displayList.exists(this))\r\n {\r\n displayList.remove(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.displayList = null;\r\n\r\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Scene's Update List.\r\n *\r\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\r\n * every game frame. Calling this method will remove it from the list, preventing this.\r\n *\r\n * Removing a Game Object from the Update List will stop most internal functions working.\r\n * For example, removing a Sprite from the Update List will prevent it from being able to\r\n * run animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.remove(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Game Object removing it from the Display List and Update List and\r\n * severing all ties to parent resources.\r\n *\r\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\r\n *\r\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\r\n * As long as no reference to it exists within your own code it should become free for\r\n * garbage collection by the browser.\r\n *\r\n * If you just want to temporarily disable an object then look at using the\r\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\r\n *\r\n * @method Phaser.GameObjects.GameObject#destroy\r\n * @fires Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [fromScene=false] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\n destroy: function (fromScene)\r\n {\r\n // This Game Object has already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n if (fromScene === undefined) { fromScene = false; }\r\n\r\n if (this.preDestroy)\r\n {\r\n this.preDestroy.call(this);\r\n }\r\n\r\n this.emit(Events.DESTROY, this, fromScene);\r\n\r\n this.removeAllListeners();\r\n\r\n if (this.postPipelines)\r\n {\r\n this.resetPostPipeline(true);\r\n }\r\n\r\n this.removeFromDisplayList();\r\n this.removeFromUpdateList();\r\n\r\n if (this.input)\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n }\r\n\r\n if (this.data)\r\n {\r\n this.data.destroy();\r\n\r\n this.data = undefined;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.body.destroy();\r\n\r\n this.body = undefined;\r\n }\r\n\r\n if (this.preFX)\r\n {\r\n this.preFX.destroy();\r\n\r\n this.preFX = undefined;\r\n }\r\n\r\n if (this.postFX)\r\n {\r\n this.postFX.destroy();\r\n\r\n this.postFX = undefined;\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n this.parentContainer = undefined;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\r\n *\r\n * @constant {number} RENDER_MASK\r\n * @memberof Phaser.GameObjects.GameObject\r\n * @default\r\n */\r\nGameObject.RENDER_MASK = 15;\r\n\r\nmodule.exports = GameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar PluginCache = require('../plugins/PluginCache');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and have them automatically registered with the Scene.\r\n *\r\n * Game Objects directly register themselves with the Factory and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectFactory\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectFactory = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectFactory (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Factory belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n this.events = scene.sys.events;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n this.events.once(SceneEvents.BOOT, this.boot, this);\r\n this.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Game Object to this Scene.\r\n *\r\n * If the Game Object renders, it will be added to the Display List.\r\n * If it has a `preUpdate` method, it will be added to the Update List.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#existing\r\n * @since 3.0.0\r\n *\r\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\r\n */\r\n existing: function (child)\r\n {\r\n if (child.renderCanvas || child.renderWebGL)\r\n {\r\n this.displayList.add(child);\r\n }\r\n\r\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\r\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\r\n if (child.preUpdate)\r\n {\r\n this.updateList.add(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.events = null;\r\n\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\r\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\r\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.register\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\r\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\r\n */\r\nGameObjectFactory.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectFactory.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\r\n * providing a its `factoryType`.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.remove\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\r\n */\r\nGameObjectFactory.remove = function (factoryType)\r\n{\r\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectFactory.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\r\n\r\nmodule.exports = GameObjectFactory;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TransformMatrix = require('./components/TransformMatrix');\r\n\r\nvar tempMatrix1 = new TransformMatrix();\r\nvar tempMatrix2 = new TransformMatrix();\r\nvar tempMatrix3 = new TransformMatrix();\r\n\r\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\r\n\r\n/**\r\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\r\n * the parent matrix if provided.\r\n *\r\n * Note that the object this results contains _references_ to the Transform Matrices,\r\n * not new instances of them. Therefore, you should use their values immediately, or\r\n * copy them to your own matrix, as they will be replaced as soon as another Game\r\n * Object is rendered.\r\n *\r\n * @function Phaser.GameObjects.GetCalcMatrix\r\n * @memberof Phaser.GameObjects\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\r\n *\r\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\r\n */\r\nvar GetCalcMatrix = function (src, camera, parentMatrix)\r\n{\r\n var camMatrix = tempMatrix1;\r\n var spriteMatrix = tempMatrix2;\r\n var calcMatrix = tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = GetCalcMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha property of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.AlphaSingle\r\n * @since 3.22.0\r\n */\r\n\r\nvar AlphaSingle = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = AlphaSingle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../../renderer/BlendModes');\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string|number)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.displayList)\r\n {\r\n this.displayList.queueDepthSort();\r\n }\r\n\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Effects = require('../../fx/');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * @classdesc\r\n * The FX Component features a set of methods used for applying a range of special built-in effects to a Game Object.\r\n *\r\n * The effects include the following:\r\n *\r\n * * Barrel Distortion\r\n * * Bloom\r\n * * Blur\r\n * * Bokeh / Tilt Shift\r\n * * Circle Outline\r\n * * Color Matrix\r\n * * Glow\r\n * * Displacement\r\n * * Gradient\r\n * * Pixelate\r\n * * Shine\r\n * * Shadow\r\n * * Vignette\r\n * * Wipe / Reveal\r\n *\r\n * All Game Objects support Post FX. These are effects applied after the Game Object has been rendered.\r\n *\r\n * Texture-based Game Objects also support Pre FX, including:\r\n *\r\n * * Image\r\n * * Sprite\r\n * * TileSprite\r\n * * Text\r\n * * RenderTexture\r\n * * Video\r\n *\r\n * And any Game Object that extends the above.\r\n *\r\n * The difference between Pre FX and Post FX are that all Post FX take place in a canvas (renderer) sized frame buffer,\r\n * after the Game Object has been rendered. Pre FX, however, take place in a texture sized frame buffer, which is sized\r\n * based on the Game Object itself. The end result is then composited back to the main game canvas. For intensive effects,\r\n * such as blur, bloom or glow, which can require many iterations, this is a much more efficient way to apply the effect,\r\n * as only it only has to work on a Game Object sized texture and not all pixels in the canvas.\r\n *\r\n * In short, you should always try and use a Pre FX if you can.\r\n *\r\n * Due to the way that FX work they can be stacked-up. For example, you can apply a blur to a Game Object, then apply\r\n * a bloom effect to the same Game Object. The bloom effect will be applied to the blurred texture, not the original.\r\n * Keep the order in mind when stacking effects.\r\n *\r\n * All effects are WebGL only and do not have canvas counterparts.\r\n *\r\n * As you can appreciate, some effects are more expensive than others. For example, a bloom effect is going to be more\r\n * expensive than a simple color matrix effect, so please consider using them wisely and performance test your target\r\n * platforms early on in production.\r\n *\r\n * This component is created automatically by the `PostPipeline` class and does not need to be instantiated directly.\r\n *\r\n * @class FX\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.60.0\r\n * @webglOnly\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that owns this FX Component.\r\n * @param {boolean} isPost - Is this a Pre or Post FX Component?\r\n */\r\nvar FX = new Class({\r\n\r\n initialize:\r\n\r\n function FX (gameObject, isPost)\r\n {\r\n /**\r\n * A reference to the Game Object that owns this FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Is this a Post FX Controller? or a Pre FX Controller?\r\n *\r\n * @name Phaser.GameObjects.Components.FX#isPost\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.60.0\r\n */\r\n this.isPost = isPost;\r\n\r\n /**\r\n * Has this FX Component been enabled?\r\n *\r\n * You should treat this property as read-only, although it is toggled\r\n * automaticaly during internal use.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#enabled\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * An array containing all of the Pre FX Controllers that\r\n * have been added to this FX Component. They are processed in\r\n * the order they are added.\r\n *\r\n * This array is empty if this is a Post FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#list\r\n * @type {Phaser.FX.Controller[]}\r\n * @since 3.60.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * The amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * You do not need to set this if you're only using Post FX.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#padding\r\n * @type {number}\r\n * @default 0\r\n * @since 3.60.0\r\n */\r\n this.padding = 0;\r\n },\r\n\r\n /**\r\n * Sets the amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * You do not need to set this if you're only using Post FX.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setPadding\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPadding: function (padding)\r\n {\r\n if (padding === undefined) { padding = 0; }\r\n\r\n this.padding = padding;\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is copied by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `copySprite` method.\r\n *\r\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFXCopy\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFXCopy: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is rendered by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `drawSprite` method.\r\n *\r\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFX\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFX: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Enables this FX Component and applies the FXPipeline to the parent Game Object.\r\n *\r\n * This is called automatically whenever you call a method such as `addBloom`, etc.\r\n *\r\n * You can check the `enabled` property to see if the Game Object is already enabled, or not.\r\n *\r\n * This only applies to Pre FX. Post FX are always enabled.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#enable\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n */\r\n enable: function (padding)\r\n {\r\n if (this.isPost)\r\n {\r\n return;\r\n }\r\n\r\n var renderer = this.gameObject.scene.sys.renderer;\r\n\r\n if (renderer && renderer.pipelines)\r\n {\r\n this.gameObject.pipeline = renderer.pipelines.FX_PIPELINE;\r\n\r\n if (padding !== undefined)\r\n {\r\n this.padding = padding;\r\n }\r\n\r\n this.enabled = true;\r\n }\r\n else\r\n {\r\n this.enabled = false;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys and removes all FX Controllers that are part of this FX Component,\r\n * then disables it.\r\n *\r\n * If this is a Pre FX Component it will only remove Pre FX.\r\n * If this is a Post FX Component it will only remove Post FX.\r\n *\r\n * To remove both at once use the `GameObject.clearFX` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#clear\r\n * @since 3.60.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clear: function ()\r\n {\r\n if (this.isPost)\r\n {\r\n this.gameObject.resetPostPipeline(true);\r\n }\r\n else\r\n {\r\n var list = this.list;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].destroy();\r\n }\r\n\r\n this.list = [];\r\n }\r\n\r\n this.enabled = false;\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * Searches for the given FX Controller within this FX Component.\r\n *\r\n * If found, the controller is removed from this component and then destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#remove\r\n * @since 3.60.0\r\n *\r\n * @generic {Phaser.FX.Controller} T\r\n * @genericUse {T} - [fx]\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX Component.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n remove: function (fx)\r\n {\r\n var i;\r\n\r\n if (this.isPost)\r\n {\r\n var pipelines = this.gameObject.getPostPipeline(String(fx.type));\r\n\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (i = 0; i < pipelines.length; i++)\r\n {\r\n var pipeline = pipelines[i];\r\n\r\n if (pipeline.controller === fx)\r\n {\r\n this.gameObject.removePostPipeline(pipeline);\r\n\r\n fx.destroy();\r\n\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n var list = this.list;\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n if (list[i] === fx)\r\n {\r\n SpliceOne(list, i);\r\n\r\n fx.destroy();\r\n }\r\n }\r\n }\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * Disables this FX Component.\r\n *\r\n * This will reset the pipeline on the Game Object that owns this component back to its\r\n * default and flag this component as disabled.\r\n *\r\n * You can re-enable it again by calling `enable` for Pre FX or by adding an FX for Post FX.\r\n *\r\n * Optionally, set `clear` to destroy all current FX Controllers.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#disable\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [clear=false] - Destroy and remove all FX Controllers that are part of this component.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n disable: function (clear)\r\n {\r\n if (clear === undefined) { clear = false; }\r\n\r\n if (!this.isPost)\r\n {\r\n this.gameObject.resetPipeline();\r\n }\r\n\r\n this.enabled = false;\r\n\r\n if (clear)\r\n {\r\n this.clear();\r\n }\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * Adds the given FX Controler to this FX Component.\r\n *\r\n * Note that adding an FX Controller does not remove any existing FX. They all stack-up\r\n * on-top of each other. If you don't want this, make sure to call either `remove` or\r\n * `clear` first.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#add\r\n * @since 3.60.0\r\n *\r\n * @generic {Phaser.FX.Controller} T\r\n * @genericUse {T} - [fx]\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX Component.\r\n * @param {object} [config] - Optional configuration object that is passed to the pipeline during instantiation.\r\n *\r\n * @return {Phaser.FX.Controller} The FX Controller.\r\n */\r\n add: function (fx, config)\r\n {\r\n if (this.isPost)\r\n {\r\n var type = String(fx.type);\r\n\r\n this.gameObject.setPostPipeline(type, config);\r\n\r\n var pipeline = this.gameObject.getPostPipeline(type);\r\n\r\n if (pipeline)\r\n {\r\n if (Array.isArray(pipeline))\r\n {\r\n pipeline = pipeline.pop();\r\n }\r\n\r\n if (pipeline) pipeline.controller = fx;\r\n\r\n return fx;\r\n }\r\n }\r\n else\r\n {\r\n if (!this.enabled)\r\n {\r\n this.enable();\r\n }\r\n\r\n this.list.push(fx);\r\n\r\n return fx;\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Glow effect.\r\n *\r\n * The glow effect is a visual technique that creates a soft, luminous halo around game objects,\r\n * characters, or UI elements. This effect is used to emphasize importance, enhance visual appeal,\r\n * or convey a sense of energy, magic, or otherworldly presence. The effect can also be set on\r\n * the inside of the Game Object. The color and strength of the glow can be modified.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGlow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n * @param {number} [quality=0.1] - Only available for PostFX. Sets the quality of this Glow effect. Default is 0.1. Cannot be changed post-creation.\r\n * @param {number} [distance=10] - Only available for PostFX. Sets the distance of this Glow effect. Default is 10. Cannot be changed post-creation.\r\n *\r\n * @return {Phaser.FX.Glow} The Glow FX Controller.\r\n */\r\n addGlow: function (color, outerStrength, innerStrength, knockout, quality, distance)\r\n {\r\n return this.add(new Effects.Glow(this.gameObject, color, outerStrength, innerStrength, knockout), { quality: quality, distance: distance });\r\n },\r\n\r\n /**\r\n * Adds a Shadow effect.\r\n *\r\n * The shadow effect is a visual technique used to create the illusion of depth and realism by adding darker,\r\n * offset silhouettes or shapes beneath game objects, characters, or environments. These simulated shadows\r\n * help to enhance the visual appeal and immersion, making the 2D game world appear more dynamic and three-dimensional.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShadow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n *\r\n * @return {Phaser.FX.Shadow} The Shadow FX Controller.\r\n */\r\n addShadow: function (x, y, decay, power, color, samples, intensity)\r\n {\r\n return this.add(new Effects.Shadow(this.gameObject, x, y, decay, power, color, samples, intensity));\r\n },\r\n\r\n /**\r\n * Adds a Pixelate effect.\r\n *\r\n * The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image,\r\n * creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic\r\n * purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as\r\n * during a transition or to censor specific content.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addPixelate\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n *\r\n * @return {Phaser.FX.Pixelate} The Pixelate FX Controller.\r\n */\r\n addPixelate: function (amount)\r\n {\r\n return this.add(new Effects.Pixelate(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Vignette effect.\r\n *\r\n * The vignette effect is a visual technique where the edges of the screen, or a Game Object, gradually darken or blur,\r\n * creating a frame-like appearance. This effect is used to draw the player's focus towards the central action or subject,\r\n * enhance immersion, and provide a cinematic or artistic quality to the game's visuals.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addVignette\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n *\r\n * @return {Phaser.FX.Vignette} The Vignette FX Controller.\r\n */\r\n addVignette: function (x, y, radius, strength)\r\n {\r\n return this.add(new Effects.Vignette(this.gameObject, x, y, radius, strength));\r\n },\r\n\r\n /**\r\n * Adds a Shine effect.\r\n *\r\n * The shine effect is a visual technique that simulates the appearance of reflective\r\n * or glossy surfaces by passing a light beam across a Game Object. This effect is used to\r\n * enhance visual appeal, emphasize certain features, and create a sense of depth or\r\n * material properties.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShine\r\n * @since 3.60.0\r\n *\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n *\r\n * @return {Phaser.FX.Shine} The Shine FX Controller.\r\n */\r\n addShine: function (speed, lineWidth, gradient, reveal)\r\n {\r\n return this.add(new Effects.Shine(this.gameObject, speed, lineWidth, gradient, reveal));\r\n },\r\n\r\n /**\r\n * Adds a Blur effect.\r\n *\r\n * A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect,\r\n * typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a\r\n * smooth blur resembling that of viewing the image through a translucent screen, distinctly different\r\n * from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBlur\r\n * @since 3.60.0\r\n *\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Blur} The Blur FX Controller.\r\n */\r\n addBlur: function (quality, x, y, strength, color, steps)\r\n {\r\n return this.add(new Effects.Blur(this.gameObject, quality, x, y, strength, color, steps));\r\n },\r\n\r\n /**\r\n * Adds a Gradient effect.\r\n *\r\n * The gradient overlay effect is a visual technique where a smooth color transition is applied over Game Objects,\r\n * such as sprites or UI components. This effect is used to enhance visual appeal, emphasize depth, or create\r\n * stylistic and atmospheric variations. It can also be utilized to convey information, such as representing\r\n * progress or health status through color changes.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGradient\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n *\r\n * @return {Phaser.FX.Gradient} The Gradient FX Controller.\r\n */\r\n addGradient: function (color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n return this.add(new Effects.Gradient(this.gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size));\r\n },\r\n\r\n /**\r\n * Adds a Bloom effect.\r\n *\r\n * Bloom is an effect used to reproduce an imaging artifact of real-world cameras.\r\n * The effect produces fringes of light extending from the borders of bright areas in an image,\r\n * contributing to the illusion of an extremely bright light overwhelming the\r\n * camera or eye capturing the scene.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBloom\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Bloom} The Bloom FX Controller.\r\n */\r\n addBloom: function (color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n return this.add(new Effects.Bloom(this.gameObject, color, offsetX, offsetY, blurStrength, strength, steps));\r\n },\r\n\r\n /**\r\n * Adds a ColorMatrix effect.\r\n *\r\n * The color matrix effect is a visual technique that involves manipulating the colors of an image\r\n * or scene using a mathematical matrix. This process can adjust hue, saturation, brightness, and contrast,\r\n * allowing developers to create various stylistic appearances or mood settings within the game.\r\n * Common applications include simulating different lighting conditions, applying color filters,\r\n * or achieving a specific visual style.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addColorMatrix\r\n * @since 3.60.0\r\n *\r\n * @return {Phaser.FX.ColorMatrix} The ColorMatrix FX Controller.\r\n */\r\n addColorMatrix: function ()\r\n {\r\n return this.add(new Effects.ColorMatrix(this.gameObject));\r\n },\r\n\r\n /**\r\n * Adds a Circle effect.\r\n *\r\n * This effect will draw a circle around the texture of the Game Object, effectively masking off\r\n * any area outside of the circle without the need for an actual mask. You can control the thickness\r\n * of the circle, the color of the circle and the color of the background, should the texture be\r\n * transparent. You can also control the feathering applied to the circle, allowing for a harsh or soft edge.\r\n *\r\n * Please note that adding this effect to a Game Object will not change the input area or physics body of\r\n * the Game Object, should it have one.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addCircle\r\n * @since 3.60.0\r\n *\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=0xfeedb6] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n *\r\n * @return {Phaser.FX.Circle} The Circle FX Controller.\r\n */\r\n addCircle: function (thickness, color, backgroundColor, scale, feather)\r\n {\r\n return this.add(new Effects.Circle(this.gameObject, thickness, color, backgroundColor, scale, feather));\r\n },\r\n\r\n /**\r\n * Adds a Barrel effect.\r\n *\r\n * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to\r\n * a Game Object. The amount of the effect can be modified in real-time.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBarrel\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n *\r\n * @return {Phaser.FX.Barrel} The Barrel FX Controller.\r\n */\r\n addBarrel: function (amount)\r\n {\r\n return this.add(new Effects.Barrel(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Displacement effect.\r\n *\r\n * The displacement effect is a visual technique that alters the position of pixels in an image\r\n * or texture based on the values of a displacement map. This effect is used to create the illusion\r\n * of depth, surface irregularities, or distortion in otherwise flat elements. It can be applied to\r\n * characters, objects, or backgrounds to enhance realism, convey movement, or achieve various\r\n * stylistic appearances.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addDisplacement\r\n * @since 3.60.0\r\n *\r\n * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply. A very small float number, such as 0.005.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply. A very small float number, such as 0.005.\r\n *\r\n * @return {Phaser.FX.Displacement} The Displacement FX Controller.\r\n */\r\n addDisplacement: function (texture, x, y)\r\n {\r\n return this.add(new Effects.Displacement(this.gameObject, texture, x, y));\r\n },\r\n\r\n /**\r\n * Adds a Wipe effect.\r\n *\r\n * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements\r\n * in the game, such as images, text, or scene transitions. This effect is often used to create\r\n * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition\r\n * between game states.\r\n *\r\n * You can set both the direction and the axis of the wipe effect. The following combinations are possible:\r\n *\r\n * * left to right: direction 0, axis 0\r\n * * right to left: direction 1, axis 0\r\n * * top to bottom: direction 1, axis 1\r\n * * bottom to top: direction 1, axis 0\r\n *\r\n * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addWipe\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addWipe: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis));\r\n },\r\n\r\n /**\r\n * Adds a Reveal Wipe effect.\r\n *\r\n * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements\r\n * in the game, such as images, text, or scene transitions. This effect is often used to create\r\n * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition\r\n * between game states.\r\n *\r\n * You can set both the direction and the axis of the wipe effect. The following combinations are possible:\r\n *\r\n * * left to right: direction 0, axis 0\r\n * * right to left: direction 1, axis 0\r\n * * top to bottom: direction 1, axis 1\r\n * * bottom to top: direction 1, axis 0\r\n *\r\n * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addReveal\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addReveal: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis, true));\r\n },\r\n\r\n /**\r\n * Adds a Bokeh effect.\r\n *\r\n * Bokeh refers to a visual effect that mimics the photographic technique of creating a shallow depth of field.\r\n * This effect is used to emphasize the game's main subject or action, by blurring the background or foreground\r\n * elements, resulting in a more immersive and visually appealing experience. It is achieved through rendering\r\n * techniques that simulate the out-of-focus areas, giving a sense of depth and realism to the game's graphics.\r\n *\r\n * See also Tilt Shift.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBokeh\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh FX Controller.\r\n */\r\n addBokeh: function (radius, amount, contrast)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast));\r\n },\r\n\r\n /**\r\n * Adds a Tilt Shift effect.\r\n *\r\n * This Bokeh effect can also be used to generate a Tilt Shift effect, which is a technique used to create a miniature\r\n * effect by blurring everything except a small area of the image. This effect is achieved by blurring the\r\n * top and bottom elements, while keeping the center area in focus.\r\n *\r\n * See also Bokeh.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addTiltShift\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {number} [blurX=1] - The amount of horizontal blur.\r\n * @param {number} [blurY=1] - The amount of vertical blur.\r\n * @param {number} [strength=1] - The strength of the blur.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh TiltShift FX Controller.\r\n */\r\n addTiltShift: function (radius, amount, contrast, blurX, blurY, strength)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast, true, blurX, blurY, strength));\r\n },\r\n\r\n /**\r\n * Destroys this FX Component.\r\n *\r\n * Called automatically when Game Objects are destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.clear();\r\n\r\n this.gameObject = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar RotateAround = require('../../math/RotateAround');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getCenter: function (output, includeParent)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n *\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is\r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = require('../../display/mask/BitmapMask');\r\nvar GeometryMask = require('../../display/mask/GeometryMask');\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n *\r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n *\r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one, or a Dynamic Texture.\r\n *\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable texture-based Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G\r\n * @generic {Phaser.Textures.DynamicTexture} T\r\n * @genericUse {(G|T|null)} [maskObject]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (maskObject, x, y, texture, frame)\r\n {\r\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n maskObject = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n *\r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G\r\n * @generic {Phaser.GameObjects.Shape} S\r\n * @genericUse {(G|S)} [graphics]\r\n *\r\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && (this.type === 'Graphics' || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = require('../../math/DegToRad');\r\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar TWEEN_CONST = require('../../tweens/tween/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The distance the follower has traveled from the previous point to the current one, at the last update.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathDelta\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.23.0\r\n */\r\n pathDelta: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.setTargetValue();\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n if (!this.pathDelta)\r\n {\r\n this.pathDelta = new Vector2();\r\n }\r\n\r\n this.pathDelta.reset();\r\n\r\n config.persist = true;\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n var pathDelta = this.pathDelta;\r\n var pathVector = this.pathVector;\r\n\r\n pathDelta.copy(pathVector).negate();\r\n\r\n if (tweenData.state === TWEEN_CONST.COMPLETE)\r\n {\r\n this.path.getPoint(tweenData.end, pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n return;\r\n }\r\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n pipelineData: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n *\r\n * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipeline)\r\n {\r\n this.pipelineData = {};\r\n\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return false;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n if (pipeline === undefined)\r\n {\r\n pipeline = pipelines.default;\r\n }\r\n\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.defaultPipeline = instance;\r\n this.pipeline = instance;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the main WebGL Pipeline of this Game Object.\r\n *\r\n * Also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipeline, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.pipeline = instance;\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipelineData: function (key, value)\r\n {\r\n var data = this.pipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n *\r\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\r\n */\r\n resetPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n this.pipeline = this.defaultPipeline;\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\nvar FX = require('../components/FX');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering post pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n\r\nvar PostPipeline = {\r\n\r\n /**\r\n * Does this Game Object have any Post Pipelines set?\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#hasPostPipeline\r\n * @type {boolean}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n hasPostPipeline: false,\r\n\r\n /**\r\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\r\n *\r\n * The pipelines are processed in the order in which they appear in this array.\r\n *\r\n * If you modify this array directly, be sure to set the\r\n * `hasPostPipeline` property accordingly.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelines\r\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelines: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelineData: null,\r\n\r\n /**\r\n * The Pre FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.preFX.addBloom();\r\n * ```\r\n *\r\n * Only the following Game Objects support Pre FX:\r\n *\r\n * * Image\r\n * * Sprite\r\n * * TileSprite\r\n * * Text\r\n * * RenderTexture\r\n * * Video\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#preFX\r\n * @type {?Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n preFX: null,\r\n\r\n /**\r\n * The Post FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.postFX.addBloom();\r\n * ```\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * This property is always `null` until the `initPostPipeline` method is called.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postFX\r\n * @type {Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postFX: null,\r\n\r\n /**\r\n * This should only be called during the instantiation of the Game Object.\r\n *\r\n * It is called by default by all core Game Objects and doesn't need\r\n * calling again.\r\n *\r\n * After that, use `setPostPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#initPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [preFX=false] - Does this Game Object support Pre FX?\r\n */\r\n initPostPipeline: function (preFX)\r\n {\r\n this.postPipelines = [];\r\n this.postPipelineData = {};\r\n\r\n this.postFX = new FX(this, true);\r\n\r\n if (preFX)\r\n {\r\n this.preFX = new FX(this, false);\r\n }\r\n },\r\n\r\n /**\r\n * Sets one, or more, Post Pipelines on this Game Object.\r\n *\r\n * Post Pipelines are invoked after this Game Object has rendered to its target and\r\n * are commonly used for post-fx.\r\n *\r\n * The post pipelines are appended to the `postPipelines` array belonging to this\r\n * Game Object. When the renderer processes this Game Object, it iterates through the post\r\n * pipelines in the order in which they appear in the array. If you are stacking together\r\n * multiple effects, be aware that the order is important.\r\n *\r\n * If you call this method multiple times, the new pipelines will be appended to any existing\r\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\r\n *\r\n * You can optionally also set the `postPipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `postPipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `postPipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipeline: function (pipelines, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelineManager = renderer.pipelines;\r\n\r\n if (pipelineManager)\r\n {\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelineManager.getPostPipeline(pipelines[i], this, pipelineData);\r\n\r\n if (instance)\r\n {\r\n this.postPipelines.push(instance);\r\n }\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.postPipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `postPipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipelineData\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipelineData: function (key, value)\r\n {\r\n var data = this.postPipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#getPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} An array of all the Post Pipelines matching the name. This array will be empty if there was no match. If there was only one single match, that pipeline is returned directly, not in an array.\r\n */\r\n getPostPipeline: function (pipeline)\r\n {\r\n var isString = (typeof pipeline === 'string');\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n var results = [];\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\r\n {\r\n results.push(instance);\r\n }\r\n }\r\n\r\n return (results.length === 1) ? results[0] : results;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\r\n * the `destroy` method on each post pipeline and then clearing the local array.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#resetPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `postPipelineData` object to being an empty object?\r\n */\r\n resetPostPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n pipelines[i].destroy();\r\n }\r\n\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n\r\n if (resetData)\r\n {\r\n this.postPipelineData = {};\r\n }\r\n },\r\n\r\n /**\r\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\r\n *\r\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#removePostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removePostPipeline: function (pipeline)\r\n {\r\n var isString = (typeof pipeline === 'string');\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = pipelines.length - 1; i >= 0; i--)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if (\r\n (isString && instance.name === pipeline) ||\r\n (!isString && instance === pipeline))\r\n {\r\n instance.destroy();\r\n\r\n SpliceOne(pipelines, i);\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Pre and Post FX Controllers from this Game Object.\r\n *\r\n * If you wish to remove a single controller, use the `preFX.remove(fx)` or `postFX.remove(fx)` methods instead.\r\n *\r\n * If you wish to clear a single controller, use the `preFX.clear()` or `postFX.clear()` methods instead.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#clearFX\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearFX: function ()\r\n {\r\n if (this.preFX)\r\n {\r\n this.preFX.clear();\r\n }\r\n\r\n if (this.postFX)\r\n {\r\n this.postFX.clear();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PostPipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleX * this.frame.realWidth);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleY * this.frame.realHeight);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame|boolean} [frame] - The frame to base the size of this Game Object on.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (!frame) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n var input = this.input;\r\n\r\n if (input && !input.customHitArea)\r\n {\r\n input.hitArea.width = this.width;\r\n input.hitArea.height = this.height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the tint of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Tint\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Tint = {\r\n\r\n /**\r\n * The tint value being applied to the top-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the top-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopRight: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomRight: 0xffffff,\r\n\r\n /**\r\n * The tint fill mode.\r\n *\r\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\r\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n tintFill: false,\r\n\r\n /**\r\n * Clears all tint values associated with this Game Object.\r\n *\r\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\r\n * which results in no visible change to the texture.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#clearTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearTint: function ()\r\n {\r\n this.setTint(0xffffff);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an additive tint on this Game Object.\r\n *\r\n * The tint works by taking the pixel color values from the Game Objects texture, and then\r\n * multiplying it by the color value of the tint. You can provide either one color value,\r\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\r\n * per corner. The colors are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 0xffffff; }\r\n\r\n if (topRight === undefined)\r\n {\r\n topRight = topLeft;\r\n bottomLeft = topLeft;\r\n bottomRight = topLeft;\r\n }\r\n\r\n this.tintTopLeft = topLeft;\r\n this.tintTopRight = topRight;\r\n this.tintBottomLeft = bottomLeft;\r\n this.tintBottomRight = bottomRight;\r\n\r\n this.tintFill = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a fill-based tint on this Game Object.\r\n *\r\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\r\n * with those in the tint. You can use this for effects such as making a player flash 'white'\r\n * if hit by something. You can provide either one color value, in which case the whole\r\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\r\n * are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTintFill\r\n * @webglOnly\r\n * @since 3.11.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n\r\n this.tintFill = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The tint value being applied to the whole of the Game Object.\r\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tint\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tint: {\r\n\r\n set: function (value)\r\n {\r\n this.setTint(value, value, value, value);\r\n }\r\n },\r\n\r\n /**\r\n * Does this Game Object have a tint applied?\r\n *\r\n * It checks to see if the 4 tint properties are set to the value 0xffffff\r\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#isTinted\r\n * @type {boolean}\r\n * @webglOnly\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n isTinted: {\r\n\r\n get: function ()\r\n {\r\n var white = 0xffffff;\r\n\r\n return (\r\n this.tintFill ||\r\n this.tintTopLeft !== white ||\r\n this.tintTopRight !== white ||\r\n this.tintBottomLeft !== white ||\r\n this.tintBottomRight !== white\r\n );\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Tint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../../math/const');\r\nvar TransformMatrix = require('./TransformMatrix');\r\nvar TransformXY = require('../../math/TransformXY');\r\nvar WrapAngle = require('../../math/angle/Wrap');\r\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Transform\r\n * @since 3.0.0\r\n */\r\n\r\nvar Transform = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\r\n * @type {boolean}\r\n * @readonly\r\n * @default true\r\n * @since 3.60.0\r\n */\r\n hasTransformComponent: true,\r\n\r\n /**\r\n * Private internal value. Holds the horizontal scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleX\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleX: 1,\r\n\r\n /**\r\n * Private internal value. Holds the vertical scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleY\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleY: 1,\r\n\r\n /**\r\n * Private internal value. Holds the rotation value in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _rotation: 0,\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: 0,\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: 0,\r\n\r\n /**\r\n * The z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: 0,\r\n\r\n /**\r\n * The w position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: 0,\r\n\r\n /**\r\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\r\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\r\n *\r\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\r\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.18.0\r\n */\r\n scale: {\r\n\r\n get: function ()\r\n {\r\n return (this._scaleX + this._scaleY) / 2;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleY !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleX !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The angle of this Game Object as expressed in degrees.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in radians, see the `rotation` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * The angle of this Game Object in radians.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\r\n * and -PI/2 is up.\r\n *\r\n * If you prefer to work in degrees, see the `angle` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#rotation\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of this Game Object.\r\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\r\n * @param {number} [z=0] - The z position of this Game Object.\r\n * @param {number} [w=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPosition: function (x, y, z, w)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n if (z === undefined) { z = 0; }\r\n if (w === undefined) { w = 0; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies an object's coordinates to this Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#copyPosition\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n copyPosition: function (source)\r\n {\r\n if (source.x !== undefined) { this.x = source.x; }\r\n if (source.y !== undefined) { this.y = source.y; }\r\n if (source.z !== undefined) { this.z = source.z; }\r\n if (source.w !== undefined) { this.w = source.w; }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object to be a random position within the confines of\r\n * the given area.\r\n *\r\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\r\n *\r\n * The position does not factor in the size of this Game Object, meaning that only the origin is\r\n * guaranteed to be within the area.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\r\n * @since 3.8.0\r\n *\r\n * @param {number} [x=0] - The x position of the top-left of the random area.\r\n * @param {number} [y=0] - The y position of the top-left of the random area.\r\n * @param {number} [width] - The width of the random area.\r\n * @param {number} [height] - The height of the random area.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRandomPosition: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n\r\n this.x = x + (Math.random() * width);\r\n this.y = y + (Math.random() * height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this.rotation = radians;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=1] - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScale: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scaleX = x;\r\n this.scaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the x position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The x position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setX: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the y position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The y position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setY: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The z position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setZ: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.z = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the w position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setW\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setW: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.w = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the local transform matrix for this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getLocalTransformMatrix: function (tempMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n },\r\n\r\n /**\r\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n var parent = this.parentContainer;\r\n\r\n if (!parent)\r\n {\r\n return this.getLocalTransformMatrix(tempMatrix);\r\n }\r\n\r\n if (!parentMatrix)\r\n {\r\n parentMatrix = new TransformMatrix();\r\n }\r\n\r\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n\r\n while (parent)\r\n {\r\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\r\n\r\n parentMatrix.multiply(tempMatrix, tempMatrix);\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return tempMatrix;\r\n },\r\n\r\n /**\r\n * Takes the given `x` and `y` coordinates and converts them into local space for this\r\n * Game Object, taking into account parent and local transforms, and the Display Origin.\r\n *\r\n * The returned Vector2 contains the translated point in its properties.\r\n *\r\n * A Camera needs to be provided in order to handle modified scroll factors. If no\r\n * camera is specified, it will use the `main` camera from the Scene to which this\r\n * Game Object belongs.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\r\n *\r\n * @return {Phaser.Math.Vector2} The translated point.\r\n */\r\n getLocalPoint: function (x, y, point, camera)\r\n {\r\n if (!point) { point = new Vector2(); }\r\n if (!camera) { camera = this.scene.sys.cameras.main; }\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n var px = x + (csx * this.scrollFactorX) - csx;\r\n var py = y + (csy * this.scrollFactorY) - csy;\r\n\r\n if (this.parentContainer)\r\n {\r\n this.getWorldTransformMatrix().applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\r\n }\r\n\r\n // Normalize origin\r\n if (this._originComponent)\r\n {\r\n point.x += this._displayOriginX;\r\n point.y += this._displayOriginY;\r\n }\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Gets the sum total rotation of all of this Game Objects parent Containers.\r\n *\r\n * The returned value is in radians and will be zero if this Game Object has no parent container.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\r\n * @since 3.18.0\r\n *\r\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\r\n */\r\n getParentRotation: function ()\r\n {\r\n var rotation = 0;\r\n\r\n var parent = this.parentContainer;\r\n\r\n while (parent)\r\n {\r\n rotation += parent.rotation;\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return rotation;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n\r\n /**\r\n * The temporary quad value cache.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\r\n * @type {Float32Array}\r\n * @since 3.60.0\r\n */\r\n this.quad = new Float32Array(8);\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n\r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n\r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? matrix : out.matrix;\r\n\r\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix[5] = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n *\r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point in to the local space of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {Phaser.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n *\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n *\r\n * The result must be applied in the following order to reproduce the current matrix:\r\n *\r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.DecomposeMatrixResults} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n *\r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Performs the 8 calculations required to create the vertices of\r\n * a quad based on this matrix and the given x/y/xw/yh values.\r\n *\r\n * The result is stored in `TransformMatrix.quad`, which is returned\r\n * from this method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\r\n * @since 3.60.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} xw - The xw value.\r\n * @param {number} yh - The yh value.\r\n * @param {boolean} roundPixels - Pass the results via Math.round?\r\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\r\n *\r\n * @return {Float32Array} The quad Float32Array.\r\n */\r\n setQuad: function (x, y, xw, yh, roundPixels, quad)\r\n {\r\n if (quad === undefined) { quad = this.quad; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var e = matrix[4];\r\n var f = matrix[5];\r\n\r\n quad[0] = x * a + y * c + e;\r\n quad[1] = x * b + y * d + f;\r\n\r\n quad[2] = x * a + yh * c + e;\r\n quad[3] = x * b + yh * d + f;\r\n\r\n quad[4] = xw * a + yh * c + e;\r\n quad[5] = xw * b + yh * d + f;\r\n\r\n quad[6] = xw * a + y * c + e;\r\n quad[7] = xw * b + y * d + f;\r\n\r\n if (roundPixels)\r\n {\r\n quad.forEach(function (value, index)\r\n {\r\n quad[index] = Math.round(value);\r\n });\r\n }\r\n\r\n return quad;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.quad = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: require('./Alpha'),\r\n AlphaSingle: require('./AlphaSingle'),\r\n BlendMode: require('./BlendMode'),\r\n ComputedSize: require('./ComputedSize'),\r\n Crop: require('./Crop'),\r\n Depth: require('./Depth'),\r\n Flip: require('./Flip'),\r\n FX: require('./FX'),\r\n GetBounds: require('./GetBounds'),\r\n Mask: require('./Mask'),\r\n Origin: require('./Origin'),\r\n PathFollower: require('./PathFollower'),\r\n Pipeline: require('./Pipeline'),\r\n PostPipeline: require('./PostPipeline'),\r\n ScrollFactor: require('./ScrollFactor'),\r\n Size: require('./Size'),\r\n Texture: require('./Texture'),\r\n TextureCrop: require('./TextureCrop'),\r\n Tint: require('./Tint'),\r\n ToJSON: require('./ToJSON'),\r\n Transform: require('./Transform'),\r\n TransformMatrix: require('./TransformMatrix'),\r\n Visible: require('./Visible')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = require('../../utils/array');\r\nvar BlendModes = require('../../renderer/BlendModes');\r\nvar Class = require('../../utils/Class');\r\nvar Components = require('../components');\r\nvar Events = require('../events');\r\nvar GameObject = require('../GameObject');\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar Render = require('./ContainerRender');\r\nvar Union = require('../../geom/rectangle/Union');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * The transform point of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\r\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\r\n * the Container, and position children positively and negative around it as required.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\r\n * or the input area will become misaligned.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.AlphaSingle\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.PostPipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.AlphaSingle,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.PostPipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {number}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.initPostPipeline();\r\n\r\n this.setPosition(x, y);\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {this} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\r\n\r\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\r\n }\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n var hasSetFirst = false;\r\n\r\n output.setEmpty();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n\r\n if (!hasSetFirst)\r\n {\r\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\r\n hasSetFirst = true;\r\n }\r\n else\r\n {\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.parentContainer = this;\r\n\r\n gameObject.removeFromDisplayList();\r\n\r\n gameObject.addedToScene();\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n\r\n gameObject.removedFromScene();\r\n\r\n gameObject.addToDisplayList();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n this.parentContainer.pointToContainer(source, output);\r\n }\r\n else\r\n {\r\n output.x = source.x;\r\n output.y = source.y;\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n *\r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {number} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {number} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {number} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {number} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object above another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveAbove\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveAbove: function (child1, child2)\r\n {\r\n ArrayUtils.MoveAbove(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object below another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveBelow\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveBelow: function (child1, child2)\r\n {\r\n ArrayUtils.MoveBelow(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var list = this.list;\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n if (list[i] && list[i].scene)\r\n {\r\n list[i].off(Events.DESTROY, this.remove, this);\r\n\r\n list[i].destroy();\r\n }\r\n }\r\n\r\n this.list = [];\r\n }\r\n else\r\n {\r\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [oldChild,newChild]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Container#setScrollFactor\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n if (container.mask)\r\n {\r\n container.mask.preRenderCanvas(renderer, null, camera);\r\n }\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n }\r\n\r\n if (container.mask)\r\n {\r\n container.mask.postRenderCanvas(renderer);\r\n }\r\n};\r\n\r\nmodule.exports = ContainerCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar NOOP = require('../../utils/NOOP');\r\nvar renderWebGL = NOOP;\r\nvar renderCanvas = NOOP;\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./ContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./ContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderWebGL\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n var childCount = children.length;\r\n\r\n if (childCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n renderer.pipelines.preBatch(container);\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container.alpha;\r\n\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlphaTopLeft;\r\n var childAlphaTopRight;\r\n var childAlphaBottomLeft;\r\n var childAlphaBottomRight;\r\n\r\n if (child.alphaTopLeft !== undefined)\r\n {\r\n childAlphaTopLeft = child.alphaTopLeft;\r\n childAlphaTopRight = child.alphaTopRight;\r\n childAlphaBottomLeft = child.alphaBottomLeft;\r\n childAlphaBottomRight = child.alphaBottomRight;\r\n }\r\n else\r\n {\r\n var childAlpha = child.alpha;\r\n\r\n childAlphaTopLeft = childAlpha;\r\n childAlphaTopRight = childAlpha;\r\n childAlphaBottomLeft = childAlpha;\r\n childAlphaBottomRight = childAlpha;\r\n }\r\n\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n mask.preRenderWebGL(renderer, child, camera);\r\n }\r\n\r\n var type = child.type;\r\n\r\n if (type !== renderer.currentType)\r\n {\r\n renderer.newType = true;\r\n renderer.currentType = type;\r\n }\r\n\r\n renderer.nextTypeMatch = (i < childCount - 1) ? (children[i + 1].type === renderer.currentType) : false;\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n\r\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\r\n\r\n // Render\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n // Restore original values\r\n\r\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\r\n\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n\r\n if (mask)\r\n {\r\n mask.postRenderWebGL(renderer, camera);\r\n }\r\n\r\n renderer.newType = false;\r\n }\r\n\r\n renderer.pipelines.postBatch(container);\r\n};\r\n\r\nmodule.exports = ContainerWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n *\r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n *\r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n *\r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n *\r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n *\r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {number} width - The width of the video.\r\n * @param {number} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n *\r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {DOMException|string} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Locked Event.\r\n *\r\n * This event is dispatched when a Video was attempted to be played, but the browser prevented it\r\n * from doing so due to the Media Engagement Interaction policy.\r\n *\r\n * If you get this event you will need to wait for the user to interact with the browser before\r\n * the video will play. This is a browser security measure to prevent autoplaying videos with\r\n * audio. An interaction includes a mouse click, a touch, or a key press.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('locked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOCKED\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'locked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n *\r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n *\r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Playing Event.\r\n *\r\n * The playing event is fired after playback is first started,\r\n * and whenever it is restarted. For example it is fired when playback\r\n * resumes after having been paused or delayed due to lack of data.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('playing', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAYING\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'playing';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n *\r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n *\r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n *\r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stalled Event.\r\n *\r\n * This event is dispatched by a Video Game Object when the video playback stalls.\r\n *\r\n * This can happen if the video is buffering.\r\n *\r\n * If will fire for any of the following native DOM events:\r\n *\r\n * `stalled`\r\n * `suspend`\r\n * `waiting`\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('stalled', listener)`.\r\n *\r\n * Note that being stalled isn't always a negative thing. A video can be stalled if it\r\n * has downloaded enough data in to its buffer to not need to download any more until\r\n * the current batch of frames have rendered.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STALLED\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'stalled';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n *\r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Texture Ready Event.\r\n *\r\n * This event is dispatched by a Video Game Object when it has finished creating its texture.\r\n *\r\n * This happens when the video has finished loading enough data for its first frame.\r\n *\r\n * If you wish to use the Video texture elsewhere in your game, such as as a Sprite texture,\r\n * then you should listen for this event first, before creating the Sprites that use it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('textureready', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TEXTURE\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object that emitted the event.\r\n * @param {Phaser.Textures.Texture} texture - The Texture that was created.\r\n */\r\nmodule.exports = 'textureready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n *\r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unsupported Event.\r\n *\r\n * This event is dispatched by a Video Game Object if the media source\r\n * (which may be specified as a MediaStream, MediaSource, Blob, or File,\r\n * for example) doesn't represent a supported media format.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('unsupported', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNSUPPORTED\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n * @param {DOMException|string} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'unsupported';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\r\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\r\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\r\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\r\n VIDEO_LOCKED: require('./VIDEO_LOCKED_EVENT'),\r\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\r\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\r\n VIDEO_PLAYING: require('./VIDEO_PLAYING_EVENT'),\r\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\r\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\r\n VIDEO_STALLED: require('./VIDEO_STALLED_EVENT'),\r\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\r\n VIDEO_TEXTURE: require('./VIDEO_TEXTURE_EVENT'),\r\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT'),\r\n VIDEO_UNSUPPORTED: require('./VIDEO_UNSUPPORTED_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n *\r\n * @name Phaser.Geom.CIRCLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n *\r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n *\r\n * @name Phaser.Geom.LINE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n *\r\n * @name Phaser.Geom.POINT\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n *\r\n * @name Phaser.Geom.POLYGON\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = require('./Length');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Random = require('./Random');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GEOM_CONST = require('../const');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {this} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = require('./Perimeter');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = require('./GetPoint');\r\nvar Perimeter = require('./Perimeter');\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\r\n * @param {number} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Contains = require('./Contains');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Line = require('../line/Line');\r\nvar Random = require('./Random');\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('./Rectangle');\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\nvar GetURL = require('./GetURL');\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\nvar XHRLoader = require('./XHRLoader');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * @classdesc\r\n * The base File class used by all File Types that the Loader can support.\r\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class File\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\r\n */\r\nvar File = new Class({\r\n\r\n initialize:\r\n\r\n function File (loader, fileConfig)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.File#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\r\n *\r\n * @name Phaser.Loader.File#cache\r\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\r\n * @since 3.7.0\r\n */\r\n this.cache = GetFastValue(fileConfig, 'cache', false);\r\n\r\n /**\r\n * The file type string (image, json, etc) for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.File#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(fileConfig, 'type', false);\r\n\r\n if (!this.type)\r\n {\r\n throw new Error('Invalid File type: ' + this.type);\r\n }\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.File#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = GetFastValue(fileConfig, 'key', false);\r\n\r\n var loadKey = this.key;\r\n\r\n if (loader.prefix && loader.prefix !== '')\r\n {\r\n this.key = loader.prefix + loadKey;\r\n }\r\n\r\n if (!this.key)\r\n {\r\n throw new Error('Invalid File key: ' + this.key);\r\n }\r\n\r\n var url = GetFastValue(fileConfig, 'url');\r\n\r\n if (url === undefined)\r\n {\r\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n url = loader.path + url;\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n *\r\n * Automatically has Loader.path prepended to it if a string.\r\n *\r\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {object|string}\r\n * @since 3.0.0\r\n */\r\n this.url = url;\r\n\r\n /**\r\n * The final URL this file will load from, including baseURL and path.\r\n * Set automatically when the Loader calls 'load' on this file.\r\n *\r\n * @name Phaser.Loader.File#src\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.src = '';\r\n\r\n /**\r\n * The merged XHRSettings for this file.\r\n *\r\n * @name Phaser.Loader.File#xhrSettings\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\r\n\r\n if (GetFastValue(fileConfig, 'xhrSettings', false))\r\n {\r\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\r\n }\r\n\r\n /**\r\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\r\n *\r\n * @name Phaser.Loader.File#xhrLoader\r\n * @type {?XMLHttpRequest}\r\n * @since 3.0.0\r\n */\r\n this.xhrLoader = null;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.File#state\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\r\n\r\n /**\r\n * The total size of this file.\r\n * Set by onProgress and only if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesTotal\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bytesTotal = 0;\r\n\r\n /**\r\n * Updated as the file loads.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesLoaded\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.bytesLoaded = -1;\r\n\r\n /**\r\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#percentComplete\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.percentComplete = -1;\r\n\r\n /**\r\n * For CORs based loading.\r\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\r\n *\r\n * @name Phaser.Loader.File#crossOrigin\r\n * @type {(string|undefined)}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = undefined;\r\n\r\n /**\r\n * The processed file data, stored here after the file has loaded.\r\n *\r\n * @name Phaser.Loader.File#data\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.data = undefined;\r\n\r\n /**\r\n * A config object that can be used by file types to store transitional data.\r\n *\r\n * @name Phaser.Loader.File#config\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.config = GetFastValue(fileConfig, 'config', {});\r\n\r\n /**\r\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\r\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\r\n *\r\n * @name Phaser.Loader.File#multiFile\r\n * @type {?Phaser.Loader.MultiFile}\r\n * @since 3.7.0\r\n */\r\n this.multiFile;\r\n\r\n /**\r\n * Does this file have an associated linked file? Such as an image and a normal map.\r\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\r\n * actually bound by data, where-as a linkFile is.\r\n *\r\n * @name Phaser.Loader.File#linkFile\r\n * @type {?Phaser.Loader.File}\r\n * @since 3.7.0\r\n */\r\n this.linkFile;\r\n },\r\n\r\n /**\r\n * Links this File with another, so they depend upon each other for loading and processing.\r\n *\r\n * @method Phaser.Loader.File#setLink\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\r\n */\r\n setLink: function (fileB)\r\n {\r\n this.linkFile = fileB;\r\n\r\n fileB.linkFile = this;\r\n },\r\n\r\n /**\r\n * Resets the XHRLoader instance this file is using.\r\n *\r\n * @method Phaser.Loader.File#resetXHR\r\n * @since 3.0.0\r\n */\r\n resetXHR: function ()\r\n {\r\n if (this.xhrLoader)\r\n {\r\n this.xhrLoader.onload = undefined;\r\n this.xhrLoader.onerror = undefined;\r\n this.xhrLoader.onprogress = undefined;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.File#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\r\n this.loader.nextFile(this, true);\r\n }\r\n else\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n // The creation of this XHRLoader starts the load process going.\r\n // It will automatically call the following, based on the load outcome:\r\n //\r\n // xhr.onload = this.onLoad\r\n // xhr.onerror = this.onError\r\n // xhr.onprogress = this.onProgress\r\n\r\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onLoad\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\r\n */\r\n onLoad: function (xhr, event)\r\n {\r\n var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\r\n {\r\n return xhr.responseURL.indexOf(scheme) === 0;\r\n });\r\n\r\n var localFileOk = (isLocalFile && event.target.status === 0);\r\n\r\n var success = !(event.target && event.target.status !== 200) || localFileOk;\r\n\r\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\r\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\r\n {\r\n success = false;\r\n }\r\n\r\n this.state = CONST.FILE_LOADED;\r\n\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, success);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onError\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\r\n */\r\n onError: function ()\r\n {\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n *\r\n * @param {ProgressEvent} event - The DOM ProgressEvent.\r\n */\r\n onProgress: function (event)\r\n {\r\n if (event.lengthComputable)\r\n {\r\n this.bytesLoaded = event.loaded;\r\n this.bytesTotal = event.total;\r\n\r\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\r\n *\r\n * @method Phaser.Loader.File#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessComplete\r\n * @since 3.7.0\r\n */\r\n onProcessComplete: function ()\r\n {\r\n this.state = CONST.FILE_COMPLETE;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileComplete(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing but it generated an error.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessError\r\n * @since 3.7.0\r\n */\r\n onProcessError: function ()\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\r\n\r\n this.state = CONST.FILE_ERRORED;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileFailed(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Checks if a key matching the one used by this file exists in the target Cache or not.\r\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\r\n * loaded or will conflict.\r\n *\r\n * @method Phaser.Loader.File#hasCacheConflict\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\r\n */\r\n hasCacheConflict: function ()\r\n {\r\n return (this.cache && this.cache.exists(this.key));\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n * This method is often overridden by specific file types.\r\n *\r\n * @method Phaser.Loader.File#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.cache && this.data)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\r\n },\r\n\r\n /**\r\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.File#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.7.0\r\n */\r\n pendingDestroy: function (data)\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n if (data === undefined) { data = this.data; }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this File and any references it holds.\r\n *\r\n * @method Phaser.Loader.File#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.cache = null;\r\n this.xhrSettings = null;\r\n this.multiFile = null;\r\n this.linkFile = null;\r\n this.data = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\r\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\r\n *\r\n * @method Phaser.Loader.File.createObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\r\n * @param {Blob} blob - A Blob object to create an object URL for.\r\n * @param {string} defaultType - Default mime type used if blob type is not available.\r\n */\r\nFile.createObjectURL = function (image, blob, defaultType)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n image.src = URL.createObjectURL(blob);\r\n }\r\n else\r\n {\r\n var reader = new FileReader();\r\n\r\n reader.onload = function ()\r\n {\r\n image.removeAttribute('crossOrigin');\r\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\r\n };\r\n\r\n reader.onerror = image.onerror;\r\n\r\n reader.readAsDataURL(blob);\r\n }\r\n};\r\n\r\n/**\r\n * Static method for releasing an existing object URL which was previously created\r\n * by calling {@link File#createObjectURL} method.\r\n *\r\n * @method Phaser.Loader.File.revokeObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\r\n */\r\nFile.revokeObjectURL = function (image)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n URL.revokeObjectURL(image.src);\r\n }\r\n};\r\n\r\nmodule.exports = File;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n *\r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n *\r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n *\r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n var finalFiles = [];\r\n\r\n // Clean out any potential 'null' or 'undefined' file entries\r\n files.forEach(function (file)\r\n {\r\n if (file)\r\n {\r\n finalFiles.push(file);\r\n }\r\n });\r\n\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {number}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = finalFiles;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.MultiFile#state\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.state = CONST.FILE_PENDING;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {number}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = finalFiles.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < finalFiles.length; i++)\r\n {\r\n finalFiles[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n\r\n // eslint-disable-next-line no-console\r\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\r\n }\r\n },\r\n\r\n /**\r\n * Called once all children of this multi file have been added to their caches and is now\r\n * ready for deletion from the Loader.\r\n *\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.MultiFile#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.60.0\r\n */\r\n pendingDestroy: function ()\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n for (var i = 0; i < this.files.length; i++)\r\n {\r\n this.files[i].pendingDestroy();\r\n }\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this Multi File and any references it holds.\r\n *\r\n * @method Phaser.Loader.MultiFile#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.files = null;\r\n this.config = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {number} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n *\r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n *\r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n *\r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n *\r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n *\r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n *\r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n *\r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing.\r\n *\r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load.\r\n *\r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n *\r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n *\r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n *\r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request.\r\n *\r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19,\r\n\r\n /**\r\n * File is pending being destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING_DESTROY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n FILE_PENDING_DESTROY: 20\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n *\r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n *\r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n *\r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {number} totalComplete - The total number of files that successfully loaded.\r\n * @param {number} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n *\r\n * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n *\r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n *\r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n *\r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n *\r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n *\r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n *\r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n *\r\n * This event is dispatched even if there aren't any files in the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\nvar GetURL = require('../GetURL');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n\r\n this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\r\n\r\n if (this.useImageElementLoad)\r\n {\r\n this.load = this.loadImage;\r\n this.onProcess = this.onProcessImage;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Handles image load processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n onProcessImage: function ()\r\n {\r\n var result = this.state;\r\n\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n if (result === CONST.FILE_LOADED)\r\n {\r\n this.onProcessComplete();\r\n }\r\n else\r\n {\r\n this.onProcessError();\r\n }\r\n },\r\n\r\n /**\r\n * Loads the image using either XHR or an Image tag.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n loadImage: function ()\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n _this.state = CONST.FILE_LOADED;\r\n\r\n _this.loader.nextFile(_this, true);\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n _this.loader.nextFile(_this, false);\r\n };\r\n\r\n this.data.src = this.src;\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n // Check if we have a linked normal map\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile)\r\n {\r\n // We do, but has it loaded?\r\n if (linkFile.state >= CONST.FILE_COMPLETE)\r\n {\r\n // Both files have loaded\r\n if (this.type === 'normalMap')\r\n {\r\n // linkFile.data = Image\r\n // this.data = Normal Map\r\n this.cache.addImage(this.key, linkFile.data, this.data);\r\n }\r\n else\r\n {\r\n // linkFile.data = Normal Map\r\n // this.data = Image\r\n this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n }\r\n\r\n // Nothing to do here, we'll use the linkFile `addToCache` call\r\n // to process this pair\r\n }\r\n else\r\n {\r\n this.cache.addImage(this.key, this.data);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\r\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\r\n * via the Image tag instead.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\r\n *\r\n * @class JSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar JSONFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function JSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n var extension = 'json';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataKey = GetFastValue(config, 'dataKey', dataKey);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'json',\r\n cache: loader.cacheManager.json,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: dataKey\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\r\n if (IsPlainObject(url))\r\n {\r\n if (dataKey)\r\n {\r\n this.data = GetValue(url, dataKey);\r\n }\r\n else\r\n {\r\n this.data = url;\r\n }\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n try\r\n {\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n catch (e)\r\n {\r\n this.onProcessError();\r\n\r\n throw e;\r\n }\r\n\r\n var key = this.config;\r\n\r\n if (typeof key === 'string')\r\n {\r\n this.data = GetValue(json, key, json);\r\n }\r\n else\r\n {\r\n this.data = json;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON file, or array of JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.json({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n *\r\n * ```json\r\n * {\r\n * \"level1\": {\r\n * \"baddies\": {\r\n * \"aliens\": {},\r\n * \"boss\": {}\r\n * }\r\n * },\r\n * \"level2\": {},\r\n * \"level3\": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#json\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new JSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = JSONFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var type = 'text';\r\n var extension = 'txt';\r\n var cache = loader.cacheManager.text;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n type = GetFastValue(config, 'type', type);\r\n cache = GetFastValue(config, 'cache', cache);\r\n }\r\n\r\n var fileConfig = {\r\n type: type,\r\n cache: cache,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {number} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\nvar Class = require('../utils/Class');\r\nvar Matrix4 = require('./Matrix4');\r\nvar NOOP = require('../utils/NOOP');\r\n\r\nvar tempMatrix = new Matrix4();\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Euler\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Euler = new Class({\r\n\r\n initialize:\r\n\r\n function Euler (x, y, z, order)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (z === undefined) { z = 0; }\r\n if (order === undefined) { order = Euler.DefaultOrder; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback = NOOP;\r\n },\r\n\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n order: {\r\n get: function ()\r\n {\r\n return this._order;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._order = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n set: function (x, y, z, order)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n copy: function (euler)\r\n {\r\n return this.set(euler.x, euler.y, euler.z, euler.order);\r\n },\r\n\r\n setFromQuaternion: function (quaternion, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n tempMatrix.fromQuat(quaternion);\r\n\r\n return this.setFromRotationMatrix(tempMatrix, order, update);\r\n },\r\n\r\n setFromRotationMatrix: function (matrix, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n var elements = matrix.val;\r\n\r\n // Upper 3x3 of matrix is un-scaled rotation matrix\r\n var m11 = elements[0];\r\n var m12 = elements[4];\r\n var m13 = elements[8];\r\n var m21 = elements[1];\r\n var m22 = elements[5];\r\n var m23 = elements[9];\r\n var m31 = elements[2];\r\n var m32 = elements[6];\r\n var m33 = elements[10];\r\n\r\n var x = 0;\r\n var y = 0;\r\n var z = 0;\r\n var epsilon = 0.99999;\r\n\r\n switch (order)\r\n {\r\n case 'XYZ':\r\n {\r\n y = Math.asin(Clamp(m13, -1, 1));\r\n\r\n if (Math.abs(m13) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m33);\r\n z = Math.atan2(-m12, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(m32, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n x = Math.asin(-Clamp(m23, -1, 1));\r\n\r\n if (Math.abs(m23) < epsilon)\r\n {\r\n y = Math.atan2(m13, m33);\r\n z = Math.atan2(m21, m22);\r\n }\r\n else\r\n {\r\n y = Math.atan2(-m31, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n x = Math.asin(Clamp(m32, -1, 1));\r\n\r\n if (Math.abs(m32) < epsilon)\r\n {\r\n y = Math.atan2(-m31, m33);\r\n z = Math.atan2(-m12, m22);\r\n }\r\n else\r\n {\r\n z = Math.atan2(m21, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n y = Math.asin(-Clamp(m31, -1, 1));\r\n\r\n if (Math.abs(m31) < epsilon)\r\n {\r\n x = Math.atan2(m32, m33);\r\n z = Math.atan2(m21, m11);\r\n }\r\n else\r\n {\r\n z = Math.atan2(-m12, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n z = Math.asin(Clamp(m21, -1, 1));\r\n\r\n if (Math.abs(m21) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m22);\r\n y = Math.atan2(-m31, m11);\r\n }\r\n else\r\n {\r\n y = Math.atan2(m13, m33);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n z = Math.asin(-Clamp(m12, -1, 1));\r\n\r\n if (Math.abs(m12) < epsilon)\r\n {\r\n x = Math.atan2(m32, m22);\r\n y = Math.atan2(m13, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(-m23, m33);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\r\n\r\nEuler.DefaultOrder = 'XYZ';\r\n\r\nmodule.exports = Euler;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent + min;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {number} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Greg McLean \r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Interpolates two given Vectors and returns a new Vector between them.\r\n *\r\n * Does not modify either of the passed Vectors.\r\n *\r\n * @function Phaser.Math.LinearXY\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\r\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\r\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\r\n */\r\nvar LinearXY = function (vector1, vector2, t)\r\n{\r\n if (t === undefined) { t = 0; }\r\n\r\n return vector1.clone().lerp(vector2, t);\r\n};\r\n\r\nmodule.exports = LinearXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Sets all values of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#setValues\r\n * @since 3.50.0\r\n *\r\n * @param {number} m00 - The m00 value.\r\n * @param {number} m01 - The m01 value.\r\n * @param {number} m02 - The m02 value.\r\n * @param {number} m03 - The m03 value.\r\n * @param {number} m10 - The m10 value.\r\n * @param {number} m11 - The m11 value.\r\n * @param {number} m12 - The m12 value.\r\n * @param {number} m13 - The m13 value.\r\n * @param {number} m20 - The m20 value.\r\n * @param {number} m21 - The m21 value.\r\n * @param {number} m22 - The m22 value.\r\n * @param {number} m23 - The m23 value.\r\n * @param {number} m30 - The m30 value.\r\n * @param {number} m31 - The m31 value.\r\n * @param {number} m32 - The m32 value.\r\n * @param {number} m33 - The m33 value.\r\n *\r\n * @return {this} This Matrix4 instance.\r\n */\r\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = m00;\r\n out[1] = m01;\r\n out[2] = m02;\r\n out[3] = m03;\r\n out[4] = m10;\r\n out[5] = m11;\r\n out[6] = m12;\r\n out[7] = m13;\r\n out[8] = m20;\r\n out[9] = m21;\r\n out[10] = m22;\r\n out[11] = m23;\r\n out[12] = m30;\r\n out[13] = m31;\r\n out[14] = m32;\r\n out[15] = m33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var a = src.val;\r\n\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} a - The array to copy the values from. Must have at least 16 elements.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Generates a transform matrix based on the given position, scale and rotation.\r\n *\r\n * @method Phaser.Math.Matrix4#transform\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {Phaser.Math.Vector3} scale - The scale vector.\r\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transform: function (position, scale, rotation)\r\n {\r\n var rotMatrix = _tempMat1.fromQuat(rotation);\r\n\r\n var rm = rotMatrix.val;\r\n\r\n var sx = scale.x;\r\n var sy = scale.y;\r\n var sz = scale.z;\r\n\r\n return this.setValues(\r\n rm[0] * sx,\r\n rm[1] * sx,\r\n rm[2] * sx,\r\n 0,\r\n\r\n rm[4] * sy,\r\n rm[5] * sy,\r\n rm[6] * sy,\r\n 0,\r\n\r\n rm[8] * sz,\r\n rm[9] * sz,\r\n rm[10] * sz,\r\n 0,\r\n\r\n position.x,\r\n position.y,\r\n position.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies the given Matrix4 into this Matrix and then inverses it.\r\n *\r\n * @method Phaser.Math.Matrix4#getInverse\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n getInverse: function (m)\r\n {\r\n this.copy(m);\r\n\r\n return this.invert();\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return this;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n return this.setValues(\r\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\r\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\r\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\r\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\r\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\r\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\r\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\r\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\r\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\r\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\r\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\r\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\r\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\r\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\r\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\r\n (a20 * b03 - a21 * b01 + a22 * b00) * det\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n return this.setValues(\r\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\r\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\r\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\r\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\r\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\r\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\r\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\r\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\r\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\r\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\r\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\r\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\r\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\r\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\r\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\r\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n return this.setValues(\r\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\r\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\r\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\r\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\r\n\r\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\r\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\r\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\r\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\r\n\r\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\r\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\r\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\r\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\r\n\r\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\r\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\r\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\r\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\r\n );\r\n },\r\n\r\n /**\r\n * Multiplies the given Matrix4 object with this Matrix.\r\n *\r\n * This is the same as calling `multiplyMatrices(m, this)`.\r\n *\r\n * @method Phaser.Math.Matrix4#premultiply\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n premultiply: function (m)\r\n {\r\n return this.multiplyMatrices(m, this);\r\n },\r\n\r\n /**\r\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyMatrices\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\r\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyMatrices: function (a, b)\r\n {\r\n var am = a.val;\r\n var bm = b.val;\r\n\r\n var a11 = am[0];\r\n var a12 = am[4];\r\n var a13 = am[8];\r\n var a14 = am[12];\r\n var a21 = am[1];\r\n var a22 = am[5];\r\n var a23 = am[9];\r\n var a24 = am[13];\r\n var a31 = am[2];\r\n var a32 = am[6];\r\n var a33 = am[10];\r\n var a34 = am[14];\r\n var a41 = am[3];\r\n var a42 = am[7];\r\n var a43 = am[11];\r\n var a44 = am[15];\r\n\r\n var b11 = bm[0];\r\n var b12 = bm[4];\r\n var b13 = bm[8];\r\n var b14 = bm[12];\r\n var b21 = bm[1];\r\n var b22 = bm[5];\r\n var b23 = bm[9];\r\n var b24 = bm[13];\r\n var b31 = bm[2];\r\n var b32 = bm[6];\r\n var b33 = bm[10];\r\n var b34 = bm[14];\r\n var b41 = bm[3];\r\n var b42 = bm[7];\r\n var b43 = bm[11];\r\n var b44 = bm[15];\r\n\r\n return this.setValues(\r\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\r\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\r\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\r\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\r\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\r\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\r\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\r\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\r\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\r\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\r\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\r\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\r\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\r\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\r\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\r\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\r\n );\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n return this.translateXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n return this.scaleXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n return this.setValues(\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n );\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return this;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n return this.setValues(\r\n a00 * b00 + a10 * b01 + a20 * b02,\r\n a01 * b00 + a11 * b01 + a21 * b02,\r\n a02 * b00 + a12 * b01 + a22 * b02,\r\n a03 * b00 + a13 * b01 + a23 * b02,\r\n a00 * b10 + a10 * b11 + a20 * b12,\r\n a01 * b10 + a11 * b11 + a21 * b12,\r\n a02 * b10 + a12 * b11 + a22 * b12,\r\n a03 * b10 + a13 * b11 + a23 * b12,\r\n a00 * b20 + a10 * b21 + a20 * b22,\r\n a01 * b20 + a11 * b21 + a21 * b22,\r\n a02 * b20 + a12 * b21 + a22 * b22,\r\n a03 * b20 + a13 * b21 + a23 * b22,\r\n a30, a31, a32, a33\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n v.x,\r\n v.y,\r\n v.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 0,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n (near * 2) * rl,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (near * 2) * tb,\r\n 0,\r\n 0,\r\n\r\n (right + left) * rl,\r\n (top + bottom) * tb,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (far * near * 2) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n f / aspect,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n f,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (2 * far * near) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n return this.setValues(\r\n (2 * near) / width,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (2 * near) / height,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n -far / (near - far),\r\n 1,\r\n\r\n 0,\r\n 0,\r\n (near * far) / (near - far),\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n return this.setValues(\r\n -2 * lr,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n -2 * bt,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 2 * nf,\r\n 0,\r\n\r\n (left + right) * lr,\r\n (top + bottom) * bt,\r\n (far + near) * nf,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAtRH\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\r\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAtRH: function (eye, target, up)\r\n {\r\n var m = this.val;\r\n\r\n _z.subVectors(eye, target);\r\n\r\n if (_z.getLengthSquared() === 0)\r\n {\r\n // eye and target are in the same position\r\n _z.z = 1;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n\r\n if (_x.getLengthSquared() === 0)\r\n {\r\n // up and z are parallel\r\n\r\n if (Math.abs(up.z) === 1)\r\n {\r\n _z.x += 0.0001;\r\n }\r\n else\r\n {\r\n _z.z += 0.0001;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n }\r\n\r\n _x.normalize();\r\n _y.crossVectors(_z, _x);\r\n\r\n m[0] = _x.x;\r\n m[1] = _x.y;\r\n m[2] = _x.z;\r\n m[4] = _y.x;\r\n m[5] = _y.y;\r\n m[6] = _y.z;\r\n m[8] = _z.x;\r\n m[9] = _z.y;\r\n m[10] = _z.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n return this.setValues(\r\n x0,\r\n y0,\r\n z0,\r\n 0,\r\n\r\n x1,\r\n y1,\r\n z1,\r\n 0,\r\n\r\n x2,\r\n y2,\r\n z2,\r\n 0,\r\n\r\n -(x0 * eyex + x1 * eyey + x2 * eyez),\r\n -(y0 * eyex + y1 * eyey + y2 * eyez),\r\n -(z0 * eyex + z1 * eyey + z2 * eyez),\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyToMat4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\r\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\r\n */\r\n multiplyToMat4: function (src, out)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b03 = b[3];\r\n var b10 = b[4];\r\n var b11 = b[5];\r\n var b12 = b[6];\r\n var b13 = b[7];\r\n var b20 = b[8];\r\n var b21 = b[9];\r\n var b22 = b[10];\r\n var b23 = b[11];\r\n var b30 = b[12];\r\n var b31 = b[13];\r\n var b32 = b[14];\r\n var b33 = b[15];\r\n\r\n return out.setValues(\r\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\r\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\r\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\r\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\r\n\r\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\r\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\r\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\r\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\r\n\r\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\r\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\r\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\r\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\r\n\r\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\r\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\r\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\r\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\r\n );\r\n },\r\n\r\n /**\r\n * Takes the rotation and position vectors and builds this Matrix4 from them.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationXYTranslation: function (rotation, position, translateFirst)\r\n {\r\n var x = position.x;\r\n var y = position.y;\r\n var z = position.z;\r\n\r\n var sx = Math.sin(rotation.x);\r\n var cx = Math.cos(rotation.x);\r\n\r\n var sy = Math.sin(rotation.y);\r\n var cy = Math.cos(rotation.y);\r\n\r\n var a30 = x;\r\n var a31 = y;\r\n var a32 = z;\r\n\r\n // Rotate X\r\n\r\n var b21 = -sx;\r\n\r\n // Rotate Y\r\n\r\n var c01 = 0 - b21 * sy;\r\n\r\n var c02 = 0 - cx * sy;\r\n\r\n var c21 = b21 * cy;\r\n\r\n var c22 = cx * cy;\r\n\r\n // Translate\r\n if (!translateFirst)\r\n {\r\n // a30 = cy * x + 0 * y + sy * z;\r\n a30 = cy * x + sy * z;\r\n a31 = c01 * x + cx * y + c21 * z;\r\n a32 = c02 * x + sx * y + c22 * z;\r\n }\r\n\r\n return this.setValues(\r\n cy,\r\n c01,\r\n c02,\r\n 0,\r\n 0,\r\n cx,\r\n sx,\r\n 0,\r\n sy,\r\n c21,\r\n c22,\r\n 0,\r\n a30,\r\n a31,\r\n a32,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Returns the maximum axis scale from this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\r\n * @since 3.50.0\r\n *\r\n * @return {number} The maximum axis scale.\r\n */\r\n getMaxScaleOnAxis: function ()\r\n {\r\n var m = this.val;\r\n\r\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\r\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\r\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\r\n\r\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat1 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat2 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _x = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _y = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _z = new Vector3();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Vladislav Forsh \r\n * @copyright 2021 RoboWhale\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\r\n * In case of an even number of values, the average of the two middle values is returned.\r\n *\r\n * @function Phaser.Math.Median\r\n * @since 3.54.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The median value.\r\n */\r\nvar Median = function (values)\r\n{\r\n var valuesNum = values.length;\r\n if (valuesNum === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n values.sort(function (a, b) { return a - b; });\r\n\r\n var halfIndex = Math.floor(valuesNum / 2);\r\n\r\n return valuesNum % 2 === 0\r\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\r\n : values[halfIndex];\r\n};\r\n\r\nmodule.exports = Median;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Matrix3 = require('./Matrix3');\r\nvar NOOP = require('../utils/NOOP');\r\nvar Vector3 = require('./Vector3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x component.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=1] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_x\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_y\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_z\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_w\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * This callback is invoked, if set, each time a value in this quaternion is changed.\r\n * The callback is passed one argument, a reference to this quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#onChangeCallback\r\n * @type {function}\r\n * @since 3.50.0\r\n */\r\n this.onChangeCallback = NOOP;\r\n\r\n this.set(x, y, z, w);\r\n },\r\n\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: {\r\n get: function ()\r\n {\r\n return this._w;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._w = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n return this.set(src);\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n * @param {boolean} [update=true] - Call the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w, update)\r\n {\r\n if (update === undefined) { update = true; }\r\n\r\n if (typeof x === 'object')\r\n {\r\n this._x = x.x || 0;\r\n this._y = x.y || 0;\r\n this._z = x.z || 0;\r\n this._w = x.w || 0;\r\n }\r\n else\r\n {\r\n this._x = x || 0;\r\n this._y = y || 0;\r\n this._z = z || 0;\r\n this._w = w || 0;\r\n }\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this._x += v.x;\r\n this._y += v.y;\r\n this._z += v.z;\r\n this._w += v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this._x -= v.x;\r\n this._y -= v.y;\r\n this._z -= v.z;\r\n this._w -= v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this._x *= scale;\r\n this._y *= scale;\r\n this._z *= scale;\r\n this._w *= scale;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this._x = x * len;\r\n this._y = y * len;\r\n this._z = z * len;\r\n this._w = w * len;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n return this.set(\r\n ax + t * (v.x - ax),\r\n ay + t * (v.y - ay),\r\n az + t * (v.z - az),\r\n aw + t * (v.w - aw)\r\n );\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n return this.set(0, 0, 0, 1);\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this._x = tmpvec.x;\r\n this._y = tmpvec.y;\r\n this._z = tmpvec.z;\r\n this._w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n return this.set(0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n return this.set(\r\n s * axis.x,\r\n s * axis.y,\r\n s * axis.z,\r\n Math.cos(rad)\r\n );\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n return this.set(\r\n ax * bw + aw * bx + ay * bz - az * by,\r\n ay * bw + aw * by + az * bx - ax * bz,\r\n az * bw + aw * bz + ax * by - ay * bx,\r\n aw * bw - ax * bx - ay * by - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n return this.set(\r\n scale0 * ax + scale1 * bx,\r\n scale0 * ay + scale1 * by,\r\n scale0 * az + scale1 * bz,\r\n scale0 * aw + scale1 * bw\r\n );\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n return this.set(\r\n -a0 * invDot,\r\n -a1 * invDot,\r\n -a2 * invDot,\r\n a3 * invDot\r\n );\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this._x = -this.x;\r\n this._y = -this.y;\r\n this._z = -this.z;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + aw * bx,\r\n ay * bw + az * bx,\r\n az * bw - ay * bx,\r\n aw * bw - ax * bx\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw - az * by,\r\n ay * bw + aw * by,\r\n az * bw + ax * by,\r\n aw * bw - ay * by\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + ay * bz,\r\n ay * bw - ax * bz,\r\n az * bw + aw * bz,\r\n aw * bw - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set this Quaternion from the given Euler, based on Euler order.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromEuler\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\r\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromEuler: function (euler, update)\r\n {\r\n var x = euler.x / 2;\r\n var y = euler.y / 2;\r\n var z = euler.z / 2;\r\n\r\n var c1 = Math.cos(x);\r\n var c2 = Math.cos(y);\r\n var c3 = Math.cos(z);\r\n\r\n var s1 = Math.sin(x);\r\n var s2 = Math.sin(y);\r\n var s3 = Math.sin(z);\r\n\r\n switch (euler.order)\r\n {\r\n case 'XYZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Quaternion from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromRotationMatrix: function (mat4)\r\n {\r\n var m = mat4.val;\r\n\r\n var m11 = m[0];\r\n var m12 = m[4];\r\n var m13 = m[8];\r\n var m21 = m[1];\r\n var m22 = m[5];\r\n var m23 = m[9];\r\n var m31 = m[2];\r\n var m32 = m[6];\r\n var m33 = m[10];\r\n\r\n var trace = m11 + m22 + m33;\r\n var s;\r\n\r\n if (trace > 0)\r\n {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n this.set(\r\n (m32 - m23) * s,\r\n (m13 - m31) * s,\r\n (m21 - m12) * s,\r\n 0.25 / s\r\n );\r\n }\r\n else if (m11 > m22 && m11 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n this.set(\r\n 0.25 * s,\r\n (m12 + m21) / s,\r\n (m13 + m31) / s,\r\n (m32 - m23) / s\r\n );\r\n }\r\n else if (m22 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n this.set(\r\n (m12 + m21) / s,\r\n 0.25 * s,\r\n (m23 + m32) / s,\r\n (m13 - m31) / s\r\n );\r\n }\r\n else\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n this.set(\r\n (m13 + m31) / s,\r\n (m23 + m32) / s,\r\n 0.25 * s,\r\n (m21 - m12) / s\r\n );\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this._x = (m[7] - m[5]) * fRoot;\r\n this._y = (m[2] - m[6]) * fRoot;\r\n this._z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this._x = tmp[0];\r\n this._y = tmp[1];\r\n this._z = tmp[2];\r\n this._w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {number} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n *\r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n *\r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n *\r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {number} index - The position within the grid to get the x/y value for.\r\n * @param {number} width - The width of the grid.\r\n * @param {number} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n }\r\n\r\n return out.set(x, y);\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y=x] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n },\r\n\r\n /**\r\n * Project this Vector onto another.\r\n *\r\n * @method Phaser.Math.Vector2#project\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n project: function (src)\r\n {\r\n var scalar = this.dot(src) / src.dot(src);\r\n\r\n return this.copy(src).scale(scalar);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.min` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#min\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n min: function (v)\r\n {\r\n this.x = Math.min(this.x, v.x);\r\n this.y = Math.min(this.y, v.y);\r\n this.z = Math.min(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#max\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n max: function (v)\r\n {\r\n this.x = Math.max(this.x, v.x);\r\n this.y = Math.max(this.y, v.y);\r\n this.z = Math.max(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Adds the two given Vector3s and sets the results into this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#addVectors\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addVectors: function (a, b)\r\n {\r\n this.x = a.x + b.x;\r\n this.y = a.y + b.y;\r\n this.z = a.z + b.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the position of the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixPosition\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixPosition: function (m)\r\n {\r\n return this.fromArray(m.val, 12);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the Matrix4 column specified.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixColumn\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\r\n * @param {number} index - The column index.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixColumn: function (mat4, index)\r\n {\r\n return this.fromArray(mat4.val, index * 4);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the given array, based on the offset.\r\n *\r\n * Vector3.x = array[offset]\r\n * Vector3.y = array[offset + 1]\r\n * Vector3.z = array[offset + 2]\r\n *\r\n * @method Phaser.Math.Vector3#fromArray\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} array - The array of values to get this Vector from.\r\n * @param {number} [offset=0] - The offset index into the array.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n fromArray: function (array, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.x = array[offset];\r\n this.y = array[offset + 1];\r\n this.z = array[offset + 2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add the given value to each component of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#addScalar\r\n * @since 3.50.0\r\n *\r\n * @param {number} s - The amount to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScalar: function (s)\r\n {\r\n this.x += s;\r\n this.y += s;\r\n this.z += s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add and scale a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#addScale\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n * @param {number} scale - The amount to scale `v` by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScale: function (v, scale)\r\n {\r\n this.x += v.x * scale;\r\n this.y += v.y * scale;\r\n this.z += v.z * scale || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix3 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix3\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix3: function (mat3)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat3.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6] * z;\r\n this.y = m[1] * x + m[4] * y + m[7] * z;\r\n this.z = m[2] * x + m[5] * y + m[8] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix4 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix4: function (mat4)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat4.val;\r\n\r\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\r\n\r\n this.x = (m[0] * x + m[4] * y + m[8] * z + m[12]) * w;\r\n this.y = (m[1] * x + m[5] * y + m[9] * z + m[13]) * w;\r\n this.z = (m[2] * x + m[6] * y + m[10] * z + m[14]) * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given view and projection matrices.\r\n *\r\n * @method Phaser.Math.Vector3#projectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n projectViewMatrix: function (viewMatrix, projectionMatrix)\r\n {\r\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\r\n *\r\n * @method Phaser.Math.Vector3#unprojectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\r\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\r\n {\r\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max`.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n if (value >= min && value <= max)\r\n {\r\n // Skip modulo if already in range\r\n return value;\r\n }\r\n\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n *\r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n *\r\n * Yes, we understand that this should actually be PI * 2, but\r\n * it has been like this for so long we can't change it now.\r\n * If you need PI * 2, use the PI2 constant instead.\r\n *\r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n *\r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n *\r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n *\r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n *\r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Euler: require('./Euler'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n LinearXY: require('./LinearXY'),\r\n MaxAdd: require('./MaxAdd'),\r\n Median: require('./Median'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {number} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n *\r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n *\r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n *\r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar corePlugins = {};\r\n\r\n// Contains the plugins that the dev has loaded into their game\r\n// These are the source objects, not instantiated.\r\nvar customPlugins = {};\r\n\r\nvar PluginCache = {};\r\n\r\n/**\r\n * @namespace Phaser.Plugins.PluginCache\r\n */\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @method Phaser.Plugins.PluginCache.register\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\r\n */\r\nPluginCache.register = function (key, plugin, mapping, custom)\r\n{\r\n if (custom === undefined) { custom = false; }\r\n\r\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\r\n};\r\n\r\n/**\r\n * Stores a custom plugin in the global plugin cache.\r\n * The key must be unique, within the scope of the cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.registerCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {?any} data - A value to be passed to the plugin's `init` method.\r\n */\r\nPluginCache.registerCustom = function (key, plugin, mapping, data)\r\n{\r\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the core plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\r\n */\r\nPluginCache.hasCore = function (key)\r\n{\r\n return corePlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the custom plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\r\n */\r\nPluginCache.hasCustom = function (key)\r\n{\r\n return customPlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Returns the core plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\r\n */\r\nPluginCache.getCore = function (key)\r\n{\r\n return corePlugins[key];\r\n};\r\n\r\n/**\r\n * Returns the custom plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\r\n */\r\nPluginCache.getCustom = function (key)\r\n{\r\n return customPlugins[key];\r\n};\r\n\r\n/**\r\n * Returns an object from the custom cache based on the given key that can be instantiated.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustomClass\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {function} The custom plugin object.\r\n */\r\nPluginCache.getCustomClass = function (key)\r\n{\r\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\r\n};\r\n\r\n/**\r\n * Removes a core plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.remove\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to remove.\r\n */\r\nPluginCache.remove = function (key)\r\n{\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes a custom plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.removeCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to remove.\r\n */\r\nPluginCache.removeCustom = function (key)\r\n{\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Core Plugins.\r\n *\r\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\r\n * So be sure you only call this if you do not wish to run Phaser again.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCorePlugins = function ()\r\n{\r\n for (var key in corePlugins)\r\n {\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Custom Plugins.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCustomPlugins = function ()\r\n{\r\n for (var key in customPlugins)\r\n {\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = PluginCache;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager, pluginKey)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The key under which this plugin was installed into the Scene Systems.\r\n *\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#pluginKey\r\n * @type {string}\r\n * @readonly\r\n * @since 3.54.0\r\n */\r\n this.pluginKey = pluginKey;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n *\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n *\r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n *\r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.ADD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n *\r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n *\r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n *\r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n *\r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n *\r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n *\r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n *\r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n *\r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n *\r\n * @name Phaser.BlendModes.HUE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n *\r\n * @name Phaser.BlendModes.ERASE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n *\r\n * @name Phaser.BlendModes.COPY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n *\r\n * @name Phaser.BlendModes.XOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Modes.\r\n *\r\n * @namespace Phaser.ScaleModes\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScaleModes = {\r\n\r\n /**\r\n * Default Scale Mode (Linear).\r\n *\r\n * @name Phaser.ScaleModes.DEFAULT\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n DEFAULT: 0,\r\n\r\n /**\r\n * Linear Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.LINEAR\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.NEAREST\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n\r\n};\r\n\r\nmodule.exports = ScaleModes;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n *\r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('boot', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#BOOT\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n *\r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n *\r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n *\r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('create', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#CREATE\r\n * @type {string}\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('destroy', listener)`.\r\n *\r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n *\r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n *\r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('pause', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('postupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author samme\r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre-Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_RENDER\r\n * @type {string}\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'prerender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('preupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('ready', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#READY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('render', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n *\r\n * @event Phaser.Scenes.Events#RENDER\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n *\r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('resume', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#RESUME\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('shutdown', listener)`.\r\n *\r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n *\r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n *\r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('sleep', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('start', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioncomplete', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioninit', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n *\r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionout', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n *\r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n *\r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionstart', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionwake', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists and the Scene is in a Running state, otherwise this is skipped.\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('update', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n *\r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('wake', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#WAKE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\r\n BOOT: require('./BOOT_EVENT'),\r\n CREATE: require('./CREATE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n PAUSE: require('./PAUSE_EVENT'),\r\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\r\n RENDER: require('./RENDER_EVENT'),\r\n RESUME: require('./RESUME_EVENT'),\r\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\r\n SLEEP: require('./SLEEP_EVENT'),\r\n START: require('./START_EVENT'),\r\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\r\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\r\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\r\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\r\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\r\n UPDATE: require('./UPDATE_EVENT'),\r\n WAKE: require('./WAKE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Clamp = require('../math/Clamp');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @classdesc\r\n * A Frame is a section of a Texture.\r\n *\r\n * @class Frame\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\r\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n */\r\nvar Frame = new Class({\r\n\r\n initialize:\r\n\r\n function Frame (texture, name, sourceIndex, x, y, width, height)\r\n {\r\n /**\r\n * The Texture this Frame is a part of.\r\n *\r\n * @name Phaser.Textures.Frame#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The name of this Frame.\r\n * The name is unique within the Texture.\r\n *\r\n * @name Phaser.Textures.Frame#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The TextureSource this Frame is part of.\r\n *\r\n * @name Phaser.Textures.Frame#source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @since 3.0.0\r\n */\r\n this.source = texture.source[sourceIndex];\r\n\r\n /**\r\n * The index of the TextureSource in the Texture sources array.\r\n *\r\n * @name Phaser.Textures.Frame#sourceIndex\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.sourceIndex = sourceIndex;\r\n\r\n /**\r\n * A reference to the Texture Source WebGL Texture that this Frame is using.\r\n *\r\n * @name Phaser.Textures.Frame#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this.glTexture = this.source.glTexture;\r\n\r\n /**\r\n * X position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutX;\r\n\r\n /**\r\n * Y position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutY;\r\n\r\n /**\r\n * The width of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutWidth;\r\n\r\n /**\r\n * The height of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutHeight;\r\n\r\n /**\r\n * The X rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The Y rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The rendering width of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width;\r\n\r\n /**\r\n * The rendering height of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height;\r\n\r\n /**\r\n * Half the width, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth;\r\n\r\n /**\r\n * Half the height, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight;\r\n\r\n /**\r\n * The x center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerX;\r\n\r\n /**\r\n * The y center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerY;\r\n\r\n /**\r\n * The horizontal pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotX = 0;\r\n\r\n /**\r\n * The vertical pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotY = 0;\r\n\r\n /**\r\n * Does this Frame have a custom pivot point?\r\n *\r\n * @name Phaser.Textures.Frame#customPivot\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customPivot = false;\r\n\r\n /**\r\n * **CURRENTLY UNSUPPORTED**\r\n *\r\n * Is this frame is rotated or not in the Texture?\r\n * Rotation allows you to use rotated frames in texture atlas packing.\r\n * It has nothing to do with Sprite rotation.\r\n *\r\n * @name Phaser.Textures.Frame#rotated\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rotated = false;\r\n\r\n /**\r\n * Over-rides the Renderer setting.\r\n * -1 = use Renderer Setting\r\n * 0 = No rounding\r\n * 1 = Round\r\n *\r\n * @name Phaser.Textures.Frame#autoRound\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.autoRound = -1;\r\n\r\n /**\r\n * Any Frame specific custom data can be stored here.\r\n *\r\n * @name Phaser.Textures.Frame#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * WebGL UV u0 value.\r\n *\r\n * @name Phaser.Textures.Frame#u0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u0 = 0;\r\n\r\n /**\r\n * WebGL UV v0 value.\r\n *\r\n * @name Phaser.Textures.Frame#v0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v0 = 0;\r\n\r\n /**\r\n * WebGL UV u1 value.\r\n *\r\n * @name Phaser.Textures.Frame#u1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u1 = 0;\r\n\r\n /**\r\n * WebGL UV v1 value.\r\n *\r\n * @name Phaser.Textures.Frame#v1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v1 = 0;\r\n\r\n /**\r\n * The un-modified source frame, trim and UV data.\r\n *\r\n * @name Phaser.Textures.Frame#data\r\n * @type {object}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n cut: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n trim: false,\r\n sourceSize: {\r\n w: 0,\r\n h: 0\r\n },\r\n spriteSourceSize: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n radius: 0,\r\n drawImage: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n }\r\n };\r\n\r\n this.setSize(width, height, x, y);\r\n },\r\n\r\n /**\r\n * Sets the width, height, x and y of this Frame.\r\n *\r\n * This is called automatically by the constructor\r\n * and should rarely be changed on-the-fly.\r\n *\r\n * @method Phaser.Textures.Frame#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {number} width - The width of the frame before being trimmed.\r\n * @param {number} height - The height of the frame before being trimmed.\r\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\r\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setSize: function (width, height, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.cutX = x;\r\n this.cutY = y;\r\n this.cutWidth = width;\r\n this.cutHeight = height;\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width * 0.5);\r\n this.halfHeight = Math.floor(height * 0.5);\r\n\r\n this.centerX = Math.floor(width / 2);\r\n this.centerY = Math.floor(height / 2);\r\n\r\n var data = this.data;\r\n var cut = data.cut;\r\n\r\n cut.x = x;\r\n cut.y = y;\r\n cut.w = width;\r\n cut.h = height;\r\n cut.r = x + width;\r\n cut.b = y + height;\r\n\r\n data.sourceSize.w = width;\r\n data.sourceSize.h = height;\r\n\r\n data.spriteSourceSize.w = width;\r\n data.spriteSourceSize.h = height;\r\n\r\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\r\n\r\n var drawImage = data.drawImage;\r\n\r\n drawImage.x = x;\r\n drawImage.y = y;\r\n drawImage.width = width;\r\n drawImage.height = height;\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\r\n *\r\n * @method Phaser.Textures.Frame#setTrim\r\n * @since 3.0.0\r\n *\r\n * @param {number} actualWidth - The width of the frame before being trimmed.\r\n * @param {number} actualHeight - The height of the frame before being trimmed.\r\n * @param {number} destX - The destination X position of the trimmed frame for display.\r\n * @param {number} destY - The destination Y position of the trimmed frame for display.\r\n * @param {number} destWidth - The destination width of the trimmed frame for display.\r\n * @param {number} destHeight - The destination height of the trimmed frame for display.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\r\n {\r\n var data = this.data;\r\n var ss = data.spriteSourceSize;\r\n\r\n // Store actual values\r\n\r\n data.trim = true;\r\n\r\n data.sourceSize.w = actualWidth;\r\n data.sourceSize.h = actualHeight;\r\n\r\n ss.x = destX;\r\n ss.y = destY;\r\n ss.w = destWidth;\r\n ss.h = destHeight;\r\n ss.r = destX + destWidth;\r\n ss.b = destY + destHeight;\r\n\r\n // Adjust properties\r\n this.x = destX;\r\n this.y = destY;\r\n\r\n this.width = destWidth;\r\n this.height = destHeight;\r\n\r\n this.halfWidth = destWidth * 0.5;\r\n this.halfHeight = destHeight * 0.5;\r\n\r\n this.centerX = Math.floor(destWidth / 2);\r\n this.centerY = Math.floor(destHeight / 2);\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * Takes a crop data object and, based on the rectangular region given, calculates the\r\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\r\n *\r\n * This is called directly by the Game Object Texture Components `setCrop` method.\r\n * Please use that method to crop a Game Object.\r\n *\r\n * @method Phaser.Textures.Frame#setCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\r\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\r\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\r\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\r\n {\r\n // Clamp the input values\r\n\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n var rw = this.realWidth;\r\n var rh = this.realHeight;\r\n\r\n x = Clamp(x, 0, rw);\r\n y = Clamp(y, 0, rh);\r\n\r\n width = Clamp(width, 0, rw - x);\r\n height = Clamp(height, 0, rh - y);\r\n\r\n var ox = cx + x;\r\n var oy = cy + y;\r\n var ow = width;\r\n var oh = height;\r\n\r\n var data = this.data;\r\n\r\n if (data.trim)\r\n {\r\n var ss = data.spriteSourceSize;\r\n\r\n // Need to check for intersection between the cut area and the crop area\r\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\r\n\r\n width = Clamp(width, 0, cw - x);\r\n height = Clamp(height, 0, ch - y);\r\n\r\n var cropRight = x + width;\r\n var cropBottom = y + height;\r\n\r\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\r\n\r\n if (intersects)\r\n {\r\n var ix = Math.max(ss.x, x);\r\n var iy = Math.max(ss.y, y);\r\n var iw = Math.min(ss.r, cropRight) - ix;\r\n var ih = Math.min(ss.b, cropBottom) - iy;\r\n\r\n ow = iw;\r\n oh = ih;\r\n\r\n if (flipX)\r\n {\r\n ox = cx + (cw - (ix - ss.x) - iw);\r\n }\r\n else\r\n {\r\n ox = cx + (ix - ss.x);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - (iy - ss.y) - ih);\r\n }\r\n else\r\n {\r\n oy = cy + (iy - ss.y);\r\n }\r\n\r\n x = ix;\r\n y = iy;\r\n\r\n width = iw;\r\n height = ih;\r\n }\r\n else\r\n {\r\n ox = 0;\r\n oy = 0;\r\n ow = 0;\r\n oh = 0;\r\n }\r\n }\r\n else\r\n {\r\n if (flipX)\r\n {\r\n ox = cx + (cw - x - width);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - y - height);\r\n }\r\n }\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n // Map the given coordinates into UV space, clamping to the 0-1 range.\r\n\r\n crop.u0 = Math.max(0, ox / tw);\r\n crop.v0 = Math.max(0, oy / th);\r\n crop.u1 = Math.min(1, (ox + ow) / tw);\r\n crop.v1 = Math.min(1, (oy + oh) / th);\r\n\r\n crop.x = x;\r\n crop.y = y;\r\n\r\n crop.cx = ox;\r\n crop.cy = oy;\r\n crop.cw = ow;\r\n crop.ch = oh;\r\n\r\n crop.width = width;\r\n crop.height = height;\r\n\r\n crop.flipX = flipX;\r\n crop.flipY = flipY;\r\n\r\n return crop;\r\n },\r\n\r\n /**\r\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\r\n * Called automatically by `setFrame`.\r\n *\r\n * @method Phaser.Textures.Frame#updateCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n updateCropUVs: function (crop, flipX, flipY)\r\n {\r\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\r\n },\r\n\r\n /**\r\n * Directly sets the canvas and WebGL UV data for this frame.\r\n *\r\n * Use this if you need to override the values that are generated automatically\r\n * when the Frame is created.\r\n *\r\n * @method Phaser.Textures.Frame#setUVs\r\n * @since 3.50.0\r\n *\r\n * @param {number} width - Width of this frame for the Canvas data.\r\n * @param {number} height - Height of this frame for the Canvas data.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setUVs: function (width, height, u0, v0, u1, v1)\r\n {\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = width;\r\n cd.height = height;\r\n\r\n // WebGL data\r\n\r\n this.u0 = u0;\r\n this.v0 = v0;\r\n\r\n this.u1 = u1;\r\n this.v1 = v1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache and the drawImage cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVs\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVs: function ()\r\n {\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = cw;\r\n cd.height = ch;\r\n\r\n // WebGL data\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = cx / tw;\r\n this.v0 = cy / th;\r\n\r\n this.u1 = (cx + cw) / tw;\r\n this.v1 = (cy + ch) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVsInverted\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVsInverted: function ()\r\n {\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = (this.cutX + this.cutHeight) / tw;\r\n this.v0 = this.cutY / th;\r\n\r\n this.u1 = this.cutX / tw;\r\n this.v1 = (this.cutY + this.cutWidth) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clones this Frame into a new Frame object.\r\n *\r\n * @method Phaser.Textures.Frame#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} A clone of this Frame.\r\n */\r\n clone: function ()\r\n {\r\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\r\n\r\n clone.cutX = this.cutX;\r\n clone.cutY = this.cutY;\r\n clone.cutWidth = this.cutWidth;\r\n clone.cutHeight = this.cutHeight;\r\n\r\n clone.x = this.x;\r\n clone.y = this.y;\r\n\r\n clone.width = this.width;\r\n clone.height = this.height;\r\n\r\n clone.halfWidth = this.halfWidth;\r\n clone.halfHeight = this.halfHeight;\r\n\r\n clone.centerX = this.centerX;\r\n clone.centerY = this.centerY;\r\n\r\n clone.rotated = this.rotated;\r\n\r\n clone.data = Extend(true, clone.data, this.data);\r\n\r\n clone.updateUVs();\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\r\n *\r\n * @method Phaser.Textures.Frame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.source = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n this.customData = null;\r\n this.data = null;\r\n },\r\n\r\n /**\r\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.w;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.h;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\r\n *\r\n * @name Phaser.Textures.Frame#radius\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.data.radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Frame trimmed or not?\r\n *\r\n * @name Phaser.Textures.Frame#trimmed\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n trimmed: {\r\n\r\n get: function ()\r\n {\r\n return this.data.trim;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Canvas drawImage data object.\r\n *\r\n * @name Phaser.Textures.Frame#canvasData\r\n * @type {object}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canvasData: {\r\n\r\n get: function ()\r\n {\r\n return this.data.drawImage;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Frame;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {boolean} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Tween States.\r\n *\r\n * @namespace Phaser.Tweens.States\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\n/**\r\n * Phaser Tween state constants.\r\n *\r\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.CREATED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n // 1 used to be INIT prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n // 3 used to be OFFSET_DELAY prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_RENDER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_FORWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.HOLD_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.REPEAT_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state. The Tween has been created but has not yet been added to the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING: 20,\r\n\r\n /**\r\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\r\n * or was playing and is currently paused, but in both cases it's still being processed by\r\n * the Tween Manager, so is considered 'active'.\r\n *\r\n * @name Phaser.Tweens.States.ACTIVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 21,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a loop countdown to elapse.\r\n *\r\n * @name Phaser.Tweens.States.LOOP_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a complete delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 23,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a starting delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.START_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n START_DELAY: 24,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_REMOVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state. The Tween has been removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.REMOVED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\r\n * so will not be automatically removed by the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.FINISHED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n FINISHED: 27,\r\n\r\n /**\r\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.DESTROYED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DESTROYED: 28,\r\n\r\n /**\r\n * A large integer value used for 'infinite' style countdowns.\r\n *\r\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\r\n * supported on IE.\r\n *\r\n * @name Phaser.Tweens.States.MAX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n MAX: 999999999999\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @ignore\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @ignore\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * Existing elements in the array are shifted up.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {number} [index=0] - The index in the array where the item will be inserted.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {number} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {number} startIndex - The start index to search from.\r\n * @param {number} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array and flattens it, returning a shallow-copy flattened array.\r\n *\r\n * @function Phaser.Utils.Array.Flatten\r\n * @since 3.60.0\r\n *\r\n * @param {array} array - The array to flatten.\r\n * @param {array} [output] - An array to hold the results in.\r\n *\r\n * @return {array} The flattened output array.\r\n */\r\nvar Flatten = function (array, output)\r\n{\r\n if (output === undefined) { output = []; }\r\n\r\n for (var i = 0; i < array.length; i++)\r\n {\r\n if (Array.isArray(array[i]))\r\n {\r\n Flatten(array[i], output);\r\n }\r\n else\r\n {\r\n output.push(array[i]);\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = Flatten;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element above another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveAbove\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move above base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveAbove = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex > baseIndex)\r\n {\r\n // item1 is already above item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === array.length - 1)\r\n {\r\n array.push(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveAbove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element below another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveBelow\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move below base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveBelow = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex < baseIndex)\r\n {\r\n // item1 is already below item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === 0)\r\n {\r\n array.unshift(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveBelow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {number} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\r\n\r\n/**\r\n * Create an array of numbers (positive and/or negative) progressing from `start`\r\n * up to but not including `end` by advancing by `step`.\r\n *\r\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\r\n *\r\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\r\n * for forward compatibility make sure to pass in actual numbers.\r\n *\r\n * @example\r\n * NumberArrayStep(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * NumberArrayStep(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * NumberArrayStep(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * NumberArrayStep(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * NumberArrayStep(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * NumberArrayStep(0);\r\n * // => []\r\n *\r\n * @function Phaser.Utils.Array.NumberArrayStep\r\n * @since 3.0.0\r\n *\r\n * @param {number} [start=0] - The start of the range.\r\n * @param {number} [end=null] - The end of the range.\r\n * @param {number} [step=1] - The value to increment or decrement by.\r\n *\r\n * @return {number[]} The array of number values.\r\n */\r\nvar NumberArrayStep = function (start, end, step)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (end === undefined) { end = null; }\r\n if (step === undefined) { step = 1; }\r\n\r\n if (end === null)\r\n {\r\n end = start;\r\n start = 0;\r\n }\r\n\r\n var result = [];\r\n\r\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n result.push(start);\r\n start += step;\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArrayStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {number} k - The k-th element index.\r\n * @param {number} [left=0] - The index of the left part of the range.\r\n * @param {number} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = require('../object/GetValue');\r\nvar Shuffle = require('./Shuffle');\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n *\r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n *\r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n *\r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n *\r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n *\r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n *\r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n var removed = [];\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n removed.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return removed;\r\n};\r\n\r\nmodule.exports = Remove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} startIndex - The start index to remove from.\r\n * @param {number} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {number} [start=0] - The array index to start the search from.\r\n * @param {number} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search within.\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The \"rotation\" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The \"rotation\" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n *\r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {number} startIndex - The start index.\r\n * @param {number} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {number} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n","/**\r\n * @author Richard Davey \r\n * @author Angry Bytes (and contributors)\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Device = require('../../device');\r\n\r\n/**\r\n * The comparator function.\r\n *\r\n * @ignore\r\n *\r\n * @param {*} a - The first item to test.\r\n * @param {*} b - The second itemt to test.\r\n *\r\n * @return {boolean} True if they localCompare, otherwise false.\r\n */\r\nfunction Compare (a, b)\r\n{\r\n return String(a).localeCompare(b);\r\n}\r\n\r\n/**\r\n * Process the array contents.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} array - The array to process.\r\n * @param {function} compare - The comparison function.\r\n *\r\n * @return {array} - The processed array.\r\n */\r\nfunction Process (array, compare)\r\n{\r\n // Short-circuit when there's nothing to sort.\r\n var len = array.length;\r\n\r\n if (len <= 1)\r\n {\r\n return array;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n\r\n for (var chk = 1; chk < len; chk *= 2)\r\n {\r\n RunPass(array, compare, chk, buffer);\r\n\r\n var tmp = array;\r\n\r\n array = buffer;\r\n\r\n buffer = tmp;\r\n }\r\n\r\n return array;\r\n}\r\n\r\n/**\r\n * Run a single pass with the given chunk size.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} arr - The array to run the pass on.\r\n * @param {function} comp - The comparison function.\r\n * @param {number} chk - The number of iterations.\r\n * @param {array} result - The array to store the result in.\r\n */\r\nfunction RunPass (arr, comp, chk, result)\r\n{\r\n var len = arr.length;\r\n var i = 0;\r\n\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl)\r\n {\r\n r = l + chk;\r\n e = r + chk;\r\n\r\n if (r > len)\r\n {\r\n r = len;\r\n }\r\n\r\n if (e > len)\r\n {\r\n e = len;\r\n }\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n\r\n while (true)\r\n {\r\n // Compare the chunks.\r\n if (li < r && ri < e)\r\n {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0)\r\n {\r\n result[i++] = arr[li++];\r\n }\r\n else\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n else if (li < r)\r\n {\r\n // Nothing to compare, just flush what's left.\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e)\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n else\r\n {\r\n // Both iterators are at the chunk ends.\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\r\n *\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The input array to be sorted.\r\n * @param {function} [compare] - The comparison function.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar StableSort = function (array, compare)\r\n{\r\n if (compare === undefined) { compare = Compare; }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n if (!array || array.length < 2)\r\n {\r\n return array;\r\n }\r\n\r\n if (Device.features.stableSort)\r\n {\r\n return array.sort(compare);\r\n }\r\n\r\n var result = Process(array, compare);\r\n\r\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\r\n if (result !== array)\r\n {\r\n RunPass(result, null, array.length, array);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = StableSort;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: require('./matrix'),\r\n\r\n Add: require('./Add'),\r\n AddAt: require('./AddAt'),\r\n BringToTop: require('./BringToTop'),\r\n CountAllMatching: require('./CountAllMatching'),\r\n Each: require('./Each'),\r\n EachInRange: require('./EachInRange'),\r\n FindClosestInSorted: require('./FindClosestInSorted'),\r\n Flatten: require('./Flatten'),\r\n GetAll: require('./GetAll'),\r\n GetFirst: require('./GetFirst'),\r\n GetRandom: require('./GetRandom'),\r\n MoveDown: require('./MoveDown'),\r\n MoveTo: require('./MoveTo'),\r\n MoveUp: require('./MoveUp'),\r\n MoveAbove: require('./MoveAbove'),\r\n MoveBelow: require('./MoveBelow'),\r\n NumberArray: require('./NumberArray'),\r\n NumberArrayStep: require('./NumberArrayStep'),\r\n QuickSelect: require('./QuickSelect'),\r\n Range: require('./Range'),\r\n Remove: require('./Remove'),\r\n RemoveAt: require('./RemoveAt'),\r\n RemoveBetween: require('./RemoveBetween'),\r\n RemoveRandomElement: require('./RemoveRandomElement'),\r\n Replace: require('./Replace'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateRight: require('./RotateRight'),\r\n SafeRange: require('./SafeRange'),\r\n SendToBack: require('./SendToBack'),\r\n SetAll: require('./SetAll'),\r\n Shuffle: require('./Shuffle'),\r\n SortByDigits: require('./SortByDigits'),\r\n SpliceOne: require('./SpliceOne'),\r\n StableSort: require('./StableSort'),\r\n Swap: require('./Swap')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = require('../../string/Pad');\r\nvar CheckMatrix = require('./CheckMatrix');\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = require('./CheckMatrix');\r\nvar TransposeMatrix = require('./TransposeMatrix');\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateLeft = require('../RotateLeft');\r\nvar RotateRight = require('../RotateRight');\r\n\r\n/**\r\n * Translates the given Array Matrix by shifting each column and row the\r\n * amount specified.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Translate\r\n * @since 3.50.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to translate.\r\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\r\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\r\n *\r\n * @return {T[][]} The translated matrix.\r\n */\r\nvar TranslateMatrix = function (matrix, x, y)\r\n{\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n // Vertical translation\r\n\r\n if (y !== 0)\r\n {\r\n if (y < 0)\r\n {\r\n // Shift Up\r\n RotateLeft(matrix, Math.abs(y));\r\n }\r\n else\r\n {\r\n // Shift Down\r\n RotateRight(matrix, y);\r\n }\r\n }\r\n\r\n // Horizontal translation\r\n\r\n if (x !== 0)\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n var row = matrix[i];\r\n\r\n if (x < 0)\r\n {\r\n RotateLeft(row, Math.abs(x));\r\n }\r\n else\r\n {\r\n RotateRight(row, x);\r\n }\r\n }\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = TranslateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n *\r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: require('./CheckMatrix'),\r\n MatrixToString: require('./MatrixToString'),\r\n ReverseColumns: require('./ReverseColumns'),\r\n ReverseRows: require('./ReverseRows'),\r\n Rotate180: require('./Rotate180'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateMatrix: require('./RotateMatrix'),\r\n RotateRight: require('./RotateRight'),\r\n Translate: require('./TranslateMatrix'),\r\n TransposeMatrix: require('./TransposeMatrix')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Deep Copy the given object or array.\r\n *\r\n * @function Phaser.Utils.Objects.DeepCopy\r\n * @since 3.50.0\r\n *\r\n * @param {object} obj - The object to deep copy.\r\n *\r\n * @return {object} A deep copy of the original object.\r\n */\r\nvar DeepCopy = function (inObject)\r\n{\r\n var outObject;\r\n var value;\r\n var key;\r\n\r\n if (typeof inObject !== 'object' || inObject === null)\r\n {\r\n // inObject is not an object\r\n return inObject;\r\n }\r\n\r\n // Create an array or object to hold the values\r\n outObject = Array.isArray(inObject) ? [] : {};\r\n\r\n for (key in inObject)\r\n {\r\n value = inObject[key];\r\n\r\n // Recursively (deep) copy for nested objects, including arrays\r\n outObject[key] = DeepCopy(value);\r\n }\r\n\r\n return outObject;\r\n};\r\n\r\nmodule.exports = DeepCopy;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n *\r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n *\r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\r\n *\r\n * The key is a string, which can be split based on the use of the period character.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * const source = {\r\n * lives: 3,\r\n * render: {\r\n * screen: {\r\n * width: 1024\r\n * }\r\n * }\r\n * }\r\n *\r\n * const lives = GetValue(source, 'lives', 1);\r\n * const width = GetValue(source, 'render.screen.width', 800);\r\n * const height = GetValue(source, 'render.screen.height', 600);\r\n * ```\r\n *\r\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\r\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\r\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue, altSource)\r\n{\r\n if ((!source && !altSource) || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source && source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (altSource && altSource.hasOwnProperty(key))\r\n {\r\n return altSource[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parentA = source;\r\n var parentB = altSource;\r\n var valueA = defaultValue;\r\n var valueB = defaultValue;\r\n var valueAFound = true;\r\n var valueBFound = true;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parentA && parentA.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentA has a key property, let's carry on down\r\n valueA = parentA[keys[i]];\r\n parentA = parentA[keys[i]];\r\n }\r\n else\r\n {\r\n valueAFound = false;\r\n }\r\n\r\n if (parentB && parentB.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentB has a key property, let's carry on down\r\n valueB = parentB[keys[i]];\r\n parentB = parentB[keys[i]];\r\n }\r\n else\r\n {\r\n valueBFound = false;\r\n }\r\n }\r\n\r\n if (valueAFound)\r\n {\r\n return valueA;\r\n }\r\n else if (valueBFound)\r\n {\r\n return valueB;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (!obj || typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and pads it out, to the length required, using the character\r\n * specified. For example if you need a string to be 6 characters long, you can call:\r\n *\r\n * `pad('bob', 6, '-', 2)`\r\n *\r\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\r\n *\r\n * You can also use it to pad numbers (they are always returned as strings):\r\n *\r\n * `pad(512, 6, '0', 1)`\r\n *\r\n * Would return: `000512` with the string padded to the left.\r\n *\r\n * If you don't specify a direction it'll pad to both sides:\r\n *\r\n * `pad('c64', 7, '*')`\r\n *\r\n * Would return: `**c64**`\r\n *\r\n * @function Phaser.Utils.String.Pad\r\n * @since 3.0.0\r\n *\r\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\r\n * @param {number} [len=0] - The number of characters to be added.\r\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\r\n * @param {number} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\r\n *\r\n * @return {string} The padded string.\r\n */\r\nvar Pad = function (str, len, pad, dir)\r\n{\r\n if (len === undefined) { len = 0; }\r\n if (pad === undefined) { pad = ' '; }\r\n if (dir === undefined) { dir = 3; }\r\n\r\n str = str.toString();\r\n\r\n var padlen = 0;\r\n\r\n if (len + 1 >= str.length)\r\n {\r\n switch (dir)\r\n {\r\n case 1:\r\n str = new Array(len + 1 - str.length).join(pad) + str;\r\n break;\r\n\r\n case 3:\r\n var right = Math.ceil((padlen = len - str.length) / 2);\r\n var left = padlen - right;\r\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\r\n break;\r\n\r\n default:\r\n str = str + new Array(len + 1 - str.length).join(pad);\r\n break;\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = Pad;\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./SpinePlugin.js\");\n",""],"names":[],"sourceRoot":""} +{"version":3,"file":"SpinePluginDebug.js","mappings":";;;;;;;;;;AAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0DAA0D,OAAO;AACjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,SAAS;AACnD;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA,gBAAgB,YAAY;AAC5B;;AAEA;AACA,4DAA4D;AAC5D,gEAAgE;AAChE,oEAAoE;AACpE,wEAAwE;AACxE;AACA,2DAA2D,SAAS;AACpE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,4DAA4D,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;;;AC/UA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,mBAAmB,mBAAO,CAAC,yFAAwC;AACnE,gBAAgB,mBAAO,CAAC,8FAA4C;AACpE,oBAAoB,mBAAO,CAAC,2FAAyC;AACrE,eAAe,mBAAO,CAAC,4FAA2C;AAClE,gBAAgB,mBAAO,CAAC,0EAAkC;AAC1D,eAAe,mBAAO,CAAC,4FAA2C;AAClE;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,kDAAkD;AAC7D,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,mBAAmB;AAC9B,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sFAAsF;AAC7H;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,uCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sGAAsG;AACrH,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC,eAAe,SAAS;AACxB,eAAe,uCAAuC;AACtD,eAAe,uCAAuC;AACtD,eAAe,QAAQ,yDAAyD;AAChF;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;;;;;;;;;;;AC9uCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oBAAoB,qBAAqB;AACzC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,iFAA+B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,gBAAgB;AAC3B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC,8CAAe;AAClC,iBAAiB,mBAAO,CAAC,0DAAqB;AAC9C,WAAW,mBAAO,CAAC,8CAAe;;AAElC;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,8EAAoC;AAC/D,YAAY,mBAAO,CAAC,8DAA4B;AAChD,YAAY,mBAAO,CAAC,gEAA6B;AACjD,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,sBAAsB,mBAAO,CAAC,kGAA8C;AAC5E,qBAAqB,mBAAO,CAAC,gGAA6C;AAC1E,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oCAAoC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,mCAAmC;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;AAC/B;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0DAA0D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtsBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;AACxC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ,qGAAqG;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,0BAA0B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,mBAAmB,+IAA+I;AACpN;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,GAAG,uBAAuB,OAAO;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,kBAAkB;AAChC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,0BAA0B;AACxC,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;AAC9C;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5qBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,wCAAwC;AACxC,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,2BAA2B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,oDAAoD;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAgE;AAC/E;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3OA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,6BAA6B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,4BAA4B;AAC9D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACpTA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC,0CAA0C;AAC1C,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B,+BAA+B;AAC/B,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,oCAAoC;AACpC,sCAAsC;AACtC,yCAAyC;AACzC,mCAAmC;AACnC,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,mCAAmC;AACnC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACrLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,sBAAsB,mBAAO,CAAC,mEAAwB;AACtD,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AChHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,2CAA2C;AAC3C,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,iCAAiC;AACjC,iCAAiC;AACjC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7MA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,mCAAmC;AACnC,qCAAqC;AACrC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjKA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,uCAAuC;AACvC,sCAAsC;AACtC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AChGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,oCAAoC;AACpC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,uCAAuC;AACvC,kCAAkC;AAClC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,2CAAU;AAC9B,gBAAgB,mBAAO,CAAC,mDAAc;AACtC,WAAW,mBAAO,CAAC,yCAAS;AAC5B,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,YAAY,mBAAO,CAAC,2CAAU;AAC9B,iBAAiB,mBAAO,CAAC,qDAAe;AACxC,kBAAkB,mBAAO,CAAC,uDAAgB;AAC1C,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,cAAc,mBAAO,CAAC,+CAAY;AAClC,cAAc,mBAAO,CAAC,+CAAY;AAClC,YAAY,mBAAO,CAAC,2CAAU;AAC9B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,cAAc,mBAAO,CAAC,+CAAY;AAClC,UAAU,mBAAO,CAAC,uCAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,+BAA+B;AAC1C,WAAW,2CAA2C;AACtD;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW,KAAK,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB,KAAK,gBAAgB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,KAAK,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAA0D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,oCAAoC;AACnD,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2DAA2D;AAC1E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACl5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mFAAmF;AACpG;AACA,eAAe,mFAAmF;AAClG;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,4FAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC;AAClD;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,cAAc,mBAAO,CAAC,2CAAW;AACjC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC,oBAAoB,GAAG;AACvB;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC,oBAAoB,GAAG;AACvB;AACA,eAAe,sBAAsB;AACrC,eAAe,QAAQ;AACvB;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA,4GAA4G,sCAAsC;AAClJ,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACr0BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA,eAAe,gCAAgC;AAC/C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpXA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAmE;AAClF;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,iBAAiB,gCAAgC;AACjD,oBAAoB,YAAY;AAChC;AACA,eAAe,gEAAgE;AAC/E,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,kCAAkC;AACjD,eAAe,uCAAuC;AACtD;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,6BAA6B;AAC9C,iBAAiB,0BAA0B;AAC3C,oBAAoB,OAAO;AAC3B;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wDAAwD;AACnF;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,wGAAwG;AACvH;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wGAAwG,UAAU;AACjI,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,SAAS,mBAAO,CAAC,mEAAkB;AACnC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uIAAuI;AACtJ,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,mGAAmG;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uDAAuD;AACtE;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9WA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAkC;AACjD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iDAAiD;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6FAA6F;AAC5G;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAoD;AAC5D;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,sBAAsB;AACtB,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3mBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,sDAAsD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,cAAc;AAC7B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,6DAAS;AAC5B,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,eAAe,mBAAO,CAAC,qEAAa;AACpC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,eAAe,mBAAO,CAAC,qEAAa;AACpC,qBAAqB,mBAAO,CAAC,iFAAmB;AAChD,aAAa,mBAAO,CAAC,iEAAW;AAChC;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,KAAK;AACzB;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACl7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;AACA;AACA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;AACA;AACA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,qBAAqB;AAChC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,qBAAqB;AAChC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,uBAAuB,mBAAO,CAAC,6FAA2B;AAC1D;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,sDAAY;AACnC,gBAAgB,mBAAO,CAAC,wDAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,aAAa,mBAAO,CAAC,kDAAU;AAC/B,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,mBAAmB;AAC9B;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,2DAAY;AACnC,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,WAAW,mBAAO,CAAC,oDAAc;AACjC,aAAa,mBAAO,CAAC,uDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjjBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,uCAAuC;AAClD;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3SA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,uCAAuC;AAClD;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,sCAAsC;AACtC,+BAA+B;AAC/B,8BAA8B;AAC9B,kCAAkC;AAClC,iCAAiC;AACjC,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,4BAA4B;AACvC,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,wDAAwD;AAClJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,oFAAoF,oDAAoD;AACxI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mBAAO,CAAC,4DAAa;AAC9B,cAAc,mBAAO,CAAC,sEAAkB;AACxC,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,uBAAuB,mBAAO,CAAC,wFAA2B;AAC1D,qBAAqB,mBAAO,CAAC,oFAAyB;AACtD,eAAe,mBAAO,CAAC,wEAAmB;AAC1C,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,kBAAkB,mBAAO,CAAC,8EAAsB;AAChD,cAAc,mBAAO,CAAC,sEAAkB;AACxC,WAAW,mBAAO,CAAC,gEAAe;AAClC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D,aAAa,mBAAO,CAAC,gDAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,wDAAwD;AACnE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,gDAAgD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wGAAwG;AACnH,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9VA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,mDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpRA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1vDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,gDAAgD;AAC3D;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AClxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/gCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACthBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,uCAAuC;AAClF;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,iCAAiC;AAC5E;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4CAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,yDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0CAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,0CAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;AACxC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;AAChC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iGAAoC;;;;;;;;;;;ACNpC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,oGAAqC;;;;;;;;;;;ACVrC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;AAClC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;AAC3B;AACA;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;AAC9E;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;AAC1B;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,oDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,8CAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;AACvD;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;AAC1C;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,kDAAkD;AAClD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wCAAwC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;AAC1B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,uCAAuC;AACnG;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,0CAA0C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,4CAA4C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1MA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,yCAAyC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8CAA8C;AACrF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,sDAAsD;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,uDAAuD;AACnI;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,YAAY,mBAAO,CAAC,iEAAgB;AACpC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,cAAc,mBAAO,CAAC,qEAAkB;AACxC,WAAW,mBAAO,CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;AAChC;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1NA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzPA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,oCAAoC;AACpC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,sDAAsD;AACtD,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE,qEAAqE;AACrE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,wBAAwB,mBAAO,CAAC,4EAA8B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,6BAA6B;AAC7B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA,6BAA6B,mBAAmB;AAChD;AACA,4BAA4B,SAAS;AACrC;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA,WAAW,KAAK;AAChB;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAc;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,0DAAU;AAC9B;AACA,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;AAC1B;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,iEAAa;AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;AAChD;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,8CAA8C,cAAc,oBAAoB;AAChF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UCrEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack:///../../../node_modules/eventemitter3/index.js","webpack:///./runtimes/spine-both.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///../../../src/const.js","webpack:///../../../src/data/DataManager.js","webpack:///../../../src/data/events/CHANGE_DATA_EVENT.js","webpack:///../../../src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///../../../src/data/events/DESTROY_EVENT.js","webpack:///../../../src/data/events/REMOVE_DATA_EVENT.js","webpack:///../../../src/data/events/SET_DATA_EVENT.js","webpack:///../../../src/data/events/index.js","webpack:///../../../src/device/Audio.js","webpack:///../../../src/device/Browser.js","webpack:///../../../src/device/CanvasFeatures.js","webpack:///../../../src/device/Features.js","webpack:///../../../src/device/Fullscreen.js","webpack:///../../../src/device/Input.js","webpack:///../../../src/device/OS.js","webpack:///../../../src/device/Video.js","webpack:///../../../src/device/index.js","webpack:///../../../src/display/ColorMatrix.js","webpack:///../../../src/display/canvas/CanvasPool.js","webpack:///../../../src/display/canvas/Smoothing.js","webpack:///../../../src/display/mask/BitmapMask.js","webpack:///../../../src/display/mask/GeometryMask.js","webpack:///../../../src/fx/Barrel.js","webpack:///../../../src/fx/Bloom.js","webpack:///../../../src/fx/Blur.js","webpack:///../../../src/fx/Bokeh.js","webpack:///../../../src/fx/Circle.js","webpack:///../../../src/fx/ColorMatrix.js","webpack:///../../../src/fx/Controller.js","webpack:///../../../src/fx/Displacement.js","webpack:///../../../src/fx/Glow.js","webpack:///../../../src/fx/Gradient.js","webpack:///../../../src/fx/Pixelate.js","webpack:///../../../src/fx/Shadow.js","webpack:///../../../src/fx/Shine.js","webpack:///../../../src/fx/Vignette.js","webpack:///../../../src/fx/Wipe.js","webpack:///../../../src/fx/const.js","webpack:///../../../src/fx/index.js","webpack:///../../../src/gameobjects/BuildGameObject.js","webpack:///../../../src/gameobjects/GameObject.js","webpack:///../../../src/gameobjects/GameObjectFactory.js","webpack:///../../../src/gameobjects/GetCalcMatrix.js","webpack:///../../../src/gameobjects/components/Alpha.js","webpack:///../../../src/gameobjects/components/AlphaSingle.js","webpack:///../../../src/gameobjects/components/BlendMode.js","webpack:///../../../src/gameobjects/components/ComputedSize.js","webpack:///../../../src/gameobjects/components/Crop.js","webpack:///../../../src/gameobjects/components/Depth.js","webpack:///../../../src/gameobjects/components/FX.js","webpack:///../../../src/gameobjects/components/Flip.js","webpack:///../../../src/gameobjects/components/GetBounds.js","webpack:///../../../src/gameobjects/components/Mask.js","webpack:///../../../src/gameobjects/components/Origin.js","webpack:///../../../src/gameobjects/components/PathFollower.js","webpack:///../../../src/gameobjects/components/Pipeline.js","webpack:///../../../src/gameobjects/components/PostPipeline.js","webpack:///../../../src/gameobjects/components/ScrollFactor.js","webpack:///../../../src/gameobjects/components/Size.js","webpack:///../../../src/gameobjects/components/Texture.js","webpack:///../../../src/gameobjects/components/TextureCrop.js","webpack:///../../../src/gameobjects/components/Tint.js","webpack:///../../../src/gameobjects/components/ToJSON.js","webpack:///../../../src/gameobjects/components/Transform.js","webpack:///../../../src/gameobjects/components/TransformMatrix.js","webpack:///../../../src/gameobjects/components/Visible.js","webpack:///../../../src/gameobjects/components/index.js","webpack:///../../../src/gameobjects/container/Container.js","webpack:///../../../src/gameobjects/container/ContainerCanvasRenderer.js","webpack:///../../../src/gameobjects/container/ContainerRender.js","webpack:///../../../src/gameobjects/container/ContainerWebGLRenderer.js","webpack:///../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/DESTROY_EVENT.js","webpack:///../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAYING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STALLED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_TEXTURE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNSUPPORTED_EVENT.js","webpack:///../../../src/gameobjects/events/index.js","webpack:///../../../src/geom/const.js","webpack:///../../../src/geom/line/GetPoint.js","webpack:///../../../src/geom/line/GetPoints.js","webpack:///../../../src/geom/line/Length.js","webpack:///../../../src/geom/line/Line.js","webpack:///../../../src/geom/line/Random.js","webpack:///../../../src/geom/point/Point.js","webpack:///../../../src/geom/rectangle/Contains.js","webpack:///../../../src/geom/rectangle/GetPoint.js","webpack:///../../../src/geom/rectangle/GetPoints.js","webpack:///../../../src/geom/rectangle/Perimeter.js","webpack:///../../../src/geom/rectangle/Random.js","webpack:///../../../src/geom/rectangle/Rectangle.js","webpack:///../../../src/geom/rectangle/Union.js","webpack:///../../../src/loader/File.js","webpack:///../../../src/loader/FileTypesManager.js","webpack:///../../../src/loader/GetURL.js","webpack:///../../../src/loader/MergeXHRSettings.js","webpack:///../../../src/loader/MultiFile.js","webpack:///../../../src/loader/XHRLoader.js","webpack:///../../../src/loader/XHRSettings.js","webpack:///../../../src/loader/const.js","webpack:///../../../src/loader/events/ADD_EVENT.js","webpack:///../../../src/loader/events/COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_EVENT.js","webpack:///../../../src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///../../../src/loader/events/POST_PROCESS_EVENT.js","webpack:///../../../src/loader/events/PROGRESS_EVENT.js","webpack:///../../../src/loader/events/START_EVENT.js","webpack:///../../../src/loader/events/index.js","webpack:///../../../src/loader/filetypes/ImageFile.js","webpack:///../../../src/loader/filetypes/JSONFile.js","webpack:///../../../src/loader/filetypes/TextFile.js","webpack:///../../../src/math/Average.js","webpack:///../../../src/math/Bernstein.js","webpack:///../../../src/math/Between.js","webpack:///../../../src/math/CatmullRom.js","webpack:///../../../src/math/CeilTo.js","webpack:///../../../src/math/Clamp.js","webpack:///../../../src/math/DegToRad.js","webpack:///../../../src/math/Difference.js","webpack:///../../../src/math/Euler.js","webpack:///../../../src/math/Factorial.js","webpack:///../../../src/math/FloatBetween.js","webpack:///../../../src/math/FloorTo.js","webpack:///../../../src/math/FromPercent.js","webpack:///../../../src/math/GetSpeed.js","webpack:///../../../src/math/IsEven.js","webpack:///../../../src/math/IsEvenStrict.js","webpack:///../../../src/math/Linear.js","webpack:///../../../src/math/LinearXY.js","webpack:///../../../src/math/Matrix3.js","webpack:///../../../src/math/Matrix4.js","webpack:///../../../src/math/MaxAdd.js","webpack:///../../../src/math/Median.js","webpack:///../../../src/math/MinSub.js","webpack:///../../../src/math/Percent.js","webpack:///../../../src/math/Quaternion.js","webpack:///../../../src/math/RadToDeg.js","webpack:///../../../src/math/RandomXY.js","webpack:///../../../src/math/RandomXYZ.js","webpack:///../../../src/math/RandomXYZW.js","webpack:///../../../src/math/Rotate.js","webpack:///../../../src/math/RotateAround.js","webpack:///../../../src/math/RotateAroundDistance.js","webpack:///../../../src/math/RotateTo.js","webpack:///../../../src/math/RotateVec3.js","webpack:///../../../src/math/RoundAwayFromZero.js","webpack:///../../../src/math/RoundTo.js","webpack:///../../../src/math/SinCosTableGenerator.js","webpack:///../../../src/math/SmoothStep.js","webpack:///../../../src/math/SmootherStep.js","webpack:///../../../src/math/ToXY.js","webpack:///../../../src/math/TransformXY.js","webpack:///../../../src/math/Vector2.js","webpack:///../../../src/math/Vector3.js","webpack:///../../../src/math/Vector4.js","webpack:///../../../src/math/Within.js","webpack:///../../../src/math/Wrap.js","webpack:///../../../src/math/angle/Between.js","webpack:///../../../src/math/angle/BetweenPoints.js","webpack:///../../../src/math/angle/BetweenPointsY.js","webpack:///../../../src/math/angle/BetweenY.js","webpack:///../../../src/math/angle/CounterClockwise.js","webpack:///../../../src/math/angle/Normalize.js","webpack:///../../../src/math/angle/Random.js","webpack:///../../../src/math/angle/RandomDegrees.js","webpack:///../../../src/math/angle/Reverse.js","webpack:///../../../src/math/angle/RotateTo.js","webpack:///../../../src/math/angle/ShortestBetween.js","webpack:///../../../src/math/angle/Wrap.js","webpack:///../../../src/math/angle/WrapDegrees.js","webpack:///../../../src/math/angle/index.js","webpack:///../../../src/math/const.js","webpack:///../../../src/math/distance/DistanceBetween.js","webpack:///../../../src/math/distance/DistanceBetweenPoints.js","webpack:///../../../src/math/distance/DistanceBetweenPointsSquared.js","webpack:///../../../src/math/distance/DistanceChebyshev.js","webpack:///../../../src/math/distance/DistancePower.js","webpack:///../../../src/math/distance/DistanceSnake.js","webpack:///../../../src/math/distance/DistanceSquared.js","webpack:///../../../src/math/distance/index.js","webpack:///../../../src/math/easing/back/In.js","webpack:///../../../src/math/easing/back/InOut.js","webpack:///../../../src/math/easing/back/Out.js","webpack:///../../../src/math/easing/back/index.js","webpack:///../../../src/math/easing/bounce/In.js","webpack:///../../../src/math/easing/bounce/InOut.js","webpack:///../../../src/math/easing/bounce/Out.js","webpack:///../../../src/math/easing/bounce/index.js","webpack:///../../../src/math/easing/circular/In.js","webpack:///../../../src/math/easing/circular/InOut.js","webpack:///../../../src/math/easing/circular/Out.js","webpack:///../../../src/math/easing/circular/index.js","webpack:///../../../src/math/easing/cubic/In.js","webpack:///../../../src/math/easing/cubic/InOut.js","webpack:///../../../src/math/easing/cubic/Out.js","webpack:///../../../src/math/easing/cubic/index.js","webpack:///../../../src/math/easing/elastic/In.js","webpack:///../../../src/math/easing/elastic/InOut.js","webpack:///../../../src/math/easing/elastic/Out.js","webpack:///../../../src/math/easing/elastic/index.js","webpack:///../../../src/math/easing/expo/In.js","webpack:///../../../src/math/easing/expo/InOut.js","webpack:///../../../src/math/easing/expo/Out.js","webpack:///../../../src/math/easing/expo/index.js","webpack:///../../../src/math/easing/index.js","webpack:///../../../src/math/easing/linear/Linear.js","webpack:///../../../src/math/easing/linear/index.js","webpack:///../../../src/math/easing/quadratic/In.js","webpack:///../../../src/math/easing/quadratic/InOut.js","webpack:///../../../src/math/easing/quadratic/Out.js","webpack:///../../../src/math/easing/quadratic/index.js","webpack:///../../../src/math/easing/quartic/In.js","webpack:///../../../src/math/easing/quartic/InOut.js","webpack:///../../../src/math/easing/quartic/Out.js","webpack:///../../../src/math/easing/quartic/index.js","webpack:///../../../src/math/easing/quintic/In.js","webpack:///../../../src/math/easing/quintic/InOut.js","webpack:///../../../src/math/easing/quintic/Out.js","webpack:///../../../src/math/easing/quintic/index.js","webpack:///../../../src/math/easing/sine/In.js","webpack:///../../../src/math/easing/sine/InOut.js","webpack:///../../../src/math/easing/sine/Out.js","webpack:///../../../src/math/easing/sine/index.js","webpack:///../../../src/math/easing/stepped/Stepped.js","webpack:///../../../src/math/easing/stepped/index.js","webpack:///../../../src/math/fuzzy/Ceil.js","webpack:///../../../src/math/fuzzy/Equal.js","webpack:///../../../src/math/fuzzy/Floor.js","webpack:///../../../src/math/fuzzy/GreaterThan.js","webpack:///../../../src/math/fuzzy/LessThan.js","webpack:///../../../src/math/fuzzy/index.js","webpack:///../../../src/math/index.js","webpack:///../../../src/math/interpolation/BezierInterpolation.js","webpack:///../../../src/math/interpolation/CatmullRomInterpolation.js","webpack:///../../../src/math/interpolation/CubicBezierInterpolation.js","webpack:///../../../src/math/interpolation/LinearInterpolation.js","webpack:///../../../src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///../../../src/math/interpolation/SmoothStepInterpolation.js","webpack:///../../../src/math/interpolation/SmootherStepInterpolation.js","webpack:///../../../src/math/interpolation/index.js","webpack:///../../../src/math/pow2/GetPowerOfTwo.js","webpack:///../../../src/math/pow2/IsSizePowerOfTwo.js","webpack:///../../../src/math/pow2/IsValuePowerOfTwo.js","webpack:///../../../src/math/pow2/index.js","webpack:///../../../src/math/random-data-generator/RandomDataGenerator.js","webpack:///../../../src/math/snap/SnapCeil.js","webpack:///../../../src/math/snap/SnapFloor.js","webpack:///../../../src/math/snap/SnapTo.js","webpack:///../../../src/math/snap/index.js","webpack:///../../../src/plugins/BasePlugin.js","webpack:///../../../src/plugins/PluginCache.js","webpack:///../../../src/plugins/ScenePlugin.js","webpack:///../../../src/renderer/BlendModes.js","webpack:///../../../src/renderer/ScaleModes.js","webpack:///../../../src/scale/events/RESIZE_EVENT.js","webpack:///../../../src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/scene/events/BOOT_EVENT.js","webpack:///../../../src/scene/events/CREATE_EVENT.js","webpack:///../../../src/scene/events/DESTROY_EVENT.js","webpack:///../../../src/scene/events/PAUSE_EVENT.js","webpack:///../../../src/scene/events/POST_UPDATE_EVENT.js","webpack:///../../../src/scene/events/PRE_RENDER_EVENT.js","webpack:///../../../src/scene/events/PRE_UPDATE_EVENT.js","webpack:///../../../src/scene/events/READY_EVENT.js","webpack:///../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/scene/events/RENDER_EVENT.js","webpack:///../../../src/scene/events/RESUME_EVENT.js","webpack:///../../../src/scene/events/SHUTDOWN_EVENT.js","webpack:///../../../src/scene/events/SLEEP_EVENT.js","webpack:///../../../src/scene/events/START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///../../../src/scene/events/UPDATE_EVENT.js","webpack:///../../../src/scene/events/WAKE_EVENT.js","webpack:///../../../src/scene/events/index.js","webpack:///../../../src/textures/Frame.js","webpack:///../../../src/tweens/builders/GetBoolean.js","webpack:///../../../src/tweens/tween/const.js","webpack:///../../../src/utils/Class.js","webpack:///../../../src/utils/NOOP.js","webpack:///../../../src/utils/array/Add.js","webpack:///../../../src/utils/array/AddAt.js","webpack:///../../../src/utils/array/BringToTop.js","webpack:///../../../src/utils/array/CountAllMatching.js","webpack:///../../../src/utils/array/Each.js","webpack:///../../../src/utils/array/EachInRange.js","webpack:///../../../src/utils/array/FindClosestInSorted.js","webpack:///../../../src/utils/array/Flatten.js","webpack:///../../../src/utils/array/GetAll.js","webpack:///../../../src/utils/array/GetFirst.js","webpack:///../../../src/utils/array/GetRandom.js","webpack:///../../../src/utils/array/MoveAbove.js","webpack:///../../../src/utils/array/MoveBelow.js","webpack:///../../../src/utils/array/MoveDown.js","webpack:///../../../src/utils/array/MoveTo.js","webpack:///../../../src/utils/array/MoveUp.js","webpack:///../../../src/utils/array/NumberArray.js","webpack:///../../../src/utils/array/NumberArrayStep.js","webpack:///../../../src/utils/array/QuickSelect.js","webpack:///../../../src/utils/array/Range.js","webpack:///../../../src/utils/array/Remove.js","webpack:///../../../src/utils/array/RemoveAt.js","webpack:///../../../src/utils/array/RemoveBetween.js","webpack:///../../../src/utils/array/RemoveRandomElement.js","webpack:///../../../src/utils/array/Replace.js","webpack:///../../../src/utils/array/RotateLeft.js","webpack:///../../../src/utils/array/RotateRight.js","webpack:///../../../src/utils/array/SafeRange.js","webpack:///../../../src/utils/array/SendToBack.js","webpack:///../../../src/utils/array/SetAll.js","webpack:///../../../src/utils/array/Shuffle.js","webpack:///../../../src/utils/array/SortByDigits.js","webpack:///../../../src/utils/array/SpliceOne.js","webpack:///../../../src/utils/array/StableSort.js","webpack:///../../../src/utils/array/Swap.js","webpack:///../../../src/utils/array/index.js","webpack:///../../../src/utils/array/matrix/CheckMatrix.js","webpack:///../../../src/utils/array/matrix/MatrixToString.js","webpack:///../../../src/utils/array/matrix/ReverseColumns.js","webpack:///../../../src/utils/array/matrix/ReverseRows.js","webpack:///../../../src/utils/array/matrix/Rotate180.js","webpack:///../../../src/utils/array/matrix/RotateLeft.js","webpack:///../../../src/utils/array/matrix/RotateMatrix.js","webpack:///../../../src/utils/array/matrix/RotateRight.js","webpack:///../../../src/utils/array/matrix/TranslateMatrix.js","webpack:///../../../src/utils/array/matrix/TransposeMatrix.js","webpack:///../../../src/utils/array/matrix/index.js","webpack:///../../../src/utils/object/DeepCopy.js","webpack:///../../../src/utils/object/Extend.js","webpack:///../../../src/utils/object/GetAdvancedValue.js","webpack:///../../../src/utils/object/GetFastValue.js","webpack:///../../../src/utils/object/GetValue.js","webpack:///../../../src/utils/object/IsPlainObject.js","webpack:///../../../src/utils/string/Pad.js","webpack:///webpack/bootstrap","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["'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","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Animation = (function () {\r\n function Animation(name, timelines, duration) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (timelines == null)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n Animation.prototype.hasTimeline = function (id) {\r\n return this.timelineIds[id] == true;\r\n };\r\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n var timelines = this.timelines;\r\n for (var i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n };\r\n Animation.binarySearch = function (values, target, step) {\r\n if (step === void 0) { step = 1; }\r\n var low = 0;\r\n var high = values.length / step - 2;\r\n if (high == 0)\r\n return step;\r\n var current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high)\r\n return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n };\r\n Animation.linearSearch = function (values, target, step) {\r\n for (var i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target)\r\n return i;\r\n return -1;\r\n };\r\n return Animation;\r\n }());\r\n spine.Animation = Animation;\r\n var MixBlend;\r\n (function (MixBlend) {\r\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\r\n var MixDirection;\r\n (function (MixDirection) {\r\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n var TimelineType;\r\n (function (TimelineType) {\r\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n var CurveTimeline = (function () {\r\n function CurveTimeline(frameCount) {\r\n if (frameCount <= 0)\r\n throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n CurveTimeline.prototype.getFrameCount = function () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n };\r\n CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n };\r\n CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n };\r\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length)\r\n return CurveTimeline.LINEAR;\r\n var type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR)\r\n return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED)\r\n return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n };\r\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n var x = dfx, y = dfy;\r\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n };\r\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n percent = spine.MathUtils.clamp(percent, 0, 1);\r\n var curves = this.curves;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var type = curves[i];\r\n if (type == CurveTimeline.LINEAR)\r\n return percent;\r\n if (type == CurveTimeline.STEPPED)\r\n return 0;\r\n i++;\r\n var x = 0;\r\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n var prevX = void 0, prevY = void 0;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n }\r\n else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n var y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x);\r\n };\r\n CurveTimeline.LINEAR = 0;\r\n CurveTimeline.STEPPED = 1;\r\n CurveTimeline.BEZIER = 2;\r\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n return CurveTimeline;\r\n }());\r\n spine.CurveTimeline = CurveTimeline;\r\n var RotateTimeline = (function (_super) {\r\n __extends(RotateTimeline, _super);\r\n function RotateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n return _this;\r\n }\r\n RotateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n };\r\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n };\r\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n var r_1 = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r_2 * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r_2 += bone.data.rotation - bone.rotation;\r\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n case MixBlend.add:\r\n bone.rotation += r_2 * alpha;\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n };\r\n RotateTimeline.ENTRIES = 2;\r\n RotateTimeline.PREV_TIME = -2;\r\n RotateTimeline.PREV_ROTATION = -1;\r\n RotateTimeline.ROTATION = 1;\r\n return RotateTimeline;\r\n }(CurveTimeline));\r\n spine.RotateTimeline = RotateTimeline;\r\n var TranslateTimeline = (function (_super) {\r\n __extends(TranslateTimeline, _super);\r\n function TranslateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TranslateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n };\r\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n };\r\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n };\r\n TranslateTimeline.ENTRIES = 3;\r\n TranslateTimeline.PREV_TIME = -3;\r\n TranslateTimeline.PREV_X = -2;\r\n TranslateTimeline.PREV_Y = -1;\r\n TranslateTimeline.X = 1;\r\n TranslateTimeline.Y = 2;\r\n return TranslateTimeline;\r\n }(CurveTimeline));\r\n spine.TranslateTimeline = TranslateTimeline;\r\n var ScaleTimeline = (function (_super) {\r\n __extends(ScaleTimeline, _super);\r\n function ScaleTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ScaleTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n };\r\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n }\r\n else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n }\r\n else {\r\n var bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = spine.MathUtils.signum(x);\r\n by = spine.MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n };\r\n return ScaleTimeline;\r\n }(TranslateTimeline));\r\n spine.ScaleTimeline = ScaleTimeline;\r\n var ShearTimeline = (function (_super) {\r\n __extends(ShearTimeline, _super);\r\n function ShearTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ShearTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n };\r\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n };\r\n return ShearTimeline;\r\n }(TranslateTimeline));\r\n spine.ShearTimeline = ShearTimeline;\r\n var ColorTimeline = (function (_super) {\r\n __extends(ColorTimeline, _super);\r\n function ColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n ColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n };\r\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n };\r\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n var color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n var color = slot.color;\r\n if (blend == MixBlend.setup)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n };\r\n ColorTimeline.ENTRIES = 5;\r\n ColorTimeline.PREV_TIME = -5;\r\n ColorTimeline.PREV_R = -4;\r\n ColorTimeline.PREV_G = -3;\r\n ColorTimeline.PREV_B = -2;\r\n ColorTimeline.PREV_A = -1;\r\n ColorTimeline.R = 1;\r\n ColorTimeline.G = 2;\r\n ColorTimeline.B = 3;\r\n ColorTimeline.A = 4;\r\n return ColorTimeline;\r\n }(CurveTimeline));\r\n spine.ColorTimeline = ColorTimeline;\r\n var TwoColorTimeline = (function (_super) {\r\n __extends(TwoColorTimeline, _super);\r\n function TwoColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TwoColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n };\r\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n };\r\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n }\r\n else {\r\n var light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n };\r\n TwoColorTimeline.ENTRIES = 8;\r\n TwoColorTimeline.PREV_TIME = -8;\r\n TwoColorTimeline.PREV_R = -7;\r\n TwoColorTimeline.PREV_G = -6;\r\n TwoColorTimeline.PREV_B = -5;\r\n TwoColorTimeline.PREV_A = -4;\r\n TwoColorTimeline.PREV_R2 = -3;\r\n TwoColorTimeline.PREV_G2 = -2;\r\n TwoColorTimeline.PREV_B2 = -1;\r\n TwoColorTimeline.R = 1;\r\n TwoColorTimeline.G = 2;\r\n TwoColorTimeline.B = 3;\r\n TwoColorTimeline.A = 4;\r\n TwoColorTimeline.R2 = 5;\r\n TwoColorTimeline.G2 = 6;\r\n TwoColorTimeline.B2 = 7;\r\n return TwoColorTimeline;\r\n }(CurveTimeline));\r\n spine.TwoColorTimeline = TwoColorTimeline;\r\n var AttachmentTimeline = (function () {\r\n function AttachmentTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n AttachmentTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n };\r\n AttachmentTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n };\r\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frameIndex = 0;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n var attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n return AttachmentTimeline;\r\n }());\r\n spine.AttachmentTimeline = AttachmentTimeline;\r\n var zeros = null;\r\n var DeformTimeline = (function (_super) {\r\n __extends(DeformTimeline, _super);\r\n function DeformTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount);\r\n _this.frameVertices = new Array(frameCount);\r\n if (zeros == null)\r\n zeros = spine.Utils.newFloatArray(64);\r\n return _this;\r\n }\r\n DeformTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n };\r\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n };\r\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var slotAttachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\r\n return;\r\n var deformArray = slot.deform;\r\n if (deformArray.length == 0)\r\n blend = MixBlend.setup;\r\n var frameVertices = this.frameVertices;\r\n var vertexCount = frameVertices[0].length;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n var vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n }\r\n else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) {\r\n var lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n }\r\n }\r\n else {\r\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n deform[i_2] += lastVertices[i_2];\r\n }\r\n }\r\n else {\r\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_1 = slotAttachment;\r\n if (vertexAttachment_1.bones == null) {\r\n var setupVertices = vertexAttachment_1.vertices;\r\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n var setup = setupVertices[i_3];\r\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n deform[i_4] = lastVertices[i_4] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n deform[i_7] += lastVertices[i_7] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time);\r\n var prevVertices = frameVertices[frame - 1];\r\n var nextVertices = frameVertices[frame];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n var prev = prevVertices[i_8];\r\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n }\r\n }\r\n else {\r\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n var prev = prevVertices[i_9];\r\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n var prev = prevVertices[i_10];\r\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_2 = slotAttachment;\r\n if (vertexAttachment_2.bones == null) {\r\n var setupVertices = vertexAttachment_2.vertices;\r\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n var prev = prevVertices[i_12];\r\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n var prev = prevVertices[i_13];\r\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n var prev = prevVertices[i_14];\r\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n var prev = prevVertices[i_15];\r\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n return DeformTimeline;\r\n }(CurveTimeline));\r\n spine.DeformTimeline = DeformTimeline;\r\n var EventTimeline = (function () {\r\n function EventTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n EventTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.event << 24;\r\n };\r\n EventTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n };\r\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (firedEvents == null)\r\n return;\r\n var frames = this.frames;\r\n var frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n }\r\n else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n var frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n var frameTime = frames[frame];\r\n while (frame > 0) {\r\n if (frames[frame - 1] != frameTime)\r\n break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n };\r\n return EventTimeline;\r\n }());\r\n spine.EventTimeline = EventTimeline;\r\n var DrawOrderTimeline = (function () {\r\n function DrawOrderTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n DrawOrderTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.drawOrder << 24;\r\n };\r\n DrawOrderTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n };\r\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var drawOrder = skeleton.drawOrder;\r\n var slots = skeleton.slots;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frame = 0;\r\n if (time >= frames[frames.length - 1])\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n var drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n };\r\n return DrawOrderTimeline;\r\n }());\r\n spine.DrawOrderTimeline = DrawOrderTimeline;\r\n var IkConstraintTimeline = (function (_super) {\r\n __extends(IkConstraintTimeline, _super);\r\n function IkConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n IkConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n };\r\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n };\r\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n };\r\n IkConstraintTimeline.ENTRIES = 6;\r\n IkConstraintTimeline.PREV_TIME = -6;\r\n IkConstraintTimeline.PREV_MIX = -5;\r\n IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n IkConstraintTimeline.PREV_COMPRESS = -2;\r\n IkConstraintTimeline.PREV_STRETCH = -1;\r\n IkConstraintTimeline.MIX = 1;\r\n IkConstraintTimeline.SOFTNESS = 2;\r\n IkConstraintTimeline.BEND_DIRECTION = 3;\r\n IkConstraintTimeline.COMPRESS = 4;\r\n IkConstraintTimeline.STRETCH = 5;\r\n return IkConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.IkConstraintTimeline = IkConstraintTimeline;\r\n var TransformConstraintTimeline = (function (_super) {\r\n __extends(TransformConstraintTimeline, _super);\r\n function TransformConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n };\r\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n };\r\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n var data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n };\r\n TransformConstraintTimeline.ENTRIES = 5;\r\n TransformConstraintTimeline.PREV_TIME = -5;\r\n TransformConstraintTimeline.PREV_ROTATE = -4;\r\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n TransformConstraintTimeline.PREV_SCALE = -2;\r\n TransformConstraintTimeline.PREV_SHEAR = -1;\r\n TransformConstraintTimeline.ROTATE = 1;\r\n TransformConstraintTimeline.TRANSLATE = 2;\r\n TransformConstraintTimeline.SCALE = 3;\r\n TransformConstraintTimeline.SHEAR = 4;\r\n return TransformConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n var PathConstraintPositionTimeline = (function (_super) {\r\n __extends(PathConstraintPositionTimeline, _super);\r\n function PathConstraintPositionTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n };\r\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n var position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n };\r\n PathConstraintPositionTimeline.ENTRIES = 2;\r\n PathConstraintPositionTimeline.PREV_TIME = -2;\r\n PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n PathConstraintPositionTimeline.VALUE = 1;\r\n return PathConstraintPositionTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n var PathConstraintSpacingTimeline = (function (_super) {\r\n __extends(PathConstraintSpacingTimeline, _super);\r\n function PathConstraintSpacingTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n var spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n };\r\n return PathConstraintSpacingTimeline;\r\n }(PathConstraintPositionTimeline));\r\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n var PathConstraintMixTimeline = (function (_super) {\r\n __extends(PathConstraintMixTimeline, _super);\r\n function PathConstraintMixTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n };\r\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n };\r\n PathConstraintMixTimeline.ENTRIES = 3;\r\n PathConstraintMixTimeline.PREV_TIME = -3;\r\n PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n PathConstraintMixTimeline.ROTATE = 1;\r\n PathConstraintMixTimeline.TRANSLATE = 2;\r\n return PathConstraintMixTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationState = (function () {\r\n function AnimationState(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new spine.IntSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n this.data = data;\r\n }\r\n AnimationState.prototype.update = function (delta) {\r\n delta *= this.timeScale;\r\n var tracks = this.tracks;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n var currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n var next = current.next;\r\n if (next != null) {\r\n var nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n }\r\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n var from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null)\r\n from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n var from = to.mixingFrom;\r\n if (from == null)\r\n return true;\r\n var finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n };\r\n AnimationState.prototype.apply = function (skeleton) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n var events = this.events;\r\n var tracks = this.tracks;\r\n var applied = false;\r\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\r\n var current = tracks[i_16];\r\n if (current == null || current.delay > 0)\r\n continue;\r\n applied = true;\r\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\r\n var mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n var timelineCount = current.animation.timelines.length;\r\n var timelines = current.animation.timelines;\r\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n else {\r\n var timelineMode = current.timelineMode;\r\n var firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = current.timelinesRotation;\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n var timeline_1 = timelines[ii];\r\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\r\n if (timeline_1 instanceof spine.RotateTimeline) {\r\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n }\r\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\r\n }\r\n else {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n };\r\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n var from = to.mixingFrom;\r\n if (from.mixingFrom != null)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n var mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == spine.MixBlend.first)\r\n blend = spine.MixBlend.setup;\r\n }\r\n else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != spine.MixBlend.first)\r\n blend = from.mixBlend;\r\n }\r\n var events = mix < from.eventThreshold ? this.events : null;\r\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n var timelineCount = from.animation.timelines.length;\r\n var timelines = from.animation.timelines;\r\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == spine.MixBlend.add) {\r\n for (var i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\r\n }\r\n else {\r\n var timelineMode = from.timelineMode;\r\n var timelineHoldMix = from.timelineHoldMix;\r\n var firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = from.timelinesRotation;\r\n from.totalAlpha = 0;\r\n for (var i = 0; i < timelineCount; i++) {\r\n var timeline = timelines[i];\r\n var direction = spine.MixDirection.mixOut;\r\n var timelineBlend = void 0;\r\n var alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = spine.MixBlend.setup;\r\n var holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof spine.RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n spine.Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\r\n direction = spine.MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n };\r\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = timeline.frames;\r\n if (time < frames[0]) {\r\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n };\r\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n };\r\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\r\n return;\r\n }\r\n var rotateTimeline = timeline;\r\n var frames = rotateTimeline.frames;\r\n var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n var r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case spine.MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case spine.MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n }\r\n else {\r\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n else {\r\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n var total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n }\r\n else {\r\n var lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n }\r\n else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n var current = diff > 0, dir = lastTotal >= 0;\r\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * spine.MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n };\r\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n var duration = animationEnd - animationStart;\r\n var trackLastWrapped = entry.trackLast % duration;\r\n var events = this.events;\r\n var i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n var event_1 = events[i];\r\n if (event_1.time < trackLastWrapped)\r\n break;\r\n if (event_1.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event_1);\r\n }\r\n var complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n var event_2 = events[i];\r\n if (event_2.time < animationStart)\r\n continue;\r\n this.queue.event(entry, events[i]);\r\n }\r\n };\r\n AnimationState.prototype.clearTracks = function () {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.clearTrack = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n var current = this.tracks[trackIndex];\r\n if (current == null)\r\n return;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n var entry = current;\r\n while (true) {\r\n var from = entry.mixingFrom;\r\n if (from == null)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n var from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n if (from != null) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n };\r\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n };\r\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var interrupt = true;\r\n var current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n }\r\n else\r\n this.disposeNext(current);\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n };\r\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n };\r\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n }\r\n else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n var duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n }\r\n else\r\n delay = last.trackTime;\r\n }\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n if (delay <= 0)\r\n delay -= mixDuration;\r\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var current = this.tracks[i];\r\n if (current != null)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.expandToIndex = function (index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n };\r\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n var entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = spine.MixBlend.replace;\r\n return entry;\r\n };\r\n AnimationState.prototype.disposeNext = function (entry) {\r\n var next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n };\r\n AnimationState.prototype._animationsChanged = function () {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var entry = this.tracks[i];\r\n if (entry == null)\r\n continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null);\r\n }\r\n };\r\n AnimationState.prototype.computeHold = function (entry) {\r\n var to = entry.mixingTo;\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n var propertyIDs = this.propertyIDs;\r\n if (to != null && to.holdPrevious) {\r\n for (var i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n outer: for (var i = 0; i < timelinesCount; i++) {\r\n var timeline = timelines[i];\r\n var id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\r\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n }\r\n else {\r\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.getCurrent = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n };\r\n AnimationState.prototype.addListener = function (listener) {\r\n if (listener == null)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n };\r\n AnimationState.prototype.removeListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n };\r\n AnimationState.prototype.clearListeners = function () {\r\n this.listeners.length = 0;\r\n };\r\n AnimationState.prototype.clearListenerNotifications = function () {\r\n this.queue.clear();\r\n };\r\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n AnimationState.SUBSEQUENT = 0;\r\n AnimationState.FIRST = 1;\r\n AnimationState.HOLD_SUBSEQUENT = 2;\r\n AnimationState.HOLD_FIRST = 3;\r\n AnimationState.HOLD_MIX = 4;\r\n AnimationState.SETUP = 1;\r\n AnimationState.CURRENT = 2;\r\n return AnimationState;\r\n }());\r\n spine.AnimationState = AnimationState;\r\n var TrackEntry = (function () {\r\n function TrackEntry() {\r\n this.mixBlend = spine.MixBlend.replace;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n TrackEntry.prototype.reset = function () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n };\r\n TrackEntry.prototype.getAnimationTime = function () {\r\n if (this.loop) {\r\n var duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n };\r\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n };\r\n TrackEntry.prototype.isComplete = function () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n };\r\n TrackEntry.prototype.resetRotationDirections = function () {\r\n this.timelinesRotation.length = 0;\r\n };\r\n return TrackEntry;\r\n }());\r\n spine.TrackEntry = TrackEntry;\r\n var EventQueue = (function () {\r\n function EventQueue(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n EventQueue.prototype.start = function (entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.interrupt = function (entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.end = function (entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.dispose = function (entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.complete = function (entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.event = function (entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n };\r\n EventQueue.prototype.drain = function () {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n var objects = this.objects;\r\n var listeners = this.animState.listeners;\r\n for (var i = 0; i < objects.length; i += 2) {\r\n var type = objects[i];\r\n var entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start)\r\n listeners[ii].start(entry);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt)\r\n listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end)\r\n listeners[ii].end(entry);\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose)\r\n listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete)\r\n listeners[ii].complete(entry);\r\n break;\r\n case EventType.event:\r\n var event_3 = objects[i++ + 2];\r\n if (entry.listener != null && entry.listener.event)\r\n entry.listener.event(entry, event_3);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event)\r\n listeners[ii].event(entry, event_3);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n };\r\n EventQueue.prototype.clear = function () {\r\n this.objects.length = 0;\r\n };\r\n return EventQueue;\r\n }());\r\n spine.EventQueue = EventQueue;\r\n var EventType;\r\n (function (EventType) {\r\n EventType[EventType[\"start\"] = 0] = \"start\";\r\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType[EventType[\"end\"] = 2] = \"end\";\r\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n EventType[EventType[\"event\"] = 5] = \"event\";\r\n })(EventType = spine.EventType || (spine.EventType = {}));\r\n var AnimationStateAdapter = (function () {\r\n function AnimationStateAdapter() {\r\n }\r\n AnimationStateAdapter.prototype.start = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.end = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.dispose = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.complete = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.event = function (entry, event) {\r\n };\r\n return AnimationStateAdapter;\r\n }());\r\n spine.AnimationStateAdapter = AnimationStateAdapter;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationStateData = (function () {\r\n function AnimationStateData(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (skeletonData == null)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n var from = this.skeletonData.findAnimation(fromName);\r\n if (from == null)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n var to = this.skeletonData.findAnimation(toName);\r\n if (to == null)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n };\r\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n if (from == null)\r\n throw new Error(\"from cannot be null.\");\r\n if (to == null)\r\n throw new Error(\"to cannot be null.\");\r\n var key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n };\r\n AnimationStateData.prototype.getMix = function (from, to) {\r\n var key = from.name + \".\" + to.name;\r\n var value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n };\r\n return AnimationStateData;\r\n }());\r\n spine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AssetManager = (function () {\r\n function AssetManager(textureLoader, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.rawDataUris = {};\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n }\r\n AssetManager.prototype.downloadText = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(request.responseText);\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.downloadBinary = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(new Uint8Array(request.response));\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.setRawDataURI = function (path, data) {\r\n this.rawDataUris[this.pathPrefix + path] = data;\r\n };\r\n AssetManager.prototype.loadBinary = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadBinary(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadText = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadTexture = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n var storagePath = path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[storagePath] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \".concat(path));\r\n };\r\n if (this.rawDataUris[path])\r\n path = this.rawDataUris[path];\r\n img.src = path;\r\n };\r\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (atlasData) {\r\n var pagesLoaded = { count: 0 };\r\n var atlasPages = new Array();\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\r\n var image = document.createElement(\"img\");\r\n image.width = 16;\r\n image.height = 16;\r\n return new spine.FakeTexture(image);\r\n });\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n return;\r\n }\r\n var _loop_1 = function (atlasPage) {\r\n var pageLoadError = false;\r\n _this.loadTexture(atlasPage, function (imagePath, image) {\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n if (!pageLoadError) {\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\r\n });\r\n _this.assets[path] = atlas;\r\n if (success)\r\n success(path, atlas);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(path));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n }, function (imagePath, errorMessage) {\r\n pageLoadError = true;\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(path));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n });\r\n };\r\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n var atlasPage = atlasPages_1[_i];\r\n _loop_1(atlasPage);\r\n }\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.get = function (path) {\r\n path = this.pathPrefix + path;\r\n return this.assets[path];\r\n };\r\n AssetManager.prototype.remove = function (path) {\r\n path = this.pathPrefix + path;\r\n var asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n this.assets[path] = null;\r\n };\r\n AssetManager.prototype.removeAll = function () {\r\n for (var key in this.assets) {\r\n var asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n };\r\n AssetManager.prototype.isLoadingComplete = function () {\r\n return this.toLoad == 0;\r\n };\r\n AssetManager.prototype.getToLoad = function () {\r\n return this.toLoad;\r\n };\r\n AssetManager.prototype.getLoaded = function () {\r\n return this.loaded;\r\n };\r\n AssetManager.prototype.dispose = function () {\r\n this.removeAll();\r\n };\r\n AssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n AssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return AssetManager;\r\n }());\r\n spine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AtlasAttachmentLoader = (function () {\r\n function AtlasAttachmentLoader(atlas) {\r\n this.atlas = atlas;\r\n }\r\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.RegionAttachment(name);\r\n attachment.setRegion(region);\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n return new spine.BoundingBoxAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n return new spine.PathAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n return new spine.PointAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n return new spine.ClippingAttachment(name);\r\n };\r\n return AtlasAttachmentLoader;\r\n }());\r\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BlendMode;\r\n (function (BlendMode) {\r\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Bone = (function () {\r\n function Bone(data, skeleton, parent) {\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.appliedValid = false;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n Bone.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n Bone.prototype.update = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransform = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n var skeleton = this.skeleton;\r\n var rotationY = rotation + 90 + shearY;\r\n var sx = skeleton.scaleX;\r\n var sy = skeleton.scaleY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case spine.TransformMode.Normal: {\r\n var rotationY = rotation + 90 + shearY;\r\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case spine.TransformMode.OnlyTranslation: {\r\n var rotationY = rotation + 90 + shearY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case spine.TransformMode.NoRotationOrReflection: {\r\n var s = pa * pa + pc * pc;\r\n var prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n }\r\n var rx = rotation + shearX - prx;\r\n var ry = rotation + shearY - prx + 90;\r\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection: {\r\n var cos = spine.MathUtils.cosDeg(rotation);\r\n var sin = spine.MathUtils.sinDeg(rotation);\r\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n var s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == spine.TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n var r = Math.PI / 2 + Math.atan2(zc, za);\r\n var zb = Math.cos(r) * s;\r\n var zd = Math.sin(r) * s;\r\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n };\r\n Bone.prototype.setToSetupPose = function () {\r\n var data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n };\r\n Bone.prototype.getWorldRotationX = function () {\r\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldRotationY = function () {\r\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldScaleX = function () {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n };\r\n Bone.prototype.getWorldScaleY = function () {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n };\r\n Bone.prototype.updateAppliedTransform = function () {\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n this.ax = this.worldX;\r\n this.ay = this.worldY;\r\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n var pid = 1 / (pa * pd - pb * pc);\r\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = (dx * pd * pid - dy * pb * pid);\r\n this.ay = (dy * pa * pid - dx * pc * pid);\r\n var ia = pid * pd;\r\n var id = pid * pa;\r\n var ib = pid * pb;\r\n var ic = pid * pc;\r\n var ra = ia * this.a - ib * this.c;\r\n var rb = ia * this.b - ib * this.d;\r\n var rc = id * this.c - ic * this.a;\r\n var rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n var det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n }\r\n };\r\n Bone.prototype.worldToLocal = function (world) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var invDet = 1 / (a * d - b * c);\r\n var x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n };\r\n Bone.prototype.localToWorld = function (local) {\r\n var x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n };\r\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\r\n };\r\n Bone.prototype.localToWorldRotation = function (localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.rotateWorld = function (degrees) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n };\r\n return Bone;\r\n }());\r\n spine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoneData = (function () {\r\n function BoneData(index, name, parent) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new spine.Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n return BoneData;\r\n }());\r\n spine.BoneData = BoneData;\r\n var TransformMode;\r\n (function (TransformMode) {\r\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ConstraintData = (function () {\r\n function ConstraintData(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n return ConstraintData;\r\n }());\r\n spine.ConstraintData = ConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Event = (function () {\r\n function Event(time, data) {\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n return Event;\r\n }());\r\n spine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var EventData = (function () {\r\n function EventData(name) {\r\n this.name = name;\r\n }\r\n return EventData;\r\n }());\r\n spine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraint = (function () {\r\n function IkConstraint(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n IkConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n IkConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n IkConstraint.prototype.update = function () {\r\n var target = this.target;\r\n var bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n };\r\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var p = bone.parent;\r\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case spine.TransformMode.NoRotationOrReflection:\r\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n var sa = pa / bone.skeleton.scaleX;\r\n var sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\r\n default:\r\n var x = targetX - p.worldX, y = targetY - p.worldY;\r\n var d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n var sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n var s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n };\r\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid)\r\n parent.updateAppliedTransform();\r\n if (!child.appliedValid)\r\n child.updateAppliedTransform();\r\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n var os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n }\r\n else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n }\r\n else\r\n os2 = 0;\r\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n var u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n }\r\n else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n var pp = parent.parent;\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n var dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n var p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer: if (u) {\r\n l2 *= psx;\r\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch)\r\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n }\r\n else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n var c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n var q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) / 2;\r\n var r0 = q / c2, r1 = c / q;\r\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n }\r\n else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n var os = Math.atan2(cy, cx) * s2;\r\n var rotation = parent.arotation;\r\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n };\r\n return IkConstraint;\r\n }());\r\n spine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraintData = (function (_super) {\r\n __extends(IkConstraintData, _super);\r\n function IkConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.bendDirection = 1;\r\n _this.compress = false;\r\n _this.stretch = false;\r\n _this.uniform = false;\r\n _this.mix = 1;\r\n _this.softness = 0;\r\n return _this;\r\n }\r\n return IkConstraintData;\r\n }(spine.ConstraintData));\r\n spine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraint = (function () {\r\n function PathConstraint(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n PathConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n PathConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n PathConstraint.prototype.update = function () {\r\n var attachment = this.target.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n var translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate)\r\n return;\r\n var data = this.data;\r\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\r\n var rotateMode = data.rotateMode;\r\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n var bones = this.bones;\r\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n var spacing = this.spacing;\r\n if (scale || !percentSpacing) {\r\n if (scale)\r\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\r\n for (var i = 0, n = spacesCount - 1; i < n;) {\r\n var bone = bones[i];\r\n var setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = 0;\r\n }\r\n else if (percentSpacing) {\r\n if (scale) {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_1 = Math.sqrt(x * x + y * y);\r\n lengths[i] = length_1;\r\n }\r\n spaces[++i] = spacing;\r\n }\r\n else {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_2 = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length_2;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\r\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n var tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == spine.RotateMode.Chain;\r\n else {\r\n tip = false;\r\n var p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n }\r\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n var bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * translateMix;\r\n bone.worldY += (boneY - bone.worldY) * translateMix;\r\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n var length_3 = lengths[i];\r\n if (length_3 != 0) {\r\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n var length_4 = bone.data.length;\r\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\r\n }\r\n else {\r\n r += offsetRotation;\r\n }\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n };\r\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n var target = this.target;\r\n var position = this.position;\r\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n var closed = path.closed;\r\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n var lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n var pathLength_1 = lengths[curveCount];\r\n if (percentPosition)\r\n position *= pathLength_1;\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength_1;\r\n }\r\n world = spine.Utils.setArraySize(this.world, 8);\r\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength_1;\r\n if (p < 0)\r\n p += pathLength_1;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength_1) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_5 = lengths[curve];\r\n if (p > length_5)\r\n continue;\r\n if (curve == 0)\r\n p /= length_5;\r\n else {\r\n var prev = lengths[curve - 1];\r\n p = (p - prev) / (length_5 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n }\r\n else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n if (closed) {\r\n verticesLength += 2;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n }\r\n else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n var pathLength = 0;\r\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition)\r\n position *= pathLength;\r\n else\r\n position *= pathLength / path.lengths[curveCount - 1];\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n var segments = this.segments;\r\n var curveLength = 0;\r\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_6 = curves[curve];\r\n if (p > length_6)\r\n continue;\r\n if (curve == 0)\r\n p /= length_6;\r\n else {\r\n var prev = curves[curve - 1];\r\n p = (p - prev) / (length_6 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n var ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (;; segment++) {\r\n var length_7 = segments[segment];\r\n if (p > length_7)\r\n continue;\r\n if (segment == 0)\r\n p /= length_7;\r\n else {\r\n var prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length_7 - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n };\r\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 0.001)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n };\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 0.00001;\r\n return PathConstraint;\r\n }());\r\n spine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraintData = (function (_super) {\r\n __extends(PathConstraintData, _super);\r\n function PathConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n return _this;\r\n }\r\n return PathConstraintData;\r\n }(spine.ConstraintData));\r\n spine.PathConstraintData = PathConstraintData;\r\n var PositionMode;\r\n (function (PositionMode) {\r\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n var SpacingMode;\r\n (function (SpacingMode) {\r\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n var RotateMode;\r\n (function (RotateMode) {\r\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Assets = (function () {\r\n function Assets(clientId) {\r\n this.toLoad = new Array();\r\n this.assets = {};\r\n this.clientId = clientId;\r\n }\r\n Assets.prototype.loaded = function () {\r\n var i = 0;\r\n for (var v in this.assets)\r\n i++;\r\n return i;\r\n };\r\n return Assets;\r\n }());\r\n var SharedAssetManager = (function () {\r\n function SharedAssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.clientAssets = {};\r\n this.queuedAssets = {};\r\n this.rawAssets = {};\r\n this.errors = {};\r\n this.pathPrefix = pathPrefix;\r\n }\r\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined) {\r\n clientAssets = new Assets(clientId);\r\n this.clientAssets[clientId] = clientAssets;\r\n }\r\n if (textureLoader !== null)\r\n clientAssets.textureLoader = textureLoader;\r\n clientAssets.toLoad.push(path);\r\n if (this.queuedAssets[path] === path) {\r\n return false;\r\n }\r\n else {\r\n this.queuedAssets[path] = path;\r\n return true;\r\n }\r\n };\r\n SharedAssetManager.prototype.loadText = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = request.responseText;\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(request.status, \", \").concat(request.responseText);\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = JSON.parse(request.responseText);\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(request.status, \", \").concat(request.responseText);\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, textureLoader, path))\r\n return;\r\n var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n if (isWebWorker) {\r\n var options = { mode: \"cors\" };\r\n fetch(path, options).then(function (response) {\r\n if (!response.ok) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n }\r\n return response.blob();\r\n }).then(function (blob) {\r\n return createImageBitmap(blob, {\r\n premultiplyAlpha: 'none',\r\n colorSpaceConversion: 'none'\r\n });\r\n }).then(function (bitmap) {\r\n _this.rawAssets[path] = bitmap;\r\n });\r\n }\r\n else {\r\n var img_1 = new Image();\r\n img_1.crossOrigin = \"anonymous\";\r\n img_1.onload = function (ev) {\r\n _this.rawAssets[path] = img_1;\r\n };\r\n img_1.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n };\r\n img_1.src = path;\r\n }\r\n };\r\n SharedAssetManager.prototype.get = function (clientId, path) {\r\n path = this.pathPrefix + path;\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n return clientAssets.assets[path];\r\n };\r\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n var path = clientAssets.toLoad[i];\r\n var asset = clientAssets.assets[path];\r\n if (asset === null || asset === undefined) {\r\n var rawAsset = this.rawAssets[path];\r\n if (rawAsset === null || rawAsset === undefined)\r\n continue;\r\n if (isWebWorker) {\r\n if (rawAsset instanceof ImageBitmap) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n else {\r\n if (rawAsset instanceof HTMLImageElement) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n this.updateClientAssets(clientAssets);\r\n return clientAssets.toLoad.length == clientAssets.loaded();\r\n };\r\n SharedAssetManager.prototype.dispose = function () {\r\n };\r\n SharedAssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n SharedAssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return SharedAssetManager;\r\n }());\r\n spine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Skeleton = (function () {\r\n function Skeleton(data) {\r\n this._updateCache = new Array();\r\n this.updateCacheReset = new Array();\r\n this.time = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++) {\r\n var boneData = data.bones[i];\r\n var bone = void 0;\r\n if (boneData.parent == null)\r\n bone = new spine.Bone(boneData, this, null);\r\n else {\r\n var parent_1 = this.bones[boneData.parent.index];\r\n bone = new spine.Bone(boneData, this, parent_1);\r\n parent_1.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (var i = 0; i < data.slots.length; i++) {\r\n var slotData = data.slots[i];\r\n var bone = this.bones[slotData.boneData.index];\r\n var slot = new spine.Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (var i = 0; i < data.ikConstraints.length; i++) {\r\n var ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (var i = 0; i < data.transformConstraints.length; i++) {\r\n var transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (var i = 0; i < data.pathConstraints.length; i++) {\r\n var pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n Skeleton.prototype.updateCache = function () {\r\n var updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin != null) {\r\n var skinBones = this.skin.bones;\r\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n var bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n var ikConstraints = this.ikConstraints;\r\n var transformConstraints = this.transformConstraints;\r\n var pathConstraints = this.pathConstraints;\r\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n var constraintCount = ikCount + transformCount + pathCount;\r\n outer: for (var i = 0; i < constraintCount; i++) {\r\n for (var ii = 0; ii < ikCount; ii++) {\r\n var constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < transformCount; ii++) {\r\n var constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < pathCount; ii++) {\r\n var constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n };\r\n Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var target = constraint.target;\r\n this.sortBone(target);\r\n var constrained = constraint.bones;\r\n var parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length > 1) {\r\n var child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var slot = constraint.target;\r\n var slotIndex = slot.data.index;\r\n var slotBone = slot.bone;\r\n if (this.skin != null)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (var i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n };\r\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (var i = 0; i < boneCount; i++) {\r\n var child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n var attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (var key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var pathBones = attachment.bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n var bones = this.bones;\r\n var i = 0;\r\n while (i < pathBones.length) {\r\n var boneCount = pathBones[i++];\r\n for (var n = i + boneCount; i < n; i++) {\r\n var boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n };\r\n Skeleton.prototype.sortBone = function (bone) {\r\n if (bone.sorted)\r\n return;\r\n var parent = bone.parent;\r\n if (parent != null)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n };\r\n Skeleton.prototype.sortReset = function (bones) {\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n };\r\n Skeleton.prototype.updateWorldTransform = function () {\r\n var updateCacheReset = this.updateCacheReset;\r\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n var bone = updateCacheReset[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n var updateCache = this._updateCache;\r\n for (var i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n };\r\n Skeleton.prototype.setToSetupPose = function () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n };\r\n Skeleton.prototype.setBonesToSetupPose = function () {\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n var data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n };\r\n Skeleton.prototype.setSlotsToSetupPose = function () {\r\n var slots = this.slots;\r\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n };\r\n Skeleton.prototype.getRootBone = function () {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n };\r\n Skeleton.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.setSkinByName = function (skinName) {\r\n var skin = this.data.findSkin(skinName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n };\r\n Skeleton.prototype.setSkin = function (newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var name_1 = slot.data.attachmentName;\r\n if (name_1 != null) {\r\n var attachment = newSkin.getAttachment(i, name_1);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n };\r\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n };\r\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n if (attachmentName == null)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin != null)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n };\r\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n var attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n };\r\n Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n if (temp === void 0) { temp = new Array(2); }\r\n if (offset == null)\r\n throw new Error(\"offset cannot be null.\");\r\n if (size == null)\r\n throw new Error(\"size cannot be null.\");\r\n var drawOrder = this.drawOrder;\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var verticesLength = 0;\r\n var vertices = null;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n };\r\n Skeleton.prototype.update = function (delta) {\r\n this.time += delta;\r\n };\r\n return Skeleton;\r\n }());\r\n spine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBinary = (function () {\r\n function SkeletonBinary(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n skeletonData.name = \"\";\r\n var input = new BinaryInput(binary);\r\n skeletonData.hash = input.readString();\r\n skeletonData.version = input.readString();\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n var nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n var n = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n input.strings.push(input.readString());\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var name_2 = input.readString();\r\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n var data = new spine.BoneData(i, name_2, parent_2);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var slotName = input.readString();\r\n var boneData = skeletonData.bones[input.readInt(true)];\r\n var data = new spine.SlotData(i, slotName, boneData);\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n var darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.IkConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.TransformConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n data.scaleMix = input.readFloat();\r\n data.shearMix = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.PathConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin != null) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n var i = skeletonData.skins.length;\r\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++)\r\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n }\r\n n = this.linkedMeshes.length;\r\n for (var i = 0; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_3 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_3);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var data = new spine.EventData(input.readStringRef());\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath != null) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n return skeletonData;\r\n };\r\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n var skin = null;\r\n var slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new spine.Skin(\"default\");\r\n }\r\n else {\r\n skin = new spine.Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (var i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (var i = 0; i < slotCount; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var name_3 = input.readStringRef();\r\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\r\n if (attachment != null)\r\n skin.setAttachment(slotIndex, name_3, attachment);\r\n }\r\n }\r\n return skin;\r\n };\r\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n var scale = this.scale;\r\n var name = input.readStringRef();\r\n if (name == null)\r\n name = attachmentName;\r\n var typeIndex = input.readByte();\r\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n switch (type) {\r\n case spine.AttachmentType.Region: {\r\n var path = input.readStringRef();\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var scaleX = input.readFloat();\r\n var scaleY = input.readFloat();\r\n var width = input.readFloat();\r\n var height = input.readFloat();\r\n var color = input.readInt32();\r\n if (path == null)\r\n path = name;\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n spine.Color.rgba8888ToColor(region.color, color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case spine.AttachmentType.BoundingBox: {\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case spine.AttachmentType.Mesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var vertexCount = input.readInt(true);\r\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n var triangles = this.readShortArray(input);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var hullLength = input.readInt(true);\r\n var edges = null;\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.hullLength = hullLength << 1;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case spine.AttachmentType.LinkedMesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var skinName = input.readStringRef();\r\n var parent_4 = input.readStringRef();\r\n var inheritDeform = input.readBoolean();\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\r\n return mesh;\r\n }\r\n case spine.AttachmentType.Path: {\r\n var closed_1 = input.readBoolean();\r\n var constantSpeed = input.readBoolean();\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n var color = nonessential ? input.readInt32() : 0;\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = closed_1;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case spine.AttachmentType.Point: {\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var color = nonessential ? input.readInt32() : 0;\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case spine.AttachmentType.Clipping: {\r\n var endSlotIndex = input.readInt(true);\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n var verticesLength = vertexCount << 1;\r\n var vertices = new Vertices();\r\n var scale = this.scale;\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n var weights = new Array();\r\n var bonesArray = new Array();\r\n for (var i = 0; i < vertexCount; i++) {\r\n var boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (var ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = spine.Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n };\r\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n var array = new Array(n);\r\n if (scale == 1) {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n }\r\n else {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readShortArray = function (input) {\r\n var n = input.readInt(true);\r\n var array = new Array(n);\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n var timelines = new Array();\r\n var scale = this.scale;\r\n var duration = 0;\r\n var tempColor1 = new spine.Color();\r\n var tempColor2 = new spine.Color();\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.SLOT_ATTACHMENT: {\r\n var timeline = new spine.AttachmentTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_COLOR: {\r\n var timeline = new spine.ColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_TWO_COLOR: {\r\n var timeline = new spine.TwoColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var boneIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.BONE_ROTATE: {\r\n var timeline = new spine.RotateTimeline(frameCount);\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.BONE_TRANSLATE:\r\n case SkeletonBinary.BONE_SCALE:\r\n case SkeletonBinary.BONE_SHEAR: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.BONE_SCALE)\r\n timeline = new spine.ScaleTimeline(frameCount);\r\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n timeline = new spine.ShearTimeline(frameCount);\r\n else {\r\n timeline = new spine.TranslateTimeline(frameCount);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.IkConstraintTimeline(frameCount);\r\n timeline.ikConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.TransformConstraintTimeline(frameCount);\r\n timeline.transformConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.PATH_POSITION:\r\n case SkeletonBinary.PATH_SPACING: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.PATH_MIX: {\r\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var skin = skeletonData.skins[input.readInt(true)];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var slotIndex = input.readInt(true);\r\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.DeformTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n var deform = void 0;\r\n var end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n }\r\n else {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (var v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, time, deform);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n }\r\n }\r\n }\r\n var drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\r\n var slotCount = skeletonData.slots.length;\r\n for (var i = 0; i < drawOrderCount; i++) {\r\n var time = input.readFloat();\r\n var offsetCount = input.readInt(true);\r\n var drawOrder = spine.Utils.newArray(slotCount, 0);\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var ii = 0; ii < offsetCount; ii++) {\r\n var slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n }\r\n var eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n var timeline = new spine.EventTimeline(eventCount);\r\n for (var i = 0; i < eventCount; i++) {\r\n var time = input.readFloat();\r\n var eventData = skeletonData.events[input.readInt(true)];\r\n var event_4 = new spine.Event(time, eventData);\r\n event_4.intValue = input.readInt(false);\r\n event_4.floatValue = input.readFloat();\r\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event_4.data.audioPath != null) {\r\n event_4.volume = input.readFloat();\r\n event_4.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event_4);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n }\r\n return new spine.Animation(name, timelines, duration);\r\n };\r\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n switch (input.readByte()) {\r\n case SkeletonBinary.CURVE_STEPPED:\r\n timeline.setStepped(frameIndex);\r\n break;\r\n case SkeletonBinary.CURVE_BEZIER:\r\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n break;\r\n }\r\n };\r\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n };\r\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\r\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\r\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\r\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\r\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\r\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\r\n SkeletonBinary.BONE_ROTATE = 0;\r\n SkeletonBinary.BONE_TRANSLATE = 1;\r\n SkeletonBinary.BONE_SCALE = 2;\r\n SkeletonBinary.BONE_SHEAR = 3;\r\n SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n SkeletonBinary.SLOT_COLOR = 1;\r\n SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n SkeletonBinary.PATH_POSITION = 0;\r\n SkeletonBinary.PATH_SPACING = 1;\r\n SkeletonBinary.PATH_MIX = 2;\r\n SkeletonBinary.CURVE_LINEAR = 0;\r\n SkeletonBinary.CURVE_STEPPED = 1;\r\n SkeletonBinary.CURVE_BEZIER = 2;\r\n return SkeletonBinary;\r\n }());\r\n spine.SkeletonBinary = SkeletonBinary;\r\n var BinaryInput = (function () {\r\n function BinaryInput(data, strings, index, buffer) {\r\n if (strings === void 0) { strings = new Array(); }\r\n if (index === void 0) { index = 0; }\r\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n BinaryInput.prototype.readByte = function () {\r\n return this.buffer.getInt8(this.index++);\r\n };\r\n BinaryInput.prototype.readShort = function () {\r\n var value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt32 = function () {\r\n var value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt = function (optimizePositive) {\r\n var b = this.readByte();\r\n var result = b & 0x7F;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 7;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 14;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 21;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n };\r\n BinaryInput.prototype.readStringRef = function () {\r\n var index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n };\r\n BinaryInput.prototype.readString = function () {\r\n var byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n var chars = \"\";\r\n var charCount = 0;\r\n for (var i = 0; i < byteCount;) {\r\n var b = this.readByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n };\r\n BinaryInput.prototype.readFloat = function () {\r\n var value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readBoolean = function () {\r\n return this.readByte() != 0;\r\n };\r\n return BinaryInput;\r\n }());\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n var Vertices = (function () {\r\n function Vertices(bones, vertices) {\r\n if (bones === void 0) { bones = null; }\r\n if (vertices === void 0) { vertices = null; }\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n return Vertices;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBounds = (function () {\r\n function SkeletonBounds() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return spine.Utils.newFloatArray(16);\r\n });\r\n }\r\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n var boundingBoxes = this.boundingBoxes;\r\n var polygons = this.polygons;\r\n var polygonPool = this.polygonPool;\r\n var slots = skeleton.slots;\r\n var slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (var i = 0; i < slotCount; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.BoundingBoxAttachment) {\r\n var boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n var polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n }\r\n else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n };\r\n SkeletonBounds.prototype.aabbCompute = function () {\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n var vertices = polygon;\r\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n var x = vertices[ii];\r\n var y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n };\r\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n var minX = this.minX;\r\n var minY = this.minY;\r\n var maxX = this.maxX;\r\n var maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n var m = (y2 - y1) / (x2 - x1);\r\n var y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n var x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n };\r\n SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var prevIndex = nn - 2;\r\n var inside = false;\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var vertexY = vertices[ii + 1];\r\n var prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n var vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n };\r\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var width12 = x1 - x2, height12 = y1 - y2;\r\n var det1 = x1 * y2 - y1 * x2;\r\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n var det2 = x3 * y4 - y3 * x4;\r\n var width34 = x3 - x4, height34 = y3 - y4;\r\n var det3 = width12 * height34 - height12 * width34;\r\n var x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n var y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n };\r\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n if (boundingBox == null)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n var index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n };\r\n SkeletonBounds.prototype.getWidth = function () {\r\n return this.maxX - this.minX;\r\n };\r\n SkeletonBounds.prototype.getHeight = function () {\r\n return this.maxY - this.minY;\r\n };\r\n return SkeletonBounds;\r\n }());\r\n spine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonClipping = (function () {\r\n function SkeletonClipping() {\r\n this.triangulator = new spine.Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n }\r\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n if (this.clipAttachment != null)\r\n return 0;\r\n this.clipAttachment = clip;\r\n var n = clip.worldVerticesLength;\r\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n var clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\r\n var polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n };\r\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n };\r\n SkeletonClipping.prototype.clipEnd = function () {\r\n if (this.clipAttachment == null)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n };\r\n SkeletonClipping.prototype.isClipping = function () {\r\n return this.clipAttachment != null;\r\n };\r\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n var clippedTriangles = this.clippedTriangles;\r\n var polygons = this.clippingPolygons;\r\n var polygonsCount = this.clippingPolygons.length;\r\n var vertexSize = twoColor ? 12 : 8;\r\n var index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer: for (var i = 0; i < trianglesLength; i += 3) {\r\n var vertexOffset = triangles[i] << 1;\r\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (var p = 0; p < polygonsCount; p++) {\r\n var s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n var clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n var clipOutputCount = clipOutputLength >> 1;\r\n var clipOutputItems = this.clipOutput;\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n var c0 = x - x3, c1 = y - y3;\r\n var a = (d0 * c0 + d1 * c1) * d;\r\n var b = (d4 * c0 + d2 * c1) * d;\r\n var c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (var ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + ii);\r\n clippedTrianglesItems[s + 2] = (index + ii + 1);\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n }\r\n else {\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n }\r\n else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + 1);\r\n clippedTrianglesItems[s + 2] = (index + 2);\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n };\r\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n var originalOutput = output;\r\n var clipped = false;\r\n var input = null;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n }\r\n else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n var clippingVertices = clippingArea;\r\n var clippingVerticesLast = clippingArea.length - 4;\r\n for (var i = 0;; i += 2) {\r\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n var inputVertices = input;\r\n var inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n }\r\n else if (side2) {\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n var temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (var i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n }\r\n else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n };\r\n SkeletonClipping.makeClockwise = function (polygon) {\r\n var vertices = polygon;\r\n var verticeslength = polygon.length;\r\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n var x = vertices[i], y = vertices[i + 1];\r\n var other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n };\r\n return SkeletonClipping;\r\n }());\r\n spine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonData = (function () {\r\n function SkeletonData() {\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.fps = 0;\r\n }\r\n SkeletonData.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSkin = function (skinName) {\r\n if (skinName == null)\r\n throw new Error(\"skinName cannot be null.\");\r\n var skins = this.skins;\r\n for (var i = 0, n = skins.length; i < n; i++) {\r\n var skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findEvent = function (eventDataName) {\r\n if (eventDataName == null)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n var events = this.events;\r\n for (var i = 0, n = events.length; i < n; i++) {\r\n var event_5 = events[i];\r\n if (event_5.name == eventDataName)\r\n return event_5;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findAnimation = function (animationName) {\r\n if (animationName == null)\r\n throw new Error(\"animationName cannot be null.\");\r\n var animations = this.animations;\r\n for (var i = 0, n = animations.length; i < n; i++) {\r\n var animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n if (pathConstraintName == null)\r\n throw new Error(\"pathConstraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName)\r\n return i;\r\n return -1;\r\n };\r\n return SkeletonData;\r\n }());\r\n spine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonJson = (function () {\r\n function SkeletonJson(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonJson.prototype.readSkeletonData = function (json) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n var skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (var i = 0; i < root.bones.length; i++) {\r\n var boneMap = root.bones[i];\r\n var parent_5 = null;\r\n var parentName = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent_5 = skeletonData.findBone(parentName);\r\n if (parent_5 == null)\r\n throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (var i = 0; i < root.slots.length; i++) {\r\n var slotMap = root.slots[i];\r\n var slotName = slotMap.name;\r\n var boneName = slotMap.bone;\r\n var boneData = skeletonData.findBone(boneName);\r\n if (boneData == null)\r\n throw new Error(\"Slot bone not found: \" + boneName);\r\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n var color = this.getValue(slotMap, \"color\", null);\r\n if (color != null)\r\n data.color.setFromString(color);\r\n var dark = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new spine.Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (var i = 0; i < root.ik.length; i++) {\r\n var constraintMap = root.ik[i];\r\n var data = new spine.IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"IK target bone not found: \" + targetName);\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (var i = 0; i < root.transform.length; i++) {\r\n var constraintMap = root.transform[i];\r\n var data = new spine.TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (var i = 0; i < root.path.length; i++) {\r\n var constraintMap = root.path[i];\r\n var data = new spine.PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Path target slot not found: \" + targetName);\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (var i = 0; i < root.skins.length; i++) {\r\n var skinMap = root.skins[i];\r\n var skin = new spine.Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null)\r\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (var slotName in skinMap.attachments) {\r\n var slot = skeletonData.findSlot(slotName);\r\n if (slot == null)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n var slotMap = skinMap.attachments[slotName];\r\n for (var entryName in slotMap) {\r\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_6 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_6);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (var eventName in root.events) {\r\n var eventMap = root.events[eventName];\r\n var data = new spine.EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (var animationName in root.animations) {\r\n var animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n };\r\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n var scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n var type = this.getValue(map, \"type\", \"region\");\r\n switch (type) {\r\n case \"region\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n region.color.setFromString(color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n mesh.color.setFromString(color);\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n var parent_7 = this.getValue(map, \"parent\", null);\r\n if (parent_7 != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n var uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n var end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n var slot = skeletonData.findSlot(end);\r\n if (slot == null)\r\n throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n var scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n var vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n var scaledVertices = spine.Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (var i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n var weights = new Array();\r\n var bones = new Array();\r\n for (var i = 0, n = vertices.length; i < n;) {\r\n var boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = spine.Utils.toFloatArray(weights);\r\n };\r\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n var scale = this.scale;\r\n var timelines = new Array();\r\n var duration = 0;\r\n if (map.slots) {\r\n for (var slotName in map.slots) {\r\n var slotMap = map.slots[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n else if (timelineName == \"color\") {\r\n var timeline = new spine.ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var color = new spine.Color();\r\n color.setFromString(valueMap.color);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n }\r\n else if (timelineName == \"twoColor\") {\r\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var light = new spine.Color();\r\n var dark = new spine.Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (var boneName in map.bones) {\r\n var boneMap = map.bones[boneName];\r\n var boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n for (var timelineName in boneMap) {\r\n var timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n var timeline = new spine.RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n var timeline = null;\r\n var timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new spine.ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n }\r\n else if (timelineName === \"shear\")\r\n timeline = new spine.ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new spine.TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (var constraintName in map.ik) {\r\n var constraintMap = map.ik[constraintName];\r\n var constraint = skeletonData.findIkConstraint(constraintName);\r\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.transform) {\r\n for (var constraintName in map.transform) {\r\n var constraintMap = map.transform[constraintName];\r\n var constraint = skeletonData.findTransformConstraint(constraintName);\r\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.path) {\r\n for (var constraintName in map.path) {\r\n var constraintMap = map.path[constraintName];\r\n var index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var timelineName in constraintMap) {\r\n var timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n var timeline = null;\r\n var timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"mix\") {\r\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n if (map.deform) {\r\n for (var deformName in map.deform) {\r\n var deformMap = map.deform[deformName];\r\n var skin = skeletonData.findSkin(deformName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + deformName);\r\n for (var slotName in deformMap) {\r\n var slotMap = deformMap[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n var attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null)\r\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var timeline = new spine.DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n var frameIndex = 0;\r\n for (var j = 0; j < timelineMap.length; j++) {\r\n var valueMap = timelineMap[j];\r\n var deform = void 0;\r\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = this.getValue(valueMap, \"offset\", 0);\r\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (var i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n var drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null)\r\n drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n var slotCount = skeletonData.slots.length;\r\n var frameIndex = 0;\r\n for (var j = 0; j < drawOrderNode.length; j++) {\r\n var drawOrderMap = drawOrderNode[j];\r\n var drawOrder = null;\r\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = spine.Utils.newArray(slotCount, -1);\r\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var i = 0; i < offsets.length; i++) {\r\n var offsetMap = offsets[i];\r\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1)\r\n drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (map.events) {\r\n var timeline = new spine.EventTimeline(map.events.length);\r\n var frameIndex = 0;\r\n for (var i = 0; i < map.events.length; i++) {\r\n var eventMap = map.events[i];\r\n var eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event_6.data.audioPath != null) {\r\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\r\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event_6);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n };\r\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n if (!map.hasOwnProperty(\"curve\"))\r\n return;\r\n if (map.curve == \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n var curve = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n };\r\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n };\r\n SkeletonJson.blendModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.BlendMode.Normal;\r\n if (str == \"additive\")\r\n return spine.BlendMode.Additive;\r\n if (str == \"multiply\")\r\n return spine.BlendMode.Multiply;\r\n if (str == \"screen\")\r\n return spine.BlendMode.Screen;\r\n throw new Error(\"Unknown blend mode: \".concat(str));\r\n };\r\n SkeletonJson.positionModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\")\r\n return spine.PositionMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.PositionMode.Percent;\r\n throw new Error(\"Unknown position mode: \".concat(str));\r\n };\r\n SkeletonJson.spacingModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"length\")\r\n return spine.SpacingMode.Length;\r\n if (str == \"fixed\")\r\n return spine.SpacingMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.SpacingMode.Percent;\r\n throw new Error(\"Unknown position mode: \".concat(str));\r\n };\r\n SkeletonJson.rotateModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\")\r\n return spine.RotateMode.Tangent;\r\n if (str == \"chain\")\r\n return spine.RotateMode.Chain;\r\n if (str == \"chainscale\")\r\n return spine.RotateMode.ChainScale;\r\n throw new Error(\"Unknown rotate mode: \".concat(str));\r\n };\r\n SkeletonJson.transformModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.TransformMode.Normal;\r\n if (str == \"onlytranslation\")\r\n return spine.TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\")\r\n return spine.TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\")\r\n return spine.TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\")\r\n return spine.TransformMode.NoScaleOrReflection;\r\n throw new Error(\"Unknown transform mode: \".concat(str));\r\n };\r\n return SkeletonJson;\r\n }());\r\n spine.SkeletonJson = SkeletonJson;\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkinEntry = (function () {\r\n function SkinEntry(slotIndex, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n return SkinEntry;\r\n }());\r\n spine.SkinEntry = SkinEntry;\r\n var Skin = (function () {\r\n function Skin(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n if (attachment == null)\r\n throw new Error(\"attachment cannot be null.\");\r\n var attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n };\r\n Skin.prototype.addSkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n };\r\n Skin.prototype.copySkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null)\r\n continue;\r\n if (attachment.attachment instanceof spine.MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n };\r\n Skin.prototype.getAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n };\r\n Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n dictionary[name] = null;\r\n };\r\n Skin.prototype.getAttachments = function () {\r\n var entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n var slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (var name_4 in slotAttachments) {\r\n var attachment = slotAttachments[name_4];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name_4, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n };\r\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n var slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (var name_5 in slotAttachments) {\r\n var attachment = slotAttachments[name_5];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\r\n }\r\n }\r\n };\r\n Skin.prototype.clear = function () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n };\r\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n var slotIndex = 0;\r\n for (var i = 0; i < skeleton.slots.length; i++) {\r\n var slot = skeleton.slots[i];\r\n var slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n var dictionary = oldSkin.attachments[slotIndex];\r\n for (var key in dictionary) {\r\n var skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n var attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n };\r\n return Skin;\r\n }());\r\n spine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Slot = (function () {\r\n function Slot(data, bone) {\r\n this.deform = new Array();\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (bone == null)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new spine.Color();\r\n this.darkColor = data.darkColor == null ? null : new spine.Color();\r\n this.setToSetupPose();\r\n }\r\n Slot.prototype.getSkeleton = function () {\r\n return this.bone.skeleton;\r\n };\r\n Slot.prototype.getAttachment = function () {\r\n return this.attachment;\r\n };\r\n Slot.prototype.setAttachment = function (attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n };\r\n Slot.prototype.setAttachmentTime = function (time) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n };\r\n Slot.prototype.getAttachmentTime = function () {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n };\r\n Slot.prototype.setToSetupPose = function () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n };\r\n return Slot;\r\n }());\r\n spine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SlotData = (function () {\r\n function SlotData(index, name, boneData) {\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (boneData == null)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n return SlotData;\r\n }());\r\n spine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Texture = (function () {\r\n function Texture(image) {\r\n this._image = image;\r\n }\r\n Texture.prototype.getImage = function () {\r\n return this._image;\r\n };\r\n Texture.filterFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(\"Unknown texture filter \".concat(text));\r\n }\r\n };\r\n Texture.wrapFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(\"Unknown texture wrap \".concat(text));\r\n }\r\n };\r\n return Texture;\r\n }());\r\n spine.Texture = Texture;\r\n var TextureFilter;\r\n (function (TextureFilter) {\r\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n var TextureWrap;\r\n (function (TextureWrap) {\r\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n var TextureRegion = (function () {\r\n function TextureRegion() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.rotate = false;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n return TextureRegion;\r\n }());\r\n spine.TextureRegion = TextureRegion;\r\n var FakeTexture = (function (_super) {\r\n __extends(FakeTexture, _super);\r\n function FakeTexture() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n FakeTexture.prototype.dispose = function () { };\r\n return FakeTexture;\r\n }(Texture));\r\n spine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TextureAtlas = (function () {\r\n function TextureAtlas(atlasText, textureLoader) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n this.load(atlasText, textureLoader);\r\n }\r\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n var reader = new TextureAtlasReader(atlasText);\r\n var tuple = new Array(4);\r\n var page = null;\r\n while (true) {\r\n var line = reader.readLine();\r\n if (line == null)\r\n break;\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n if (reader.readTuple(tuple) == 2) {\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n reader.readTuple(tuple);\r\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n var direction = reader.readValue();\r\n page.uWrap = spine.TextureWrap.ClampToEdge;\r\n page.vWrap = spine.TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n page.texture = textureLoader(line);\r\n page.texture.setFilters(page.minFilter, page.magFilter);\r\n page.texture.setWraps(page.uWrap, page.vWrap);\r\n page.width = page.texture.getImage().width;\r\n page.height = page.texture.getImage().height;\r\n this.pages.push(page);\r\n }\r\n else {\r\n var region = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n var rotateValue = reader.readValue();\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n region.degrees = 90;\r\n }\r\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n region.degrees = 0;\r\n }\r\n else {\r\n region.degrees = parseFloat(rotateValue);\r\n }\r\n region.rotate = region.degrees == 90;\r\n reader.readTuple(tuple);\r\n var x = parseInt(tuple[0]);\r\n var y = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n var width = parseInt(tuple[0]);\r\n var height = parseInt(tuple[1]);\r\n region.u = x / page.width;\r\n region.v = y / page.height;\r\n if (region.rotate) {\r\n region.u2 = (x + height) / page.width;\r\n region.v2 = (y + width) / page.height;\r\n }\r\n else {\r\n region.u2 = (x + width) / page.width;\r\n region.v2 = (y + height) / page.height;\r\n }\r\n region.x = x;\r\n region.y = y;\r\n region.width = Math.abs(width);\r\n region.height = Math.abs(height);\r\n if (reader.readTuple(tuple) == 4) {\r\n if (reader.readTuple(tuple) == 4) {\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n region.originalWidth = parseInt(tuple[0]);\r\n region.originalHeight = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n region.offsetX = parseInt(tuple[0]);\r\n region.offsetY = parseInt(tuple[1]);\r\n region.index = parseInt(reader.readValue());\r\n region.texture = page.texture;\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n TextureAtlas.prototype.findRegion = function (name) {\r\n for (var i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n };\r\n TextureAtlas.prototype.dispose = function () {\r\n for (var i = 0; i < this.pages.length; i++) {\r\n this.pages[i].texture.dispose();\r\n }\r\n };\r\n return TextureAtlas;\r\n }());\r\n spine.TextureAtlas = TextureAtlas;\r\n var TextureAtlasReader = (function () {\r\n function TextureAtlasReader(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n TextureAtlasReader.prototype.readLine = function () {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n };\r\n TextureAtlasReader.prototype.readValue = function () {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n };\r\n TextureAtlasReader.prototype.readTuple = function (tuple) {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n var i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n var comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1)\r\n break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n };\r\n return TextureAtlasReader;\r\n }());\r\n var TextureAtlasPage = (function () {\r\n function TextureAtlasPage() {\r\n }\r\n return TextureAtlasPage;\r\n }());\r\n spine.TextureAtlasPage = TextureAtlasPage;\r\n var TextureAtlasRegion = (function (_super) {\r\n __extends(TextureAtlasRegion, _super);\r\n function TextureAtlasRegion() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return TextureAtlasRegion;\r\n }(spine.TextureRegion));\r\n spine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraint = (function () {\r\n function TransformConstraint(data, skeleton) {\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.scaleMix = 0;\r\n this.shearMix = 0;\r\n this.temp = new spine.Vector2();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n TransformConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n TransformConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n TransformConstraint.prototype.update = function () {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n }\r\n else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * translateMix;\r\n bone.worldY += (temp.y - bone.worldY) * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n var ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var b = bone.b, d = bone.d;\r\n var by = Math.atan2(d, b);\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * translateMix;\r\n bone.worldY += temp.y * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n var b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n var r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0) {\r\n var r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0)\r\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001)\r\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0)\r\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n return TransformConstraint;\r\n }());\r\n spine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraintData = (function (_super) {\r\n __extends(TransformConstraintData, _super);\r\n function TransformConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.rotateMix = 0;\r\n _this.translateMix = 0;\r\n _this.scaleMix = 0;\r\n _this.shearMix = 0;\r\n _this.offsetRotation = 0;\r\n _this.offsetX = 0;\r\n _this.offsetY = 0;\r\n _this.offsetScaleX = 0;\r\n _this.offsetScaleY = 0;\r\n _this.offsetShearY = 0;\r\n _this.relative = false;\r\n _this.local = false;\r\n return _this;\r\n }\r\n return TransformConstraintData;\r\n }(spine.ConstraintData));\r\n spine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Triangulator = (function () {\r\n function Triangulator() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n }\r\n Triangulator.prototype.triangulate = function (verticesArray) {\r\n var vertices = verticesArray;\r\n var vertexCount = verticesArray.length >> 1;\r\n var indices = this.indicesArray;\r\n indices.length = 0;\r\n for (var i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n var isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (var i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n var triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n var previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer: if (!isConcave[i]) {\r\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n var v = indices[ii] << 1;\r\n var vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n var previousIndex = (vertexCount + i - 1) % vertexCount;\r\n var nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n };\r\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\r\n var vertices = verticesArray;\r\n var convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n var convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n var polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n var polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n var fanBaseIndex = -1, lastWinding = 0;\r\n for (var i = 0, n = triangles.length; i < n; i += 3) {\r\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n var merged = false;\r\n if (fanBaseIndex == t1) {\r\n var o = polygon.length - 4;\r\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n var firstIndex = polygonIndices[0];\r\n var lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n var o = polygon.length - 4;\r\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n var firstX = polygon[0], firstY = polygon[1];\r\n var secondX = polygon[2], secondY = polygon[3];\r\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (var ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n var otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n var otherFirstIndex = otherIndices[0];\r\n var otherSecondIndex = otherIndices[1];\r\n var otherLastIndex = otherIndices[2];\r\n var otherPoly = convexPolygons[ii];\r\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n };\r\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n var current = indices[index] << 1;\r\n var next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n };\r\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n };\r\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n var px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n };\r\n return Triangulator;\r\n }());\r\n spine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IntSet = (function () {\r\n function IntSet() {\r\n this.array = new Array();\r\n }\r\n IntSet.prototype.add = function (value) {\r\n var contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n };\r\n IntSet.prototype.contains = function (value) {\r\n return this.array[value | 0] != undefined;\r\n };\r\n IntSet.prototype.remove = function (value) {\r\n this.array[value | 0] = undefined;\r\n };\r\n IntSet.prototype.clear = function () {\r\n this.array.length = 0;\r\n };\r\n return IntSet;\r\n }());\r\n spine.IntSet = IntSet;\r\n var Color = (function () {\r\n function Color(r, g, b, a) {\r\n if (r === void 0) { r = 0; }\r\n if (g === void 0) { g = 0; }\r\n if (b === void 0) { b = 0; }\r\n if (a === void 0) { a = 0; }\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n Color.prototype.set = function (r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.setFromColor = function (c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n };\r\n Color.prototype.setFromString = function (hex) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n };\r\n Color.prototype.add = function (r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.clamp = function () {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n };\r\n Color.rgba8888ToColor = function (color, value) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.rgb888ToColor = function (color, value) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.WHITE = new Color(1, 1, 1, 1);\r\n Color.RED = new Color(1, 0, 0, 1);\r\n Color.GREEN = new Color(0, 1, 0, 1);\r\n Color.BLUE = new Color(0, 0, 1, 1);\r\n Color.MAGENTA = new Color(1, 0, 1, 1);\r\n return Color;\r\n }());\r\n spine.Color = Color;\r\n var MathUtils = (function () {\r\n function MathUtils() {\r\n }\r\n MathUtils.clamp = function (value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n MathUtils.cosDeg = function (degrees) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.sinDeg = function (degrees) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.signum = function (value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n };\r\n MathUtils.toInt = function (x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n };\r\n MathUtils.cbrt = function (x) {\r\n var y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n };\r\n MathUtils.randomTriangular = function (min, max) {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n };\r\n MathUtils.randomTriangularWith = function (min, max, mode) {\r\n var u = Math.random();\r\n var d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n };\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n MathUtils.degRad = MathUtils.degreesToRadians;\r\n return MathUtils;\r\n }());\r\n spine.MathUtils = MathUtils;\r\n var Interpolation = (function () {\r\n function Interpolation() {\r\n }\r\n Interpolation.prototype.apply = function (start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n };\r\n return Interpolation;\r\n }());\r\n spine.Interpolation = Interpolation;\r\n var Pow = (function (_super) {\r\n __extends(Pow, _super);\r\n function Pow(power) {\r\n var _this = _super.call(this) || this;\r\n _this.power = 2;\r\n _this.power = power;\r\n return _this;\r\n }\r\n Pow.prototype.applyInternal = function (a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n };\r\n return Pow;\r\n }(Interpolation));\r\n spine.Pow = Pow;\r\n var PowOut = (function (_super) {\r\n __extends(PowOut, _super);\r\n function PowOut(power) {\r\n return _super.call(this, power) || this;\r\n }\r\n PowOut.prototype.applyInternal = function (a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n };\r\n return PowOut;\r\n }(Pow));\r\n spine.PowOut = PowOut;\r\n var Utils = (function () {\r\n function Utils() {\r\n }\r\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n };\r\n Utils.setArraySize = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n var oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (var i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n };\r\n Utils.ensureArrayCapacity = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n if (array.length >= size)\r\n return array;\r\n return Utils.setArraySize(array, size, value);\r\n };\r\n Utils.newArray = function (size, defaultValue) {\r\n var array = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n };\r\n Utils.newFloatArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.newShortArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.toFloatArray = function (array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n };\r\n Utils.toSinglePrecision = function (value) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n };\r\n Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n };\r\n Utils.contains = function (array, element, identity) {\r\n if (identity === void 0) { identity = true; }\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] == element)\r\n return true;\r\n }\r\n return false;\r\n };\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n return Utils;\r\n }());\r\n spine.Utils = Utils;\r\n var DebugUtils = (function () {\r\n function DebugUtils() {\r\n }\r\n DebugUtils.logBones = function (skeleton) {\r\n for (var i = 0; i < skeleton.bones.length; i++) {\r\n var bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n };\r\n return DebugUtils;\r\n }());\r\n spine.DebugUtils = DebugUtils;\r\n var Pool = (function () {\r\n function Pool(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n Pool.prototype.obtain = function () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n };\r\n Pool.prototype.free = function (item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n };\r\n Pool.prototype.freeAll = function (items) {\r\n for (var i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n };\r\n Pool.prototype.clear = function () {\r\n this.items.length = 0;\r\n };\r\n return Pool;\r\n }());\r\n spine.Pool = Pool;\r\n var Vector2 = (function () {\r\n function Vector2(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n }\r\n Vector2.prototype.set = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2.prototype.length = function () {\r\n var x = this.x;\r\n var y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n };\r\n Vector2.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n };\r\n return Vector2;\r\n }());\r\n spine.Vector2 = Vector2;\r\n var TimeKeeper = (function () {\r\n function TimeKeeper() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1000;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n TimeKeeper.prototype.update = function () {\r\n var now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n };\r\n return TimeKeeper;\r\n }());\r\n spine.TimeKeeper = TimeKeeper;\r\n var WindowedMean = (function () {\r\n function WindowedMean(windowSize) {\r\n if (windowSize === void 0) { windowSize = 32; }\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n WindowedMean.prototype.hasEnoughData = function () {\r\n return this.addedValues >= this.values.length;\r\n };\r\n WindowedMean.prototype.addValue = function (value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n };\r\n WindowedMean.prototype.getMean = function () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n var mean = 0;\r\n for (var i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n return WindowedMean;\r\n }());\r\n spine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n if (!Math.fround) {\r\n Math.fround = (function (array) {\r\n return function (x) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Attachment = (function () {\r\n function Attachment(name) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n return Attachment;\r\n }());\r\n spine.Attachment = Attachment;\r\n var VertexAttachment = (function (_super) {\r\n __extends(VertexAttachment, _super);\r\n function VertexAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n _this.worldVerticesLength = 0;\r\n _this.deformAttachment = _this;\r\n return _this;\r\n }\r\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n var skeleton = slot.bone.skeleton;\r\n var deformArray = slot.deform;\r\n var vertices = this.vertices;\r\n var bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n var bone = slot.bone;\r\n var x = bone.worldX;\r\n var y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n var v = 0, skip = 0;\r\n for (var i = 0; i < start; i += 2) {\r\n var n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n var skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n else {\r\n var deform = deformArray;\r\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n };\r\n VertexAttachment.prototype.copyTo = function (attachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n }\r\n else\r\n attachment.bones = null;\r\n if (this.vertices != null) {\r\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\r\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n else\r\n attachment.vertices = null;\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n };\r\n VertexAttachment.nextID = 0;\r\n return VertexAttachment;\r\n }(Attachment));\r\n spine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AttachmentType;\r\n (function (AttachmentType) {\r\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoundingBoxAttachment = (function (_super) {\r\n __extends(BoundingBoxAttachment, _super);\r\n function BoundingBoxAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n BoundingBoxAttachment.prototype.copy = function () {\r\n var copy = new BoundingBoxAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return BoundingBoxAttachment;\r\n }(spine.VertexAttachment));\r\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ClippingAttachment = (function (_super) {\r\n __extends(ClippingAttachment, _super);\r\n function ClippingAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n return _this;\r\n }\r\n ClippingAttachment.prototype.copy = function () {\r\n var copy = new ClippingAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return ClippingAttachment;\r\n }(spine.VertexAttachment));\r\n spine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var MeshAttachment = (function (_super) {\r\n __extends(MeshAttachment, _super);\r\n function MeshAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.tempColor = new spine.Color(0, 0, 0, 0);\r\n return _this;\r\n }\r\n MeshAttachment.prototype.updateUVs = function () {\r\n var regionUVs = this.regionUVs;\r\n if (this.uvs == null || this.uvs.length != regionUVs.length)\r\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n var uvs = this.uvs;\r\n var n = this.uvs.length;\r\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof spine.TextureAtlasRegion) {\r\n var region = this.region;\r\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n }\r\n else if (this.region == null) {\r\n u = v = 0;\r\n width = height = 1;\r\n }\r\n else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n };\r\n MeshAttachment.prototype.getParentMesh = function () {\r\n return this.parentMesh;\r\n };\r\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n };\r\n MeshAttachment.prototype.copy = function () {\r\n if (this.parentMesh != null)\r\n return this.newLinkedMesh();\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n };\r\n MeshAttachment.prototype.newLinkedMesh = function () {\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n copy.updateUVs();\r\n return copy;\r\n };\r\n return MeshAttachment;\r\n }(spine.VertexAttachment));\r\n spine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathAttachment = (function (_super) {\r\n __extends(PathAttachment, _super);\r\n function PathAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.closed = false;\r\n _this.constantSpeed = false;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n PathAttachment.prototype.copy = function () {\r\n var copy = new PathAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PathAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PointAttachment = (function (_super) {\r\n __extends(PointAttachment, _super);\r\n function PointAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n return _this;\r\n }\r\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n };\r\n PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n var x = cos * bone.a + sin * bone.b;\r\n var y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n };\r\n PointAttachment.prototype.copy = function () {\r\n var copy = new PointAttachment(this.name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PointAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var RegionAttachment = (function (_super) {\r\n __extends(RegionAttachment, _super);\r\n function RegionAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.scaleX = 1;\r\n _this.scaleY = 1;\r\n _this.rotation = 0;\r\n _this.width = 0;\r\n _this.height = 0;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.offset = spine.Utils.newFloatArray(8);\r\n _this.uvs = spine.Utils.newFloatArray(8);\r\n _this.tempColor = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n RegionAttachment.prototype.updateOffset = function () {\r\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n var localX2 = localX + this.region.width * regionScaleX;\r\n var localY2 = localY + this.region.height * regionScaleY;\r\n var radians = this.rotation * Math.PI / 180;\r\n var cos = Math.cos(radians);\r\n var sin = Math.sin(radians);\r\n var localXCos = localX * cos + this.x;\r\n var localXSin = localX * sin;\r\n var localYCos = localY * cos + this.y;\r\n var localYSin = localY * sin;\r\n var localX2Cos = localX2 * cos + this.x;\r\n var localX2Sin = localX2 * sin;\r\n var localY2Cos = localY2 * cos + this.y;\r\n var localY2Sin = localY2 * sin;\r\n var offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n };\r\n RegionAttachment.prototype.setRegion = function (region) {\r\n this.region = region;\r\n var uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n }\r\n else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n };\r\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n var vertexOffset = this.offset;\r\n var x = bone.worldX, y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n };\r\n RegionAttachment.prototype.copy = function () {\r\n var copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n RegionAttachment.OX1 = 0;\r\n RegionAttachment.OY1 = 1;\r\n RegionAttachment.OX2 = 2;\r\n RegionAttachment.OY2 = 3;\r\n RegionAttachment.OX3 = 4;\r\n RegionAttachment.OY3 = 5;\r\n RegionAttachment.OX4 = 6;\r\n RegionAttachment.OY4 = 7;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n return RegionAttachment;\r\n }(spine.Attachment));\r\n spine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var JitterEffect = (function () {\r\n function JitterEffect(jitterX, jitterY) {\r\n this.jitterX = 0;\r\n this.jitterY = 0;\r\n this.jitterX = jitterX;\r\n this.jitterY = jitterY;\r\n }\r\n JitterEffect.prototype.begin = function (skeleton) {\r\n };\r\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n };\r\n JitterEffect.prototype.end = function () {\r\n };\r\n return JitterEffect;\r\n }());\r\n spine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SwirlEffect = (function () {\r\n function SwirlEffect(radius) {\r\n this.centerX = 0;\r\n this.centerY = 0;\r\n this.radius = 0;\r\n this.angle = 0;\r\n this.worldX = 0;\r\n this.worldY = 0;\r\n this.radius = radius;\r\n }\r\n SwirlEffect.prototype.begin = function (skeleton) {\r\n this.worldX = skeleton.x + this.centerX;\r\n this.worldY = skeleton.y + this.centerY;\r\n };\r\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n var x = position.x - this.worldX;\r\n var y = position.y - this.worldY;\r\n var dist = Math.sqrt(x * x + y * y);\r\n if (dist < this.radius) {\r\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n var cos = Math.cos(theta);\r\n var sin = Math.sin(theta);\r\n position.x = cos * x - sin * y + this.worldX;\r\n position.y = sin * x + cos * y + this.worldY;\r\n }\r\n };\r\n SwirlEffect.prototype.end = function () {\r\n };\r\n SwirlEffect.interpolation = new spine.PowOut(2);\r\n return SwirlEffect;\r\n }());\r\n spine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n canvas.AssetManager = AssetManager;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var CanvasTexture = (function (_super) {\r\n __extends(CanvasTexture, _super);\r\n function CanvasTexture(image) {\r\n return _super.call(this, image) || this;\r\n }\r\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n CanvasTexture.prototype.dispose = function () { };\r\n return CanvasTexture;\r\n }(spine.Texture));\r\n canvas.CanvasTexture = CanvasTexture;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context) {\r\n this.triangleRendering = false;\r\n this.debugRendering = false;\r\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\r\n this.tempColor = new spine.Color();\r\n this.ctx = context;\r\n }\r\n SkeletonRenderer.prototype.draw = function (skeleton) {\r\n if (this.triangleRendering)\r\n this.drawTriangles(skeleton);\r\n else\r\n this.drawImages(skeleton);\r\n };\r\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\r\n var ctx = this.ctx;\r\n var drawOrder = skeleton.drawOrder;\r\n if (this.debugRendering)\r\n ctx.strokeStyle = \"green\";\r\n ctx.save();\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n var regionAttachment = null;\r\n var region = null;\r\n var image = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n regionAttachment = attachment;\r\n region = regionAttachment.region;\r\n image = region.texture.getImage();\r\n }\r\n else\r\n continue;\r\n var skeleton_1 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_1.color;\r\n var slotColor = slot.color;\r\n var regionColor = regionAttachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\r\n var att = attachment;\r\n var bone = slot.bone;\r\n var w = region.width;\r\n var h = region.height;\r\n ctx.save();\r\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n ctx.translate(attachment.offset[0], attachment.offset[1]);\r\n ctx.rotate(attachment.rotation * Math.PI / 180);\r\n var atlasScale = att.width / w;\r\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n ctx.translate(w / 2, h / 2);\r\n if (attachment.region.rotate) {\r\n var t = w;\r\n w = h;\r\n h = t;\r\n ctx.rotate(-Math.PI / 2);\r\n }\r\n ctx.scale(1, -1);\r\n ctx.translate(-w / 2, -h / 2);\r\n ctx.globalAlpha = color.a;\r\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n if (this.debugRendering)\r\n ctx.strokeRect(0, 0, w, h);\r\n ctx.restore();\r\n }\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\r\n var blendMode = null;\r\n var vertices = this.vertices;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n var region = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n region = regionAttachment.region;\r\n texture = region.texture.getImage();\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n vertices = this.computeMeshVertices(slot, mesh, false);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture.getImage();\r\n }\r\n else\r\n continue;\r\n if (texture != null) {\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n }\r\n var skeleton_2 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_2.color;\r\n var slotColor = slot.color;\r\n var attachmentColor = attachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\r\n var ctx = this.ctx;\r\n ctx.globalAlpha = color.a;\r\n for (var j = 0; j < triangles.length; j += 3) {\r\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n if (this.debugRendering) {\r\n ctx.strokeStyle = \"green\";\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x0, y0);\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n }\r\n this.ctx.globalAlpha = 1;\r\n };\r\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n var ctx = this.ctx;\r\n u0 *= img.width;\r\n v0 *= img.height;\r\n u1 *= img.width;\r\n v1 *= img.height;\r\n u2 *= img.width;\r\n v2 *= img.height;\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.closePath();\r\n x1 -= x0;\r\n y1 -= y0;\r\n x2 -= x0;\r\n y2 -= y0;\r\n u1 -= u0;\r\n v1 -= v0;\r\n u2 -= u0;\r\n v2 -= v0;\r\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n ctx.save();\r\n ctx.transform(a, b, c, d, e, f);\r\n ctx.clip();\r\n ctx.drawImage(img, 0, 0);\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = region.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var vertices = this.vertices;\r\n var uvs = region.uvs;\r\n vertices[spine.RegionAttachment.C1R] = color.r;\r\n vertices[spine.RegionAttachment.C1G] = color.g;\r\n vertices[spine.RegionAttachment.C1B] = color.b;\r\n vertices[spine.RegionAttachment.C1A] = color.a;\r\n vertices[spine.RegionAttachment.U1] = uvs[0];\r\n vertices[spine.RegionAttachment.V1] = uvs[1];\r\n vertices[spine.RegionAttachment.C2R] = color.r;\r\n vertices[spine.RegionAttachment.C2G] = color.g;\r\n vertices[spine.RegionAttachment.C2B] = color.b;\r\n vertices[spine.RegionAttachment.C2A] = color.a;\r\n vertices[spine.RegionAttachment.U2] = uvs[2];\r\n vertices[spine.RegionAttachment.V2] = uvs[3];\r\n vertices[spine.RegionAttachment.C3R] = color.r;\r\n vertices[spine.RegionAttachment.C3G] = color.g;\r\n vertices[spine.RegionAttachment.C3B] = color.b;\r\n vertices[spine.RegionAttachment.C3A] = color.a;\r\n vertices[spine.RegionAttachment.U3] = uvs[4];\r\n vertices[spine.RegionAttachment.V3] = uvs[5];\r\n vertices[spine.RegionAttachment.C4R] = color.r;\r\n vertices[spine.RegionAttachment.C4G] = color.g;\r\n vertices[spine.RegionAttachment.C4B] = color.b;\r\n vertices[spine.RegionAttachment.C4A] = color.a;\r\n vertices[spine.RegionAttachment.U4] = uvs[6];\r\n vertices[spine.RegionAttachment.V4] = uvs[7];\r\n return vertices;\r\n };\r\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = mesh.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n var numVertices = mesh.worldVerticesLength / 2;\r\n if (this.vertices.length < mesh.worldVerticesLength) {\r\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\r\n }\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var uvs = mesh.uvs;\r\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\r\n vertices[v++] = color.r;\r\n vertices[v++] = color.g;\r\n vertices[v++] = color.b;\r\n vertices[v++] = color.a;\r\n vertices[v++] = uvs[u++];\r\n vertices[v++] = uvs[u++];\r\n v += 2;\r\n }\r\n return vertices;\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n return SkeletonRenderer;\r\n }());\r\n canvas.SkeletonRenderer = SkeletonRenderer;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(context, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) {\r\n return new spine.webgl.GLTexture(context, image);\r\n }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n webgl.AssetManager = AssetManager;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var OrthoCamera = (function () {\r\n function OrthoCamera(viewportWidth, viewportHeight) {\r\n this.position = new webgl.Vector3(0, 0, 0);\r\n this.direction = new webgl.Vector3(0, 0, -1);\r\n this.up = new webgl.Vector3(0, 1, 0);\r\n this.near = 0;\r\n this.far = 100;\r\n this.zoom = 1;\r\n this.viewportWidth = 0;\r\n this.viewportHeight = 0;\r\n this.projectionView = new webgl.Matrix4();\r\n this.inverseProjectionView = new webgl.Matrix4();\r\n this.projection = new webgl.Matrix4();\r\n this.view = new webgl.Matrix4();\r\n this.tmp = new webgl.Vector3();\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n this.update();\r\n }\r\n OrthoCamera.prototype.update = function () {\r\n var projection = this.projection;\r\n var view = this.view;\r\n var projectionView = this.projectionView;\r\n var inverseProjectionView = this.inverseProjectionView;\r\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\r\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\r\n view.lookAt(this.position, this.direction, this.up);\r\n projectionView.set(projection.values);\r\n projectionView.multiply(view);\r\n inverseProjectionView.set(projectionView.values).invert();\r\n };\r\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\r\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\r\n var tmp = this.tmp;\r\n tmp.x = (2 * x) / screenWidth - 1;\r\n tmp.y = (2 * y) / screenHeight - 1;\r\n tmp.z = (2 * screenCoords.z) - 1;\r\n tmp.project(this.inverseProjectionView);\r\n screenCoords.set(tmp.x, tmp.y, tmp.z);\r\n return screenCoords;\r\n };\r\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n };\r\n return OrthoCamera;\r\n }());\r\n webgl.OrthoCamera = OrthoCamera;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var GLTexture = (function (_super) {\r\n __extends(GLTexture, _super);\r\n function GLTexture(context, image, useMipMaps) {\r\n if (useMipMaps === void 0) { useMipMaps = false; }\r\n var _this = _super.call(this, image) || this;\r\n _this.texture = null;\r\n _this.boundUnit = 0;\r\n _this.useMipMaps = false;\r\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n _this.useMipMaps = useMipMaps;\r\n _this.restore();\r\n _this.context.addRestorable(_this);\r\n return _this;\r\n }\r\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\r\n };\r\n GLTexture.validateMagFilter = function (magFilter) {\r\n switch (magFilter) {\r\n case spine.TextureFilter.MipMap:\r\n case spine.TextureFilter.MipMapLinearLinear:\r\n case spine.TextureFilter.MipMapLinearNearest:\r\n case spine.TextureFilter.MipMapNearestLinear:\r\n case spine.TextureFilter.MipMapNearestNearest:\r\n return spine.TextureFilter.Linear;\r\n default:\r\n return magFilter;\r\n }\r\n };\r\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\r\n };\r\n GLTexture.prototype.update = function (useMipMaps) {\r\n var gl = this.context.gl;\r\n if (!this.texture) {\r\n this.texture = this.context.gl.createTexture();\r\n }\r\n this.bind();\r\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n };\r\n GLTexture.prototype.restore = function () {\r\n this.texture = null;\r\n this.update(this.useMipMaps);\r\n };\r\n GLTexture.prototype.bind = function (unit) {\r\n if (unit === void 0) { unit = 0; }\r\n var gl = this.context.gl;\r\n this.boundUnit = unit;\r\n gl.activeTexture(gl.TEXTURE0 + unit);\r\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\r\n };\r\n GLTexture.prototype.unbind = function () {\r\n var gl = this.context.gl;\r\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\r\n gl.bindTexture(gl.TEXTURE_2D, null);\r\n };\r\n GLTexture.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteTexture(this.texture);\r\n };\r\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\r\n return GLTexture;\r\n }(spine.Texture));\r\n webgl.GLTexture = GLTexture;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n webgl.M00 = 0;\r\n webgl.M01 = 4;\r\n webgl.M02 = 8;\r\n webgl.M03 = 12;\r\n webgl.M10 = 1;\r\n webgl.M11 = 5;\r\n webgl.M12 = 9;\r\n webgl.M13 = 13;\r\n webgl.M20 = 2;\r\n webgl.M21 = 6;\r\n webgl.M22 = 10;\r\n webgl.M23 = 14;\r\n webgl.M30 = 3;\r\n webgl.M31 = 7;\r\n webgl.M32 = 11;\r\n webgl.M33 = 15;\r\n var Matrix4 = (function () {\r\n function Matrix4() {\r\n this.temp = new Float32Array(16);\r\n this.values = new Float32Array(16);\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M11] = 1;\r\n v[webgl.M22] = 1;\r\n v[webgl.M33] = 1;\r\n }\r\n Matrix4.prototype.set = function (values) {\r\n this.values.set(values);\r\n return this;\r\n };\r\n Matrix4.prototype.transpose = function () {\r\n var t = this.temp;\r\n var v = this.values;\r\n t[webgl.M00] = v[webgl.M00];\r\n t[webgl.M01] = v[webgl.M10];\r\n t[webgl.M02] = v[webgl.M20];\r\n t[webgl.M03] = v[webgl.M30];\r\n t[webgl.M10] = v[webgl.M01];\r\n t[webgl.M11] = v[webgl.M11];\r\n t[webgl.M12] = v[webgl.M21];\r\n t[webgl.M13] = v[webgl.M31];\r\n t[webgl.M20] = v[webgl.M02];\r\n t[webgl.M21] = v[webgl.M12];\r\n t[webgl.M22] = v[webgl.M22];\r\n t[webgl.M23] = v[webgl.M32];\r\n t[webgl.M30] = v[webgl.M03];\r\n t[webgl.M31] = v[webgl.M13];\r\n t[webgl.M32] = v[webgl.M23];\r\n t[webgl.M33] = v[webgl.M33];\r\n return this.set(t);\r\n };\r\n Matrix4.prototype.identity = function () {\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M01] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M03] = 0;\r\n v[webgl.M10] = 0;\r\n v[webgl.M11] = 1;\r\n v[webgl.M12] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M21] = 0;\r\n v[webgl.M22] = 1;\r\n v[webgl.M23] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M32] = 0;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.invert = function () {\r\n var v = this.values;\r\n var t = this.temp;\r\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n if (l_det == 0)\r\n throw new Error(\"non-invertible matrix\");\r\n var inv_det = 1.0 / l_det;\r\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\r\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\r\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\r\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\r\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\r\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\r\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\r\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\r\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\r\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\r\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\r\n v[webgl.M00] = t[webgl.M00] * inv_det;\r\n v[webgl.M01] = t[webgl.M01] * inv_det;\r\n v[webgl.M02] = t[webgl.M02] * inv_det;\r\n v[webgl.M03] = t[webgl.M03] * inv_det;\r\n v[webgl.M10] = t[webgl.M10] * inv_det;\r\n v[webgl.M11] = t[webgl.M11] * inv_det;\r\n v[webgl.M12] = t[webgl.M12] * inv_det;\r\n v[webgl.M13] = t[webgl.M13] * inv_det;\r\n v[webgl.M20] = t[webgl.M20] * inv_det;\r\n v[webgl.M21] = t[webgl.M21] * inv_det;\r\n v[webgl.M22] = t[webgl.M22] * inv_det;\r\n v[webgl.M23] = t[webgl.M23] * inv_det;\r\n v[webgl.M30] = t[webgl.M30] * inv_det;\r\n v[webgl.M31] = t[webgl.M31] * inv_det;\r\n v[webgl.M32] = t[webgl.M32] * inv_det;\r\n v[webgl.M33] = t[webgl.M33] * inv_det;\r\n return this;\r\n };\r\n Matrix4.prototype.determinant = function () {\r\n var v = this.values;\r\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n };\r\n Matrix4.prototype.translate = function (x, y, z) {\r\n var v = this.values;\r\n v[webgl.M03] += x;\r\n v[webgl.M13] += y;\r\n v[webgl.M23] += z;\r\n return this;\r\n };\r\n Matrix4.prototype.copy = function () {\r\n return new Matrix4().set(this.values);\r\n };\r\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\r\n this.identity();\r\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\r\n var l_a1 = (far + near) / (near - far);\r\n var l_a2 = (2 * far * near) / (near - far);\r\n var v = this.values;\r\n v[webgl.M00] = l_fd / aspectRatio;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = l_fd;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = l_a1;\r\n v[webgl.M32] = -1;\r\n v[webgl.M03] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M23] = l_a2;\r\n v[webgl.M33] = 0;\r\n return this;\r\n };\r\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\r\n return this.ortho(x, x + width, y, y + height, 0, 1);\r\n };\r\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\r\n this.identity();\r\n var x_orth = 2 / (right - left);\r\n var y_orth = 2 / (top - bottom);\r\n var z_orth = -2 / (far - near);\r\n var tx = -(right + left) / (right - left);\r\n var ty = -(top + bottom) / (top - bottom);\r\n var tz = -(far + near) / (far - near);\r\n var v = this.values;\r\n v[webgl.M00] = x_orth;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = y_orth;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = z_orth;\r\n v[webgl.M32] = 0;\r\n v[webgl.M03] = tx;\r\n v[webgl.M13] = ty;\r\n v[webgl.M23] = tz;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.multiply = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\r\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\r\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\r\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\r\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\r\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\r\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\r\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\r\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\r\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\r\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\r\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\r\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\r\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\r\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\r\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.multiplyLeft = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\r\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\r\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\r\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\r\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\r\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\r\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\r\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\r\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\r\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\r\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\r\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\r\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\r\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\r\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\r\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.lookAt = function (position, direction, up) {\r\n Matrix4.initTemps();\r\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\r\n zAxis.setFrom(direction).normalize();\r\n xAxis.setFrom(direction).normalize();\r\n xAxis.cross(up).normalize();\r\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\r\n this.identity();\r\n var val = this.values;\r\n val[webgl.M00] = xAxis.x;\r\n val[webgl.M01] = xAxis.y;\r\n val[webgl.M02] = xAxis.z;\r\n val[webgl.M10] = yAxis.x;\r\n val[webgl.M11] = yAxis.y;\r\n val[webgl.M12] = yAxis.z;\r\n val[webgl.M20] = -zAxis.x;\r\n val[webgl.M21] = -zAxis.y;\r\n val[webgl.M22] = -zAxis.z;\r\n Matrix4.tmpMatrix.identity();\r\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\r\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\r\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\r\n this.multiply(Matrix4.tmpMatrix);\r\n return this;\r\n };\r\n Matrix4.initTemps = function () {\r\n if (Matrix4.xAxis === null)\r\n Matrix4.xAxis = new webgl.Vector3();\r\n if (Matrix4.yAxis === null)\r\n Matrix4.yAxis = new webgl.Vector3();\r\n if (Matrix4.zAxis === null)\r\n Matrix4.zAxis = new webgl.Vector3();\r\n };\r\n Matrix4.xAxis = null;\r\n Matrix4.yAxis = null;\r\n Matrix4.zAxis = null;\r\n Matrix4.tmpMatrix = new Matrix4();\r\n return Matrix4;\r\n }());\r\n webgl.Matrix4 = Matrix4;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Mesh = (function () {\r\n function Mesh(context, attributes, maxVertices, maxIndices) {\r\n this.attributes = attributes;\r\n this.verticesLength = 0;\r\n this.dirtyVertices = false;\r\n this.indicesLength = 0;\r\n this.dirtyIndices = false;\r\n this.elementsPerVertex = 0;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.elementsPerVertex = 0;\r\n for (var i = 0; i < attributes.length; i++) {\r\n this.elementsPerVertex += attributes[i].numElements;\r\n }\r\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\r\n this.indices = new Uint16Array(maxIndices);\r\n this.context.addRestorable(this);\r\n }\r\n Mesh.prototype.getAttributes = function () { return this.attributes; };\r\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\r\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\r\n Mesh.prototype.setVerticesLength = function (length) {\r\n this.dirtyVertices = true;\r\n this.verticesLength = length;\r\n };\r\n Mesh.prototype.getVertices = function () { return this.vertices; };\r\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\r\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\r\n Mesh.prototype.setIndicesLength = function (length) {\r\n this.dirtyIndices = true;\r\n this.indicesLength = length;\r\n };\r\n Mesh.prototype.getIndices = function () { return this.indices; };\r\n ;\r\n Mesh.prototype.getVertexSizeInFloats = function () {\r\n var size = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attribute = this.attributes[i];\r\n size += attribute.numElements;\r\n }\r\n return size;\r\n };\r\n Mesh.prototype.setVertices = function (vertices) {\r\n this.dirtyVertices = true;\r\n if (vertices.length > this.vertices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\r\n this.vertices.set(vertices, 0);\r\n this.verticesLength = vertices.length;\r\n };\r\n Mesh.prototype.setIndices = function (indices) {\r\n this.dirtyIndices = true;\r\n if (indices.length > this.indices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\r\n this.indices.set(indices, 0);\r\n this.indicesLength = indices.length;\r\n };\r\n Mesh.prototype.draw = function (shader, primitiveType) {\r\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\r\n };\r\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices || this.dirtyIndices)\r\n this.update();\r\n this.bind(shader);\r\n if (this.indicesLength > 0) {\r\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\r\n }\r\n else {\r\n gl.drawArrays(primitiveType, offset, count);\r\n }\r\n this.unbind(shader);\r\n };\r\n Mesh.prototype.bind = function (shader) {\r\n var gl = this.context.gl;\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n var offset = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_1 = shader.getAttributeLocation(attrib.name);\r\n gl.enableVertexAttribArray(location_1);\r\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\r\n offset += attrib.numElements;\r\n }\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n };\r\n Mesh.prototype.unbind = function (shader) {\r\n var gl = this.context.gl;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_2 = shader.getAttributeLocation(attrib.name);\r\n gl.disableVertexAttribArray(location_2);\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\r\n };\r\n Mesh.prototype.update = function () {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices) {\r\n if (!this.verticesBuffer) {\r\n this.verticesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyVertices = false;\r\n }\r\n if (this.dirtyIndices) {\r\n if (!this.indicesBuffer) {\r\n this.indicesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyIndices = false;\r\n }\r\n };\r\n Mesh.prototype.restore = function () {\r\n this.verticesBuffer = null;\r\n this.indicesBuffer = null;\r\n this.update();\r\n };\r\n Mesh.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteBuffer(this.verticesBuffer);\r\n gl.deleteBuffer(this.indicesBuffer);\r\n };\r\n return Mesh;\r\n }());\r\n webgl.Mesh = Mesh;\r\n var VertexAttribute = (function () {\r\n function VertexAttribute(name, type, numElements) {\r\n this.name = name;\r\n this.type = type;\r\n this.numElements = numElements;\r\n }\r\n return VertexAttribute;\r\n }());\r\n webgl.VertexAttribute = VertexAttribute;\r\n var Position2Attribute = (function (_super) {\r\n __extends(Position2Attribute, _super);\r\n function Position2Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\r\n }\r\n return Position2Attribute;\r\n }(VertexAttribute));\r\n webgl.Position2Attribute = Position2Attribute;\r\n var Position3Attribute = (function (_super) {\r\n __extends(Position3Attribute, _super);\r\n function Position3Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\r\n }\r\n return Position3Attribute;\r\n }(VertexAttribute));\r\n webgl.Position3Attribute = Position3Attribute;\r\n var TexCoordAttribute = (function (_super) {\r\n __extends(TexCoordAttribute, _super);\r\n function TexCoordAttribute(unit) {\r\n if (unit === void 0) { unit = 0; }\r\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\r\n }\r\n return TexCoordAttribute;\r\n }(VertexAttribute));\r\n webgl.TexCoordAttribute = TexCoordAttribute;\r\n var ColorAttribute = (function (_super) {\r\n __extends(ColorAttribute, _super);\r\n function ColorAttribute() {\r\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\r\n }\r\n return ColorAttribute;\r\n }(VertexAttribute));\r\n webgl.ColorAttribute = ColorAttribute;\r\n var Color2Attribute = (function (_super) {\r\n __extends(Color2Attribute, _super);\r\n function Color2Attribute() {\r\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\r\n }\r\n return Color2Attribute;\r\n }(VertexAttribute));\r\n webgl.Color2Attribute = Color2Attribute;\r\n var VertexAttributeType;\r\n (function (VertexAttributeType) {\r\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\r\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var PolygonBatcher = (function () {\r\n function PolygonBatcher(context, twoColorTint, maxVertices) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n var attributes = twoColorTint ?\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\r\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n PolygonBatcher.prototype.begin = function (shader) {\r\n var gl = this.context.gl;\r\n if (this.isDrawing)\r\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\r\n this.drawCalls = 0;\r\n this.shader = shader;\r\n this.lastTexture = null;\r\n this.isDrawing = true;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\r\n if (texture != this.lastTexture) {\r\n this.flush();\r\n this.lastTexture = texture;\r\n }\r\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\r\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\r\n this.flush();\r\n }\r\n var indexStart = this.mesh.numVertices();\r\n this.mesh.getVertices().set(vertices, this.verticesLength);\r\n this.verticesLength += vertices.length;\r\n this.mesh.setVerticesLength(this.verticesLength);\r\n var indicesArray = this.mesh.getIndices();\r\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\r\n indicesArray[i] = indices[j] + indexStart;\r\n this.indicesLength += indices.length;\r\n this.mesh.setIndicesLength(this.indicesLength);\r\n };\r\n PolygonBatcher.prototype.flush = function () {\r\n var gl = this.context.gl;\r\n if (this.verticesLength == 0)\r\n return;\r\n this.lastTexture.bind();\r\n this.mesh.draw(this.shader, gl.TRIANGLES);\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.mesh.setVerticesLength(0);\r\n this.mesh.setIndicesLength(0);\r\n this.drawCalls++;\r\n };\r\n PolygonBatcher.prototype.end = function () {\r\n var gl = this.context.gl;\r\n if (!this.isDrawing)\r\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\r\n if (this.verticesLength > 0 || this.indicesLength > 0)\r\n this.flush();\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.isDrawing = false;\r\n gl.disable(gl.BLEND);\r\n };\r\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\r\n PolygonBatcher.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return PolygonBatcher;\r\n }());\r\n webgl.PolygonBatcher = PolygonBatcher;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SceneRenderer = (function () {\r\n function SceneRenderer(canvas, context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.twoColorTint = false;\r\n this.activeRenderer = null;\r\n this.QUAD = [\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n ];\r\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n this.WHITE = new spine.Color(1, 1, 1, 1);\r\n this.canvas = canvas;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.twoColorTint = twoColorTint;\r\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\r\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\r\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\r\n this.shapesShader = webgl.Shader.newColored(this.context);\r\n this.shapes = new webgl.ShapeRenderer(this.context);\r\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\r\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\r\n }\r\n SceneRenderer.prototype.begin = function () {\r\n this.camera.update();\r\n this.enableRenderer(this.batcher);\r\n };\r\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n this.enableRenderer(this.batcher);\r\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\r\n };\r\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n this.enableRenderer(this.shapes);\r\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\r\n };\r\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var worldOriginX = x + pivotX;\r\n var worldOriginY = y + pivotY;\r\n var fx = -pivotX;\r\n var fy = -pivotY;\r\n var fx2 = width - pivotX;\r\n var fy2 = height - pivotY;\r\n var p1x = fx;\r\n var p1y = fy;\r\n var p2x = fx;\r\n var p2y = fy2;\r\n var p3x = fx2;\r\n var p3y = fy2;\r\n var p4x = fx2;\r\n var p4y = fy;\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 0;\r\n var y2 = 0;\r\n var x3 = 0;\r\n var y3 = 0;\r\n var x4 = 0;\r\n var y4 = 0;\r\n if (angle != 0) {\r\n var cos = spine.MathUtils.cosDeg(angle);\r\n var sin = spine.MathUtils.sinDeg(angle);\r\n x1 = cos * p1x - sin * p1y;\r\n y1 = sin * p1x + cos * p1y;\r\n x4 = cos * p2x - sin * p2y;\r\n y4 = sin * p2x + cos * p2y;\r\n x3 = cos * p3x - sin * p3y;\r\n y3 = sin * p3x + cos * p3y;\r\n x2 = x3 + (x1 - x4);\r\n y2 = y3 + (y1 - y4);\r\n }\r\n else {\r\n x1 = p1x;\r\n y1 = p1y;\r\n x4 = p2x;\r\n y4 = p2y;\r\n x3 = p3x;\r\n y3 = p3y;\r\n x2 = p4x;\r\n y2 = p4y;\r\n }\r\n x1 += worldOriginX;\r\n y1 += worldOriginY;\r\n x2 += worldOriginX;\r\n y2 += worldOriginY;\r\n x3 += worldOriginX;\r\n y3 += worldOriginY;\r\n x4 += worldOriginX;\r\n y4 += worldOriginY;\r\n var i = 0;\r\n quad[i++] = x1;\r\n quad[i++] = y1;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x2;\r\n quad[i++] = y2;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x3;\r\n quad[i++] = y3;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x4;\r\n quad[i++] = y4;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.line(x, y, x2, y2, color);\r\n };\r\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\r\n };\r\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\r\n };\r\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rect(filled, x, y, width, height, color);\r\n };\r\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\r\n };\r\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.polygon(polygonVertices, offset, count, color);\r\n };\r\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.circle(filled, x, y, radius, color, segments);\r\n };\r\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\r\n };\r\n SceneRenderer.prototype.end = function () {\r\n if (this.activeRenderer === this.batcher)\r\n this.batcher.end();\r\n else if (this.activeRenderer === this.shapes)\r\n this.shapes.end();\r\n this.activeRenderer = null;\r\n };\r\n SceneRenderer.prototype.resize = function (resizeMode) {\r\n var canvas = this.canvas;\r\n var w = canvas.clientWidth;\r\n var h = canvas.clientHeight;\r\n if (canvas.width != w || canvas.height != h) {\r\n canvas.width = w;\r\n canvas.height = h;\r\n }\r\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\r\n if (resizeMode === ResizeMode.Stretch) {\r\n }\r\n else if (resizeMode === ResizeMode.Expand) {\r\n this.camera.setViewport(w, h);\r\n }\r\n else if (resizeMode === ResizeMode.Fit) {\r\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\r\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\r\n var targetRatio = targetHeight / targetWidth;\r\n var sourceRatio = sourceHeight / sourceWidth;\r\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\r\n this.camera.viewportWidth = sourceWidth * scale;\r\n this.camera.viewportHeight = sourceHeight * scale;\r\n }\r\n this.camera.update();\r\n };\r\n SceneRenderer.prototype.enableRenderer = function (renderer) {\r\n if (this.activeRenderer === renderer)\r\n return;\r\n this.end();\r\n if (renderer instanceof webgl.PolygonBatcher) {\r\n this.batcherShader.bind();\r\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.batcherShader.setUniformi(\"u_texture\", 0);\r\n this.batcher.begin(this.batcherShader);\r\n this.activeRenderer = this.batcher;\r\n }\r\n else if (renderer instanceof webgl.ShapeRenderer) {\r\n this.shapesShader.bind();\r\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.shapes.begin(this.shapesShader);\r\n this.activeRenderer = this.shapes;\r\n }\r\n else {\r\n this.activeRenderer = this.skeletonDebugRenderer;\r\n }\r\n };\r\n SceneRenderer.prototype.dispose = function () {\r\n this.batcher.dispose();\r\n this.batcherShader.dispose();\r\n this.shapes.dispose();\r\n this.shapesShader.dispose();\r\n this.skeletonDebugRenderer.dispose();\r\n };\r\n return SceneRenderer;\r\n }());\r\n webgl.SceneRenderer = SceneRenderer;\r\n var ResizeMode;\r\n (function (ResizeMode) {\r\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\r\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\r\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\r\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Shader = (function () {\r\n function Shader(context, vertexShader, fragmentShader) {\r\n this.vertexShader = vertexShader;\r\n this.fragmentShader = fragmentShader;\r\n this.vs = null;\r\n this.fs = null;\r\n this.program = null;\r\n this.tmp2x2 = new Float32Array(2 * 2);\r\n this.tmp3x3 = new Float32Array(3 * 3);\r\n this.tmp4x4 = new Float32Array(4 * 4);\r\n this.vsSource = vertexShader;\r\n this.fsSource = fragmentShader;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.context.addRestorable(this);\r\n this.compile();\r\n }\r\n Shader.prototype.getProgram = function () { return this.program; };\r\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\r\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\r\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\r\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\r\n Shader.prototype.compile = function () {\r\n var gl = this.context.gl;\r\n try {\r\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\r\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\r\n this.program = this.compileProgram(this.vs, this.fs);\r\n }\r\n catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n };\r\n Shader.prototype.compileShader = function (type, source) {\r\n var gl = this.context.gl;\r\n var shader = gl.createShader(type);\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\r\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\r\n gl.deleteShader(shader);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return shader;\r\n };\r\n Shader.prototype.compileProgram = function (vs, fs) {\r\n var gl = this.context.gl;\r\n var program = gl.createProgram();\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\r\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\r\n gl.deleteProgram(program);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return program;\r\n };\r\n Shader.prototype.restore = function () {\r\n this.compile();\r\n };\r\n Shader.prototype.bind = function () {\r\n this.context.gl.useProgram(this.program);\r\n };\r\n Shader.prototype.unbind = function () {\r\n this.context.gl.useProgram(null);\r\n };\r\n Shader.prototype.setUniformi = function (uniform, value) {\r\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniformf = function (uniform, value) {\r\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\r\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\r\n };\r\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\r\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\r\n };\r\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\r\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\r\n };\r\n Shader.prototype.setUniform2x2f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp2x2.set(value);\r\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\r\n };\r\n Shader.prototype.setUniform3x3f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp3x3.set(value);\r\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\r\n };\r\n Shader.prototype.setUniform4x4f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp4x4.set(value);\r\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\r\n };\r\n Shader.prototype.getUniformLocation = function (uniform) {\r\n var gl = this.context.gl;\r\n var location = gl.getUniformLocation(this.program, uniform);\r\n if (!location && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for uniform \".concat(uniform));\r\n return location;\r\n };\r\n Shader.prototype.getAttributeLocation = function (attribute) {\r\n var gl = this.context.gl;\r\n var location = gl.getAttribLocation(this.program, attribute);\r\n if (location == -1 && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for attribute \".concat(attribute));\r\n return location;\r\n };\r\n Shader.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n if (this.vs) {\r\n gl.deleteShader(this.vs);\r\n this.vs = null;\r\n }\r\n if (this.fs) {\r\n gl.deleteShader(this.fs);\r\n this.fs = null;\r\n }\r\n if (this.program) {\r\n gl.deleteProgram(this.program);\r\n this.program = null;\r\n }\r\n };\r\n Shader.newColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(Shader.MVP_MATRIX, \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(Shader.POSITION, \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\");\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newTwoColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(Shader.MVP_MATRIX, \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_dark = \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(Shader.POSITION, \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\");\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newColored = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(Shader.MVP_MATRIX, \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(Shader.POSITION, \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\");\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.MVP_MATRIX = \"u_projTrans\";\r\n Shader.POSITION = \"a_position\";\r\n Shader.COLOR = \"a_color\";\r\n Shader.COLOR2 = \"a_color2\";\r\n Shader.TEXCOORDS = \"a_texCoords\";\r\n Shader.SAMPLER = \"u_texture\";\r\n return Shader;\r\n }());\r\n webgl.Shader = Shader;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ShapeRenderer = (function () {\r\n function ShapeRenderer(context, maxVertices) {\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shapeType = ShapeType.Filled;\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.vertexIndex = 0;\r\n this.tmp = new spine.Vector2();\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n ShapeRenderer.prototype.begin = function (shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has already been called\");\r\n this.shader = shader;\r\n this.vertexIndex = 0;\r\n this.isDrawing = true;\r\n var gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n ShapeRenderer.prototype.setColor = function (color) {\r\n this.color.setFromColor(color);\r\n };\r\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\r\n this.color.set(r, g, b, a);\r\n };\r\n ShapeRenderer.prototype.point = function (x, y, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Point, 1);\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n };\r\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, 2);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color);\r\n this.vertex(x3, y3, color2);\r\n this.vertex(x3, y3, color);\r\n this.vertex(x, y, color2);\r\n }\r\n };\r\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (color4 === null)\r\n color4 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\r\n };\r\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\r\n if (color === null)\r\n color = this.color;\r\n var t = this.tmp.set(y2 - y1, x1 - x2);\r\n t.normalize();\r\n width *= 0.5;\r\n var tx = t.x * width;\r\n var ty = t.y * width;\r\n if (!filled) {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n else {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.x = function (x, y, size) {\r\n this.line(x - size, y - size, x + size, y + size);\r\n this.line(x - size, y + size, x + size, y - size);\r\n };\r\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n if (count < 3)\r\n throw new Error(\"Polygon must contain at least 3 vertices\");\r\n this.check(ShapeType.Line, count * 2);\r\n if (color === null)\r\n color = this.color;\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n offset <<= 1;\r\n count <<= 1;\r\n var firstX = polygonVertices[offset];\r\n var firstY = polygonVertices[offset + 1];\r\n var last = offset + count;\r\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\r\n var x1 = polygonVertices[i];\r\n var y1 = polygonVertices[i + 1];\r\n var x2 = 0;\r\n var y2 = 0;\r\n if (i + 2 >= last) {\r\n x2 = firstX;\r\n y2 = firstY;\r\n }\r\n else {\r\n x2 = polygonVertices[i + 2];\r\n y2 = polygonVertices[i + 3];\r\n }\r\n this.vertex(x1, y1, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n if (segments === 0)\r\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\r\n if (segments <= 0)\r\n throw new Error(\"segments must be > 0.\");\r\n if (color === null)\r\n color = this.color;\r\n var angle = 2 * spine.MathUtils.PI / segments;\r\n var cos = Math.cos(angle);\r\n var sin = Math.sin(angle);\r\n var cx = radius, cy = 0;\r\n if (!filled) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_1 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_1 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n else {\r\n this.check(ShapeType.Filled, segments * 3 + 3);\r\n segments--;\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n var temp = cx;\r\n cx = radius;\r\n cy = 0;\r\n this.vertex(x + cx, y + cy, color);\r\n };\r\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n if (color === null)\r\n color = this.color;\r\n var subdiv_step = 1 / segments;\r\n var subdiv_step2 = subdiv_step * subdiv_step;\r\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\r\n var pre1 = 3 * subdiv_step;\r\n var pre2 = 3 * subdiv_step2;\r\n var pre4 = 6 * subdiv_step2;\r\n var pre5 = 6 * subdiv_step3;\r\n var tmp1x = x1 - cx1 * 2 + cx2;\r\n var tmp1y = y1 - cy1 * 2 + cy2;\r\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\r\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\r\n var fx = x1;\r\n var fy = y1;\r\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\r\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\r\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\r\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\r\n var dddfx = tmp2x * pre5;\r\n var dddfy = tmp2y * pre5;\r\n while (segments-- > 0) {\r\n this.vertex(fx, fy, color);\r\n fx += dfx;\r\n fy += dfy;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n this.vertex(fx, fy, color);\r\n }\r\n this.vertex(fx, fy, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.vertex = function (x, y, color) {\r\n var idx = this.vertexIndex;\r\n var vertices = this.mesh.getVertices();\r\n vertices[idx++] = x;\r\n vertices[idx++] = y;\r\n vertices[idx++] = color.r;\r\n vertices[idx++] = color.g;\r\n vertices[idx++] = color.b;\r\n vertices[idx++] = color.a;\r\n this.vertexIndex = idx;\r\n };\r\n ShapeRenderer.prototype.end = function () {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n this.flush();\r\n this.context.gl.disable(this.context.gl.BLEND);\r\n this.isDrawing = false;\r\n };\r\n ShapeRenderer.prototype.flush = function () {\r\n if (this.vertexIndex == 0)\r\n return;\r\n this.mesh.setVerticesLength(this.vertexIndex);\r\n this.mesh.draw(this.shader, this.shapeType);\r\n this.vertexIndex = 0;\r\n };\r\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n if (this.shapeType == shapeType) {\r\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\r\n this.flush();\r\n else\r\n return;\r\n }\r\n else {\r\n this.flush();\r\n this.shapeType = shapeType;\r\n }\r\n };\r\n ShapeRenderer.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return ShapeRenderer;\r\n }());\r\n webgl.ShapeRenderer = ShapeRenderer;\r\n var ShapeType;\r\n (function (ShapeType) {\r\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\r\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\r\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\r\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SkeletonDebugRenderer = (function () {\r\n function SkeletonDebugRenderer(context) {\r\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\r\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\r\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\r\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\r\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\r\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\r\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\r\n this.drawBones = true;\r\n this.drawRegionAttachments = true;\r\n this.drawBoundingBoxes = true;\r\n this.drawMeshHull = true;\r\n this.drawMeshTriangles = true;\r\n this.drawPaths = true;\r\n this.drawSkeletonXY = false;\r\n this.drawClipping = true;\r\n this.premultipliedAlpha = false;\r\n this.scale = 1;\r\n this.boneWidth = 2;\r\n this.bounds = new spine.SkeletonBounds();\r\n this.temp = new Array();\r\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n }\r\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n var skeletonX = skeleton.x;\r\n var skeletonY = skeleton.y;\r\n var gl = this.context.gl;\r\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\r\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\r\n var bones = skeleton.bones;\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneLineColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n if (bone.parent == null)\r\n continue;\r\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\r\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\r\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\r\n }\r\n if (this.drawSkeletonXY)\r\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\r\n }\r\n if (this.drawRegionAttachments) {\r\n shapes.setColor(this.attachmentLineColor);\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n var vertices = this.vertices;\r\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\r\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\r\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\r\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\r\n }\r\n }\r\n }\r\n if (this.drawMeshHull || this.drawMeshTriangles) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.MeshAttachment))\r\n continue;\r\n var mesh = attachment;\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\r\n var triangles = mesh.triangles;\r\n var hullLength = mesh.hullLength;\r\n if (this.drawMeshTriangles) {\r\n shapes.setColor(this.triangleLineColor);\r\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\r\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\r\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\r\n }\r\n }\r\n if (this.drawMeshHull && hullLength > 0) {\r\n shapes.setColor(this.attachmentLineColor);\r\n hullLength = (hullLength >> 1) * 2;\r\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\r\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n shapes.line(x, y, lastX, lastY);\r\n lastX = x;\r\n lastY = y;\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawBoundingBoxes) {\r\n var bounds = this.bounds;\r\n bounds.update(skeleton, true);\r\n shapes.setColor(this.aabbColor);\r\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\r\n var polygons = bounds.polygons;\r\n var boxes = bounds.boundingBoxes;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n shapes.setColor(boxes[i].color);\r\n shapes.polygon(polygon, 0, polygon.length);\r\n }\r\n }\r\n if (this.drawPaths) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n continue;\r\n var path = attachment;\r\n var nn = path.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n var color = this.pathColor;\r\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\r\n if (path.closed) {\r\n shapes.setColor(color);\r\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\r\n x2 = world[nn - 4];\r\n y2 = world[nn - 3];\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n }\r\n nn -= 4;\r\n for (var ii = 4; ii < nn; ii += 6) {\r\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\r\n x2 = world[ii + 4];\r\n y2 = world[ii + 5];\r\n shapes.setColor(color);\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n }\r\n }\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneOriginColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\r\n }\r\n }\r\n if (this.drawClipping) {\r\n var slots = skeleton.slots;\r\n shapes.setColor(this.clipColor);\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.ClippingAttachment))\r\n continue;\r\n var clip = attachment;\r\n var nn = clip.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\r\n var x = world[i_17];\r\n var y = world[i_17 + 1];\r\n var x2 = world[(i_17 + 2) % world.length];\r\n var y2 = world[(i_17 + 3) % world.length];\r\n shapes.line(x, y, x2, y2);\r\n }\r\n }\r\n }\r\n };\r\n SkeletonDebugRenderer.prototype.dispose = function () {\r\n };\r\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\r\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\r\n return SkeletonDebugRenderer;\r\n }());\r\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Renderable = (function () {\r\n function Renderable(vertices, numVertices, numFloats) {\r\n this.vertices = vertices;\r\n this.numVertices = numVertices;\r\n this.numFloats = numFloats;\r\n }\r\n return Renderable;\r\n }());\r\n ;\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.premultipliedAlpha = false;\r\n this.vertexEffect = null;\r\n this.tempColor = new spine.Color();\r\n this.tempColor2 = new spine.Color();\r\n this.vertexSize = 2 + 2 + 4;\r\n this.twoColorTint = false;\r\n this.renderable = new Renderable(null, 0, 0);\r\n this.clipper = new spine.SkeletonClipping();\r\n this.temp = new spine.Vector2();\r\n this.temp2 = new spine.Vector2();\r\n this.temp3 = new spine.Color();\r\n this.temp4 = new spine.Color();\r\n this.twoColorTint = twoColorTint;\r\n if (twoColorTint)\r\n this.vertexSize += 4;\r\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\r\n }\r\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n var clipper = this.clipper;\r\n var premultipliedAlpha = this.premultipliedAlpha;\r\n var twoColorTint = this.twoColorTint;\r\n var blendMode = null;\r\n var tempPos = this.temp;\r\n var tempUv = this.temp2;\r\n var tempLight = this.temp3;\r\n var tempDark = this.temp4;\r\n var renderable = this.renderable;\r\n var uvs = null;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n var attachmentColor = null;\r\n var skeletonColor = skeleton.color;\r\n var vertexSize = twoColorTint ? 12 : 8;\r\n var inRange = false;\r\n if (slotRangeStart == -1)\r\n inRange = true;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\r\n inRange = true;\r\n }\r\n if (!inRange) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\r\n inRange = false;\r\n }\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var region = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = 4;\r\n renderable.numFloats = clippedVertexSize << 2;\r\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n uvs = region.uvs;\r\n texture = region.region.renderObject.texture;\r\n attachmentColor = region.color;\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\r\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\r\n if (renderable.numFloats > renderable.vertices.length) {\r\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\r\n }\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture;\r\n uvs = mesh.uvs;\r\n attachmentColor = mesh.color;\r\n }\r\n else if (attachment instanceof spine.ClippingAttachment) {\r\n var clip = (attachment);\r\n clipper.clipStart(slot, clip);\r\n continue;\r\n }\r\n else {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (texture != null) {\r\n var slotColor = slot.color;\r\n var finalColor = this.tempColor;\r\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\r\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\r\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\r\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n if (premultipliedAlpha) {\r\n finalColor.r *= finalColor.a;\r\n finalColor.g *= finalColor.a;\r\n finalColor.b *= finalColor.a;\r\n }\r\n var darkColor = this.tempColor2;\r\n if (slot.darkColor == null)\r\n darkColor.set(0, 0, 0, 1.0);\r\n else {\r\n if (premultipliedAlpha) {\r\n darkColor.r = slot.darkColor.r * finalColor.a;\r\n darkColor.g = slot.darkColor.g * finalColor.a;\r\n darkColor.b = slot.darkColor.b * finalColor.a;\r\n }\r\n else {\r\n darkColor.setFromColor(slot.darkColor);\r\n }\r\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\r\n }\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\r\n }\r\n if (clipper.isClipping()) {\r\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\r\n var clippedVertices = new Float32Array(clipper.clippedVertices);\r\n var clippedTriangles = clipper.clippedTriangles;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n var verts = clippedVertices;\r\n if (!twoColorTint) {\r\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n batcher.draw(texture, clippedVertices, clippedTriangles);\r\n }\r\n else {\r\n var verts = renderable.vertices;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n if (!twoColorTint) {\r\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.setFromColor(darkColor);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n else {\r\n if (!twoColorTint) {\r\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n }\r\n }\r\n else {\r\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n verts[v + 6] = darkColor.r;\r\n verts[v + 7] = darkColor.g;\r\n verts[v + 8] = darkColor.b;\r\n verts[v + 9] = darkColor.a;\r\n }\r\n }\r\n }\r\n var view = renderable.vertices.subarray(0, renderable.numFloats);\r\n batcher.draw(texture, view, triangles);\r\n }\r\n }\r\n clipper.clipEndWithSlot(slot);\r\n }\r\n clipper.clipEnd();\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n return SkeletonRenderer;\r\n }());\r\n webgl.SkeletonRenderer = SkeletonRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Vector3 = (function () {\r\n function Vector3(x, y, z) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n if (z === void 0) { z = 0; }\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n Vector3.prototype.setFrom = function (v) {\r\n this.x = v.x;\r\n this.y = v.y;\r\n this.z = v.z;\r\n return this;\r\n };\r\n Vector3.prototype.set = function (x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n };\r\n Vector3.prototype.add = function (v) {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n return this;\r\n };\r\n Vector3.prototype.sub = function (v) {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n return this;\r\n };\r\n Vector3.prototype.scale = function (s) {\r\n this.x *= s;\r\n this.y *= s;\r\n this.z *= s;\r\n return this;\r\n };\r\n Vector3.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len == 0)\r\n return this;\r\n len = 1 / len;\r\n this.x *= len;\r\n this.y *= len;\r\n this.z *= len;\r\n return this;\r\n };\r\n Vector3.prototype.cross = function (v) {\r\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\r\n };\r\n Vector3.prototype.multiply = function (matrix) {\r\n var l_mat = matrix.values;\r\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\r\n };\r\n Vector3.prototype.project = function (matrix) {\r\n var l_mat = matrix.values;\r\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\r\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\r\n };\r\n Vector3.prototype.dot = function (v) {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n };\r\n Vector3.prototype.length = function () {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n };\r\n Vector3.prototype.distance = function (v) {\r\n var a = v.x - this.x;\r\n var b = v.y - this.y;\r\n var c = v.z - this.z;\r\n return Math.sqrt(a * a + b * b + c * c);\r\n };\r\n return Vector3;\r\n }());\r\n webgl.Vector3 = Vector3;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ManagedWebGLRenderingContext = (function () {\r\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\r\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\r\n this.restorables = new Array();\r\n if (!((canvasOrContext instanceof WebGLRenderingContext) || (canvasOrContext instanceof WebGL2RenderingContext))) {\r\n this.setupCanvas(canvasOrContext, contextConfig);\r\n }\r\n else {\r\n this.gl = canvasOrContext;\r\n this.canvas = this.gl.canvas;\r\n }\r\n }\r\n ManagedWebGLRenderingContext.prototype.setupCanvas = function (canvas, contextConfig) {\r\n var _this = this;\r\n this.gl = (canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig));\r\n this.canvas = canvas;\r\n canvas.addEventListener(\"webglcontextlost\", function (e) {\r\n var event = e;\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n });\r\n canvas.addEventListener(\"webglcontextrestored\", function (e) {\r\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\r\n _this.restorables[i].restore();\r\n }\r\n });\r\n };\r\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\r\n this.restorables.push(restorable);\r\n };\r\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\r\n var index = this.restorables.indexOf(restorable);\r\n if (index > -1)\r\n this.restorables.splice(index, 1);\r\n };\r\n return ManagedWebGLRenderingContext;\r\n }());\r\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\r\n var WebGLBlendModeConverter = (function () {\r\n function WebGLBlendModeConverter() {\r\n }\r\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.ZERO = 0;\r\n WebGLBlendModeConverter.ONE = 1;\r\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\r\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\r\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\r\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\r\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\r\n return WebGLBlendModeConverter;\r\n }());\r\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-both.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\r\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\r\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\r\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\r\nvar MultiFile = require('../../../src/loader/MultiFile.js');\r\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\r\n\r\n/**\r\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\r\n *\r\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Spine File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\r\n *\r\n * @class SpineFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar SpineFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\r\n {\r\n var i;\r\n var json;\r\n var atlas;\r\n var files = [];\r\n var cache = loader.cacheManager.custom.spine;\r\n\r\n // atlas can be an array of atlas files, not just a single one\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n json = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'jsonURL'),\r\n extension: GetFastValue(config, 'jsonExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\r\n });\r\n\r\n atlasURL = GetFastValue(config, 'atlasURL');\r\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, {\r\n key: key + '!' + i,\r\n url: atlasURL[i],\r\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n else\r\n {\r\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, key + '!' + i, atlasURL[i], atlasXhrSettings);\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n\r\n files.unshift(json);\r\n\r\n MultiFile.call(this, loader, 'spine', key, files);\r\n\r\n this.config.preMultipliedAlpha = preMultipliedAlpha;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'text')\r\n {\r\n // Inspect the data for the files to now load\r\n var content = file.data.split('\\n');\r\n\r\n // Extract the textures\r\n var textures = [];\r\n\r\n for (var t = 0; t < content.length; t++)\r\n {\r\n var line = content[t];\r\n\r\n if (line.trim() === '' && t < content.length - 1)\r\n {\r\n line = content[t + 1];\r\n\r\n textures.push(line);\r\n }\r\n }\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\r\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\r\n var prefix = GetFastValue(config, 'prefix', this.prefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n var textureURL = textures[i];\r\n\r\n var key = this.key + ':' + textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n if (!loader.keyExists(image))\r\n {\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\r\n * @since 3.19.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var atlasCache;\r\n var atlasKey = '';\r\n var combinedAtlasData = '';\r\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\r\n var textureManager = this.loader.textureManager;\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'text')\r\n {\r\n atlasKey = file.key.replace(/![\\d]$/, '');\r\n\r\n atlasCache = file.cache;\r\n\r\n combinedAtlasData = combinedAtlasData.concat(file.data);\r\n }\r\n else\r\n {\r\n var src = file.key.trim();\r\n var pos = src.indexOf('!');\r\n var key = src.substr(pos + 1);\r\n\r\n if (!textureManager.exists(key))\r\n {\r\n textureManager.addImage(key, file.data);\r\n }\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetValue = require('../../../src/utils/object/GetValue');\r\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\r\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\r\nvar Spine = require('Spine');\r\nvar SpineFile = require('./SpineFile');\r\nvar SpineGameObject = require('./gameobject/SpineGameObject');\r\nvar SpineContainer = require('./container/SpineContainer');\r\nvar NOOP = require('../../../src/utils/NOOP');\r\n\r\n/**\r\n * @classdesc\r\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\r\n *\r\n * Find more details about Spine itself at http://esotericsoftware.com/.\r\n *\r\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\r\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\r\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\r\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\r\n *\r\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\r\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\r\n *\r\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\r\n *\r\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\r\n *\r\n * ```javascript\r\n * import * as SpinePlugin from './SpinePlugin.js';\r\n * ```\r\n *\r\n * and then adding it to your Phaser Game configuration:\r\n *\r\n * ```javascript\r\n * plugins: {\r\n * scene: [\r\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\r\n * ]\r\n * }\r\n * ```\r\n *\r\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\r\n * Game Configuration object, like this:\r\n *\r\n * ```javascript\r\n * scene: {\r\n * preload: preload,\r\n * create: create,\r\n * pack: {\r\n * files: [\r\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\r\n * ]\r\n * }\r\n * }\r\n * ```\r\n *\r\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\r\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\r\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\r\n * subsequent Scenes.\r\n *\r\n * ## A note about inlined data:\r\n *\r\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\r\n * at all. Instead, call the functions directly as required:\r\n *\r\n * scene.cache.json.add\r\n * scene.cache.custom.spine.add\r\n * scene.textures.addBase64\r\n *\r\n * ## Using the plugin\r\n *\r\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\r\n *\r\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\r\n * Spine files directly, i.e.:\r\n *\r\n * ```javascript\r\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\r\n * ```\r\n *\r\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\r\n * and Spine Containers:\r\n *\r\n * ```javascript\r\n * const man = this.add.spine(512, 650, 'stretchyman');\r\n *\r\n * const container = this.add.spineContainer();\r\n *\r\n * container.add(man);\r\n * ```\r\n *\r\n * The first argument is the key which you used when importing the Spine data. There are lots of\r\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\r\n * see the respective documentation and examples for further details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\r\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\r\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\r\n * load arguments, or you may see black outlines around skeleton textures.\r\n *\r\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\r\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\r\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\r\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\r\n * game, regardless if the Scene loaded the Spine data or not.\r\n *\r\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\r\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\r\n *\r\n * ```javascript\r\n * this.plugins.removeScenePlugin('SpinePlugin');\r\n * ```\r\n *\r\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\r\n *\r\n * @class SpinePlugin\r\n * @extends Phaser.Plugins.ScenePlugin\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar SpinePlugin = new Class({\r\n\r\n Extends: ScenePlugin,\r\n\r\n initialize:\r\n\r\n function SpinePlugin (scene, pluginManager, pluginKey)\r\n {\r\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\r\n\r\n var game = pluginManager.game;\r\n\r\n /**\r\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\r\n *\r\n * @name SpinePlugin#isWebGL\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isWebGL = (game.config.renderType === 2);\r\n\r\n /**\r\n * A custom cache that stores the Spine atlas data.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.cache = game.cache.addCustom('spine');\r\n\r\n /**\r\n * A custom cache that stores the Spine Textures.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#spineTextures\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.spineTextures = game.cache.addCustom('spineTextures');\r\n\r\n /**\r\n * A reference to the global JSON Cache.\r\n *\r\n * @name SpinePlugin#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.json = game.cache.json;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name SpinePlugin#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.19.0\r\n */\r\n this.textures = game.textures;\r\n\r\n /**\r\n * A flag that sets if the Skeleton Renderers will render debug information over the top\r\n * of the skeleton or not.\r\n *\r\n * @name SpinePlugin#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The underlying WebGL context of the Phaser renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.19.0\r\n */\r\n this.gl;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name SpinePlugin#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.renderer;\r\n\r\n /**\r\n * An instance of the Spine WebGL Scene Renderer.\r\n *\r\n * There is only one instance of the Scene Renderer shared across the whole plugin.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#sceneRenderer\r\n * @type {spine.webgl.SceneRenderer}\r\n * @since 3.19.0\r\n */\r\n this.sceneRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Renderer.\r\n *\r\n * @name SpinePlugin#skeletonRenderer\r\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.skeletonRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Debug Renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#skeletonDebugRenderer\r\n * @type {spine.webgl.skeletonDebugRenderer}\r\n * @since 3.19.0\r\n */\r\n this.skeletonDebugRenderer;\r\n\r\n /**\r\n * A reference to the Spine runtime.\r\n * This is the runtime created by Esoteric Software.\r\n *\r\n * @name SpinePlugin#plugin\r\n * @type {spine}\r\n * @since 3.19.0\r\n */\r\n this.plugin = Spine;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp1\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp1;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp2\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp2;\r\n\r\n if (this.isWebGL)\r\n {\r\n this.runtime = Spine.webgl;\r\n\r\n this.renderer = game.renderer;\r\n this.gl = game.renderer.gl;\r\n\r\n this.getAtlas = this.getAtlasWebGL;\r\n }\r\n else\r\n {\r\n this.runtime = Spine.canvas;\r\n\r\n this.renderer = game.renderer;\r\n\r\n this.getAtlas = this.getAtlasCanvas;\r\n }\r\n\r\n // Headless mode?\r\n if (!this.renderer)\r\n {\r\n this.renderer = {\r\n width: game.scale.width,\r\n height: game.scale.height,\r\n preRender: NOOP,\r\n postRender: NOOP,\r\n render: NOOP,\r\n destroy: NOOP\r\n };\r\n }\r\n\r\n var isWebGL = this.isWebGL;\r\n\r\n var add = function (x, y, key, animationName, loop)\r\n {\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.clear();\r\n }\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, x, y, key, animationName, loop);\r\n\r\n this.displayList.add(spineGO);\r\n this.updateList.add(spineGO);\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.rebind();\r\n }\r\n\r\n return spineGO;\r\n };\r\n\r\n var make = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.clear();\r\n }\r\n\r\n var key = GetValue(config, 'key', null);\r\n var animationName = GetValue(config, 'animationName', null);\r\n var loop = GetValue(config, 'loop', false);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 0, 0, key, animationName, loop);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, spineGO, config);\r\n\r\n // Spine specific\r\n var skinName = GetValue(config, 'skinName', false);\r\n\r\n if (skinName)\r\n {\r\n spineGO.setSkinByName(skinName);\r\n }\r\n\r\n var slotName = GetValue(config, 'slotName', false);\r\n var attachmentName = GetValue(config, 'attachmentName', null);\r\n\r\n if (slotName)\r\n {\r\n spineGO.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.rebind();\r\n }\r\n\r\n return spineGO.refresh();\r\n };\r\n\r\n var addContainer = function (x, y, children)\r\n {\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n this.displayList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var makeContainer = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetValue(config, 'x', 0);\r\n var y = GetValue(config, 'y', 0);\r\n var children = GetValue(config, 'children', null);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var container = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n\r\n return container;\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\r\n },\r\n\r\n /**\r\n * Internal boot handler.\r\n *\r\n * @method SpinePlugin#boot\r\n * @private\r\n * @since 3.19.0\r\n */\r\n boot: function ()\r\n {\r\n if (this.isWebGL)\r\n {\r\n this.bootWebGL();\r\n this.onResize();\r\n this.game.scale.on(ResizeEvent, this.onResize, this);\r\n }\r\n else\r\n {\r\n this.bootCanvas();\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n eventEmitter.once('destroy', this.destroy, this);\r\n\r\n this.game.events.once('destroy', this.gameDestroy, this);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the Canvas Renderer.\r\n *\r\n * @method SpinePlugin#bootCanvas\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootCanvas: function ()\r\n {\r\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the WebGL Renderer.\r\n *\r\n * @method SpinePlugin#bootWebGL\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootWebGL: function ()\r\n {\r\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\r\n\r\n var setBlendMode = function (srcBlend, dstBlend)\r\n {\r\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\r\n {\r\n var gl = this.context.gl;\r\n\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n\r\n if (this.isDrawing)\r\n {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n }\r\n };\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (!sceneRenderer)\r\n {\r\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n sceneRenderer.batcher.setBlendMode = setBlendMode;\r\n sceneRenderer.shapes.setBlendMode = setBlendMode;\r\n\r\n this.renderer.spineSceneRenderer = sceneRenderer;\r\n }\r\n\r\n // All scene share the same instance\r\n this.sceneRenderer = sceneRenderer;\r\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer;\r\n\r\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\r\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasCanvas\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasCanvas: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage());\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasWebGL\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasWebGL: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n var gl = this.sceneRenderer.context.gl;\r\n\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage(), false);\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\r\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\r\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\r\n * outlines around skeleton textures.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\r\n * Loading a file using a key that is already taken will result in a warning.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.spine({\r\n * key: 'mainmenu',\r\n * jsonURL: 'boy.json',\r\n * atlasURL: 'boy.atlas',\r\n * preMultipliedAlpha: true\r\n * });\r\n * ```\r\n *\r\n * If you need to load multiple Spine atlas files, provide them as an array:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\r\n * }\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the data from the Spine plugin.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spine\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.19.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {object} [settings] - An external Settings configuration object { prefix: '' }\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\r\n {\r\n var multifile;\r\n settings = settings || {};\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new SpineFile(this, key[i]);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#worldToLocal\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The screen space x coordinate to convert.\r\n * @param {number} y - The screen space y coordinate to convert.\r\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\r\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\r\n *\r\n * @return {spine.Vector2} A Vector2 containing the translated point.\r\n */\r\n worldToLocal: function (x, y, skeleton, bone)\r\n {\r\n var temp1 = this.temp1;\r\n var temp2 = this.temp2;\r\n var camera = this.sceneRenderer.camera;\r\n\r\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\r\n\r\n var width = camera.viewportWidth;\r\n var height = camera.viewportHeight;\r\n\r\n camera.screenToWorld(temp1, width, height);\r\n\r\n if (bone && bone.parent !== null)\r\n {\r\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\r\n\r\n return new Spine.Vector2(temp2.x, temp2.y);\r\n }\r\n else if (bone)\r\n {\r\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\r\n }\r\n else\r\n {\r\n return new Spine.Vector2(temp1.x, temp1.y);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x and y values.\r\n *\r\n * @method SpinePlugin#getVector2\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector2: function (x, y)\r\n {\r\n return new Spine.Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x, y and z values.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#getVector3\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n * @param {number} z - The Vector z value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector3: function (x, y, z)\r\n {\r\n return new Spine.webgl.Vector3(x, y, z);\r\n },\r\n\r\n /**\r\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBones\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBones: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBones = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugRegionAttachments\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugRegionAttachments: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawRegionAttachments = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBoundingBoxes\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBoundingBoxes: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshHull\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshHull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshHull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshTriangles\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshTriangles: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshTriangles = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugPaths\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugPaths: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawPaths = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugSkeletonXY\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugSkeletonXY: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawSkeletonXY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugClipping\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugClipping: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawClipping = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the given vertex effect on the Spine Skeleton Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setEffect\r\n * @since 3.19.0\r\n *\r\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setEffect: function (effect)\r\n {\r\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\r\n *\r\n * The Skeleton data should have already been loaded before calling this method.\r\n *\r\n * @method SpinePlugin#createSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\r\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\r\n *\r\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\r\n */\r\n createSkeleton: function (key, skeletonJSON)\r\n {\r\n var atlasKey = key;\r\n var jsonKey = key;\r\n var split = (key.indexOf('.') !== -1);\r\n\r\n if (split)\r\n {\r\n var parts = key.split('.');\r\n\r\n atlasKey = parts.shift();\r\n jsonKey = parts.join('.');\r\n }\r\n\r\n var atlasData = this.cache.get(atlasKey);\r\n var atlas = this.getAtlas(atlasKey);\r\n\r\n if (!atlas)\r\n {\r\n return null;\r\n }\r\n\r\n if (!this.spineTextures.has(atlasKey))\r\n {\r\n this.spineTextures.add(atlasKey, atlas);\r\n }\r\n\r\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\r\n\r\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\r\n\r\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\r\n\r\n var data;\r\n\r\n if (skeletonJSON)\r\n {\r\n data = skeletonJSON;\r\n }\r\n else\r\n {\r\n var json = this.json.get(atlasKey);\r\n\r\n data = (split) ? GetValue(json, jsonKey) : json;\r\n }\r\n\r\n if (data)\r\n {\r\n var skeletonData = skeletonJson.readSkeletonData(data);\r\n\r\n var skeleton = new Spine.Skeleton(skeletonData);\r\n\r\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Animation State and Animation State Data for the given skeleton.\r\n *\r\n * The returned object contains two properties: `state` and `stateData` respectively.\r\n *\r\n * @method SpinePlugin#createAnimationState\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\r\n *\r\n * @return {any} An object containing the Animation State and Animation State Data instances.\r\n */\r\n createAnimationState: function (skeleton)\r\n {\r\n var stateData = new Spine.AnimationStateData(skeleton.data);\r\n\r\n var state = new Spine.AnimationState(stateData);\r\n\r\n return { stateData: stateData, state: state };\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpinePlugin#getBounds\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function (skeleton)\r\n {\r\n var offset = new Spine.Vector2();\r\n var size = new Spine.Vector2();\r\n\r\n skeleton.getBounds(offset, size, []);\r\n\r\n return { offset: offset, size: size };\r\n },\r\n\r\n /**\r\n * Internal handler for when the renderer resizes.\r\n *\r\n * Only called if running in WebGL.\r\n *\r\n * @method SpinePlugin#onResize\r\n * @since 3.19.0\r\n */\r\n onResize: function ()\r\n {\r\n var renderer = this.renderer;\r\n var sceneRenderer = this.sceneRenderer;\r\n\r\n var viewportWidth = renderer.width;\r\n var viewportHeight = renderer.height;\r\n\r\n sceneRenderer.camera.position.x = viewportWidth / 2;\r\n sceneRenderer.camera.position.y = viewportHeight / 2;\r\n\r\n sceneRenderer.camera.setViewport(viewportWidth, viewportHeight);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n *\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method SpinePlugin#shutdown\r\n * @private\r\n * @since 3.19.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n if (this.isWebGL)\r\n {\r\n this.game.scale.off(ResizeEvent, this.onResize, this);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n *\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method SpinePlugin#destroy\r\n * @private\r\n * @since 3.19.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.cache = null;\r\n this.spineTextures = null;\r\n this.json = null;\r\n this.textures = null;\r\n this.skeletonRenderer = null;\r\n this.gl = null;\r\n },\r\n\r\n /**\r\n * The Game that owns this plugin is being destroyed.\r\n *\r\n * Dispose of the Scene Renderer and remove the Game Objects.\r\n *\r\n * @method SpinePlugin#gameDestroy\r\n * @private\r\n * @since 3.50.0\r\n */\r\n gameDestroy: function ()\r\n {\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n this.pluginManager.removeGameObject('spineContainer', true, true);\r\n\r\n this.pluginManager = null;\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (sceneRenderer)\r\n {\r\n sceneRenderer.dispose();\r\n }\r\n\r\n this.renderer.spineSceneRenderer = null;\r\n this.sceneRenderer = null;\r\n }\r\n\r\n});\r\n\r\nSpinePlugin.SpineGameObject = SpineGameObject;\r\nSpinePlugin.SpineContainer = SpineContainer;\r\n\r\n/**\r\n * Creates a new Spine Game Object and adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\r\n *\r\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\r\n *\r\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\r\n * name, then use `SpinePlugin.make` instead.\r\n *\r\n * @method SpinePlugin#add\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\n/**\r\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 500, y: 500, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-idle', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * @method SpinePlugin#make\r\n * @since 3.19.0\r\n *\r\n * @param {any} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\nmodule.exports = SpinePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../../src/utils/Class');\r\nvar Container = require('../../../../src/gameobjects/container/Container');\r\nvar SpineContainerRender = require('./SpineContainerRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\r\n *\r\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\r\n * for Spine Game Objects. You must only add ever Spine Game Objects, or other Spine Containers, to this type of Container.\r\n * Although Phaser will not prevent you from adding other types, they will not render and are likely to throw runtime errors.\r\n *\r\n * To create one in a Scene, use the factory methods:\r\n *\r\n * ```javascript\r\n * this.add.spineContainer();\r\n * ```\r\n *\r\n * or\r\n *\r\n * ```javascript\r\n * this.make.spineContainer();\r\n * ```\r\n *\r\n * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\r\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\r\n * Spine Containers. In short, if you need masking, don't mix and match the types.\r\n *\r\n * See the Container documentation for further details about what Containers can do.\r\n *\r\n * @class SpineContainer\r\n * @extends Phaser.GameObjects.Container\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\r\n */\r\nvar SpineContainer = new Class({\r\n\r\n Extends: Container,\r\n\r\n Mixins: [\r\n SpineContainerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineContainer (scene, plugin, x, y, children)\r\n {\r\n Container.call(this, scene, x, y, children);\r\n\r\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\r\n this.type = 'Spine';\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineContainer#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.50.0\r\n */\r\n this.plugin = plugin;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineContainer#preDestroy\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineContainer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n camera.addToRenderList(container);\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = SpineContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineContainerWebGLRenderer#renderWebGL\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineContainer} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n var plugin = container.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n }\r\n\r\n return;\r\n }\r\n\r\n camera.addToRenderList(container);\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var rendererNextType = renderer.nextTypeMatch;\r\n\r\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\r\n renderer.nextTypeMatch = true;\r\n renderer.newType = false;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (child.willRender(camera, container))\r\n {\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.preRenderWebGL(renderer, child, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.postRenderWebGL(renderer, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n }\r\n }\r\n\r\n renderer.nextTypeMatch = rendererNextType;\r\n\r\n if (!rendererNextType || container.mask)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineContainerWebGLRenderer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AngleBetween = require('../../../../src/math/angle/Between');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar Class = require('../../../../src/utils/Class');\r\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\r\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\r\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\r\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\r\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\r\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar DegToRad = require('../../../../src/math/DegToRad');\r\nvar GameObject = require('../../../../src/gameobjects/GameObject');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar SpineEvents = require('../events/');\r\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\r\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\r\n * easily change the skin, slot attachment, bone positions and more.\r\n *\r\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\r\n * You can only create them if the Spine plugin has been loaded into Phaser.\r\n *\r\n * The quickest way is the Game Object Factory:\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\r\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\r\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\r\n * animation to loop. Look at the documentation for further details on each of these options.\r\n *\r\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\r\n * Configuration object:\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 512, y: 550, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-think', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\r\n * overall scale.\r\n *\r\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\r\n * update and render, it must be added to the display and update lists of your Scene:\r\n *\r\n * ```javascript\r\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\r\n * this.sys.displayList.add(jelly);\r\n * this.sys.updateList.add(jelly);\r\n * ```\r\n *\r\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\r\n * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup\r\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\r\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\r\n * input shape being created. If it's not suitable, provide your own shape to the `setInteractive` method.\r\n *\r\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\r\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\r\n * Object position with it. See the examples for further details.\r\n *\r\n * If your Spine Game Object has black outlines around the different parts of the texture when it\r\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\r\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\r\n *\r\n * @class SpineGameObject\r\n * @extends Phaser.GameObjects.GameObject\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n */\r\nvar SpineGameObject = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsComputedSize,\r\n ComponentsDepth,\r\n ComponentsFlip,\r\n ComponentsScrollFactor,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n SpineGameObjectRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\r\n {\r\n GameObject.call(this, scene, 'Spine');\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineGameObject#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.19.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The Spine Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeleton\r\n * @type {spine.Skeleton}\r\n * @since 3.19.0\r\n */\r\n this.skeleton = null;\r\n\r\n /**\r\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeletonData\r\n * @type {spine.SkeletonData}\r\n * @since 3.19.0\r\n */\r\n this.skeletonData = null;\r\n\r\n /**\r\n * The Spine Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#state\r\n * @type {spine.AnimationState}\r\n * @since 3.19.0\r\n */\r\n this.state = null;\r\n\r\n /**\r\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#stateData\r\n * @type {spine.AnimationStateData}\r\n * @since 3.19.0\r\n */\r\n this.stateData = null;\r\n\r\n /**\r\n * A reference to the root bone of the Skeleton.\r\n *\r\n * @name SpineGameObject#root\r\n * @type {spine.Bone}\r\n * @since 3.19.0\r\n */\r\n this.root = null;\r\n\r\n /**\r\n * This object holds the calculated bounds of the current\r\n * pose, as set when a new Skeleton is applied.\r\n *\r\n * @name SpineGameObject#bounds\r\n * @type {any}\r\n * @since 3.19.0\r\n */\r\n this.bounds = null;\r\n\r\n /**\r\n * A Game Object level flag that allows you to enable debug drawing\r\n * to the Skeleton Debug Renderer by toggling it.\r\n *\r\n * @name SpineGameObject#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The factor to scale the Animation update time by.\r\n *\r\n * @name SpineGameObject#timeScale\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginX\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginY\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * A flag that stores if the texture associated with the current\r\n * Skin being used by this Game Object, has its alpha pre-multiplied\r\n * into it, or not.\r\n *\r\n * @name SpineGameObject#preMultipliedAlpha\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.preMultipliedAlpha = false;\r\n\r\n /**\r\n * A default Blend Mode. You cannot change the blend mode of a\r\n * Spine Game Object.\r\n *\r\n * @name SpineGameObject#blendMode\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.blendMode = -1;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key)\r\n {\r\n this.setSkeleton(key, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Returns `true` if this Spine Game Object both has a skeleton and\r\n * also passes the render tests for the given Camera.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n *\r\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function (camera, container)\r\n {\r\n var GameObjectRenderMask = 15;\r\n\r\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\r\n\r\n if (!container && !result && this.parentContainer)\r\n {\r\n var plugin = this.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\r\n {\r\n sceneRenderer.end();\r\n\r\n plugin.renderer.pipelines.rebind();\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Set the Alpha level for the whole Skeleton of this Game Object.\r\n *\r\n * The alpha controls the opacity of the Game Object as it renders.\r\n *\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method SpineGameObject#setAlpha\r\n * @since 3.19.0\r\n *\r\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value, slotName)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n slot.color.a = Clamp(value, 0, 1);\r\n }\r\n }\r\n else\r\n {\r\n this.alpha = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#alpha\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.a = v;\r\n }\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~2;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 2;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of red used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#red\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.r = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of green used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#green\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.g = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of blue used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#blue\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.b = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\r\n *\r\n * @method SpineGameObject#setColor\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\r\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setColor: function (color, slotName)\r\n {\r\n if (color === undefined) { color = 0xffffff; }\r\n\r\n var red = (color >> 16 & 0xFF) / 255;\r\n var green = (color >> 8 & 0xFF) / 255;\r\n var blue = (color & 0xFF) / 255;\r\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\r\n\r\n var target = this.skeleton;\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n target = slot;\r\n }\r\n }\r\n\r\n target.color.r = red;\r\n target.color.g = green;\r\n target.color.b = blue;\r\n\r\n if (alpha !== null)\r\n {\r\n target.color.a = alpha;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\r\n * that contains the Skeleton data.\r\n *\r\n * @method SpineGameObject#setSkeletonFromJSON\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\r\n {\r\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on its cache key.\r\n *\r\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\r\n * or slot attachment, or any other property to adjust it.\r\n *\r\n * @method SpineGameObject#setSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\r\n\r\n this.skeletonData = data.skeletonData;\r\n\r\n this.preMultipliedAlpha = data.preMultipliedAlpha;\r\n\r\n var skeleton = data.skeleton;\r\n\r\n skeleton.setSkin();\r\n skeleton.setToSetupPose();\r\n\r\n this.skeleton = skeleton;\r\n\r\n // AnimationState\r\n data = this.plugin.createAnimationState(skeleton);\r\n\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.state = data.state;\r\n this.stateData = data.stateData;\r\n\r\n this.state.addListener({\r\n event: this.onEvent.bind(this),\r\n complete: this.onComplete.bind(this),\r\n start: this.onStart.bind(this),\r\n end: this.onEnd.bind(this),\r\n dispose: this.onDispose.bind(this),\r\n interrupted: this.onInterrupted.bind(this)\r\n });\r\n\r\n if (animationName)\r\n {\r\n this.setAnimation(0, animationName, loop);\r\n }\r\n\r\n this.root = this.getRootBone();\r\n\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.state.apply(skeleton);\r\n\r\n skeleton.updateCache();\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onComplete event via this Game Object.\r\n *\r\n * @method SpineGameObject#onComplete\r\n * @fires SpinePluginEvents#COMPLETE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onComplete: function (entry)\r\n {\r\n this.emit(SpineEvents.COMPLETE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onDispose event via this Game Object.\r\n *\r\n * @method SpineGameObject#onDispose\r\n * @fires SpinePluginEvents#DISPOSE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onDispose: function (entry)\r\n {\r\n this.emit(SpineEvents.DISPOSE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onEnd event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEnd\r\n * @fires SpinePluginEvents#END\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onEnd: function (entry)\r\n {\r\n this.emit(SpineEvents.END, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine Event event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEvent\r\n * @fires SpinePluginEvents#EVENT\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n * @param {spine.Event} event - The Spine event.\r\n */\r\n onEvent: function (entry, event)\r\n {\r\n this.emit(SpineEvents.EVENT, entry, event);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\r\n *\r\n * @method SpineGameObject#onInterrupted\r\n * @fires SpinePluginEvents#INTERRUPTED\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onInterrupted: function (entry)\r\n {\r\n this.emit(SpineEvents.INTERRUPTED, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onStart event via this Game Object.\r\n *\r\n * @method SpineGameObject#onStart\r\n * @fires SpinePluginEvents#START\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onStart: function (entry)\r\n {\r\n this.emit(SpineEvents.START, entry);\r\n },\r\n\r\n /**\r\n * Refreshes the data about the current Skeleton.\r\n *\r\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\r\n *\r\n * Call this method if you need to access the Skeleton data directly, and it may have changed\r\n * recently.\r\n *\r\n * @method SpineGameObject#refresh\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n refresh: function ()\r\n {\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.updateSize();\r\n\r\n this.skeleton.updateCache();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n *\r\n * If no arguments are given it uses the current skeleton data dimensions.\r\n *\r\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\r\n * when the skeleton data doesn't match what is required in-game.\r\n *\r\n * @method SpineGameObject#setSize\r\n * @since 3.19.0\r\n *\r\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\r\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSize: function (width, height, offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (width === undefined) { width = skeleton.data.width; }\r\n if (height === undefined) { height = skeleton.data.height; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of this Game Object from the Skeleton position.\r\n *\r\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\r\n *\r\n * @method SpineGameObject#setOffset\r\n * @since 3.19.0\r\n *\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setOffset: function (offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\r\n * It then syncs the skeleton bounds back to this Game Object.\r\n *\r\n * This method is called automatically as needed internally, however, it's also exposed should\r\n * you require overriding the size settings.\r\n *\r\n * @method SpineGameObject#updateSize\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n updateSize: function ()\r\n {\r\n var skeleton = this.skeleton;\r\n var renderer = this.plugin.renderer;\r\n\r\n var height = renderer.height;\r\n\r\n var oldScaleX = this.scaleX;\r\n var oldScaleY = this.scaleY;\r\n\r\n skeleton.x = this.x;\r\n skeleton.y = height - this.y;\r\n skeleton.scaleX = 1;\r\n skeleton.scaleY = 1;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n var bounds = this.getBounds();\r\n\r\n this.width = bounds.size.x;\r\n this.height = bounds.size.y;\r\n\r\n this.displayOriginX = this.x - bounds.offset.x;\r\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\r\n\r\n skeleton.scaleX = oldScaleX;\r\n skeleton.scaleY = oldScaleY;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the bones in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getBoneList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\r\n */\r\n getBoneList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.bones.length; i++)\r\n {\r\n output.push(skeletonData.bones[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the skins in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getSkinList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\r\n */\r\n getSkinList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.skins.length; i++)\r\n {\r\n output.push(skeletonData.skins[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the slots in the Skeleton.\r\n *\r\n * @method SpineGameObject#getSlotList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\r\n */\r\n getSlotList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeleton = this.skeleton;\r\n\r\n for (var i = 0; i < skeleton.slots.length; i++)\r\n {\r\n output.push(skeleton.slots[i].data.name);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the animations in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getAnimationList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\r\n */\r\n getAnimationList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.animations.length; i++)\r\n {\r\n output.push(skeletonData.animations[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the current animation being played on the given track, if any.\r\n *\r\n * @method SpineGameObject#getCurrentAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\r\n *\r\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\r\n */\r\n getCurrentAnimation: function (trackIndex)\r\n {\r\n if (trackIndex === undefined) { trackIndex = 0; }\r\n\r\n var current = this.state.getCurrent(trackIndex);\r\n\r\n if (current)\r\n {\r\n return current.animation;\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#play\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\r\n */\r\n play: function (animationName, loop, ignoreIfPlaying)\r\n {\r\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#setAnimation\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to play the animation on.\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n\r\n if (ignoreIfPlaying && this.state)\r\n {\r\n var currentTrack = this.state.getCurrent(trackIndex);\r\n\r\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (this.findAnimation(animationName))\r\n {\r\n return this.state.setAnimation(trackIndex, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an animation to be played after the current or last queued animation for a track.\r\n * If the track is empty, it is equivalent to calling setAnimation.\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\r\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\r\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\r\n * If the previous entry is looping, its next loop completion is used instead of its duration.\r\n *\r\n * @method SpineGameObject#addAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {string} animationName - The string-based key of the animation to add.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n addAnimation: function (trackIndex, animationName, loop, delay)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (delay === undefined) { delay = 0; }\r\n\r\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\r\n },\r\n\r\n /**\r\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\r\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n *\r\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\r\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\r\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\r\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\r\n * A mix duration of 0 still mixes out over one frame.\r\n *\r\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\r\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\r\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\r\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\r\n * property to the value keyed in the new animation.\r\n *\r\n * @method SpineGameObject#setEmptyAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {spine.TrackEntry} The returned Track Entry.\r\n */\r\n setEmptyAnimation: function (trackIndex, mixDuration)\r\n {\r\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\r\n },\r\n\r\n /**\r\n * Removes all animations from the track, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTrack\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTrack: function (trackIndex)\r\n {\r\n this.state.clearTrack(trackIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all animations from all tracks, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTracks\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTracks: function ()\r\n {\r\n this.state.clearTracks();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkinByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to set.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkinByName: function (skinName)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkinByName(skinName);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkin\r\n * @since 3.19.0\r\n *\r\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkin: function (newSkin)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkin(newSkin);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mix duration when changing from the specified animation to the other.\r\n *\r\n * @method SpineGameObject#setMix\r\n * @since 3.19.0\r\n *\r\n * @param {string} fromName - The animation to mix from.\r\n * @param {string} toName - The animation to mix to.\r\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMix: function (fromName, toName, duration)\r\n {\r\n this.stateData.setMix(fromName, toName, duration);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot\r\n * index and attachment name. First the skin is checked and if the attachment was not found,\r\n * the default skin is checked.\r\n *\r\n * @method SpineGameObject#getAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {integer} slotIndex - The slot index to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachment: function (slotIndex, attachmentName)\r\n {\r\n return this.skeleton.getAttachment(slotIndex, attachmentName);\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\r\n *\r\n * @method SpineGameObject#getAttachmentByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachmentByName: function (slotName, attachmentName)\r\n {\r\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n },\r\n\r\n /**\r\n * A convenience method to set an attachment by finding the slot with findSlot,\r\n * finding the attachment with getAttachment, then setting the slot's attachment.\r\n *\r\n * @method SpineGameObject#setAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to add the attachment to.\r\n * @param {string} attachmentName - The attachment name to add.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAttachment: function (slotName, attachmentName)\r\n {\r\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\r\n {\r\n for (var i = 0; i < slotName.length; i++)\r\n {\r\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\r\n }\r\n }\r\n else\r\n {\r\n this.skeleton.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setToSetupPose: function ()\r\n {\r\n this.skeleton.setToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the slots and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setSlotsToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSlotsToSetupPose: function ()\r\n {\r\n this.skeleton.setSlotsToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones and constraints to their setup pose values.\r\n *\r\n * @method SpineGameObject#setBonesToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBonesToSetupPose: function ()\r\n {\r\n this.skeleton.setBonesToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the root bone, or null.\r\n *\r\n * @method SpineGameObject#getRootBone\r\n * @since 3.19.0\r\n *\r\n * @return {spine.Bone} The root bone, or null.\r\n */\r\n getRootBone: function ()\r\n {\r\n return this.skeleton.getRootBone();\r\n },\r\n\r\n /**\r\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\r\n * towards the given position. You can set an optional angle offset, should the bone be\r\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\r\n *\r\n * @method SpineGameObject#angleBoneToXY\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\r\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\r\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\r\n * @param {number} [offset=0] - An offset to add to the rotation angle.\r\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\r\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n if (minAngle === undefined) { minAngle = 0; }\r\n if (maxAngle === undefined) { maxAngle = 360; }\r\n\r\n var renderer = this.plugin.renderer;\r\n var height = renderer.height;\r\n\r\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\r\n\r\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBone\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {spine.Bone} The bone, or null.\r\n */\r\n findBone: function (boneName)\r\n {\r\n return this.skeleton.findBone(boneName);\r\n },\r\n\r\n /**\r\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBoneIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {integer} The bone index. Or -1 if the bone was not found.\r\n */\r\n findBoneIndex: function (boneName)\r\n {\r\n return this.skeleton.findBoneIndex(boneName);\r\n },\r\n\r\n /**\r\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlot\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {spine.Slot} The Slot. May be null.\r\n */\r\n findSlot: function (slotName)\r\n {\r\n return this.skeleton.findSlot(slotName);\r\n },\r\n\r\n /**\r\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlotIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {integer} The slot index. Or -1 if the Slot was not found.\r\n */\r\n findSlotIndex: function (slotName)\r\n {\r\n return this.skeleton.findSlotIndex(slotName);\r\n },\r\n\r\n /**\r\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\r\n * this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSkin\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to find.\r\n *\r\n * @return {spine.Skin} The Skin. May be null.\r\n */\r\n findSkin: function (skinName)\r\n {\r\n return this.skeletonData.findSkin(skinName);\r\n },\r\n\r\n /**\r\n * Finds an event by comparing each events's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findEvent\r\n * @since 3.19.0\r\n *\r\n * @param {string} eventDataName - The name of the event to find.\r\n *\r\n * @return {spine.EventData} The Event Data. May be null.\r\n */\r\n findEvent: function (eventDataName)\r\n {\r\n return this.skeletonData.findEvent(eventDataName);\r\n },\r\n\r\n /**\r\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The name of the animation to find.\r\n *\r\n * @return {spine.Animation} The Animation. May be null.\r\n */\r\n findAnimation: function (animationName)\r\n {\r\n return this.skeletonData.findAnimation(animationName);\r\n },\r\n\r\n /**\r\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findIkConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.IkConstraintData} The IK constraint. May be null.\r\n */\r\n findIkConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findIkConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds an transform constraint by comparing each transform constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findTransformConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\r\n */\r\n findTransformConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findTransformConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.PathConstraintData} The path constraint. May be null.\r\n */\r\n findPathConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds the index of a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraintIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\r\n */\r\n findPathConstraintIndex: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraintIndex(constraintName);\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpineGameObject#getBounds\r\n * @since 3.19.0\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function ()\r\n {\r\n return this.plugin.getBounds(this.skeleton);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method SpineGameObject#preUpdate\r\n * @protected\r\n * @since 3.19.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n this.state.update((delta / 1000) * this.timeScale);\r\n\r\n this.state.apply(skeleton);\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineGameObject#preDestroy\r\n * @protected\r\n * @since 3.19.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.plugin = null;\r\n\r\n this.skeleton = null;\r\n this.skeletonData = null;\r\n\r\n this.state = null;\r\n this.stateData = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderCanvas\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatrix)\r\n{\r\n var context = renderer.currentContext;\r\n\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var skeletonRenderer = plugin.skeletonRenderer;\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n camera.addToRenderList(src);\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n\r\n // Inverse or we get upside-down skeletons\r\n skeleton.scaleY = calcMatrix.scaleY * -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n if (camera.renderToTexture)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n skeletonRenderer.ctx = context;\r\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\r\n\r\n context.save();\r\n\r\n skeletonRenderer.draw(skeleton);\r\n\r\n context.restore();\r\n};\r\n\r\nmodule.exports = SpineGameObjectCanvasRenderer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Directly renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderDirect\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n }\r\n\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLDirect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderWebGL\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n\r\n // The Spine debug draw has reset the batcher, so we need to do this regardless:\r\n sceneRenderer.end();\r\n renderer.pipelines.rebind();\r\n }\r\n else if (!renderer.nextTypeMatch)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Global constants.\r\n *\r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Phaser Release Version\r\n *\r\n * @name Phaser.VERSION\r\n * @const\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n VERSION: '3.60.0',\r\n\r\n BlendModes: require('./renderer/BlendModes'),\r\n\r\n ScaleModes: require('./renderer/ScaleModes'),\r\n\r\n /**\r\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\r\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\r\n *\r\n * @name Phaser.AUTO\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n AUTO: 0,\r\n\r\n /**\r\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\r\n * WebGL or not.\r\n *\r\n * @name Phaser.CANVAS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n CANVAS: 1,\r\n\r\n /**\r\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\r\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\r\n * message to the user.\r\n *\r\n * @name Phaser.WEBGL\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n WEBGL: 2,\r\n\r\n /**\r\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\r\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\r\n * not for running Phaser on the server, which is something you really shouldn't do.\r\n *\r\n * @name Phaser.HEADLESS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n HEADLESS: 3,\r\n\r\n /**\r\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\r\n * to help you remember what the value is doing in your code.\r\n *\r\n * @name Phaser.FOREVER\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FOREVER: -1,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.NONE\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n NONE: 4,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.UP\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n UP: 5,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.DOWN\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DOWN: 6,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.LEFT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LEFT: 7,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.RIGHT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 8\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n *\r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once(Events.DESTROY, this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n *\r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {number} [data=1] - The amount to increase the given key by. Pass a negative value to decrease the key.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n\r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n *\r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n *\r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n *\r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.on('changedata', listener)`.\r\n *\r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Data Manager Destroy Event.\r\n *\r\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\r\n *\r\n * @event Phaser.Data.Events#DESTROY\r\n * @type {string}\r\n * @since 3.50.0\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.audio` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Audio\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} audioData - Can this device play HTML Audio tags?\r\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\r\n * @property {boolean} m4a - Can this device can play m4a files.\r\n * @property {boolean} aac - Can this device can play aac files.\r\n * @property {boolean} flac - Can this device can play flac files.\r\n * @property {boolean} mp3 - Can this device play mp3 files?\r\n * @property {boolean} ogg - Can this device play ogg files?\r\n * @property {boolean} opus - Can this device play opus files?\r\n * @property {boolean} wav - Can this device play wav files?\r\n * @property {boolean} webAudio - Does this device have the Web Audio API?\r\n * @property {boolean} webm - Can this device play webm files?\r\n */\r\nvar Audio = {\r\n\r\n flac: false,\r\n aac: false,\r\n audioData: false,\r\n dolby: false,\r\n m4a: false,\r\n mp3: false,\r\n ogg: false,\r\n opus: false,\r\n wav: false,\r\n webAudio: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Audio;\r\n }\r\n\r\n Audio.audioData = !!(window['Audio']);\r\n\r\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\r\n\r\n var audioElement = document.createElement('audio');\r\n var result = !!audioElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n var CanPlay = function (type1, type2)\r\n {\r\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\r\n\r\n if (type2)\r\n {\r\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\r\n }\r\n else\r\n {\r\n return Boolean(canPlayType1);\r\n }\r\n };\r\n\r\n // wav Mimetypes accepted:\r\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\r\n\r\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\r\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\r\n Audio.mp3 = CanPlay('mpeg');\r\n Audio.wav = CanPlay('wav');\r\n Audio.m4a = CanPlay('x-m4a');\r\n Audio.aac = CanPlay('aac');\r\n Audio.flac = CanPlay('flac', 'x-flac');\r\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\r\n\r\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\r\n {\r\n if (Browser.edge)\r\n {\r\n Audio.dolby = true;\r\n }\r\n else if (Browser.safari && Browser.safariVersion >= 9)\r\n {\r\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\r\n {\r\n var major = parseInt(RegExp.$1, 10);\r\n var minor = parseInt(RegExp.$2, 10);\r\n\r\n if ((major === 10 && minor >= 11) || major > 10)\r\n {\r\n Audio.dolby = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do here\r\n }\r\n\r\n return Audio;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\n\r\n/**\r\n * Determines the browser type and version running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.browser` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Browser\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} chrome - Set to true if running in Chrome.\r\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\r\n * @property {boolean} firefox - Set to true if running in Firefox.\r\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\r\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\r\n * @property {boolean} opera - Set to true if running in Opera.\r\n * @property {boolean} safari - Set to true if running in Safari.\r\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\r\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\r\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\r\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\r\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\r\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\r\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\r\n */\r\nvar Browser = {\r\n\r\n chrome: false,\r\n chromeVersion: 0,\r\n edge: false,\r\n firefox: false,\r\n firefoxVersion: 0,\r\n ie: false,\r\n ieVersion: 0,\r\n mobileSafari: false,\r\n opera: false,\r\n safari: false,\r\n safariVersion: 0,\r\n silk: false,\r\n trident: false,\r\n tridentVersion: 0,\r\n es2019: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Edg\\/\\d+/).test(ua))\r\n {\r\n Browser.edge = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/OPR/).test(ua))\r\n {\r\n Browser.opera = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.chrome = true;\r\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.chromeVersion > 69);\r\n }\r\n else if ((/Firefox\\D+(\\d+)/).test(ua))\r\n {\r\n Browser.firefox = true;\r\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.firefoxVersion > 10);\r\n }\r\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\r\n {\r\n Browser.mobileSafari = true;\r\n }\r\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.ieVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.safari = true;\r\n Browser.safariVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.safariVersion > 10);\r\n }\r\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.trident = true;\r\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\r\n Browser.ieVersion = parseInt(RegExp.$3, 10);\r\n }\r\n\r\n // Silk gets its own if clause because its ua also contains 'Safari'\r\n if ((/Silk/).test(ua))\r\n {\r\n Browser.silk = true;\r\n }\r\n\r\n return Browser;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the canvas features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.CanvasFeatures\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\r\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\r\n */\r\nvar CanvasFeatures = {\r\n\r\n supportInverseAlpha: false,\r\n supportNewBlendModes: false\r\n\r\n};\r\n\r\nfunction checkBlendMode ()\r\n{\r\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\r\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\r\n\r\n var magenta = new Image();\r\n\r\n magenta.onload = function ()\r\n {\r\n var yellow = new Image();\r\n\r\n yellow.onload = function ()\r\n {\r\n var canvas = CanvasPool.create2D(yellow, 6);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.globalCompositeOperation = 'multiply';\r\n\r\n context.drawImage(magenta, 0, 0);\r\n context.drawImage(yellow, 2, 0);\r\n\r\n if (!context.getImageData(2, 0, 1, 1))\r\n {\r\n return false;\r\n }\r\n\r\n var data = context.getImageData(2, 0, 1, 1).data;\r\n\r\n CanvasPool.remove(yellow);\r\n\r\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\r\n };\r\n\r\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\r\n };\r\n\r\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\r\n\r\n return false;\r\n}\r\n\r\nfunction checkInverseAlpha ()\r\n{\r\n var canvas = CanvasPool.create2D(this, 2);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\r\n\r\n // Draw a single pixel\r\n context.fillRect(0, 0, 1, 1);\r\n\r\n // Get the color values\r\n var s1 = context.getImageData(0, 0, 1, 1);\r\n\r\n if (s1 === null)\r\n {\r\n return false;\r\n }\r\n\r\n // Plot them to x2\r\n context.putImageData(s1, 1, 0);\r\n\r\n // Get those values\r\n var s2 = context.getImageData(1, 0, 1, 1);\r\n\r\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\r\n\r\n CanvasPool.remove(this);\r\n\r\n // Compare and return\r\n return result;\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts !== 'function' && document !== undefined)\r\n {\r\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\r\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\r\n }\r\n\r\n return CanvasFeatures;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\nvar Browser = require('./Browser');\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.features` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Features\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} canvas - Is canvas available?\r\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\r\n * @property {boolean} file - Is file available?\r\n * @property {boolean} fileSystem - Is fileSystem available?\r\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\r\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\r\n * @property {boolean} localStorage - Is localStorage available?\r\n * @property {boolean} pointerLock - Is Pointer Lock available?\r\n * @property {boolean} stableSort - Is Array.sort stable?\r\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\r\n * @property {boolean} vibration - Does the device support the Vibration API?\r\n * @property {boolean} webGL - Is webGL available?\r\n * @property {boolean} worker - Is worker available?\r\n */\r\nvar Features = {\r\n\r\n canvas: false,\r\n canvasBitBltShift: null,\r\n file: false,\r\n fileSystem: false,\r\n getUserMedia: true,\r\n littleEndian: false,\r\n localStorage: false,\r\n pointerLock: false,\r\n stableSort: false,\r\n support32bit: false,\r\n vibration: false,\r\n webGL: false,\r\n worker: false\r\n\r\n};\r\n\r\n// Check Little or Big Endian system.\r\n// @author Matt DesLauriers (@mattdesl)\r\nfunction checkIsLittleEndian ()\r\n{\r\n var a = new ArrayBuffer(4);\r\n var b = new Uint8Array(a);\r\n var c = new Uint32Array(a);\r\n\r\n b[0] = 0xa1;\r\n b[1] = 0xb2;\r\n b[2] = 0xc3;\r\n b[3] = 0xd4;\r\n\r\n if (c[0] === 0xd4c3b2a1)\r\n {\r\n return true;\r\n }\r\n\r\n if (c[0] === 0xa1b2c3d4)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n // Could not determine endianness\r\n return null;\r\n }\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Features;\r\n }\r\n\r\n Features.canvas = !!window['CanvasRenderingContext2D'];\r\n\r\n try\r\n {\r\n Features.localStorage = !!localStorage.getItem;\r\n }\r\n catch (error)\r\n {\r\n Features.localStorage = false;\r\n }\r\n\r\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\r\n Features.fileSystem = !!window['requestFileSystem'];\r\n\r\n var isUint8 = false;\r\n\r\n var testWebGL = function ()\r\n {\r\n if (window['WebGLRenderingContext'])\r\n {\r\n try\r\n {\r\n var canvas = CanvasPool.createWebGL(this);\r\n\r\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\r\n\r\n var canvas2D = CanvasPool.create2D(this);\r\n\r\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\r\n\r\n // Can't be done on a webgl context\r\n var image = ctx2D.createImageData(1, 1);\r\n\r\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\r\n // @author Matt DesLauriers (@mattdesl)\r\n isUint8 = image.data instanceof Uint8ClampedArray;\r\n\r\n CanvasPool.remove(canvas);\r\n CanvasPool.remove(canvas2D);\r\n\r\n return !!ctx;\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n Features.webGL = testWebGL();\r\n\r\n Features.worker = !!window['Worker'];\r\n\r\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\r\n\r\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\r\n\r\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\r\n\r\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\r\n\r\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\r\n if (Browser.firefox && Browser.firefoxVersion < 21)\r\n {\r\n Features.getUserMedia = false;\r\n }\r\n\r\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\r\n // is safer to not try and use the fast copy-over method.\r\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\r\n {\r\n Features.canvasBitBltShift = true;\r\n }\r\n\r\n // Known not to work\r\n if (Browser.safari || Browser.mobileSafari)\r\n {\r\n Features.canvasBitBltShift = false;\r\n }\r\n\r\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\r\n\r\n if (navigator.vibrate)\r\n {\r\n Features.vibration = true;\r\n }\r\n\r\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\r\n {\r\n Features.littleEndian = checkIsLittleEndian();\r\n }\r\n\r\n Features.support32bit = (\r\n typeof ArrayBuffer !== 'undefined' &&\r\n typeof Uint8ClampedArray !== 'undefined' &&\r\n typeof Int32Array !== 'undefined' &&\r\n Features.littleEndian !== null &&\r\n isUint8\r\n );\r\n\r\n return Features;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the full screen support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.fullscreen` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Fullscreen\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} available - Does the browser support the Full Screen API?\r\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\r\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\r\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\r\n */\r\nvar Fullscreen = {\r\n\r\n available: false,\r\n cancel: '',\r\n keyboard: false,\r\n request: ''\r\n\r\n};\r\n\r\n/**\r\n* Checks for support of the Full Screen API.\r\n*\r\n* @ignore\r\n*/\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Fullscreen;\r\n }\r\n\r\n var i;\r\n\r\n var suffix1 = 'Fullscreen';\r\n var suffix2 = 'FullScreen';\r\n\r\n var fs = [\r\n 'request' + suffix1,\r\n 'request' + suffix2,\r\n 'webkitRequest' + suffix1,\r\n 'webkitRequest' + suffix2,\r\n 'msRequest' + suffix1,\r\n 'msRequest' + suffix2,\r\n 'mozRequest' + suffix2,\r\n 'mozRequest' + suffix1\r\n ];\r\n\r\n for (i = 0; i < fs.length; i++)\r\n {\r\n if (document.documentElement[fs[i]])\r\n {\r\n Fullscreen.available = true;\r\n Fullscreen.request = fs[i];\r\n break;\r\n }\r\n }\r\n\r\n var cfs = [\r\n 'cancel' + suffix2,\r\n 'exit' + suffix1,\r\n 'webkitCancel' + suffix2,\r\n 'webkitExit' + suffix1,\r\n 'msCancel' + suffix2,\r\n 'msExit' + suffix1,\r\n 'mozCancel' + suffix2,\r\n 'mozExit' + suffix1\r\n ];\r\n\r\n if (Fullscreen.available)\r\n {\r\n for (i = 0; i < cfs.length; i++)\r\n {\r\n if (document[cfs[i]])\r\n {\r\n Fullscreen.cancel = cfs[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Keyboard Input?\r\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\r\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\r\n {\r\n Fullscreen.keyboard = true;\r\n }\r\n\r\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\r\n\r\n return Fullscreen;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the input support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.input` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Input\r\n * @since 3.0.0\r\n *\r\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\r\n * @property {boolean} gamepads - Is navigator.getGamepads available?\r\n * @property {boolean} mspointer - Is mspointer available?\r\n * @property {boolean} touch - Is touch available?\r\n */\r\nvar Input = {\r\n\r\n gamepads: false,\r\n mspointer: false,\r\n touch: false,\r\n wheelEvent: null\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Input;\r\n }\r\n\r\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\r\n {\r\n Input.touch = true;\r\n }\r\n\r\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\r\n {\r\n Input.mspointer = true;\r\n }\r\n\r\n if (navigator.getGamepads)\r\n {\r\n Input.gamepads = true;\r\n }\r\n\r\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\r\n {\r\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\r\n Input.wheelEvent = 'wheel';\r\n }\r\n else if ('onmousewheel' in window)\r\n {\r\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\r\n Input.wheelEvent = 'mousewheel';\r\n }\r\n else if (Browser.firefox && 'MouseScrollEvent' in window)\r\n {\r\n // FF prior to 17. This should probably be scrubbed.\r\n Input.wheelEvent = 'DOMMouseScroll';\r\n }\r\n\r\n return Input;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the operating system of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.os` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.OS\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} android - Is running on android?\r\n * @property {boolean} chromeOS - Is running on chromeOS?\r\n * @property {boolean} cordova - Is the game running under Apache Cordova?\r\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\r\n * @property {boolean} desktop - Is running on a desktop?\r\n * @property {boolean} ejecta - Is the game running under Ejecta?\r\n * @property {boolean} electron - Is the game running under GitHub Electron?\r\n * @property {boolean} iOS - Is running on iOS?\r\n * @property {boolean} iPad - Is running on iPad?\r\n * @property {boolean} iPhone - Is running on iPhone?\r\n * @property {boolean} kindle - Is running on an Amazon Kindle?\r\n * @property {boolean} linux - Is running on linux?\r\n * @property {boolean} macOS - Is running on macOS?\r\n * @property {boolean} node - Is the game running under Node.js?\r\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\r\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\r\n * @property {boolean} windows - Is running on windows?\r\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\r\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\r\n * @property {number} pixelRatio - PixelRatio of the host device?\r\n */\r\nvar OS = {\r\n\r\n android: false,\r\n chromeOS: false,\r\n cordova: false,\r\n crosswalk: false,\r\n desktop: false,\r\n ejecta: false,\r\n electron: false,\r\n iOS: false,\r\n iOSVersion: 0,\r\n iPad: false,\r\n iPhone: false,\r\n kindle: false,\r\n linux: false,\r\n macOS: false,\r\n node: false,\r\n nodeWebkit: false,\r\n pixelRatio: 1,\r\n webApp: false,\r\n windows: false,\r\n windowsPhone: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return OS;\r\n }\r\n\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Windows/).test(ua))\r\n {\r\n OS.windows = true;\r\n }\r\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\r\n {\r\n // Because iOS 13 identifies as Mac OS:\r\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\r\n {\r\n OS.iOS = true;\r\n OS.iPad = true;\r\n\r\n (navigator.appVersion).match(/Version\\/(\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else\r\n {\r\n OS.macOS = true;\r\n }\r\n }\r\n else if ((/Android/).test(ua))\r\n {\r\n OS.android = true;\r\n }\r\n else if ((/Linux/).test(ua))\r\n {\r\n OS.linux = true;\r\n }\r\n else if ((/iP[ao]d|iPhone/i).test(ua))\r\n {\r\n OS.iOS = true;\r\n\r\n (navigator.appVersion).match(/OS (\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n\r\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\r\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\r\n }\r\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\r\n {\r\n OS.kindle = true;\r\n\r\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\r\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\r\n }\r\n else if ((/CrOS/).test(ua))\r\n {\r\n OS.chromeOS = true;\r\n }\r\n\r\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\r\n {\r\n OS.android = false;\r\n OS.iOS = false;\r\n OS.macOS = false;\r\n OS.windows = true;\r\n OS.windowsPhone = true;\r\n }\r\n\r\n var silk = (/Silk/).test(ua);\r\n\r\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\r\n {\r\n OS.desktop = true;\r\n }\r\n\r\n // Windows Phone / Table reset\r\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\r\n {\r\n OS.desktop = false;\r\n }\r\n\r\n // WebApp mode in iOS\r\n if (navigator.standalone)\r\n {\r\n OS.webApp = true;\r\n }\r\n\r\n if (typeof importScripts !== 'function')\r\n {\r\n if (window.cordova !== undefined)\r\n {\r\n OS.cordova = true;\r\n }\r\n\r\n if (window.ejecta !== undefined)\r\n {\r\n OS.ejecta = true;\r\n }\r\n }\r\n\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\r\n {\r\n OS.node = true;\r\n }\r\n\r\n if (OS.node && typeof process.versions === 'object')\r\n {\r\n OS.nodeWebkit = !!process.versions['node-webkit'];\r\n\r\n OS.electron = !!process.versions.electron;\r\n }\r\n\r\n if ((/Crosswalk/).test(ua))\r\n {\r\n OS.crosswalk = true;\r\n }\r\n\r\n OS.pixelRatio = window['devicePixelRatio'] || 1;\r\n\r\n return OS;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\n\r\n/**\r\n * Determines the video support of the browser running this Phaser Game instance.\r\n *\r\n * These values are read-only and populated during the boot sequence of the game.\r\n *\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.video` from within any Scene.\r\n *\r\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\r\n *\r\n * @typedef {object} Phaser.Device.Video\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\r\n * @property {boolean} hls - Can this device play hls video files?\r\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\r\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\r\n * @property {boolean} ogg - Can this device play ogg video files?\r\n * @property {boolean} vp9 - Can this device play vp9 video files?\r\n * @property {boolean} webm - Can this device play webm video files?\r\n * @property {function} getVideoURL - Returns the first video URL that can be played by this browser.\r\n */\r\nvar Video = {\r\n\r\n h264: false,\r\n hls: false,\r\n mp4: false,\r\n m4v: false,\r\n ogg: false,\r\n vp9: false,\r\n webm: false,\r\n hasRequestVideoFrame: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Video;\r\n }\r\n\r\n var videoElement = document.createElement('video');\r\n var result = !!videoElement.canPlayType;\r\n var no = /^no$/;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\r\n {\r\n Video.ogg = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\r\n Video.h264 = true;\r\n Video.mp4 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\r\n {\r\n Video.m4v = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\r\n {\r\n Video.webm = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\r\n {\r\n Video.vp9 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n Video.hls = true;\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do\r\n }\r\n\r\n if (videoElement.parentNode)\r\n {\r\n videoElement.parentNode.removeChild(videoElement);\r\n }\r\n\r\n Video.getVideoURL = function (urls)\r\n {\r\n if (!Array.isArray(urls))\r\n {\r\n urls = [ urls ];\r\n }\r\n\r\n for (var i = 0; i < urls.length; i++)\r\n {\r\n var url = GetFastValue(urls[i], 'url', urls[i]);\r\n\r\n if (url.indexOf('blob:') === 0)\r\n {\r\n return {\r\n url: url,\r\n type: ''\r\n };\r\n }\r\n\r\n var videoType;\r\n\r\n if (url.indexOf('data:') === 0)\r\n {\r\n videoType = url.split(',')[0].match(/\\/(.*?);/);\r\n }\r\n else\r\n {\r\n videoType = url.match(/\\.([a-zA-Z0-9]+)($|\\?)/);\r\n }\r\n\r\n videoType = GetFastValue(urls[i], 'type', (videoType) ? videoType[1] : '').toLowerCase();\r\n\r\n if (Video[videoType])\r\n {\r\n return {\r\n url: url,\r\n type: videoType\r\n };\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n return Video;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// This singleton is instantiated as soon as Phaser loads,\r\n// before a Phaser.Game instance has even been created.\r\n// Which means all instances of Phaser Games can share it,\r\n// without having to re-poll the device all over again\r\n\r\n/**\r\n * @namespace Phaser.Device\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.DeviceConf\r\n *\r\n * @property {Phaser.Device.OS} os - The OS Device functions.\r\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\r\n * @property {Phaser.Device.Features} features - The Features Device functions.\r\n * @property {Phaser.Device.Input} input - The Input Device functions.\r\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\r\n * @property {Phaser.Device.Video} video - The Video Device functions.\r\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\r\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\r\n */\r\n\r\nmodule.exports = {\r\n\r\n os: require('./OS'),\r\n browser: require('./Browser'),\r\n features: require('./Features'),\r\n input: require('./Input'),\r\n audio: require('./Audio'),\r\n video: require('./Video'),\r\n fullscreen: require('./Fullscreen'),\r\n canvasFeatures: require('./CanvasFeatures')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar tempMatrix = new Float32Array(20);\r\n\r\n/**\r\n * @classdesc\r\n * The ColorMatrix class creates a 5x4 matrix that can be used in shaders and graphics\r\n * operations. It provides methods required to modify the color values, such as adjusting\r\n * the brightness, setting a sepia tone, hue rotation and more.\r\n *\r\n * Use the method `getData` to return a Float32Array containing the current color values.\r\n *\r\n * @class ColorMatrix\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.50.0\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function ColorMatrix ()\r\n {\r\n /**\r\n * Internal ColorMatrix array.\r\n *\r\n * @name Phaser.Display.ColorMatrix#_matrix\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._matrix = new Float32Array(20);\r\n\r\n /**\r\n * The value that determines how much of the original color is used\r\n * when mixing the colors. A value between 0 (all original) and 1 (all final)\r\n *\r\n * @name Phaser.Display.ColorMatrix#alpha\r\n * @type {number}\r\n * @since 3.50.0\r\n */\r\n this.alpha = 1;\r\n\r\n /**\r\n * Is the ColorMatrix array dirty?\r\n *\r\n * @name Phaser.Display.ColorMatrix#_dirty\r\n * @type {boolean}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._dirty = true;\r\n\r\n /**\r\n * The matrix data as a Float32Array.\r\n *\r\n * Returned by the `getData` method.\r\n *\r\n * @name Phaser.Display.ColorMatrix#data\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._data = new Float32Array(20);\r\n\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix from the given array of color values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#set\r\n * @since 3.50.0\r\n *\r\n * @param {(number[]|Float32Array)} value - The ColorMatrix values to set. Must have 20 elements.\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n set: function (value)\r\n {\r\n this._matrix.set(value);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the ColorMatrix to default values and also resets\r\n * the `alpha` property back to 1.\r\n *\r\n * @method Phaser.Display.ColorMatrix#reset\r\n * @since 3.50.0\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n reset: function ()\r\n {\r\n var m = this._matrix;\r\n\r\n m.fill(0);\r\n\r\n m[0] = 1;\r\n m[6] = 1;\r\n m[12] = 1;\r\n m[18] = 1;\r\n\r\n this.alpha = 1;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the ColorMatrix as a Float32Array.\r\n *\r\n * Can be used directly as a 1fv shader uniform value.\r\n *\r\n * @method Phaser.Display.ColorMatrix#getData\r\n * @since 3.50.0\r\n *\r\n * @return {Float32Array} The ColorMatrix as a Float32Array.\r\n */\r\n getData: function ()\r\n {\r\n var data = this._data;\r\n\r\n if (this._dirty)\r\n {\r\n data.set(this._matrix);\r\n\r\n data[4] /= 255;\r\n data[9] /= 255;\r\n data[14] /= 255;\r\n data[19] /= 255;\r\n\r\n this._dirty = false;\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Changes the brightness of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brightness\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of brightness to apply to this ColorMatrix. Between 0 (black) and 1.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brightness: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var b = value;\r\n\r\n return this.multiply([\r\n b, 0, 0, 0, 0,\r\n 0, b, 0, 0, 0,\r\n 0, 0, b, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Changes the saturation of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturate\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of saturation to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n saturate: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var x = (value * 2 / 3) + 1;\r\n var y = ((x - 1) * -0.5);\r\n\r\n return this.multiply([\r\n x, y, y, 0, 0,\r\n y, x, y, 0, 0,\r\n y, y, x, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Desaturates this ColorMatrix (removes color from it).\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturation\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturate: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-1, multiply);\r\n },\r\n\r\n /**\r\n * Rotates the hues of this ColorMatrix by the value given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#hue\r\n * @since 3.50.0\r\n *\r\n * @param {number} [rotation=0] - The amount of hue rotation to apply to this ColorMatrix, in degrees.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n hue: function (rotation, multiply)\r\n {\r\n if (rotation === undefined) { rotation = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n rotation = rotation / 180 * Math.PI;\r\n\r\n var cos = Math.cos(rotation);\r\n var sin = Math.sin(rotation);\r\n var lumR = 0.213;\r\n var lumG = 0.715;\r\n var lumB = 0.072;\r\n\r\n return this.multiply([\r\n lumR + cos * (1 - lumR) + sin * (-lumR),lumG + cos * (-lumG) + sin * (-lumG),lumB + cos * (-lumB) + sin * (1 - lumB), 0, 0,\r\n lumR + cos * (-lumR) + sin * (0.143),lumG + cos * (1 - lumG) + sin * (0.140),lumB + cos * (-lumB) + sin * (-0.283), 0, 0,\r\n lumR + cos * (-lumR) + sin * (-(1 - lumR)),lumG + cos * (-lumG) + sin * (lumG),lumB + cos * (1 - lumB) + sin * (lumB), 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be grayscale.\r\n *\r\n * @method Phaser.Display.ColorMatrix#grayscale\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=1] - The grayscale scale (0 is black).\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n grayscale: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-value, multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be black and white.\r\n *\r\n * @method Phaser.Display.ColorMatrix#blackWhite\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n blackWhite: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BLACK_WHITE, multiply);\r\n },\r\n\r\n /**\r\n * Change the contrast of this ColorMatrix by the amount given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#contrast\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of contrast to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n contrast: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var v = value + 1;\r\n var o = -0.5 * (v - 1);\r\n\r\n return this.multiply([\r\n v, 0, 0, 0, o,\r\n 0, v, 0, 0, o,\r\n 0, 0, v, 0, o,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Converts this ColorMatrix to have negative values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#negative\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n negative: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.NEGATIVE, multiply);\r\n },\r\n\r\n /**\r\n * Apply a desaturated luminance to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#desaturateLuminance\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturateLuminance: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.DESATURATE_LUMINANCE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a sepia tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#sepia\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n sepia: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SEPIA, multiply);\r\n },\r\n\r\n /**\r\n * Applies a night vision tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#night\r\n * @since 3.50.0\r\n *\r\n * @param {number} [intensity=0.1] - The intensity of this effect.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n night: function (intensity, multiply)\r\n {\r\n if (intensity === undefined) { intensity = 0.1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply([\r\n intensity * (-2.0), -intensity, 0, 0, 0,\r\n -intensity, 0, intensity, 0, 0,\r\n 0, intensity, intensity * 2.0, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Applies a trippy color tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#lsd\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n lsd: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.LSD, multiply);\r\n },\r\n\r\n /**\r\n * Applies a brown tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brown\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brown: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BROWN, multiply);\r\n },\r\n\r\n /**\r\n * Applies a vintage pinhole color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#vintagePinhole\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n vintagePinhole: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.VINTAGE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a kodachrome color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#kodachrome\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n kodachrome: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.KODACHROME, multiply);\r\n },\r\n\r\n /**\r\n * Applies a technicolor color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#technicolor\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n technicolor: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.TECHNICOLOR, multiply);\r\n },\r\n\r\n /**\r\n * Applies a polaroid color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#polaroid\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n polaroid: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.POLAROID, multiply);\r\n },\r\n\r\n /**\r\n * Shifts the values of this ColorMatrix into BGR order.\r\n *\r\n * @method Phaser.Display.ColorMatrix#shiftToBGR\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n shiftToBGR: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SHIFT_BGR, multiply);\r\n },\r\n\r\n /**\r\n * Multiplies the two given matrices.\r\n *\r\n * @method Phaser.Display.ColorMatrix#multiply\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} a - The 5x4 array to multiply with ColorMatrix._matrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n multiply: function (a, multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n // Duplicate _matrix into c\r\n\r\n if (!multiply)\r\n {\r\n this.reset();\r\n }\r\n\r\n var m = this._matrix;\r\n var c = tempMatrix;\r\n\r\n // copy _matrix to tempMatrox\r\n c.set(m);\r\n\r\n m.set([\r\n // R\r\n (c[0] * a[0]) + (c[1] * a[5]) + (c[2] * a[10]) + (c[3] * a[15]),\r\n (c[0] * a[1]) + (c[1] * a[6]) + (c[2] * a[11]) + (c[3] * a[16]),\r\n (c[0] * a[2]) + (c[1] * a[7]) + (c[2] * a[12]) + (c[3] * a[17]),\r\n (c[0] * a[3]) + (c[1] * a[8]) + (c[2] * a[13]) + (c[3] * a[18]),\r\n (c[0] * a[4]) + (c[1] * a[9]) + (c[2] * a[14]) + (c[3] * a[19]) + c[4],\r\n\r\n // G\r\n (c[5] * a[0]) + (c[6] * a[5]) + (c[7] * a[10]) + (c[8] * a[15]),\r\n (c[5] * a[1]) + (c[6] * a[6]) + (c[7] * a[11]) + (c[8] * a[16]),\r\n (c[5] * a[2]) + (c[6] * a[7]) + (c[7] * a[12]) + (c[8] * a[17]),\r\n (c[5] * a[3]) + (c[6] * a[8]) + (c[7] * a[13]) + (c[8] * a[18]),\r\n (c[5] * a[4]) + (c[6] * a[9]) + (c[7] * a[14]) + (c[8] * a[19]) + c[9],\r\n\r\n // B\r\n (c[10] * a[0]) + (c[11] * a[5]) + (c[12] * a[10]) + (c[13] * a[15]),\r\n (c[10] * a[1]) + (c[11] * a[6]) + (c[12] * a[11]) + (c[13] * a[16]),\r\n (c[10] * a[2]) + (c[11] * a[7]) + (c[12] * a[12]) + (c[13] * a[17]),\r\n (c[10] * a[3]) + (c[11] * a[8]) + (c[12] * a[13]) + (c[13] * a[18]),\r\n (c[10] * a[4]) + (c[11] * a[9]) + (c[12] * a[14]) + (c[13] * a[19]) + c[14],\r\n\r\n // A\r\n (c[15] * a[0]) + (c[16] * a[5]) + (c[17] * a[10]) + (c[18] * a[15]),\r\n (c[15] * a[1]) + (c[16] * a[6]) + (c[17] * a[11]) + (c[18] * a[16]),\r\n (c[15] * a[2]) + (c[16] * a[7]) + (c[17] * a[12]) + (c[18] * a[17]),\r\n (c[15] * a[3]) + (c[16] * a[8]) + (c[17] * a[13]) + (c[18] * a[18]),\r\n (c[15] * a[4]) + (c[16] * a[9]) + (c[17] * a[14]) + (c[18] * a[19]) + c[19]\r\n\r\n ]);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for black_white operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BLACK_WHITE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BLACK_WHITE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for negative operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.NEGATIVE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.NEGATIVE = [ -1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for desatured luminance operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.DESATURATE_LUMINANCE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.DESATURATE_LUMINANCE = [ 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for sepia operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SEPIA\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SEPIA = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for lsd operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.LSD\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.LSD = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for brown operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BROWN\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BROWN = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for vintage pinhole operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.VINTAGE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.VINTAGE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for kodachrome operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.KODACHROME\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.KODACHROME = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for technicolor operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.TECHNICOLOR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.TECHNICOLOR = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for polaroid shift operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.POLAROID\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.POLAROID = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for shift BGR operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SHIFT_BGR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SHIFT_BGR = [ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0 ];\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../../const');\r\nvar Smoothing = require('./Smoothing');\r\n\r\n// The pool into which the canvas elements are placed.\r\nvar pool = [];\r\n\r\n// Automatically apply smoothing(false) to created Canvas elements\r\nvar _disableContextSmoothing = false;\r\n\r\n/**\r\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\r\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\r\n * which is useless for some of the Phaser pipelines / renderer.\r\n *\r\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\r\n * Which means all instances of Phaser Games on the same page can share the one single pool.\r\n *\r\n * @namespace Phaser.Display.Canvas.CanvasPool\r\n * @since 3.0.0\r\n */\r\nvar CanvasPool = function ()\r\n{\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\r\n *\r\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\r\n */\r\n var create = function (parent, width, height, canvasType, selfParent)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = 1; }\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n if (selfParent === undefined) { selfParent = false; }\r\n\r\n var canvas;\r\n var container = first(canvasType);\r\n\r\n if (container === null)\r\n {\r\n container = {\r\n parent: parent,\r\n canvas: document.createElement('canvas'),\r\n type: canvasType\r\n };\r\n\r\n if (canvasType === CONST.CANVAS)\r\n {\r\n pool.push(container);\r\n }\r\n\r\n canvas = container.canvas;\r\n }\r\n else\r\n {\r\n container.parent = parent;\r\n\r\n canvas = container.canvas;\r\n }\r\n\r\n if (selfParent)\r\n {\r\n container.parent = canvas;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\r\n {\r\n Smoothing.disable(canvas.getContext('2d', { willReadFrequently: false }));\r\n }\r\n\r\n return canvas;\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create2D\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created canvas.\r\n */\r\n var create2D = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.CANVAS);\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created WebGL canvas.\r\n */\r\n var createWebGL = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.WEBGL);\r\n };\r\n\r\n /**\r\n * Gets the first free canvas index from the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.first\r\n * @since 3.0.0\r\n *\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n *\r\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\r\n */\r\n var first = function (canvasType)\r\n {\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n\r\n if (canvasType === CONST.WEBGL)\r\n {\r\n return null;\r\n }\r\n\r\n for (var i = 0; i < pool.length; i++)\r\n {\r\n var container = pool[i];\r\n\r\n if (!container.parent && container.type === canvasType)\r\n {\r\n return container;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\r\n * The canvas has its width and height set to 1, and its parent attribute nulled.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.remove\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The canvas or the parent of the canvas to free.\r\n */\r\n var remove = function (parent)\r\n {\r\n // Check to see if the parent is a canvas object\r\n var isCanvas = parent instanceof HTMLCanvasElement;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\r\n {\r\n container.parent = null;\r\n container.canvas.width = 1;\r\n container.canvas.height = 1;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the total number of used canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.total\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of used canvases.\r\n */\r\n var total = function ()\r\n {\r\n var c = 0;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if (container.parent)\r\n {\r\n c++;\r\n }\r\n });\r\n\r\n return c;\r\n };\r\n\r\n /**\r\n * Gets the total number of free canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.free\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of free canvases.\r\n */\r\n var free = function ()\r\n {\r\n return pool.length - total();\r\n };\r\n\r\n /**\r\n * Disable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\r\n * @since 3.0.0\r\n */\r\n var disableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = true;\r\n };\r\n\r\n /**\r\n * Enable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\r\n * @since 3.0.0\r\n */\r\n var enableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = false;\r\n };\r\n\r\n return {\r\n create2D: create2D,\r\n create: create,\r\n createWebGL: createWebGL,\r\n disableSmoothing: disableSmoothing,\r\n enableSmoothing: enableSmoothing,\r\n first: first,\r\n free: free,\r\n pool: pool,\r\n remove: remove,\r\n total: total\r\n };\r\n};\r\n\r\n// If we export the called function here, it'll only be invoked once (not every time it's required).\r\nmodule.exports = CanvasPool();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Browser specific prefix, so not going to change between contexts, only between browsers\r\nvar prefix = '';\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.Smoothing\r\n * @since 3.0.0\r\n */\r\nvar Smoothing = function ()\r\n{\r\n /**\r\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\r\n *\r\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\r\n */\r\n var getPrefix = function (context)\r\n {\r\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\r\n\r\n for (var i = 0; i < vendors.length; i++)\r\n {\r\n var s = vendors[i] + 'mageSmoothingEnabled';\r\n\r\n if (s in context)\r\n {\r\n return s;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.enable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var enable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = true;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.disable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var disable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = false;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\r\n * Returns null if no smoothing prefix is available.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\r\n *\r\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\r\n */\r\n var isEnabled = function (context)\r\n {\r\n return (prefix !== null) ? context[prefix] : null;\r\n };\r\n\r\n return {\r\n disable: disable,\r\n enable: enable,\r\n getPrefix: getPrefix,\r\n isEnabled: isEnabled\r\n };\r\n\r\n};\r\n\r\nmodule.exports = Smoothing();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object or Dynamic Texture to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects.\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this mask is being added.\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, maskObject, x, y, texture, frame)\r\n {\r\n if (!maskObject)\r\n {\r\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\r\n }\r\n\r\n /**\r\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = maskObject;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel.\r\n *\r\n * Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask? This is false by default and should not be changed.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n },\r\n\r\n /**\r\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\r\n *\r\n * If a Game Object it must have a texture, such as a Sprite.\r\n *\r\n * You can update the source of the mask as often as you like.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\r\n */\r\n setBitmap: function (maskObject)\r\n {\r\n this.bitmapMask = maskObject;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\r\n */\r\n postRenderWebGL: function (renderer, camera, renderTarget)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object, or Dynamic Texture, to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\r\n * @since 3.60.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\r\n */\r\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\r\n{\r\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level. This can change dynamically at runtime\r\n * and is set in the applyStencil method.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n *\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n var mask = 0xff;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n\r\n // Do this _after_ we set the stencilFunc\r\n level++;\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n this.level = level;\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, mask);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var current = renderer.currentMask;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n current.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n current.mask = prev.mask;\r\n current.camera = prev.camera;\r\n }\r\n else\r\n {\r\n current.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Barrel FX Controller.\r\n *\r\n * This FX controller manages the barrel distortion effect for a Game Object.\r\n *\r\n * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to\r\n * a Game Object. The amount of the effect can be modified in real-time.\r\n *\r\n * A Barrel effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBarrel();\r\n * sprite.postFX.addBarrel();\r\n * ```\r\n *\r\n * @class Barrel\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n */\r\nvar Barrel = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Barrel (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.BARREL, gameObject);\r\n\r\n /**\r\n * The amount of distortion applied to the barrel effect.\r\n *\r\n * Typically keep this within the range 1 (no distortion) to +- 1.\r\n *\r\n * @name Phaser.FX.Barrel#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Barrel;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Bloom FX Controller.\r\n *\r\n * This FX controller manages the bloom effect for a Game Object.\r\n *\r\n * Bloom is an effect used to reproduce an imaging artifact of real-world cameras.\r\n * The effect produces fringes of light extending from the borders of bright areas in an image,\r\n * contributing to the illusion of an extremely bright light overwhelming the\r\n * camera or eye capturing the scene.\r\n *\r\n * A Bloom effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBloom();\r\n * sprite.postFX.addBloom();\r\n * ```\r\n *\r\n * @class Bloom\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color=0xffffff] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n */\r\nvar Bloom = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bloom (gameObject, color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n if (offsetX === undefined) { offsetX = 1; }\r\n if (offsetY === undefined) { offsetY = 1; }\r\n if (blurStrength === undefined) { blurStrength = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLOOM, gameObject);\r\n\r\n /**\r\n * The number of steps to run the Bloom effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the Bloom,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Bloom#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The horizontal offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetX = offsetX;\r\n\r\n /**\r\n * The vertical offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetY = offsetY;\r\n\r\n /**\r\n * The strength of the blur process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#blurStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurStrength = blurStrength;\r\n\r\n /**\r\n * The strength of the blend process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Bloom#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the bloom as a number value.\r\n *\r\n * @name Phaser.FX.Bloom#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bloom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Blur FX Controller.\r\n *\r\n * This FX controller manages the blur effect for a Game Object.\r\n *\r\n * A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect,\r\n * typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a\r\n * smooth blur resembling that of viewing the image through a translucent screen, distinctly different\r\n * from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.\r\n *\r\n * A Blur effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBlur();\r\n * sprite.postFX.addBlur();\r\n * ```\r\n *\r\n * @class Blur\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n */\r\nvar Blur = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Blur (gameObject, quality, x, y, strength, color, steps)\r\n {\r\n if (quality === undefined) { quality = 0; }\r\n if (x === undefined) { x = 2; }\r\n if (y === undefined) { y = 2; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLUR, gameObject);\r\n\r\n /**\r\n * The quality of the blur effect.\r\n *\r\n * This can be:\r\n *\r\n * 0 for Low Quality\r\n * 1 for Medium Quality\r\n * 2 for High Quality\r\n *\r\n * The higher the quality, the more complex shader is used\r\n * and the more processing time is spent on the GPU calculating\r\n * the final blur. This value is used in conjunction with the\r\n * `steps` value, as one has a direct impact on the other.\r\n *\r\n * Keep this value as low as you can, while still achieving the\r\n * desired effect you need for your game.\r\n *\r\n * @name Phaser.FX.Blur#quality\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.quality = 0;\r\n\r\n /**\r\n * The horizontal offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The number of steps to run the Blur effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the blur,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Blur#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The strength of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Blur#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the blur as a number value.\r\n *\r\n * @name Phaser.FX.Blur#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Blur;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Bokeh FX Controller.\r\n *\r\n * This FX controller manages the bokeh effect for a Game Object.\r\n *\r\n * Bokeh refers to a visual effect that mimics the photographic technique of creating a shallow depth of field.\r\n * This effect is used to emphasize the game's main subject or action, by blurring the background or foreground\r\n * elements, resulting in a more immersive and visually appealing experience. It is achieved through rendering\r\n * techniques that simulate the out-of-focus areas, giving a sense of depth and realism to the game's graphics.\r\n *\r\n * This effect can also be used to generate a Tilt Shift effect, which is a technique used to create a miniature\r\n * effect by blurring everything except a small area of the image. This effect is achieved by blurring the\r\n * top and bottom elements, while keeping the center area in focus.\r\n *\r\n * A Bokeh effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBokeh();\r\n * sprite.postFX.addBokeh();\r\n * ```\r\n *\r\n * @class Bokeh\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {boolean} [isTiltShift=false] - Is this a bokeh or Tile Shift effect?\r\n * @param {number} [blurX=1] - If Tilt Shift, the amount of horizontal blur.\r\n * @param {number} [blurY=1] - If Tilt Shift, the amount of vertical blur.\r\n * @param {number} [strength=1] - If Tilt Shift, the strength of the blur.\r\n */\r\nvar Bokeh = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bokeh (gameObject, radius, amount, contrast, isTiltShift, blurX, blurY, strength)\r\n {\r\n if (radius === undefined) { radius = 0.5; }\r\n if (amount === undefined) { amount = 1; }\r\n if (contrast === undefined) { contrast = 0.2; }\r\n if (isTiltShift === undefined) { isTiltShift = false; }\r\n if (blurX === undefined) { blurX = 1; }\r\n if (blurY === undefined) { blurY = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n\r\n Controller.call(this, FX_CONST.BOKEH, gameObject);\r\n\r\n /**\r\n * The radius of the bokeh effect.\r\n *\r\n * This is a float value, where a radius of 0 will result in no effect being applied,\r\n * and a radius of 1 will result in a strong bokeh. However, you can exceed this value\r\n * for even stronger effects.\r\n *\r\n * @name Phaser.FX.Bokeh#radius\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The amount, or strength, of the bokeh effect. Defaults to 1.\r\n *\r\n * @name Phaser.FX.Bokeh#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n\r\n /**\r\n * The color contrast, or brightness, of the bokeh effect. Defaults to 0.2.\r\n *\r\n * @name Phaser.FX.Bokeh#contrast\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.contrast = contrast;\r\n\r\n /**\r\n * Is this a Tilt Shift effect or a standard bokeh effect?\r\n *\r\n * @name Phaser.FX.Bokeh#isTiltShift\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.isTiltShift = isTiltShift;\r\n\r\n /**\r\n * If a Tilt Shift effect this controls the strength of the blur.\r\n *\r\n * Setting this value on a non-Tilt Shift effect will have no effect.\r\n *\r\n * @name Phaser.FX.Bokeh#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * If a Tilt Shift effect this controls the amount of horizontal blur.\r\n *\r\n * Setting this value on a non-Tilt Shift effect will have no effect.\r\n *\r\n * @name Phaser.FX.Bokeh#blurX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurX = blurX;\r\n\r\n /**\r\n * If a Tilt Shift effect this controls the amount of vertical blur.\r\n *\r\n * Setting this value on a non-Tilt Shift effect will have no effect.\r\n *\r\n * @name Phaser.FX.Bokeh#blurY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurY = blurY;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bokeh;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Circle FX Controller.\r\n *\r\n * This FX controller manages the circle effect for a Game Object.\r\n *\r\n * This effect will draw a circle around the texture of the Game Object, effectively masking off\r\n * any area outside of the circle without the need for an actual mask. You can control the thickness\r\n * of the circle, the color of the circle and the color of the background, should the texture be\r\n * transparent. You can also control the feathering applied to the circle, allowing for a harsh or soft edge.\r\n *\r\n * Please note that adding this effect to a Game Object will not change the input area or physics body of\r\n * the Game Object, should it have one.\r\n *\r\n * A Circle effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addCircle();\r\n * sprite.postFX.addCircle();\r\n * ```\r\n *\r\n * @class Circle\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=0xfeedb6] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n */\r\nvar Circle = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Circle (gameObject, thickness, color, backgroundColor, scale, feather)\r\n {\r\n if (thickness === undefined) { thickness = 8; }\r\n if (scale === undefined) { scale = 1; }\r\n if (feather === undefined) { feather = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.CIRCLE, gameObject);\r\n\r\n /**\r\n * The scale of the circle. The default scale is 1, which is a circle\r\n * the full size of the underlying texture. Reduce this value to create\r\n * a smaller circle, or increase it to create a circle that extends off\r\n * the edges of the texture.\r\n *\r\n * @name Phaser.FX.Circle#scale\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.scale = scale;\r\n\r\n /**\r\n * The amount of feathering to apply to the circle from the ring,\r\n * extending into the middle of the circle. The default is 0.005,\r\n * which is a very low amount of feathering just making sure the ring\r\n * has a smooth edge. Increase this amount to a value such as 0.5\r\n * or 0.025 for larger amounts of feathering.\r\n *\r\n * @name Phaser.FX.Circle#feather\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.feather = feather;\r\n\r\n /**\r\n * The width of the circle around the texture, in pixels. This value\r\n * doesn't factor in the feather, which can extend the thickness\r\n * internally depending on its value.\r\n *\r\n * @name Phaser.FX.Circle#thickness\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.thickness = thickness;\r\n\r\n /**\r\n * The internal gl color array for the ring color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 0.2, 0.7 ];\r\n\r\n /**\r\n * The internal gl color array for the background color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 1, 0, 0, 0.4 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n\r\n if (backgroundColor !== undefined && backgroundColor !== null)\r\n {\r\n this.backgroundColor = backgroundColor;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the circular ring, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of the background, behind the texture, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#backgroundColor\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n backgroundColor: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Circle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar BaseColorMatrix = require('../display/ColorMatrix');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The ColorMatrix FX Controller.\r\n *\r\n * This FX controller manages the color matrix effect for a Game Object.\r\n *\r\n * The color matrix effect is a visual technique that involves manipulating the colors of an image\r\n * or scene using a mathematical matrix. This process can adjust hue, saturation, brightness, and contrast,\r\n * allowing developers to create various stylistic appearances or mood settings within the game.\r\n * Common applications include simulating different lighting conditions, applying color filters,\r\n * or achieving a specific visual style.\r\n *\r\n * A ColorMatrix effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addColorMatrix();\r\n * sprite.postFX.addColorMatrix();\r\n * ```\r\n *\r\n * @class ColorMatrix\r\n * @extends Phaser.Display.ColorMatrix\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n Extends: BaseColorMatrix,\r\n\r\n initialize:\r\n\r\n function ColorMatrix (gameObject)\r\n {\r\n BaseColorMatrix.call(this);\r\n\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = FX_CONST.COLOR_MATRIX;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * @name Phaser.FX.ColorMatrix#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this._matrix = null;\r\n this._data = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * FX Controller is the base class that all built-in FX use.\r\n *\r\n * You should not normally create an instance of this class directly, but instead use one of the built-in FX that extend it.\r\n *\r\n * @class Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {number} type - The FX Type constant.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar Controller = new Class({\r\n\r\n initialize:\r\n\r\n function Controller (type, gameObject)\r\n {\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.Controller#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.Controller#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * Only works for Pre FX.\r\n *\r\n * Post FX are always active.\r\n *\r\n * @name Phaser.FX.Controller#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n /**\r\n * Sets the active state of this FX Controller.\r\n *\r\n * A disabled FX Controller will not be updated.\r\n *\r\n * @method Phaser.FX.Controller#setActive\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} value - `true` to enable this FX Controller, or `false` to disable it.\r\n *\r\n * @return {this} This FX Controller instance.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this FX Controller.\r\n *\r\n * @method Phaser.FX.Controller#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this.active = false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Controller;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Displacement FX Controller.\r\n *\r\n * This FX controller manages the displacement effect for a Game Object.\r\n *\r\n * The displacement effect is a visual technique that alters the position of pixels in an image\r\n * or texture based on the values of a displacement map. This effect is used to create the illusion\r\n * of depth, surface irregularities, or distortion in otherwise flat elements. It can be applied to\r\n * characters, objects, or backgrounds to enhance realism, convey movement, or achieve various\r\n * stylistic appearances.\r\n *\r\n * A Displacement effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addDisplacement();\r\n * sprite.postFX.addDisplacement();\r\n * ```\r\n *\r\n * @class Displacement\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply. A very small float number, such as 0.005.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply. A very small float number, such as 0.005.\r\n */\r\nvar Displacement = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Displacement (gameObject, texture, x, y)\r\n {\r\n if (texture === undefined) { texture = '__WHITE'; }\r\n if (x === undefined) { x = 0.005; }\r\n if (y === undefined) { y = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.DISPLACEMENT, gameObject);\r\n\r\n /**\r\n * The amount of horizontal displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The amount of vertical displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The underlying WebGLTexture used for displacement.\r\n *\r\n * @name Phaser.FX.Displacement#glTexture\r\n * @type {WebGLTexture}\r\n * @since 3.60.0\r\n */\r\n this.glTexture;\r\n\r\n this.setTexture(texture);\r\n },\r\n\r\n /**\r\n * Sets the Texture to be used for the displacement effect.\r\n *\r\n * You can only use a whole texture, not a frame from a texture atlas or sprite sheet.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setTexture\r\n * @since 3.60.0\r\n *\r\n * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n *\r\n * @return {this} This FX Controller.\r\n */\r\n setTexture: function (texture)\r\n {\r\n var phaserTexture = this.gameObject.scene.sys.textures.getFrame(texture);\r\n\r\n if (phaserTexture)\r\n {\r\n this.glTexture = phaserTexture.glTexture;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Displacement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Glow FX Controller.\r\n *\r\n * This FX controller manages the glow effect for a Game Object.\r\n *\r\n * The glow effect is a visual technique that creates a soft, luminous halo around game objects,\r\n * characters, or UI elements. This effect is used to emphasize importance, enhance visual appeal,\r\n * or convey a sense of energy, magic, or otherworldly presence. The effect can also be set on\r\n * the inside of the Game Object. The color and strength of the glow can be modified.\r\n *\r\n * A Glow effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addGlow();\r\n * sprite.postFX.addGlow();\r\n * ```\r\n *\r\n * @class Glow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n */\r\nvar Glow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Glow (gameObject, color, outerStrength, innerStrength, knockout)\r\n {\r\n if (outerStrength === undefined) { outerStrength = 4; }\r\n if (innerStrength === undefined) { innerStrength = 0; }\r\n if (knockout === undefined) { knockout = false; }\r\n\r\n Controller.call(this, FX_CONST.GLOW, gameObject);\r\n\r\n /**\r\n * The strength of the glow outward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#outerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.outerStrength = outerStrength;\r\n\r\n /**\r\n * The strength of the glow inward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#innerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.innerStrength = innerStrength;\r\n\r\n /**\r\n * If `true` only the glow is drawn, not the texture itself.\r\n *\r\n * @name Phaser.FX.Glow#knockout\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.knockout = knockout;\r\n\r\n /**\r\n * A 4 element array of gl color values.\r\n *\r\n * @name Phaser.FX.Glow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1, 1 ];\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the glow as a number value.\r\n *\r\n * @name Phaser.FX.Glow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Glow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Gradient FX Controller.\r\n *\r\n * This FX controller manages the gradient effect for a Game Object.\r\n *\r\n * The gradient overlay effect is a visual technique where a smooth color transition is applied over Game Objects,\r\n * such as sprites or UI components. This effect is used to enhance visual appeal, emphasize depth, or create\r\n * stylistic and atmospheric variations. It can also be utilized to convey information, such as representing\r\n * progress or health status through color changes.\r\n *\r\n * A Gradient effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addGradient();\r\n * sprite.postFX.addGradient();\r\n * ```\r\n *\r\n * @class Gradient\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n */\r\nvar Gradient = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Gradient (gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n if (alpha === undefined) { alpha = 0.2; }\r\n if (fromX === undefined) { fromX = 0; }\r\n if (fromY === undefined) { fromY = 0; }\r\n if (toX === undefined) { toX = 0; }\r\n if (toY === undefined) { toY = 1; }\r\n if (size === undefined) { size = 0; }\r\n\r\n Controller.call(this, FX_CONST.GRADIENT, gameObject);\r\n\r\n /**\r\n * The alpha value of the gradient effect.\r\n *\r\n * @name Phaser.FX.Gradient#alpha\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.alpha = alpha;\r\n\r\n /**\r\n * Sets how many 'chunks' the gradient is divided in to, as spread over the\r\n * entire height of the texture. Leave this at zero for a smooth gradient,\r\n * or set to a higher number to split the gradient into that many sections, giving\r\n * a more banded 'retro' effect.\r\n *\r\n * @name Phaser.FX.Gradient#size\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.size = size;\r\n\r\n /**\r\n * The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromX = fromX;\r\n\r\n /**\r\n * The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromY = fromY;\r\n\r\n /**\r\n * The horizontal position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toX = toX;\r\n\r\n /**\r\n * The vertical position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toY = toY;\r\n\r\n /**\r\n * The internal gl color array for the starting color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor1\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor1 = [ 255, 0, 0 ];\r\n\r\n /**\r\n * The internal gl color array for the ending color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 0, 255, 0 ];\r\n\r\n if (color1 !== undefined && color1 !== null)\r\n {\r\n this.color1 = color1;\r\n }\r\n\r\n if (color2 !== undefined && color2 !== null)\r\n {\r\n this.color2 = color2;\r\n }\r\n },\r\n\r\n /**\r\n * The first gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color1\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color1: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor1;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor1;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The second gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color2\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color2: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Gradient;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Pixelate FX Controller.\r\n *\r\n * This FX controller manages the pixelate effect for a Game Object.\r\n *\r\n * The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image,\r\n * creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic\r\n * purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as\r\n * during a transition or to censor specific content.\r\n *\r\n * A Pixelate effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addPixelate();\r\n * sprite.postFX.addPixelate();\r\n * ```\r\n *\r\n * @class Pixelate\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n */\r\nvar Pixelate = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Pixelate (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.PIXELATE, gameObject);\r\n\r\n /**\r\n * The amount of pixelation to apply.\r\n *\r\n * @name Phaser.FX.Pixelate#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pixelate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Shadow FX Controller.\r\n *\r\n * This FX controller manages the shadow effect for a Game Object.\r\n *\r\n * The shadow effect is a visual technique used to create the illusion of depth and realism by adding darker,\r\n * offset silhouettes or shapes beneath game objects, characters, or environments. These simulated shadows\r\n * help to enhance the visual appeal and immersion, making the 2D game world appear more dynamic and three-dimensional.\r\n *\r\n * A Shadow effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addShadow();\r\n * sprite.postFX.addShadow();\r\n * ```\r\n *\r\n * @class Shadow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n */\r\nvar Shadow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shadow (gameObject, x, y, decay, power, color, samples, intensity)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (decay === undefined) { decay = 0.1; }\r\n if (power === undefined) { power = 1; }\r\n if (samples === undefined) { samples = 6; }\r\n if (intensity === undefined) { intensity = 1; }\r\n\r\n Controller.call(this, FX_CONST.SHADOW, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The amount of decay for the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#decay\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.decay = decay;\r\n\r\n /**\r\n * The power of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#power\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.power = power;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Shadow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 0, 0, 0, 1 ];\r\n\r\n /**\r\n * The number of samples that the shadow effect will run for.\r\n *\r\n * This should be an integer with a minimum value of 1 and a maximum of 12.\r\n *\r\n * @name Phaser.FX.Shadow#samples\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.samples = samples;\r\n\r\n /**\r\n * The intensity of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#intensity\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.intensity = intensity;\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the shadow.\r\n *\r\n * @name Phaser.FX.Shadow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shadow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Shine FX Controller.\r\n *\r\n * This FX controller manages the shift effect for a Game Object.\r\n *\r\n * The shine effect is a visual technique that simulates the appearance of reflective\r\n * or glossy surfaces by passing a light beam across a Game Object. This effect is used to\r\n * enhance visual appeal, emphasize certain features, and create a sense of depth or\r\n * material properties.\r\n *\r\n * A Shine effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addShine();\r\n * sprite.postFX.addShine();\r\n * ```\r\n *\r\n * @class Shine\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n */\r\nvar Shine = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shine (gameObject, speed, lineWidth, gradient, reveal)\r\n {\r\n if (speed === undefined) { speed = 0.5; }\r\n if (lineWidth === undefined) { lineWidth = 0.5; }\r\n if (gradient === undefined) { gradient = 3; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.SHINE, gameObject);\r\n\r\n /**\r\n * The speed of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#speed\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.speed = speed;\r\n\r\n /**\r\n * The line width of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#lineWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.lineWidth = lineWidth;\r\n\r\n /**\r\n * The gradient of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#gradient\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.gradient = gradient;\r\n\r\n /**\r\n * Does this Shine effect reveal or get added to its target?\r\n *\r\n * @name Phaser.FX.Shine#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shine;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Vignette FX Controller.\r\n *\r\n * This FX controller manages the vignette effect for a Game Object.\r\n *\r\n * The vignette effect is a visual technique where the edges of the screen, or a Game Object, gradually darken or blur,\r\n * creating a frame-like appearance. This effect is used to draw the player's focus towards the central action or subject,\r\n * enhance immersion, and provide a cinematic or artistic quality to the game's visuals.\r\n *\r\n * A Vignette effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addVignette();\r\n * sprite.postFX.addVignette();\r\n * ```\r\n *\r\n * @class Vignette\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n */\r\nvar Vignette = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Vignette (gameObject, x, y, radius, strength)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = 0.5; }\r\n if (radius === undefined) { radius = 0.5; }\r\n if (strength === undefined) { strength = 0.5; }\r\n\r\n Controller.call(this, FX_CONST.VIGNETTE, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#radius\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The strength of the vignette effect.\r\n *\r\n * @name Phaser.FX.Vignette#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Vignette;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Wipe FX Controller.\r\n *\r\n * This FX controller manages the wipe effect for a Game Object.\r\n *\r\n * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements\r\n * in the game, such as images, text, or scene transitions. This effect is often used to create\r\n * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition\r\n * between game states.\r\n *\r\n * You can set both the direction and the axis of the wipe effect. The following combinations are possible:\r\n *\r\n * * left to right: direction 0, axis 0\r\n * * right to left: direction 1, axis 0\r\n * * top to bottom: direction 1, axis 1\r\n * * bottom to top: direction 1, axis 0\r\n *\r\n * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect.\r\n *\r\n * A Wipe effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addWipe();\r\n * sprite.postFX.addWipe();\r\n * sprite.preFX.addReveal();\r\n * sprite.postFX.addReveal();\r\n * ```\r\n *\r\n * @class Wipe\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n * @param {boolean} [reveal=false] - Is this a reveal (true) or a fade (false) effect?\r\n */\r\nvar Wipe = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Wipe (gameObject, wipeWidth, direction, axis, reveal)\r\n {\r\n if (wipeWidth === undefined) { wipeWidth = 0.1; }\r\n if (direction === undefined) { direction = 0; }\r\n if (axis === undefined) { axis = 0; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.WIPE, gameObject);\r\n\r\n /**\r\n * The progress of the Wipe effect. This value is normalized to the range 0 to 1.\r\n *\r\n * Adjust this value to make the wipe transition (i.e. via a Tween)\r\n *\r\n * @name Phaser.FX.Wipe#progress\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Wipe#wipeWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.wipeWidth = wipeWidth;\r\n\r\n /**\r\n * The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n *\r\n * @name Phaser.FX.Wipe#direction\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.direction = direction;\r\n\r\n /**\r\n * The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @name Phaser.FX.Wipe#axis\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.axis = axis;\r\n\r\n /**\r\n * Is this a reveal (true) or a fade (false) effect?\r\n *\r\n * @name Phaser.FX.Wipe#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Wipe;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FX_CONST = {\r\n\r\n /**\r\n * The Glow FX.\r\n *\r\n * @name Phaser.FX.GLOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GLOW: 4,\r\n\r\n /**\r\n * The Shadow FX.\r\n *\r\n * @name Phaser.FX.SHADOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHADOW: 5,\r\n\r\n /**\r\n * The Pixelate FX.\r\n *\r\n * @name Phaser.FX.PIXELATE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n PIXELATE: 6,\r\n\r\n /**\r\n * The Vignette FX.\r\n *\r\n * @name Phaser.FX.VIGNETTE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n VIGNETTE: 7,\r\n\r\n /**\r\n * The Shine FX.\r\n *\r\n * @name Phaser.FX.SHINE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHINE: 8,\r\n\r\n /**\r\n * The Blur FX.\r\n *\r\n * @name Phaser.FX.BLUR\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLUR: 9, // uses 3 shaders, slots 9, 10 and 11\r\n\r\n /**\r\n * The Gradient FX.\r\n *\r\n * @name Phaser.FX.GRADIENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GRADIENT: 12,\r\n\r\n /**\r\n * The Bloom FX.\r\n *\r\n * @name Phaser.FX.BLOOM\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLOOM: 13,\r\n\r\n /**\r\n * The Color Matrix FX.\r\n *\r\n * @name Phaser.FX.COLOR_MATRIX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n COLOR_MATRIX: 14,\r\n\r\n /**\r\n * The Circle FX.\r\n *\r\n * @name Phaser.FX.CIRCLE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n CIRCLE: 15,\r\n\r\n /**\r\n * The Barrel FX.\r\n *\r\n * @name Phaser.FX.BARREL\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BARREL: 16,\r\n\r\n /**\r\n * The Displacement FX.\r\n *\r\n * @name Phaser.FX.DISPLACEMENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DISPLACEMENT: 17,\r\n\r\n /**\r\n * The Wipe FX.\r\n *\r\n * @name Phaser.FX.WIPE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n WIPE: 18,\r\n\r\n /**\r\n * The Bokeh and Tilt Shift FX.\r\n *\r\n * @name Phaser.FX.BOKEH\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BOKEH: 19\r\n\r\n};\r\n\r\nmodule.exports = FX_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @namespace Phaser.FX\r\n */\r\n\r\nvar FX = {\r\n\r\n Barrel: require('./Barrel'),\r\n Controller: require('./Controller'),\r\n Bloom: require('./Bloom'),\r\n Blur: require('./Blur'),\r\n Bokeh: require('./Bokeh'),\r\n Circle: require('./Circle'),\r\n ColorMatrix: require('./ColorMatrix'),\r\n Displacement: require('./Displacement'),\r\n Glow: require('./Glow'),\r\n Gradient: require('./Gradient'),\r\n Pixelate: require('./Pixelate'),\r\n Shadow: require('./Shadow'),\r\n Shine: require('./Shine'),\r\n Vignette: require('./Vignette'),\r\n Wipe: require('./Wipe')\r\n\r\n};\r\n\r\nFX = Extend(false, FX, FX_CONST);\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar ComponentsToJSON = require('./components/ToJSON');\r\nvar DataManager = require('../data/DataManager');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The base class that all Game Objects extend.\r\n * You don't create GameObjects directly and they cannot be added to the display list.\r\n * Instead, use them as the base for your own custom classes.\r\n *\r\n * @class GameObject\r\n * @memberof Phaser.GameObjects\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\r\n */\r\nvar GameObject = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GameObject (scene, type)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene to which this Game Object belongs.\r\n *\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * You should consider this property as being read-only. You cannot move a\r\n * Game Object to another Scene by simply changing it.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Holds a reference to the Display List that contains this Game Object.\r\n *\r\n * This is set automatically when this Game Object is added to a Scene or Layer.\r\n *\r\n * You should treat this property as being read-only.\r\n *\r\n * @name Phaser.GameObjects.GameObject#displayList\r\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\r\n * @default null\r\n * @since 3.50.0\r\n */\r\n this.displayList = null;\r\n\r\n /**\r\n * A textual representation of this Game Object, i.e. `sprite`.\r\n * Used internally by Phaser but is available for your own custom classes to populate.\r\n *\r\n * @name Phaser.GameObjects.GameObject#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The current state of this Game Object.\r\n *\r\n * Phaser itself will never modify this value, although plugins may do so.\r\n *\r\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\r\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\r\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @name Phaser.GameObjects.GameObject#state\r\n * @type {(number|string)}\r\n * @since 3.16.0\r\n */\r\n this.state = 0;\r\n\r\n /**\r\n * The parent Container of this Game Object, if it has one.\r\n *\r\n * @name Phaser.GameObjects.GameObject#parentContainer\r\n * @type {Phaser.GameObjects.Container}\r\n * @since 3.4.0\r\n */\r\n this.parentContainer = null;\r\n\r\n /**\r\n * The name of this Game Object.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.GameObject#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The active state of this Game Object.\r\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\r\n * An active object is one which is having its logic and internal systems updated.\r\n *\r\n * @name Phaser.GameObjects.GameObject#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The Tab Index of the Game Object.\r\n * Reserved for future use by plugins and the Input Manager.\r\n *\r\n * @name Phaser.GameObjects.GameObject#tabIndex\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.tabIndex = -1;\r\n\r\n /**\r\n * A Data Manager.\r\n * It allows you to store, query and get key/value paired information specific to this Game Object.\r\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#data\r\n * @type {Phaser.Data.DataManager}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.data = null;\r\n\r\n /**\r\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\r\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\r\n * If those components are not used by your custom class then you can use this bitmask as you wish.\r\n *\r\n * @name Phaser.GameObjects.GameObject#renderFlags\r\n * @type {number}\r\n * @default 15\r\n * @since 3.0.0\r\n */\r\n this.renderFlags = 15;\r\n\r\n /**\r\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\r\n * Not usually set directly, instead call `Camera.ignore`, however you can\r\n * set this property directly using the Camera.id property:\r\n *\r\n * @example\r\n * this.cameraFilter |= camera.id\r\n *\r\n * @name Phaser.GameObjects.GameObject#cameraFilter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cameraFilter = 0;\r\n\r\n /**\r\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\r\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#input\r\n * @type {?Phaser.Types.Input.InteractiveObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.input = null;\r\n\r\n /**\r\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\r\n * This includes calls that may come from a Group, Container or the Scene itself.\r\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\r\n * responsible for managing references to and from this Game Object.\r\n *\r\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.ignoreDestroy = false;\r\n\r\n this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\r\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\r\n\r\n // Tell the Scene to re-sort the children\r\n scene.sys.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\r\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\r\n * The `name` property is not populated by Phaser and is presented for your own use.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The name to be given to this Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setName: function (value)\r\n {\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current state of this Game Object.\r\n *\r\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\r\n *\r\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\r\n * The state value should typically be an integer (ideally mapped to a constant\r\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setState\r\n * @since 3.16.0\r\n *\r\n * @param {(number|string)} value - The state of the Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setState: function (value)\r\n {\r\n this.state = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a Data Manager component to this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setDataEnabled\r\n * @since 3.0.0\r\n * @see Phaser.Data.DataManager\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setDataEnabled: function ()\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Allows you to store a key value pair within this Game Objects Data Manager.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * sprite.setData('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `getData`:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setData\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.set(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#incData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n incData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.inc(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toggleData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n toggleData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.toggle(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * sprite.getData([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n getData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this.data.get(key);\r\n },\r\n\r\n /**\r\n * Pass this Game Object to the Input Manager to enable it for Input.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @example\r\n * sprite.setInteractive();\r\n *\r\n * @example\r\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\r\n *\r\n * @example\r\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\r\n *\r\n * @method Phaser.GameObjects.GameObject#setInteractive\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\r\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will disable it.\r\n *\r\n * An object that is disabled for input stops processing or being considered for\r\n * input events, but can be turned back on again at any time by simply calling\r\n * `setInteractive()` with no arguments provided.\r\n *\r\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#disableInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n disableInteractive: function ()\r\n {\r\n this.scene.sys.input.disable(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will queue it\r\n * for removal, causing it to no longer be interactive. The removal happens on\r\n * the next game step, it is not immediate.\r\n *\r\n * The Interactive Object that was assigned to this Game Object will be destroyed,\r\n * removed from the Input Manager and cleared from this Game Object.\r\n *\r\n * If you wish to re-enable this Game Object at a later date you will need to\r\n * re-create its InteractiveObject by calling `setInteractive` again.\r\n *\r\n * If you wish to only temporarily stop an object from receiving input then use\r\n * `disableInteractive` instead, as that toggles the interactive state, where-as\r\n * this erases it completely.\r\n *\r\n * If you wish to resize a hit area, don't remove and then set it as being\r\n * interactive. Instead, access the hitarea object directly and resize the shape\r\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\r\n * shape is a Rectangle, which it is by default.)\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n removeInteractive: function ()\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is added to a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to add themselves into the Update List.\r\n *\r\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addedToScene\r\n * @since 3.50.0\r\n */\r\n addedToScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is removed from a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to removed themselves from the Update List.\r\n *\r\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removedFromScene\r\n * @since 3.50.0\r\n */\r\n removedFromScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\r\n *\r\n * @method Phaser.GameObjects.GameObject#update\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - args\r\n */\r\n update: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Returns a JSON representation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n return ComponentsToJSON(this);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.GameObject#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\r\n\r\n return !(!listWillRender || GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n },\r\n\r\n /**\r\n * Returns an array containing the display list index of either this Game Object, or if it has one,\r\n * its parent Container. It then iterates up through all of the parent containers until it hits the\r\n * root of the display list (which is index 0 in the returned array).\r\n *\r\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\r\n * this Game Object and all of its ancestors.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getIndexList\r\n * @since 3.4.0\r\n *\r\n * @return {number[]} An array of display list position indexes.\r\n */\r\n getIndexList: function ()\r\n {\r\n // eslint-disable-next-line consistent-this\r\n var child = this;\r\n var parent = this.parentContainer;\r\n\r\n var indexes = [];\r\n\r\n while (parent)\r\n {\r\n indexes.unshift(parent.getIndex(child));\r\n\r\n child = parent;\r\n\r\n if (!parent.parentContainer)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n parent = parent.parentContainer;\r\n }\r\n }\r\n\r\n if (this.displayList)\r\n {\r\n indexes.unshift(this.displayList.getIndex(child));\r\n }\r\n else\r\n {\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n }\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the given Display List.\r\n *\r\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\r\n * this Game Object belongs.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\r\n *\r\n * If this Game Object is already on another Display List when this method is called, it will first\r\n * be removed from it, before being added to the new list.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToDisplayList\r\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToDisplayList: function (displayList)\r\n {\r\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\r\n\r\n if (this.displayList && this.displayList !== displayList)\r\n {\r\n this.removeFromDisplayList();\r\n }\r\n\r\n // Don't repeat if it's already on this list\r\n if (!displayList.exists(this))\r\n {\r\n this.displayList = displayList;\r\n\r\n displayList.add(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the Update List belonging to the Scene.\r\n *\r\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\r\n * every game frame. This method is passed two parameters: `delta` and `time`.\r\n *\r\n * If you wish to run your own logic within `preUpdate` then you should always call\r\n * `super.preUpdate(delta, time)` within it, or it may fail to process required operations,\r\n * such as Sprite animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Display List it is currently on.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\r\n * and added back at a later stage.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\r\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromDisplayList: function ()\r\n {\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n if (displayList && displayList.exists(this))\r\n {\r\n displayList.remove(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.displayList = null;\r\n\r\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Scene's Update List.\r\n *\r\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\r\n * every game frame. Calling this method will remove it from the list, preventing this.\r\n *\r\n * Removing a Game Object from the Update List will stop most internal functions working.\r\n * For example, removing a Sprite from the Update List will prevent it from being able to\r\n * run animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.remove(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Game Object removing it from the Display List and Update List and\r\n * severing all ties to parent resources.\r\n *\r\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\r\n *\r\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\r\n * As long as no reference to it exists within your own code it should become free for\r\n * garbage collection by the browser.\r\n *\r\n * If you just want to temporarily disable an object then look at using the\r\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\r\n *\r\n * @method Phaser.GameObjects.GameObject#destroy\r\n * @fires Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [fromScene=false] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\n destroy: function (fromScene)\r\n {\r\n // This Game Object has already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n if (fromScene === undefined) { fromScene = false; }\r\n\r\n if (this.preDestroy)\r\n {\r\n this.preDestroy.call(this);\r\n }\r\n\r\n this.emit(Events.DESTROY, this, fromScene);\r\n\r\n this.removeAllListeners();\r\n\r\n if (this.postPipelines)\r\n {\r\n this.resetPostPipeline(true);\r\n }\r\n\r\n this.removeFromDisplayList();\r\n this.removeFromUpdateList();\r\n\r\n if (this.input)\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n }\r\n\r\n if (this.data)\r\n {\r\n this.data.destroy();\r\n\r\n this.data = undefined;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.body.destroy();\r\n\r\n this.body = undefined;\r\n }\r\n\r\n if (this.preFX)\r\n {\r\n this.preFX.destroy();\r\n\r\n this.preFX = undefined;\r\n }\r\n\r\n if (this.postFX)\r\n {\r\n this.postFX.destroy();\r\n\r\n this.postFX = undefined;\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n this.parentContainer = undefined;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\r\n *\r\n * @constant {number} RENDER_MASK\r\n * @memberof Phaser.GameObjects.GameObject\r\n * @default\r\n */\r\nGameObject.RENDER_MASK = 15;\r\n\r\nmodule.exports = GameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar PluginCache = require('../plugins/PluginCache');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and have them automatically registered with the Scene.\r\n *\r\n * Game Objects directly register themselves with the Factory and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectFactory\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectFactory = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectFactory (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Factory belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n this.events = scene.sys.events;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n this.events.once(SceneEvents.BOOT, this.boot, this);\r\n this.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Game Object to this Scene.\r\n *\r\n * If the Game Object renders, it will be added to the Display List.\r\n * If it has a `preUpdate` method, it will be added to the Update List.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#existing\r\n * @since 3.0.0\r\n *\r\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\r\n */\r\n existing: function (child)\r\n {\r\n if (child.renderCanvas || child.renderWebGL)\r\n {\r\n this.displayList.add(child);\r\n }\r\n\r\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\r\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\r\n if (child.preUpdate)\r\n {\r\n this.updateList.add(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.events = null;\r\n\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\r\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\r\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.register\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\r\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\r\n */\r\nGameObjectFactory.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectFactory.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\r\n * providing a its `factoryType`.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.remove\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\r\n */\r\nGameObjectFactory.remove = function (factoryType)\r\n{\r\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectFactory.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\r\n\r\nmodule.exports = GameObjectFactory;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TransformMatrix = require('./components/TransformMatrix');\r\n\r\nvar tempMatrix1 = new TransformMatrix();\r\nvar tempMatrix2 = new TransformMatrix();\r\nvar tempMatrix3 = new TransformMatrix();\r\n\r\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\r\n\r\n/**\r\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\r\n * the parent matrix if provided.\r\n *\r\n * Note that the object this results contains _references_ to the Transform Matrices,\r\n * not new instances of them. Therefore, you should use their values immediately, or\r\n * copy them to your own matrix, as they will be replaced as soon as another Game\r\n * Object is rendered.\r\n *\r\n * @function Phaser.GameObjects.GetCalcMatrix\r\n * @memberof Phaser.GameObjects\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\r\n *\r\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\r\n */\r\nvar GetCalcMatrix = function (src, camera, parentMatrix)\r\n{\r\n var camMatrix = tempMatrix1;\r\n var spriteMatrix = tempMatrix2;\r\n var calcMatrix = tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = GetCalcMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha property of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.AlphaSingle\r\n * @since 3.22.0\r\n */\r\n\r\nvar AlphaSingle = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = AlphaSingle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../../renderer/BlendModes');\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string|number)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.displayList)\r\n {\r\n this.displayList.queueDepthSort();\r\n }\r\n\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Effects = require('../../fx/');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * @classdesc\r\n * The FX Component features a set of methods used for applying a range of special built-in effects to a Game Object.\r\n *\r\n * The effects include the following:\r\n *\r\n * * Barrel Distortion\r\n * * Bloom\r\n * * Blur\r\n * * Bokeh / Tilt Shift\r\n * * Circle Outline\r\n * * Color Matrix\r\n * * Glow\r\n * * Displacement\r\n * * Gradient\r\n * * Pixelate\r\n * * Shine\r\n * * Shadow\r\n * * Vignette\r\n * * Wipe / Reveal\r\n *\r\n * All Game Objects support Post FX. These are effects applied after the Game Object has been rendered.\r\n *\r\n * Texture-based Game Objects also support Pre FX, including:\r\n *\r\n * * Image\r\n * * Sprite\r\n * * TileSprite\r\n * * Text\r\n * * RenderTexture\r\n * * Video\r\n *\r\n * And any Game Object that extends the above.\r\n *\r\n * The difference between Pre FX and Post FX are that all Post FX take place in a canvas (renderer) sized frame buffer,\r\n * after the Game Object has been rendered. Pre FX, however, take place in a texture sized frame buffer, which is sized\r\n * based on the Game Object itself. The end result is then composited back to the main game canvas. For intensive effects,\r\n * such as blur, bloom or glow, which can require many iterations, this is a much more efficient way to apply the effect,\r\n * as only it only has to work on a Game Object sized texture and not all pixels in the canvas.\r\n *\r\n * In short, you should always try and use a Pre FX if you can.\r\n *\r\n * Due to the way that FX work they can be stacked-up. For example, you can apply a blur to a Game Object, then apply\r\n * a bloom effect to the same Game Object. The bloom effect will be applied to the blurred texture, not the original.\r\n * Keep the order in mind when stacking effects.\r\n *\r\n * All effects are WebGL only and do not have canvas counterparts.\r\n *\r\n * As you can appreciate, some effects are more expensive than others. For example, a bloom effect is going to be more\r\n * expensive than a simple color matrix effect, so please consider using them wisely and performance test your target\r\n * platforms early on in production.\r\n *\r\n * This component is created automatically by the `PostPipeline` class and does not need to be instantiated directly.\r\n *\r\n * @class FX\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.60.0\r\n * @webglOnly\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that owns this FX Component.\r\n * @param {boolean} isPost - Is this a Pre or Post FX Component?\r\n */\r\nvar FX = new Class({\r\n\r\n initialize:\r\n\r\n function FX (gameObject, isPost)\r\n {\r\n /**\r\n * A reference to the Game Object that owns this FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Is this a Post FX Controller? or a Pre FX Controller?\r\n *\r\n * @name Phaser.GameObjects.Components.FX#isPost\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.60.0\r\n */\r\n this.isPost = isPost;\r\n\r\n /**\r\n * Has this FX Component been enabled?\r\n *\r\n * You should treat this property as read-only, although it is toggled\r\n * automaticaly during internal use.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#enabled\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * An array containing all of the Pre FX Controllers that\r\n * have been added to this FX Component. They are processed in\r\n * the order they are added.\r\n *\r\n * This array is empty if this is a Post FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#list\r\n * @type {Phaser.FX.Controller[]}\r\n * @since 3.60.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * The amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * You do not need to set this if you're only using Post FX.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#padding\r\n * @type {number}\r\n * @default 0\r\n * @since 3.60.0\r\n */\r\n this.padding = 0;\r\n },\r\n\r\n /**\r\n * Sets the amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * You do not need to set this if you're only using Post FX.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setPadding\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPadding: function (padding)\r\n {\r\n if (padding === undefined) { padding = 0; }\r\n\r\n this.padding = padding;\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is copied by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `copySprite` method.\r\n *\r\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFXCopy\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFXCopy: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is rendered by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `drawSprite` method.\r\n *\r\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFX\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFX: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Enables this FX Component and applies the FXPipeline to the parent Game Object.\r\n *\r\n * This is called automatically whenever you call a method such as `addBloom`, etc.\r\n *\r\n * You can check the `enabled` property to see if the Game Object is already enabled, or not.\r\n *\r\n * This only applies to Pre FX. Post FX are always enabled.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#enable\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n */\r\n enable: function (padding)\r\n {\r\n if (this.isPost)\r\n {\r\n return;\r\n }\r\n\r\n var renderer = this.gameObject.scene.sys.renderer;\r\n\r\n if (renderer && renderer.pipelines)\r\n {\r\n this.gameObject.pipeline = renderer.pipelines.FX_PIPELINE;\r\n\r\n if (padding !== undefined)\r\n {\r\n this.padding = padding;\r\n }\r\n\r\n this.enabled = true;\r\n }\r\n else\r\n {\r\n this.enabled = false;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys and removes all FX Controllers that are part of this FX Component,\r\n * then disables it.\r\n *\r\n * If this is a Pre FX Component it will only remove Pre FX.\r\n * If this is a Post FX Component it will only remove Post FX.\r\n *\r\n * To remove both at once use the `GameObject.clearFX` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#clear\r\n * @since 3.60.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clear: function ()\r\n {\r\n if (this.isPost)\r\n {\r\n this.gameObject.resetPostPipeline(true);\r\n }\r\n else\r\n {\r\n var list = this.list;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].destroy();\r\n }\r\n\r\n this.list = [];\r\n }\r\n\r\n this.enabled = false;\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * Searches for the given FX Controller within this FX Component.\r\n *\r\n * If found, the controller is removed from this component and then destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#remove\r\n * @since 3.60.0\r\n *\r\n * @generic {Phaser.FX.Controller} T\r\n * @genericUse {T} - [fx]\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX Component.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n remove: function (fx)\r\n {\r\n var i;\r\n\r\n if (this.isPost)\r\n {\r\n var pipelines = this.gameObject.getPostPipeline(String(fx.type));\r\n\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (i = 0; i < pipelines.length; i++)\r\n {\r\n var pipeline = pipelines[i];\r\n\r\n if (pipeline.controller === fx)\r\n {\r\n this.gameObject.removePostPipeline(pipeline);\r\n\r\n fx.destroy();\r\n\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n var list = this.list;\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n if (list[i] === fx)\r\n {\r\n SpliceOne(list, i);\r\n\r\n fx.destroy();\r\n }\r\n }\r\n }\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * Disables this FX Component.\r\n *\r\n * This will reset the pipeline on the Game Object that owns this component back to its\r\n * default and flag this component as disabled.\r\n *\r\n * You can re-enable it again by calling `enable` for Pre FX or by adding an FX for Post FX.\r\n *\r\n * Optionally, set `clear` to destroy all current FX Controllers.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#disable\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [clear=false] - Destroy and remove all FX Controllers that are part of this component.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n disable: function (clear)\r\n {\r\n if (clear === undefined) { clear = false; }\r\n\r\n if (!this.isPost)\r\n {\r\n this.gameObject.resetPipeline();\r\n }\r\n\r\n this.enabled = false;\r\n\r\n if (clear)\r\n {\r\n this.clear();\r\n }\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * Adds the given FX Controler to this FX Component.\r\n *\r\n * Note that adding an FX Controller does not remove any existing FX. They all stack-up\r\n * on-top of each other. If you don't want this, make sure to call either `remove` or\r\n * `clear` first.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#add\r\n * @since 3.60.0\r\n *\r\n * @generic {Phaser.FX.Controller} T\r\n * @genericUse {T} - [fx]\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX Component.\r\n * @param {object} [config] - Optional configuration object that is passed to the pipeline during instantiation.\r\n *\r\n * @return {Phaser.FX.Controller} The FX Controller.\r\n */\r\n add: function (fx, config)\r\n {\r\n if (this.isPost)\r\n {\r\n var type = String(fx.type);\r\n\r\n this.gameObject.setPostPipeline(type, config);\r\n\r\n var pipeline = this.gameObject.getPostPipeline(type);\r\n\r\n if (pipeline)\r\n {\r\n if (Array.isArray(pipeline))\r\n {\r\n pipeline = pipeline.pop();\r\n }\r\n\r\n pipeline.controller = fx;\r\n\r\n return fx;\r\n }\r\n }\r\n else\r\n {\r\n if (!this.enabled)\r\n {\r\n this.enable();\r\n }\r\n\r\n this.list.push(fx);\r\n\r\n return fx;\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Glow effect.\r\n *\r\n * The glow effect is a visual technique that creates a soft, luminous halo around game objects,\r\n * characters, or UI elements. This effect is used to emphasize importance, enhance visual appeal,\r\n * or convey a sense of energy, magic, or otherworldly presence. The effect can also be set on\r\n * the inside of the Game Object. The color and strength of the glow can be modified.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGlow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n * @param {number} [quality=0.1] - Only available for PostFX. Sets the quality of this Glow effect. Default is 0.1. Cannot be changed post-creation.\r\n * @param {number} [distance=10] - Only available for PostFX. Sets the distance of this Glow effect. Default is 10. Cannot be changed post-creation.\r\n *\r\n * @return {Phaser.FX.Glow} The Glow FX Controller.\r\n */\r\n addGlow: function (color, outerStrength, innerStrength, knockout, quality, distance)\r\n {\r\n return this.add(new Effects.Glow(this.gameObject, color, outerStrength, innerStrength, knockout), { quality: quality, distance: distance });\r\n },\r\n\r\n /**\r\n * Adds a Shadow effect.\r\n *\r\n * The shadow effect is a visual technique used to create the illusion of depth and realism by adding darker,\r\n * offset silhouettes or shapes beneath game objects, characters, or environments. These simulated shadows\r\n * help to enhance the visual appeal and immersion, making the 2D game world appear more dynamic and three-dimensional.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShadow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n *\r\n * @return {Phaser.FX.Shadow} The Shadow FX Controller.\r\n */\r\n addShadow: function (x, y, decay, power, color, samples, intensity)\r\n {\r\n return this.add(new Effects.Shadow(this.gameObject, x, y, decay, power, color, samples, intensity));\r\n },\r\n\r\n /**\r\n * Adds a Pixelate effect.\r\n *\r\n * The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image,\r\n * creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic\r\n * purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as\r\n * during a transition or to censor specific content.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addPixelate\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n *\r\n * @return {Phaser.FX.Pixelate} The Pixelate FX Controller.\r\n */\r\n addPixelate: function (amount)\r\n {\r\n return this.add(new Effects.Pixelate(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Vignette effect.\r\n *\r\n * The vignette effect is a visual technique where the edges of the screen, or a Game Object, gradually darken or blur,\r\n * creating a frame-like appearance. This effect is used to draw the player's focus towards the central action or subject,\r\n * enhance immersion, and provide a cinematic or artistic quality to the game's visuals.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addVignette\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n *\r\n * @return {Phaser.FX.Vignette} The Vignette FX Controller.\r\n */\r\n addVignette: function (x, y, radius, strength)\r\n {\r\n return this.add(new Effects.Vignette(this.gameObject, x, y, radius, strength));\r\n },\r\n\r\n /**\r\n * Adds a Shine effect.\r\n *\r\n * The shine effect is a visual technique that simulates the appearance of reflective\r\n * or glossy surfaces by passing a light beam across a Game Object. This effect is used to\r\n * enhance visual appeal, emphasize certain features, and create a sense of depth or\r\n * material properties.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShine\r\n * @since 3.60.0\r\n *\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n *\r\n * @return {Phaser.FX.Shine} The Shine FX Controller.\r\n */\r\n addShine: function (speed, lineWidth, gradient, reveal)\r\n {\r\n return this.add(new Effects.Shine(this.gameObject, speed, lineWidth, gradient, reveal));\r\n },\r\n\r\n /**\r\n * Adds a Blur effect.\r\n *\r\n * A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect,\r\n * typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a\r\n * smooth blur resembling that of viewing the image through a translucent screen, distinctly different\r\n * from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBlur\r\n * @since 3.60.0\r\n *\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Blur} The Blur FX Controller.\r\n */\r\n addBlur: function (quality, x, y, strength, color, steps)\r\n {\r\n return this.add(new Effects.Blur(this.gameObject, quality, x, y, strength, color, steps));\r\n },\r\n\r\n /**\r\n * Adds a Gradient effect.\r\n *\r\n * The gradient overlay effect is a visual technique where a smooth color transition is applied over Game Objects,\r\n * such as sprites or UI components. This effect is used to enhance visual appeal, emphasize depth, or create\r\n * stylistic and atmospheric variations. It can also be utilized to convey information, such as representing\r\n * progress or health status through color changes.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGradient\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n *\r\n * @return {Phaser.FX.Gradient} The Gradient FX Controller.\r\n */\r\n addGradient: function (color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n return this.add(new Effects.Gradient(this.gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size));\r\n },\r\n\r\n /**\r\n * Adds a Bloom effect.\r\n *\r\n * Bloom is an effect used to reproduce an imaging artifact of real-world cameras.\r\n * The effect produces fringes of light extending from the borders of bright areas in an image,\r\n * contributing to the illusion of an extremely bright light overwhelming the\r\n * camera or eye capturing the scene.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBloom\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Bloom} The Bloom FX Controller.\r\n */\r\n addBloom: function (color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n return this.add(new Effects.Bloom(this.gameObject, color, offsetX, offsetY, blurStrength, strength, steps));\r\n },\r\n\r\n /**\r\n * Adds a ColorMatrix effect.\r\n *\r\n * The color matrix effect is a visual technique that involves manipulating the colors of an image\r\n * or scene using a mathematical matrix. This process can adjust hue, saturation, brightness, and contrast,\r\n * allowing developers to create various stylistic appearances or mood settings within the game.\r\n * Common applications include simulating different lighting conditions, applying color filters,\r\n * or achieving a specific visual style.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addColorMatrix\r\n * @since 3.60.0\r\n *\r\n * @return {Phaser.FX.ColorMatrix} The ColorMatrix FX Controller.\r\n */\r\n addColorMatrix: function ()\r\n {\r\n return this.add(new Effects.ColorMatrix(this.gameObject));\r\n },\r\n\r\n /**\r\n * Adds a Circle effect.\r\n *\r\n * This effect will draw a circle around the texture of the Game Object, effectively masking off\r\n * any area outside of the circle without the need for an actual mask. You can control the thickness\r\n * of the circle, the color of the circle and the color of the background, should the texture be\r\n * transparent. You can also control the feathering applied to the circle, allowing for a harsh or soft edge.\r\n *\r\n * Please note that adding this effect to a Game Object will not change the input area or physics body of\r\n * the Game Object, should it have one.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addCircle\r\n * @since 3.60.0\r\n *\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=0xfeedb6] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n *\r\n * @return {Phaser.FX.Circle} The Circle FX Controller.\r\n */\r\n addCircle: function (thickness, color, backgroundColor, scale, feather)\r\n {\r\n return this.add(new Effects.Circle(this.gameObject, thickness, color, backgroundColor, scale, feather));\r\n },\r\n\r\n /**\r\n * Adds a Barrel effect.\r\n *\r\n * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to\r\n * a Game Object. The amount of the effect can be modified in real-time.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBarrel\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n *\r\n * @return {Phaser.FX.Barrel} The Barrel FX Controller.\r\n */\r\n addBarrel: function (amount)\r\n {\r\n return this.add(new Effects.Barrel(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Displacement effect.\r\n *\r\n * The displacement effect is a visual technique that alters the position of pixels in an image\r\n * or texture based on the values of a displacement map. This effect is used to create the illusion\r\n * of depth, surface irregularities, or distortion in otherwise flat elements. It can be applied to\r\n * characters, objects, or backgrounds to enhance realism, convey movement, or achieve various\r\n * stylistic appearances.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addDisplacement\r\n * @since 3.60.0\r\n *\r\n * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply. A very small float number, such as 0.005.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply. A very small float number, such as 0.005.\r\n *\r\n * @return {Phaser.FX.Displacement} The Displacement FX Controller.\r\n */\r\n addDisplacement: function (texture, x, y)\r\n {\r\n return this.add(new Effects.Displacement(this.gameObject, texture, x, y));\r\n },\r\n\r\n /**\r\n * Adds a Wipe effect.\r\n *\r\n * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements\r\n * in the game, such as images, text, or scene transitions. This effect is often used to create\r\n * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition\r\n * between game states.\r\n *\r\n * You can set both the direction and the axis of the wipe effect. The following combinations are possible:\r\n *\r\n * * left to right: direction 0, axis 0\r\n * * right to left: direction 1, axis 0\r\n * * top to bottom: direction 1, axis 1\r\n * * bottom to top: direction 1, axis 0\r\n *\r\n * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addWipe\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addWipe: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis));\r\n },\r\n\r\n /**\r\n * Adds a Reveal Wipe effect.\r\n *\r\n * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements\r\n * in the game, such as images, text, or scene transitions. This effect is often used to create\r\n * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition\r\n * between game states.\r\n *\r\n * You can set both the direction and the axis of the wipe effect. The following combinations are possible:\r\n *\r\n * * left to right: direction 0, axis 0\r\n * * right to left: direction 1, axis 0\r\n * * top to bottom: direction 1, axis 1\r\n * * bottom to top: direction 1, axis 0\r\n *\r\n * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addReveal\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addReveal: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis, true));\r\n },\r\n\r\n /**\r\n * Adds a Bokeh effect.\r\n *\r\n * Bokeh refers to a visual effect that mimics the photographic technique of creating a shallow depth of field.\r\n * This effect is used to emphasize the game's main subject or action, by blurring the background or foreground\r\n * elements, resulting in a more immersive and visually appealing experience. It is achieved through rendering\r\n * techniques that simulate the out-of-focus areas, giving a sense of depth and realism to the game's graphics.\r\n *\r\n * See also Tilt Shift.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBokeh\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh FX Controller.\r\n */\r\n addBokeh: function (radius, amount, contrast)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast));\r\n },\r\n\r\n /**\r\n * Adds a Tilt Shift effect.\r\n *\r\n * This Bokeh effect can also be used to generate a Tilt Shift effect, which is a technique used to create a miniature\r\n * effect by blurring everything except a small area of the image. This effect is achieved by blurring the\r\n * top and bottom elements, while keeping the center area in focus.\r\n *\r\n * See also Bokeh.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addTiltShift\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {number} [blurX=1] - The amount of horizontal blur.\r\n * @param {number} [blurY=1] - The amount of vertical blur.\r\n * @param {number} [strength=1] - The strength of the blur.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh TiltShift FX Controller.\r\n */\r\n addTiltShift: function (radius, amount, contrast, blurX, blurY, strength)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast, true, blurX, blurY, strength));\r\n },\r\n\r\n /**\r\n * Destroys this FX Component.\r\n *\r\n * Called automatically when Game Objects are destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.clear();\r\n\r\n this.gameObject = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar RotateAround = require('../../math/RotateAround');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getCenter: function (output, includeParent)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n *\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is\r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = require('../../display/mask/BitmapMask');\r\nvar GeometryMask = require('../../display/mask/GeometryMask');\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n *\r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n *\r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one, or a Dynamic Texture.\r\n *\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable texture-based Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G\r\n * @generic {Phaser.Textures.DynamicTexture} T\r\n * @genericUse {(G|T|null)} [maskObject]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (maskObject, x, y, texture, frame)\r\n {\r\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n maskObject = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n *\r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G\r\n * @generic {Phaser.GameObjects.Shape} S\r\n * @genericUse {(G|S)} [graphics]\r\n *\r\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && (this.type === 'Graphics' || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = require('../../math/DegToRad');\r\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar TWEEN_CONST = require('../../tweens/tween/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The distance the follower has traveled from the previous point to the current one, at the last update.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathDelta\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.23.0\r\n */\r\n pathDelta: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.setTargetValue();\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n if (!this.pathDelta)\r\n {\r\n this.pathDelta = new Vector2();\r\n }\r\n\r\n this.pathDelta.reset();\r\n\r\n config.persist = true;\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n var pathDelta = this.pathDelta;\r\n var pathVector = this.pathVector;\r\n\r\n pathDelta.copy(pathVector).negate();\r\n\r\n if (tweenData.state === TWEEN_CONST.COMPLETE)\r\n {\r\n this.path.getPoint(tweenData.end, pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n return;\r\n }\r\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n pipelineData: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n *\r\n * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipeline)\r\n {\r\n this.pipelineData = {};\r\n\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return false;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n if (pipeline === undefined)\r\n {\r\n pipeline = pipelines.default;\r\n }\r\n\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.defaultPipeline = instance;\r\n this.pipeline = instance;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the main WebGL Pipeline of this Game Object.\r\n *\r\n * Also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipeline, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.pipeline = instance;\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipelineData: function (key, value)\r\n {\r\n var data = this.pipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n *\r\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\r\n */\r\n resetPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n this.pipeline = this.defaultPipeline;\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\nvar FX = require('../components/FX');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering post pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n\r\nvar PostPipeline = {\r\n\r\n /**\r\n * Does this Game Object have any Post Pipelines set?\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#hasPostPipeline\r\n * @type {boolean}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n hasPostPipeline: false,\r\n\r\n /**\r\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\r\n *\r\n * The pipelines are processed in the order in which they appear in this array.\r\n *\r\n * If you modify this array directly, be sure to set the\r\n * `hasPostPipeline` property accordingly.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelines\r\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelines: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelineData: null,\r\n\r\n /**\r\n * The Pre FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.preFX.addBloom();\r\n * ```\r\n *\r\n * Only the following Game Objects support Pre FX:\r\n *\r\n * * Image\r\n * * Sprite\r\n * * TileSprite\r\n * * Text\r\n * * RenderTexture\r\n * * Video\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#preFX\r\n * @type {?Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n preFX: null,\r\n\r\n /**\r\n * The Post FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.postFX.addBloom();\r\n * ```\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * This property is always `null` until the `initPostPipeline` method is called.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postFX\r\n * @type {Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postFX: null,\r\n\r\n /**\r\n * This should only be called during the instantiation of the Game Object.\r\n *\r\n * It is called by default by all core Game Objects and doesn't need\r\n * calling again.\r\n *\r\n * After that, use `setPostPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#initPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [preFX=false] - Does this Game Object support Pre FX?\r\n */\r\n initPostPipeline: function (preFX)\r\n {\r\n this.postPipelines = [];\r\n this.postPipelineData = {};\r\n\r\n this.postFX = new FX(this, true);\r\n\r\n if (preFX)\r\n {\r\n this.preFX = new FX(this, false);\r\n }\r\n },\r\n\r\n /**\r\n * Sets one, or more, Post Pipelines on this Game Object.\r\n *\r\n * Post Pipelines are invoked after this Game Object has rendered to its target and\r\n * are commonly used for post-fx.\r\n *\r\n * The post pipelines are appended to the `postPipelines` array belonging to this\r\n * Game Object. When the renderer processes this Game Object, it iterates through the post\r\n * pipelines in the order in which they appear in the array. If you are stacking together\r\n * multiple effects, be aware that the order is important.\r\n *\r\n * If you call this method multiple times, the new pipelines will be appended to any existing\r\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\r\n *\r\n * You can optionally also set the `postPipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `postPipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `postPipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipeline: function (pipelines, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelineManager = renderer.pipelines;\r\n\r\n if (pipelineManager)\r\n {\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelineManager.getPostPipeline(pipelines[i], this, pipelineData);\r\n\r\n if (instance)\r\n {\r\n this.postPipelines.push(instance);\r\n }\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.postPipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `postPipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipelineData\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipelineData: function (key, value)\r\n {\r\n var data = this.postPipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#getPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} An array of all the Post Pipelines matching the name. This array will be empty if there was no match. If there was only one single match, that pipeline is returned directly, not in an array.\r\n */\r\n getPostPipeline: function (pipeline)\r\n {\r\n var isString = (typeof pipeline === 'string');\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n var results = [];\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\r\n {\r\n results.push(instance);\r\n }\r\n }\r\n\r\n return (results.length === 1) ? results[0] : results;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\r\n * the `destroy` method on each post pipeline and then clearing the local array.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#resetPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `postPipelineData` object to being an empty object?\r\n */\r\n resetPostPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n pipelines[i].destroy();\r\n }\r\n\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n\r\n if (resetData)\r\n {\r\n this.postPipelineData = {};\r\n }\r\n },\r\n\r\n /**\r\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\r\n *\r\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#removePostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removePostPipeline: function (pipeline)\r\n {\r\n var isString = (typeof pipeline === 'string');\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = pipelines.length - 1; i >= 0; i--)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if (\r\n (isString && instance.name === pipeline) ||\r\n (!isString && instance === pipeline))\r\n {\r\n instance.destroy();\r\n\r\n SpliceOne(pipelines, i);\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Pre and Post FX Controllers from this Game Object.\r\n *\r\n * If you wish to remove a single controller, use the `preFX.remove(fx)` or `postFX.remove(fx)` methods instead.\r\n *\r\n * If you wish to clear a single controller, use the `preFX.clear()` or `postFX.clear()` methods instead.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#clearFX\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearFX: function ()\r\n {\r\n if (this.preFX)\r\n {\r\n this.preFX.clear();\r\n }\r\n\r\n if (this.postFX)\r\n {\r\n this.postFX.clear();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PostPipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleX * this.frame.realWidth);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleY * this.frame.realHeight);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame|boolean} [frame] - The frame to base the size of this Game Object on.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (!frame) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n var input = this.input;\r\n\r\n if (input && !input.customHitArea)\r\n {\r\n input.hitArea.width = this.width;\r\n input.hitArea.height = this.height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the tint of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Tint\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Tint = {\r\n\r\n /**\r\n * The tint value being applied to the top-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the top-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopRight: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomRight: 0xffffff,\r\n\r\n /**\r\n * The tint fill mode.\r\n *\r\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\r\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n tintFill: false,\r\n\r\n /**\r\n * Clears all tint values associated with this Game Object.\r\n *\r\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\r\n * which results in no visible change to the texture.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#clearTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearTint: function ()\r\n {\r\n this.setTint(0xffffff);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an additive tint on this Game Object.\r\n *\r\n * The tint works by taking the pixel color values from the Game Objects texture, and then\r\n * multiplying it by the color value of the tint. You can provide either one color value,\r\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\r\n * per corner. The colors are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 0xffffff; }\r\n\r\n if (topRight === undefined)\r\n {\r\n topRight = topLeft;\r\n bottomLeft = topLeft;\r\n bottomRight = topLeft;\r\n }\r\n\r\n this.tintTopLeft = topLeft;\r\n this.tintTopRight = topRight;\r\n this.tintBottomLeft = bottomLeft;\r\n this.tintBottomRight = bottomRight;\r\n\r\n this.tintFill = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a fill-based tint on this Game Object.\r\n *\r\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\r\n * with those in the tint. You can use this for effects such as making a player flash 'white'\r\n * if hit by something. You can provide either one color value, in which case the whole\r\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\r\n * are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTintFill\r\n * @webglOnly\r\n * @since 3.11.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n\r\n this.tintFill = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The tint value being applied to the whole of the Game Object.\r\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tint\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tint: {\r\n\r\n set: function (value)\r\n {\r\n this.setTint(value, value, value, value);\r\n }\r\n },\r\n\r\n /**\r\n * Does this Game Object have a tint applied?\r\n *\r\n * It checks to see if the 4 tint properties are set to the value 0xffffff\r\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#isTinted\r\n * @type {boolean}\r\n * @webglOnly\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n isTinted: {\r\n\r\n get: function ()\r\n {\r\n var white = 0xffffff;\r\n\r\n return (\r\n this.tintFill ||\r\n this.tintTopLeft !== white ||\r\n this.tintTopRight !== white ||\r\n this.tintBottomLeft !== white ||\r\n this.tintBottomRight !== white\r\n );\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Tint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../../math/const');\r\nvar TransformMatrix = require('./TransformMatrix');\r\nvar TransformXY = require('../../math/TransformXY');\r\nvar WrapAngle = require('../../math/angle/Wrap');\r\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Transform\r\n * @since 3.0.0\r\n */\r\n\r\nvar Transform = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\r\n * @type {boolean}\r\n * @readonly\r\n * @default true\r\n * @since 3.60.0\r\n */\r\n hasTransformComponent: true,\r\n\r\n /**\r\n * Private internal value. Holds the horizontal scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleX\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleX: 1,\r\n\r\n /**\r\n * Private internal value. Holds the vertical scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleY\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleY: 1,\r\n\r\n /**\r\n * Private internal value. Holds the rotation value in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _rotation: 0,\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: 0,\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: 0,\r\n\r\n /**\r\n * The z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: 0,\r\n\r\n /**\r\n * The w position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: 0,\r\n\r\n /**\r\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\r\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\r\n *\r\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\r\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.18.0\r\n */\r\n scale: {\r\n\r\n get: function ()\r\n {\r\n return (this._scaleX + this._scaleY) / 2;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleY !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleX !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The angle of this Game Object as expressed in degrees.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in radians, see the `rotation` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * The angle of this Game Object in radians.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\r\n * and -PI/2 is up.\r\n *\r\n * If you prefer to work in degrees, see the `angle` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#rotation\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of this Game Object.\r\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\r\n * @param {number} [z=0] - The z position of this Game Object.\r\n * @param {number} [w=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPosition: function (x, y, z, w)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n if (z === undefined) { z = 0; }\r\n if (w === undefined) { w = 0; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies an object's coordinates to this Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#copyPosition\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n copyPosition: function (source)\r\n {\r\n if (source.x !== undefined) { this.x = source.x; }\r\n if (source.y !== undefined) { this.y = source.y; }\r\n if (source.z !== undefined) { this.z = source.z; }\r\n if (source.w !== undefined) { this.w = source.w; }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object to be a random position within the confines of\r\n * the given area.\r\n *\r\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\r\n *\r\n * The position does not factor in the size of this Game Object, meaning that only the origin is\r\n * guaranteed to be within the area.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\r\n * @since 3.8.0\r\n *\r\n * @param {number} [x=0] - The x position of the top-left of the random area.\r\n * @param {number} [y=0] - The y position of the top-left of the random area.\r\n * @param {number} [width] - The width of the random area.\r\n * @param {number} [height] - The height of the random area.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRandomPosition: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n\r\n this.x = x + (Math.random() * width);\r\n this.y = y + (Math.random() * height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this.rotation = radians;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=1] - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScale: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scaleX = x;\r\n this.scaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the x position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The x position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setX: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the y position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The y position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setY: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The z position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setZ: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.z = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the w position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setW\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setW: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.w = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the local transform matrix for this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getLocalTransformMatrix: function (tempMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n },\r\n\r\n /**\r\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n var parent = this.parentContainer;\r\n\r\n if (!parent)\r\n {\r\n return this.getLocalTransformMatrix(tempMatrix);\r\n }\r\n\r\n if (!parentMatrix)\r\n {\r\n parentMatrix = new TransformMatrix();\r\n }\r\n\r\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n\r\n while (parent)\r\n {\r\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\r\n\r\n parentMatrix.multiply(tempMatrix, tempMatrix);\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return tempMatrix;\r\n },\r\n\r\n /**\r\n * Takes the given `x` and `y` coordinates and converts them into local space for this\r\n * Game Object, taking into account parent and local transforms, and the Display Origin.\r\n *\r\n * The returned Vector2 contains the translated point in its properties.\r\n *\r\n * A Camera needs to be provided in order to handle modified scroll factors. If no\r\n * camera is specified, it will use the `main` camera from the Scene to which this\r\n * Game Object belongs.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\r\n *\r\n * @return {Phaser.Math.Vector2} The translated point.\r\n */\r\n getLocalPoint: function (x, y, point, camera)\r\n {\r\n if (!point) { point = new Vector2(); }\r\n if (!camera) { camera = this.scene.sys.cameras.main; }\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n var px = x + (csx * this.scrollFactorX) - csx;\r\n var py = y + (csy * this.scrollFactorY) - csy;\r\n\r\n if (this.parentContainer)\r\n {\r\n this.getWorldTransformMatrix().applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\r\n }\r\n\r\n // Normalize origin\r\n if (this._originComponent)\r\n {\r\n point.x += this._displayOriginX;\r\n point.y += this._displayOriginY;\r\n }\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Gets the sum total rotation of all of this Game Objects parent Containers.\r\n *\r\n * The returned value is in radians and will be zero if this Game Object has no parent container.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\r\n * @since 3.18.0\r\n *\r\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\r\n */\r\n getParentRotation: function ()\r\n {\r\n var rotation = 0;\r\n\r\n var parent = this.parentContainer;\r\n\r\n while (parent)\r\n {\r\n rotation += parent.rotation;\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return rotation;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n\r\n /**\r\n * The temporary quad value cache.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\r\n * @type {Float32Array}\r\n * @since 3.60.0\r\n */\r\n this.quad = new Float32Array(8);\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n\r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n\r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? matrix : out.matrix;\r\n\r\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix[5] = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n *\r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point in to the local space of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {Phaser.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n *\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n *\r\n * The result must be applied in the following order to reproduce the current matrix:\r\n *\r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.DecomposeMatrixResults} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n *\r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Performs the 8 calculations required to create the vertices of\r\n * a quad based on this matrix and the given x/y/xw/yh values.\r\n *\r\n * The result is stored in `TransformMatrix.quad`, which is returned\r\n * from this method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\r\n * @since 3.60.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} xw - The xw value.\r\n * @param {number} yh - The yh value.\r\n * @param {boolean} roundPixels - Pass the results via Math.round?\r\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\r\n *\r\n * @return {Float32Array} The quad Float32Array.\r\n */\r\n setQuad: function (x, y, xw, yh, roundPixels, quad)\r\n {\r\n if (quad === undefined) { quad = this.quad; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var e = matrix[4];\r\n var f = matrix[5];\r\n\r\n quad[0] = x * a + y * c + e;\r\n quad[1] = x * b + y * d + f;\r\n\r\n quad[2] = x * a + yh * c + e;\r\n quad[3] = x * b + yh * d + f;\r\n\r\n quad[4] = xw * a + yh * c + e;\r\n quad[5] = xw * b + yh * d + f;\r\n\r\n quad[6] = xw * a + y * c + e;\r\n quad[7] = xw * b + y * d + f;\r\n\r\n if (roundPixels)\r\n {\r\n quad.forEach(function (value, index)\r\n {\r\n quad[index] = Math.round(value);\r\n });\r\n }\r\n\r\n return quad;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.quad = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: require('./Alpha'),\r\n AlphaSingle: require('./AlphaSingle'),\r\n BlendMode: require('./BlendMode'),\r\n ComputedSize: require('./ComputedSize'),\r\n Crop: require('./Crop'),\r\n Depth: require('./Depth'),\r\n Flip: require('./Flip'),\r\n FX: require('./FX'),\r\n GetBounds: require('./GetBounds'),\r\n Mask: require('./Mask'),\r\n Origin: require('./Origin'),\r\n PathFollower: require('./PathFollower'),\r\n Pipeline: require('./Pipeline'),\r\n PostPipeline: require('./PostPipeline'),\r\n ScrollFactor: require('./ScrollFactor'),\r\n Size: require('./Size'),\r\n Texture: require('./Texture'),\r\n TextureCrop: require('./TextureCrop'),\r\n Tint: require('./Tint'),\r\n ToJSON: require('./ToJSON'),\r\n Transform: require('./Transform'),\r\n TransformMatrix: require('./TransformMatrix'),\r\n Visible: require('./Visible')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = require('../../utils/array');\r\nvar BlendModes = require('../../renderer/BlendModes');\r\nvar Class = require('../../utils/Class');\r\nvar Components = require('../components');\r\nvar Events = require('../events');\r\nvar GameObject = require('../GameObject');\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar Render = require('./ContainerRender');\r\nvar Union = require('../../geom/rectangle/Union');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * The transform point of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\r\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\r\n * the Container, and position children positively and negative around it as required.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\r\n * or the input area will become misaligned.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.AlphaSingle\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.PostPipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.AlphaSingle,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.PostPipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {number}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.initPostPipeline();\r\n\r\n this.setPosition(x, y);\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {this} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\r\n\r\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\r\n }\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n var hasSetFirst = false;\r\n\r\n output.setEmpty();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n\r\n if (!hasSetFirst)\r\n {\r\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\r\n hasSetFirst = true;\r\n }\r\n else\r\n {\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.parentContainer = this;\r\n\r\n gameObject.removeFromDisplayList();\r\n\r\n gameObject.addedToScene();\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n\r\n gameObject.removedFromScene();\r\n\r\n gameObject.addToDisplayList();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n this.parentContainer.pointToContainer(source, output);\r\n }\r\n else\r\n {\r\n output.x = source.x;\r\n output.y = source.y;\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n *\r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {number} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {number} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {number} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {number} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object above another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveAbove\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveAbove: function (child1, child2)\r\n {\r\n ArrayUtils.MoveAbove(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object below another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveBelow\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveBelow: function (child1, child2)\r\n {\r\n ArrayUtils.MoveBelow(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var list = this.list;\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n if (list[i] && list[i].scene)\r\n {\r\n list[i].off(Events.DESTROY, this.remove, this);\r\n\r\n list[i].destroy();\r\n }\r\n }\r\n\r\n this.list = [];\r\n }\r\n else\r\n {\r\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [oldChild,newChild]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Container#setScrollFactor\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n if (container.mask)\r\n {\r\n container.mask.preRenderCanvas(renderer, null, camera);\r\n }\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n }\r\n\r\n if (container.mask)\r\n {\r\n container.mask.postRenderCanvas(renderer);\r\n }\r\n};\r\n\r\nmodule.exports = ContainerCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar NOOP = require('../../utils/NOOP');\r\nvar renderWebGL = NOOP;\r\nvar renderCanvas = NOOP;\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./ContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./ContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderWebGL\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n var childCount = children.length;\r\n\r\n if (childCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n renderer.pipelines.preBatch(container);\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container.alpha;\r\n\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlphaTopLeft;\r\n var childAlphaTopRight;\r\n var childAlphaBottomLeft;\r\n var childAlphaBottomRight;\r\n\r\n if (child.alphaTopLeft !== undefined)\r\n {\r\n childAlphaTopLeft = child.alphaTopLeft;\r\n childAlphaTopRight = child.alphaTopRight;\r\n childAlphaBottomLeft = child.alphaBottomLeft;\r\n childAlphaBottomRight = child.alphaBottomRight;\r\n }\r\n else\r\n {\r\n var childAlpha = child.alpha;\r\n\r\n childAlphaTopLeft = childAlpha;\r\n childAlphaTopRight = childAlpha;\r\n childAlphaBottomLeft = childAlpha;\r\n childAlphaBottomRight = childAlpha;\r\n }\r\n\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n mask.preRenderWebGL(renderer, child, camera);\r\n }\r\n\r\n var type = child.type;\r\n\r\n if (type !== renderer.currentType)\r\n {\r\n renderer.newType = true;\r\n renderer.currentType = type;\r\n }\r\n\r\n renderer.nextTypeMatch = (i < childCount - 1) ? (children[i + 1].type === renderer.currentType) : false;\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n\r\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\r\n\r\n // Render\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n // Restore original values\r\n\r\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\r\n\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n\r\n if (mask)\r\n {\r\n mask.postRenderWebGL(renderer, camera);\r\n }\r\n\r\n renderer.newType = false;\r\n }\r\n\r\n renderer.pipelines.postBatch(container);\r\n};\r\n\r\nmodule.exports = ContainerWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n *\r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n *\r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n *\r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n *\r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n *\r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {number} width - The width of the video.\r\n * @param {number} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n *\r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {DOMException|string} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Locked Event.\r\n *\r\n * This event is dispatched when a Video was attempted to be played, but the browser prevented it\r\n * from doing so due to the Media Engagement Interaction policy.\r\n *\r\n * If you get this event you will need to wait for the user to interact with the browser before\r\n * the video will play. This is a browser security measure to prevent autoplaying videos with\r\n * audio. An interaction includes a mouse click, a touch, or a key press.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('locked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOCKED\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'locked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n *\r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n *\r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Playing Event.\r\n *\r\n * The playing event is fired after playback is first started,\r\n * and whenever it is restarted. For example it is fired when playback\r\n * resumes after having been paused or delayed due to lack of data.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('playing', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAYING\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'playing';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n *\r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n *\r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n *\r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stalled Event.\r\n *\r\n * This event is dispatched by a Video Game Object when the video playback stalls.\r\n *\r\n * This can happen if the video is buffering.\r\n *\r\n * If will fire for any of the following native DOM events:\r\n *\r\n * `stalled`\r\n * `suspend`\r\n * `waiting`\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('stalled', listener)`.\r\n *\r\n * Note that being stalled isn't always a negative thing. A video can be stalled if it\r\n * has downloaded enough data in to its buffer to not need to download any more until\r\n * the current batch of frames have rendered.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STALLED\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'stalled';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n *\r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Texture Ready Event.\r\n *\r\n * This event is dispatched by a Video Game Object when it has finished creating its texture.\r\n *\r\n * This happens when the video has finished loading enough data for its first frame.\r\n *\r\n * If you wish to use the Video texture elsewhere in your game, such as as a Sprite texture,\r\n * then you should listen for this event first, before creating the Sprites that use it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('textureready', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TEXTURE\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object that emitted the event.\r\n * @param {Phaser.Textures.Texture} texture - The Texture that was created.\r\n */\r\nmodule.exports = 'textureready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n *\r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unsupported Event.\r\n *\r\n * This event is dispatched by a Video Game Object if the media source\r\n * (which may be specified as a MediaStream, MediaSource, Blob, or File,\r\n * for example) doesn't represent a supported media format.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('unsupported', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNSUPPORTED\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n * @param {DOMException|string} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'unsupported';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\r\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\r\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\r\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\r\n VIDEO_LOCKED: require('./VIDEO_LOCKED_EVENT'),\r\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\r\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\r\n VIDEO_PLAYING: require('./VIDEO_PLAYING_EVENT'),\r\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\r\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\r\n VIDEO_STALLED: require('./VIDEO_STALLED_EVENT'),\r\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\r\n VIDEO_TEXTURE: require('./VIDEO_TEXTURE_EVENT'),\r\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT'),\r\n VIDEO_UNSUPPORTED: require('./VIDEO_UNSUPPORTED_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n *\r\n * @name Phaser.Geom.CIRCLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n *\r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n *\r\n * @name Phaser.Geom.LINE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n *\r\n * @name Phaser.Geom.POINT\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n *\r\n * @name Phaser.Geom.POLYGON\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = require('./Length');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Random = require('./Random');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GEOM_CONST = require('../const');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {this} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = require('./Perimeter');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = require('./GetPoint');\r\nvar Perimeter = require('./Perimeter');\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\r\n * @param {number} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Contains = require('./Contains');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Line = require('../line/Line');\r\nvar Random = require('./Random');\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('./Rectangle');\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\nvar GetURL = require('./GetURL');\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\nvar XHRLoader = require('./XHRLoader');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * @classdesc\r\n * The base File class used by all File Types that the Loader can support.\r\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class File\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\r\n */\r\nvar File = new Class({\r\n\r\n initialize:\r\n\r\n function File (loader, fileConfig)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.File#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\r\n *\r\n * @name Phaser.Loader.File#cache\r\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\r\n * @since 3.7.0\r\n */\r\n this.cache = GetFastValue(fileConfig, 'cache', false);\r\n\r\n /**\r\n * The file type string (image, json, etc) for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.File#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(fileConfig, 'type', false);\r\n\r\n if (!this.type)\r\n {\r\n throw new Error('Invalid File type: ' + this.type);\r\n }\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.File#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = GetFastValue(fileConfig, 'key', false);\r\n\r\n var loadKey = this.key;\r\n\r\n if (loader.prefix && loader.prefix !== '')\r\n {\r\n this.key = loader.prefix + loadKey;\r\n }\r\n\r\n if (!this.key)\r\n {\r\n throw new Error('Invalid File key: ' + this.key);\r\n }\r\n\r\n var url = GetFastValue(fileConfig, 'url');\r\n\r\n if (url === undefined)\r\n {\r\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n url = loader.path + url;\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n *\r\n * Automatically has Loader.path prepended to it if a string.\r\n *\r\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {object|string}\r\n * @since 3.0.0\r\n */\r\n this.url = url;\r\n\r\n /**\r\n * The final URL this file will load from, including baseURL and path.\r\n * Set automatically when the Loader calls 'load' on this file.\r\n *\r\n * @name Phaser.Loader.File#src\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.src = '';\r\n\r\n /**\r\n * The merged XHRSettings for this file.\r\n *\r\n * @name Phaser.Loader.File#xhrSettings\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\r\n\r\n if (GetFastValue(fileConfig, 'xhrSettings', false))\r\n {\r\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\r\n }\r\n\r\n /**\r\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\r\n *\r\n * @name Phaser.Loader.File#xhrLoader\r\n * @type {?XMLHttpRequest}\r\n * @since 3.0.0\r\n */\r\n this.xhrLoader = null;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.File#state\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\r\n\r\n /**\r\n * The total size of this file.\r\n * Set by onProgress and only if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesTotal\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bytesTotal = 0;\r\n\r\n /**\r\n * Updated as the file loads.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesLoaded\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.bytesLoaded = -1;\r\n\r\n /**\r\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#percentComplete\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.percentComplete = -1;\r\n\r\n /**\r\n * For CORs based loading.\r\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\r\n *\r\n * @name Phaser.Loader.File#crossOrigin\r\n * @type {(string|undefined)}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = undefined;\r\n\r\n /**\r\n * The processed file data, stored here after the file has loaded.\r\n *\r\n * @name Phaser.Loader.File#data\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.data = undefined;\r\n\r\n /**\r\n * A config object that can be used by file types to store transitional data.\r\n *\r\n * @name Phaser.Loader.File#config\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.config = GetFastValue(fileConfig, 'config', {});\r\n\r\n /**\r\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\r\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\r\n *\r\n * @name Phaser.Loader.File#multiFile\r\n * @type {?Phaser.Loader.MultiFile}\r\n * @since 3.7.0\r\n */\r\n this.multiFile;\r\n\r\n /**\r\n * Does this file have an associated linked file? Such as an image and a normal map.\r\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\r\n * actually bound by data, where-as a linkFile is.\r\n *\r\n * @name Phaser.Loader.File#linkFile\r\n * @type {?Phaser.Loader.File}\r\n * @since 3.7.0\r\n */\r\n this.linkFile;\r\n },\r\n\r\n /**\r\n * Links this File with another, so they depend upon each other for loading and processing.\r\n *\r\n * @method Phaser.Loader.File#setLink\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\r\n */\r\n setLink: function (fileB)\r\n {\r\n this.linkFile = fileB;\r\n\r\n fileB.linkFile = this;\r\n },\r\n\r\n /**\r\n * Resets the XHRLoader instance this file is using.\r\n *\r\n * @method Phaser.Loader.File#resetXHR\r\n * @since 3.0.0\r\n */\r\n resetXHR: function ()\r\n {\r\n if (this.xhrLoader)\r\n {\r\n this.xhrLoader.onload = undefined;\r\n this.xhrLoader.onerror = undefined;\r\n this.xhrLoader.onprogress = undefined;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.File#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\r\n this.loader.nextFile(this, true);\r\n }\r\n else\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n // The creation of this XHRLoader starts the load process going.\r\n // It will automatically call the following, based on the load outcome:\r\n //\r\n // xhr.onload = this.onLoad\r\n // xhr.onerror = this.onError\r\n // xhr.onprogress = this.onProgress\r\n\r\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onLoad\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\r\n */\r\n onLoad: function (xhr, event)\r\n {\r\n var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\r\n {\r\n return xhr.responseURL.indexOf(scheme) === 0;\r\n });\r\n\r\n var localFileOk = (isLocalFile && event.target.status === 0);\r\n\r\n var success = !(event.target && event.target.status !== 200) || localFileOk;\r\n\r\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\r\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\r\n {\r\n success = false;\r\n }\r\n\r\n this.state = CONST.FILE_LOADED;\r\n\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, success);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onError\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\r\n */\r\n onError: function ()\r\n {\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n *\r\n * @param {ProgressEvent} event - The DOM ProgressEvent.\r\n */\r\n onProgress: function (event)\r\n {\r\n if (event.lengthComputable)\r\n {\r\n this.bytesLoaded = event.loaded;\r\n this.bytesTotal = event.total;\r\n\r\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\r\n *\r\n * @method Phaser.Loader.File#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessComplete\r\n * @since 3.7.0\r\n */\r\n onProcessComplete: function ()\r\n {\r\n this.state = CONST.FILE_COMPLETE;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileComplete(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing but it generated an error.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessError\r\n * @since 3.7.0\r\n */\r\n onProcessError: function ()\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\r\n\r\n this.state = CONST.FILE_ERRORED;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileFailed(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Checks if a key matching the one used by this file exists in the target Cache or not.\r\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\r\n * loaded or will conflict.\r\n *\r\n * @method Phaser.Loader.File#hasCacheConflict\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\r\n */\r\n hasCacheConflict: function ()\r\n {\r\n return (this.cache && this.cache.exists(this.key));\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n * This method is often overridden by specific file types.\r\n *\r\n * @method Phaser.Loader.File#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.cache && this.data)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\r\n },\r\n\r\n /**\r\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.File#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.7.0\r\n */\r\n pendingDestroy: function (data)\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n if (data === undefined) { data = this.data; }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this File and any references it holds.\r\n *\r\n * @method Phaser.Loader.File#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.cache = null;\r\n this.xhrSettings = null;\r\n this.multiFile = null;\r\n this.linkFile = null;\r\n this.data = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\r\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\r\n *\r\n * @method Phaser.Loader.File.createObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\r\n * @param {Blob} blob - A Blob object to create an object URL for.\r\n * @param {string} defaultType - Default mime type used if blob type is not available.\r\n */\r\nFile.createObjectURL = function (image, blob, defaultType)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n image.src = URL.createObjectURL(blob);\r\n }\r\n else\r\n {\r\n var reader = new FileReader();\r\n\r\n reader.onload = function ()\r\n {\r\n image.removeAttribute('crossOrigin');\r\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\r\n };\r\n\r\n reader.onerror = image.onerror;\r\n\r\n reader.readAsDataURL(blob);\r\n }\r\n};\r\n\r\n/**\r\n * Static method for releasing an existing object URL which was previously created\r\n * by calling {@link File#createObjectURL} method.\r\n *\r\n * @method Phaser.Loader.File.revokeObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\r\n */\r\nFile.revokeObjectURL = function (image)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n URL.revokeObjectURL(image.src);\r\n }\r\n};\r\n\r\nmodule.exports = File;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n *\r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n *\r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n *\r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n var finalFiles = [];\r\n\r\n // Clean out any potential 'null' or 'undefined' file entries\r\n files.forEach(function (file)\r\n {\r\n if (file)\r\n {\r\n finalFiles.push(file);\r\n }\r\n });\r\n\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {number}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = finalFiles;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.MultiFile#state\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.state = CONST.FILE_PENDING;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {number}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = finalFiles.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < finalFiles.length; i++)\r\n {\r\n finalFiles[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n\r\n // eslint-disable-next-line no-console\r\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\r\n }\r\n },\r\n\r\n /**\r\n * Called once all children of this multi file have been added to their caches and is now\r\n * ready for deletion from the Loader.\r\n *\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.MultiFile#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.60.0\r\n */\r\n pendingDestroy: function ()\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n for (var i = 0; i < this.files.length; i++)\r\n {\r\n this.files[i].pendingDestroy();\r\n }\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this Multi File and any references it holds.\r\n *\r\n * @method Phaser.Loader.MultiFile#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.files = null;\r\n this.config = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {number} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n *\r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n *\r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n *\r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n *\r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n *\r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n *\r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n *\r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing.\r\n *\r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load.\r\n *\r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n *\r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n *\r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n *\r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request.\r\n *\r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19,\r\n\r\n /**\r\n * File is pending being destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING_DESTROY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n FILE_PENDING_DESTROY: 20\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n *\r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n *\r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n *\r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {number} totalComplete - The total number of files that successfully loaded.\r\n * @param {number} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n *\r\n * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n *\r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n *\r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n *\r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n *\r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n *\r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n *\r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n *\r\n * This event is dispatched even if there aren't any files in the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\nvar GetURL = require('../GetURL');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n\r\n this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\r\n\r\n if (this.useImageElementLoad)\r\n {\r\n this.load = this.loadImage;\r\n this.onProcess = this.onProcessImage;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Handles image load processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n onProcessImage: function ()\r\n {\r\n var result = this.state;\r\n\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n if (result === CONST.FILE_LOADED)\r\n {\r\n this.onProcessComplete();\r\n }\r\n else\r\n {\r\n this.onProcessError();\r\n }\r\n },\r\n\r\n /**\r\n * Loads the image using either XHR or an Image tag.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n loadImage: function ()\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n _this.state = CONST.FILE_LOADED;\r\n\r\n _this.loader.nextFile(_this, true);\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n _this.loader.nextFile(_this, false);\r\n };\r\n\r\n this.data.src = this.src;\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n // Check if we have a linked normal map\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile)\r\n {\r\n // We do, but has it loaded?\r\n if (linkFile.state >= CONST.FILE_COMPLETE)\r\n {\r\n // Both files have loaded\r\n if (this.type === 'normalMap')\r\n {\r\n // linkFile.data = Image\r\n // this.data = Normal Map\r\n this.cache.addImage(this.key, linkFile.data, this.data);\r\n }\r\n else\r\n {\r\n // linkFile.data = Normal Map\r\n // this.data = Image\r\n this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n }\r\n\r\n // Nothing to do here, we'll use the linkFile `addToCache` call\r\n // to process this pair\r\n }\r\n else\r\n {\r\n this.cache.addImage(this.key, this.data);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\r\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\r\n * via the Image tag instead.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\r\n *\r\n * @class JSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar JSONFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function JSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n var extension = 'json';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataKey = GetFastValue(config, 'dataKey', dataKey);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'json',\r\n cache: loader.cacheManager.json,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: dataKey\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\r\n if (IsPlainObject(url))\r\n {\r\n if (dataKey)\r\n {\r\n this.data = GetValue(url, dataKey);\r\n }\r\n else\r\n {\r\n this.data = url;\r\n }\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n try\r\n {\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n catch (e)\r\n {\r\n this.onProcessError();\r\n\r\n throw e;\r\n }\r\n\r\n var key = this.config;\r\n\r\n if (typeof key === 'string')\r\n {\r\n this.data = GetValue(json, key, json);\r\n }\r\n else\r\n {\r\n this.data = json;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON file, or array of JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.json({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n *\r\n * ```json\r\n * {\r\n * \"level1\": {\r\n * \"baddies\": {\r\n * \"aliens\": {},\r\n * \"boss\": {}\r\n * }\r\n * },\r\n * \"level2\": {},\r\n * \"level3\": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#json\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new JSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = JSONFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var type = 'text';\r\n var extension = 'txt';\r\n var cache = loader.cacheManager.text;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n type = GetFastValue(config, 'type', type);\r\n cache = GetFastValue(config, 'cache', cache);\r\n }\r\n\r\n var fileConfig = {\r\n type: type,\r\n cache: cache,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {number} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\nvar Class = require('../utils/Class');\r\nvar Matrix4 = require('./Matrix4');\r\nvar NOOP = require('../utils/NOOP');\r\n\r\nvar tempMatrix = new Matrix4();\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Euler\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Euler = new Class({\r\n\r\n initialize:\r\n\r\n function Euler (x, y, z, order)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (z === undefined) { z = 0; }\r\n if (order === undefined) { order = Euler.DefaultOrder; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback = NOOP;\r\n },\r\n\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n order: {\r\n get: function ()\r\n {\r\n return this._order;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._order = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n set: function (x, y, z, order)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n copy: function (euler)\r\n {\r\n return this.set(euler.x, euler.y, euler.z, euler.order);\r\n },\r\n\r\n setFromQuaternion: function (quaternion, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n tempMatrix.fromQuat(quaternion);\r\n\r\n return this.setFromRotationMatrix(tempMatrix, order, update);\r\n },\r\n\r\n setFromRotationMatrix: function (matrix, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n var elements = matrix.val;\r\n\r\n // Upper 3x3 of matrix is un-scaled rotation matrix\r\n var m11 = elements[0];\r\n var m12 = elements[4];\r\n var m13 = elements[8];\r\n var m21 = elements[1];\r\n var m22 = elements[5];\r\n var m23 = elements[9];\r\n var m31 = elements[2];\r\n var m32 = elements[6];\r\n var m33 = elements[10];\r\n\r\n var x = 0;\r\n var y = 0;\r\n var z = 0;\r\n var epsilon = 0.99999;\r\n\r\n switch (order)\r\n {\r\n case 'XYZ':\r\n {\r\n y = Math.asin(Clamp(m13, -1, 1));\r\n\r\n if (Math.abs(m13) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m33);\r\n z = Math.atan2(-m12, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(m32, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n x = Math.asin(-Clamp(m23, -1, 1));\r\n\r\n if (Math.abs(m23) < epsilon)\r\n {\r\n y = Math.atan2(m13, m33);\r\n z = Math.atan2(m21, m22);\r\n }\r\n else\r\n {\r\n y = Math.atan2(-m31, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n x = Math.asin(Clamp(m32, -1, 1));\r\n\r\n if (Math.abs(m32) < epsilon)\r\n {\r\n y = Math.atan2(-m31, m33);\r\n z = Math.atan2(-m12, m22);\r\n }\r\n else\r\n {\r\n z = Math.atan2(m21, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n y = Math.asin(-Clamp(m31, -1, 1));\r\n\r\n if (Math.abs(m31) < epsilon)\r\n {\r\n x = Math.atan2(m32, m33);\r\n z = Math.atan2(m21, m11);\r\n }\r\n else\r\n {\r\n z = Math.atan2(-m12, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n z = Math.asin(Clamp(m21, -1, 1));\r\n\r\n if (Math.abs(m21) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m22);\r\n y = Math.atan2(-m31, m11);\r\n }\r\n else\r\n {\r\n y = Math.atan2(m13, m33);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n z = Math.asin(-Clamp(m12, -1, 1));\r\n\r\n if (Math.abs(m12) < epsilon)\r\n {\r\n x = Math.atan2(m32, m22);\r\n y = Math.atan2(m13, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(-m23, m33);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\r\n\r\nEuler.DefaultOrder = 'XYZ';\r\n\r\nmodule.exports = Euler;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent + min;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {number} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Greg McLean \r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Interpolates two given Vectors and returns a new Vector between them.\r\n *\r\n * Does not modify either of the passed Vectors.\r\n *\r\n * @function Phaser.Math.LinearXY\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\r\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\r\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\r\n */\r\nvar LinearXY = function (vector1, vector2, t)\r\n{\r\n if (t === undefined) { t = 0; }\r\n\r\n return vector1.clone().lerp(vector2, t);\r\n};\r\n\r\nmodule.exports = LinearXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Sets all values of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#setValues\r\n * @since 3.50.0\r\n *\r\n * @param {number} m00 - The m00 value.\r\n * @param {number} m01 - The m01 value.\r\n * @param {number} m02 - The m02 value.\r\n * @param {number} m03 - The m03 value.\r\n * @param {number} m10 - The m10 value.\r\n * @param {number} m11 - The m11 value.\r\n * @param {number} m12 - The m12 value.\r\n * @param {number} m13 - The m13 value.\r\n * @param {number} m20 - The m20 value.\r\n * @param {number} m21 - The m21 value.\r\n * @param {number} m22 - The m22 value.\r\n * @param {number} m23 - The m23 value.\r\n * @param {number} m30 - The m30 value.\r\n * @param {number} m31 - The m31 value.\r\n * @param {number} m32 - The m32 value.\r\n * @param {number} m33 - The m33 value.\r\n *\r\n * @return {this} This Matrix4 instance.\r\n */\r\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = m00;\r\n out[1] = m01;\r\n out[2] = m02;\r\n out[3] = m03;\r\n out[4] = m10;\r\n out[5] = m11;\r\n out[6] = m12;\r\n out[7] = m13;\r\n out[8] = m20;\r\n out[9] = m21;\r\n out[10] = m22;\r\n out[11] = m23;\r\n out[12] = m30;\r\n out[13] = m31;\r\n out[14] = m32;\r\n out[15] = m33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var a = src.val;\r\n\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} a - The array to copy the values from. Must have at least 16 elements.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Generates a transform matrix based on the given position, scale and rotation.\r\n *\r\n * @method Phaser.Math.Matrix4#transform\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {Phaser.Math.Vector3} scale - The scale vector.\r\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transform: function (position, scale, rotation)\r\n {\r\n var rotMatrix = _tempMat1.fromQuat(rotation);\r\n\r\n var rm = rotMatrix.val;\r\n\r\n var sx = scale.x;\r\n var sy = scale.y;\r\n var sz = scale.z;\r\n\r\n return this.setValues(\r\n rm[0] * sx,\r\n rm[1] * sx,\r\n rm[2] * sx,\r\n 0,\r\n\r\n rm[4] * sy,\r\n rm[5] * sy,\r\n rm[6] * sy,\r\n 0,\r\n\r\n rm[8] * sz,\r\n rm[9] * sz,\r\n rm[10] * sz,\r\n 0,\r\n\r\n position.x,\r\n position.y,\r\n position.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies the given Matrix4 into this Matrix and then inverses it.\r\n *\r\n * @method Phaser.Math.Matrix4#getInverse\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n getInverse: function (m)\r\n {\r\n this.copy(m);\r\n\r\n return this.invert();\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return this;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n return this.setValues(\r\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\r\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\r\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\r\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\r\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\r\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\r\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\r\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\r\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\r\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\r\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\r\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\r\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\r\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\r\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\r\n (a20 * b03 - a21 * b01 + a22 * b00) * det\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n return this.setValues(\r\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\r\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\r\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\r\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\r\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\r\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\r\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\r\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\r\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\r\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\r\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\r\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\r\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\r\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\r\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\r\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n return this.setValues(\r\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\r\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\r\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\r\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\r\n\r\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\r\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\r\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\r\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\r\n\r\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\r\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\r\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\r\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\r\n\r\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\r\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\r\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\r\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\r\n );\r\n },\r\n\r\n /**\r\n * Multiplies the given Matrix4 object with this Matrix.\r\n *\r\n * This is the same as calling `multiplyMatrices(m, this)`.\r\n *\r\n * @method Phaser.Math.Matrix4#premultiply\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n premultiply: function (m)\r\n {\r\n return this.multiplyMatrices(m, this);\r\n },\r\n\r\n /**\r\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyMatrices\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\r\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyMatrices: function (a, b)\r\n {\r\n var am = a.val;\r\n var bm = b.val;\r\n\r\n var a11 = am[0];\r\n var a12 = am[4];\r\n var a13 = am[8];\r\n var a14 = am[12];\r\n var a21 = am[1];\r\n var a22 = am[5];\r\n var a23 = am[9];\r\n var a24 = am[13];\r\n var a31 = am[2];\r\n var a32 = am[6];\r\n var a33 = am[10];\r\n var a34 = am[14];\r\n var a41 = am[3];\r\n var a42 = am[7];\r\n var a43 = am[11];\r\n var a44 = am[15];\r\n\r\n var b11 = bm[0];\r\n var b12 = bm[4];\r\n var b13 = bm[8];\r\n var b14 = bm[12];\r\n var b21 = bm[1];\r\n var b22 = bm[5];\r\n var b23 = bm[9];\r\n var b24 = bm[13];\r\n var b31 = bm[2];\r\n var b32 = bm[6];\r\n var b33 = bm[10];\r\n var b34 = bm[14];\r\n var b41 = bm[3];\r\n var b42 = bm[7];\r\n var b43 = bm[11];\r\n var b44 = bm[15];\r\n\r\n return this.setValues(\r\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\r\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\r\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\r\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\r\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\r\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\r\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\r\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\r\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\r\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\r\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\r\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\r\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\r\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\r\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\r\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\r\n );\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n return this.translateXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n return this.scaleXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n return this.setValues(\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n );\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return this;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n return this.setValues(\r\n a00 * b00 + a10 * b01 + a20 * b02,\r\n a01 * b00 + a11 * b01 + a21 * b02,\r\n a02 * b00 + a12 * b01 + a22 * b02,\r\n a03 * b00 + a13 * b01 + a23 * b02,\r\n a00 * b10 + a10 * b11 + a20 * b12,\r\n a01 * b10 + a11 * b11 + a21 * b12,\r\n a02 * b10 + a12 * b11 + a22 * b12,\r\n a03 * b10 + a13 * b11 + a23 * b12,\r\n a00 * b20 + a10 * b21 + a20 * b22,\r\n a01 * b20 + a11 * b21 + a21 * b22,\r\n a02 * b20 + a12 * b21 + a22 * b22,\r\n a03 * b20 + a13 * b21 + a23 * b22,\r\n a30, a31, a32, a33\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n v.x,\r\n v.y,\r\n v.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 0,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n (near * 2) * rl,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (near * 2) * tb,\r\n 0,\r\n 0,\r\n\r\n (right + left) * rl,\r\n (top + bottom) * tb,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (far * near * 2) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n f / aspect,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n f,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (2 * far * near) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n return this.setValues(\r\n (2 * near) / width,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (2 * near) / height,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n -far / (near - far),\r\n 1,\r\n\r\n 0,\r\n 0,\r\n (near * far) / (near - far),\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n return this.setValues(\r\n -2 * lr,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n -2 * bt,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 2 * nf,\r\n 0,\r\n\r\n (left + right) * lr,\r\n (top + bottom) * bt,\r\n (far + near) * nf,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAtRH\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\r\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAtRH: function (eye, target, up)\r\n {\r\n var m = this.val;\r\n\r\n _z.subVectors(eye, target);\r\n\r\n if (_z.getLengthSquared() === 0)\r\n {\r\n // eye and target are in the same position\r\n _z.z = 1;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n\r\n if (_x.getLengthSquared() === 0)\r\n {\r\n // up and z are parallel\r\n\r\n if (Math.abs(up.z) === 1)\r\n {\r\n _z.x += 0.0001;\r\n }\r\n else\r\n {\r\n _z.z += 0.0001;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n }\r\n\r\n _x.normalize();\r\n _y.crossVectors(_z, _x);\r\n\r\n m[0] = _x.x;\r\n m[1] = _x.y;\r\n m[2] = _x.z;\r\n m[4] = _y.x;\r\n m[5] = _y.y;\r\n m[6] = _y.z;\r\n m[8] = _z.x;\r\n m[9] = _z.y;\r\n m[10] = _z.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n return this.setValues(\r\n x0,\r\n y0,\r\n z0,\r\n 0,\r\n\r\n x1,\r\n y1,\r\n z1,\r\n 0,\r\n\r\n x2,\r\n y2,\r\n z2,\r\n 0,\r\n\r\n -(x0 * eyex + x1 * eyey + x2 * eyez),\r\n -(y0 * eyex + y1 * eyey + y2 * eyez),\r\n -(z0 * eyex + z1 * eyey + z2 * eyez),\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyToMat4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\r\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\r\n */\r\n multiplyToMat4: function (src, out)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b03 = b[3];\r\n var b10 = b[4];\r\n var b11 = b[5];\r\n var b12 = b[6];\r\n var b13 = b[7];\r\n var b20 = b[8];\r\n var b21 = b[9];\r\n var b22 = b[10];\r\n var b23 = b[11];\r\n var b30 = b[12];\r\n var b31 = b[13];\r\n var b32 = b[14];\r\n var b33 = b[15];\r\n\r\n return out.setValues(\r\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\r\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\r\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\r\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\r\n\r\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\r\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\r\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\r\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\r\n\r\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\r\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\r\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\r\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\r\n\r\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\r\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\r\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\r\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\r\n );\r\n },\r\n\r\n /**\r\n * Takes the rotation and position vectors and builds this Matrix4 from them.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationXYTranslation: function (rotation, position, translateFirst)\r\n {\r\n var x = position.x;\r\n var y = position.y;\r\n var z = position.z;\r\n\r\n var sx = Math.sin(rotation.x);\r\n var cx = Math.cos(rotation.x);\r\n\r\n var sy = Math.sin(rotation.y);\r\n var cy = Math.cos(rotation.y);\r\n\r\n var a30 = x;\r\n var a31 = y;\r\n var a32 = z;\r\n\r\n // Rotate X\r\n\r\n var b21 = -sx;\r\n\r\n // Rotate Y\r\n\r\n var c01 = 0 - b21 * sy;\r\n\r\n var c02 = 0 - cx * sy;\r\n\r\n var c21 = b21 * cy;\r\n\r\n var c22 = cx * cy;\r\n\r\n // Translate\r\n if (!translateFirst)\r\n {\r\n // a30 = cy * x + 0 * y + sy * z;\r\n a30 = cy * x + sy * z;\r\n a31 = c01 * x + cx * y + c21 * z;\r\n a32 = c02 * x + sx * y + c22 * z;\r\n }\r\n\r\n return this.setValues(\r\n cy,\r\n c01,\r\n c02,\r\n 0,\r\n 0,\r\n cx,\r\n sx,\r\n 0,\r\n sy,\r\n c21,\r\n c22,\r\n 0,\r\n a30,\r\n a31,\r\n a32,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Returns the maximum axis scale from this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\r\n * @since 3.50.0\r\n *\r\n * @return {number} The maximum axis scale.\r\n */\r\n getMaxScaleOnAxis: function ()\r\n {\r\n var m = this.val;\r\n\r\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\r\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\r\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\r\n\r\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat1 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat2 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _x = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _y = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _z = new Vector3();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Vladislav Forsh \r\n * @copyright 2021 RoboWhale\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\r\n * In case of an even number of values, the average of the two middle values is returned.\r\n *\r\n * @function Phaser.Math.Median\r\n * @since 3.54.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The median value.\r\n */\r\nvar Median = function (values)\r\n{\r\n var valuesNum = values.length;\r\n if (valuesNum === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n values.sort(function (a, b) { return a - b; });\r\n\r\n var halfIndex = Math.floor(valuesNum / 2);\r\n\r\n return valuesNum % 2 === 0\r\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\r\n : values[halfIndex];\r\n};\r\n\r\nmodule.exports = Median;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Matrix3 = require('./Matrix3');\r\nvar NOOP = require('../utils/NOOP');\r\nvar Vector3 = require('./Vector3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x component.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=1] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_x\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_y\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_z\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_w\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * This callback is invoked, if set, each time a value in this quaternion is changed.\r\n * The callback is passed one argument, a reference to this quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#onChangeCallback\r\n * @type {function}\r\n * @since 3.50.0\r\n */\r\n this.onChangeCallback = NOOP;\r\n\r\n this.set(x, y, z, w);\r\n },\r\n\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: {\r\n get: function ()\r\n {\r\n return this._w;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._w = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n return this.set(src);\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n * @param {boolean} [update=true] - Call the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w, update)\r\n {\r\n if (update === undefined) { update = true; }\r\n\r\n if (typeof x === 'object')\r\n {\r\n this._x = x.x || 0;\r\n this._y = x.y || 0;\r\n this._z = x.z || 0;\r\n this._w = x.w || 0;\r\n }\r\n else\r\n {\r\n this._x = x || 0;\r\n this._y = y || 0;\r\n this._z = z || 0;\r\n this._w = w || 0;\r\n }\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this._x += v.x;\r\n this._y += v.y;\r\n this._z += v.z;\r\n this._w += v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this._x -= v.x;\r\n this._y -= v.y;\r\n this._z -= v.z;\r\n this._w -= v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this._x *= scale;\r\n this._y *= scale;\r\n this._z *= scale;\r\n this._w *= scale;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this._x = x * len;\r\n this._y = y * len;\r\n this._z = z * len;\r\n this._w = w * len;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n return this.set(\r\n ax + t * (v.x - ax),\r\n ay + t * (v.y - ay),\r\n az + t * (v.z - az),\r\n aw + t * (v.w - aw)\r\n );\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n return this.set(0, 0, 0, 1);\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this._x = tmpvec.x;\r\n this._y = tmpvec.y;\r\n this._z = tmpvec.z;\r\n this._w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n return this.set(0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n return this.set(\r\n s * axis.x,\r\n s * axis.y,\r\n s * axis.z,\r\n Math.cos(rad)\r\n );\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n return this.set(\r\n ax * bw + aw * bx + ay * bz - az * by,\r\n ay * bw + aw * by + az * bx - ax * bz,\r\n az * bw + aw * bz + ax * by - ay * bx,\r\n aw * bw - ax * bx - ay * by - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n return this.set(\r\n scale0 * ax + scale1 * bx,\r\n scale0 * ay + scale1 * by,\r\n scale0 * az + scale1 * bz,\r\n scale0 * aw + scale1 * bw\r\n );\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n return this.set(\r\n -a0 * invDot,\r\n -a1 * invDot,\r\n -a2 * invDot,\r\n a3 * invDot\r\n );\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this._x = -this.x;\r\n this._y = -this.y;\r\n this._z = -this.z;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + aw * bx,\r\n ay * bw + az * bx,\r\n az * bw - ay * bx,\r\n aw * bw - ax * bx\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw - az * by,\r\n ay * bw + aw * by,\r\n az * bw + ax * by,\r\n aw * bw - ay * by\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + ay * bz,\r\n ay * bw - ax * bz,\r\n az * bw + aw * bz,\r\n aw * bw - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set this Quaternion from the given Euler, based on Euler order.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromEuler\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\r\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromEuler: function (euler, update)\r\n {\r\n var x = euler.x / 2;\r\n var y = euler.y / 2;\r\n var z = euler.z / 2;\r\n\r\n var c1 = Math.cos(x);\r\n var c2 = Math.cos(y);\r\n var c3 = Math.cos(z);\r\n\r\n var s1 = Math.sin(x);\r\n var s2 = Math.sin(y);\r\n var s3 = Math.sin(z);\r\n\r\n switch (euler.order)\r\n {\r\n case 'XYZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Quaternion from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromRotationMatrix: function (mat4)\r\n {\r\n var m = mat4.val;\r\n\r\n var m11 = m[0];\r\n var m12 = m[4];\r\n var m13 = m[8];\r\n var m21 = m[1];\r\n var m22 = m[5];\r\n var m23 = m[9];\r\n var m31 = m[2];\r\n var m32 = m[6];\r\n var m33 = m[10];\r\n\r\n var trace = m11 + m22 + m33;\r\n var s;\r\n\r\n if (trace > 0)\r\n {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n this.set(\r\n (m32 - m23) * s,\r\n (m13 - m31) * s,\r\n (m21 - m12) * s,\r\n 0.25 / s\r\n );\r\n }\r\n else if (m11 > m22 && m11 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n this.set(\r\n 0.25 * s,\r\n (m12 + m21) / s,\r\n (m13 + m31) / s,\r\n (m32 - m23) / s\r\n );\r\n }\r\n else if (m22 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n this.set(\r\n (m12 + m21) / s,\r\n 0.25 * s,\r\n (m23 + m32) / s,\r\n (m13 - m31) / s\r\n );\r\n }\r\n else\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n this.set(\r\n (m13 + m31) / s,\r\n (m23 + m32) / s,\r\n 0.25 * s,\r\n (m21 - m12) / s\r\n );\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this._x = (m[7] - m[5]) * fRoot;\r\n this._y = (m[2] - m[6]) * fRoot;\r\n this._z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this._x = tmp[0];\r\n this._y = tmp[1];\r\n this._z = tmp[2];\r\n this._w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {number} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n *\r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n *\r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n *\r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {number} index - The position within the grid to get the x/y value for.\r\n * @param {number} width - The width of the grid.\r\n * @param {number} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n }\r\n\r\n return out.set(x, y);\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y=x] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n },\r\n\r\n /**\r\n * Project this Vector onto another.\r\n *\r\n * @method Phaser.Math.Vector2#project\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n project: function (src)\r\n {\r\n var scalar = this.dot(src) / src.dot(src);\r\n\r\n return this.copy(src).scale(scalar);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.min` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#min\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n min: function (v)\r\n {\r\n this.x = Math.min(this.x, v.x);\r\n this.y = Math.min(this.y, v.y);\r\n this.z = Math.min(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#max\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n max: function (v)\r\n {\r\n this.x = Math.max(this.x, v.x);\r\n this.y = Math.max(this.y, v.y);\r\n this.z = Math.max(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Adds the two given Vector3s and sets the results into this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#addVectors\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addVectors: function (a, b)\r\n {\r\n this.x = a.x + b.x;\r\n this.y = a.y + b.y;\r\n this.z = a.z + b.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the position of the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixPosition\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixPosition: function (m)\r\n {\r\n return this.fromArray(m.val, 12);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the Matrix4 column specified.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixColumn\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\r\n * @param {number} index - The column index.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixColumn: function (mat4, index)\r\n {\r\n return this.fromArray(mat4.val, index * 4);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the given array, based on the offset.\r\n *\r\n * Vector3.x = array[offset]\r\n * Vector3.y = array[offset + 1]\r\n * Vector3.z = array[offset + 2]\r\n *\r\n * @method Phaser.Math.Vector3#fromArray\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} array - The array of values to get this Vector from.\r\n * @param {number} [offset=0] - The offset index into the array.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n fromArray: function (array, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.x = array[offset];\r\n this.y = array[offset + 1];\r\n this.z = array[offset + 2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add the given value to each component of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#addScalar\r\n * @since 3.50.0\r\n *\r\n * @param {number} s - The amount to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScalar: function (s)\r\n {\r\n this.x += s;\r\n this.y += s;\r\n this.z += s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add and scale a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#addScale\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n * @param {number} scale - The amount to scale `v` by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScale: function (v, scale)\r\n {\r\n this.x += v.x * scale;\r\n this.y += v.y * scale;\r\n this.z += v.z * scale || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix3 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix3\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix3: function (mat3)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat3.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6] * z;\r\n this.y = m[1] * x + m[4] * y + m[7] * z;\r\n this.z = m[2] * x + m[5] * y + m[8] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix4 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix4: function (mat4)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat4.val;\r\n\r\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\r\n\r\n this.x = (m[0] * x + m[4] * y + m[8] * z + m[12]) * w;\r\n this.y = (m[1] * x + m[5] * y + m[9] * z + m[13]) * w;\r\n this.z = (m[2] * x + m[6] * y + m[10] * z + m[14]) * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given view and projection matrices.\r\n *\r\n * @method Phaser.Math.Vector3#projectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n projectViewMatrix: function (viewMatrix, projectionMatrix)\r\n {\r\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\r\n *\r\n * @method Phaser.Math.Vector3#unprojectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\r\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\r\n {\r\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max`.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n if (value >= min && value <= max)\r\n {\r\n // Skip modulo if already in range\r\n return value;\r\n }\r\n\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n *\r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n *\r\n * Yes, we understand that this should actually be PI * 2, but\r\n * it has been like this for so long we can't change it now.\r\n * If you need PI * 2, use the PI2 constant instead.\r\n *\r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n *\r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n *\r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n *\r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n *\r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Euler: require('./Euler'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n LinearXY: require('./LinearXY'),\r\n MaxAdd: require('./MaxAdd'),\r\n Median: require('./Median'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {number} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n *\r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n *\r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n *\r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar corePlugins = {};\r\n\r\n// Contains the plugins that the dev has loaded into their game\r\n// These are the source objects, not instantiated.\r\nvar customPlugins = {};\r\n\r\nvar PluginCache = {};\r\n\r\n/**\r\n * @namespace Phaser.Plugins.PluginCache\r\n */\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @method Phaser.Plugins.PluginCache.register\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\r\n */\r\nPluginCache.register = function (key, plugin, mapping, custom)\r\n{\r\n if (custom === undefined) { custom = false; }\r\n\r\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\r\n};\r\n\r\n/**\r\n * Stores a custom plugin in the global plugin cache.\r\n * The key must be unique, within the scope of the cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.registerCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {?any} data - A value to be passed to the plugin's `init` method.\r\n */\r\nPluginCache.registerCustom = function (key, plugin, mapping, data)\r\n{\r\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the core plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\r\n */\r\nPluginCache.hasCore = function (key)\r\n{\r\n return corePlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the custom plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\r\n */\r\nPluginCache.hasCustom = function (key)\r\n{\r\n return customPlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Returns the core plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\r\n */\r\nPluginCache.getCore = function (key)\r\n{\r\n return corePlugins[key];\r\n};\r\n\r\n/**\r\n * Returns the custom plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\r\n */\r\nPluginCache.getCustom = function (key)\r\n{\r\n return customPlugins[key];\r\n};\r\n\r\n/**\r\n * Returns an object from the custom cache based on the given key that can be instantiated.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustomClass\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {function} The custom plugin object.\r\n */\r\nPluginCache.getCustomClass = function (key)\r\n{\r\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\r\n};\r\n\r\n/**\r\n * Removes a core plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.remove\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to remove.\r\n */\r\nPluginCache.remove = function (key)\r\n{\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes a custom plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.removeCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to remove.\r\n */\r\nPluginCache.removeCustom = function (key)\r\n{\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Core Plugins.\r\n *\r\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\r\n * So be sure you only call this if you do not wish to run Phaser again.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCorePlugins = function ()\r\n{\r\n for (var key in corePlugins)\r\n {\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Custom Plugins.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCustomPlugins = function ()\r\n{\r\n for (var key in customPlugins)\r\n {\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = PluginCache;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager, pluginKey)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The key under which this plugin was installed into the Scene Systems.\r\n *\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#pluginKey\r\n * @type {string}\r\n * @readonly\r\n * @since 3.54.0\r\n */\r\n this.pluginKey = pluginKey;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n *\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n *\r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n *\r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.ADD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n *\r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n *\r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n *\r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n *\r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n *\r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n *\r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n *\r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n *\r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n *\r\n * @name Phaser.BlendModes.HUE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n *\r\n * @name Phaser.BlendModes.ERASE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n *\r\n * @name Phaser.BlendModes.COPY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n *\r\n * @name Phaser.BlendModes.XOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Modes.\r\n *\r\n * @namespace Phaser.ScaleModes\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScaleModes = {\r\n\r\n /**\r\n * Default Scale Mode (Linear).\r\n *\r\n * @name Phaser.ScaleModes.DEFAULT\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n DEFAULT: 0,\r\n\r\n /**\r\n * Linear Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.LINEAR\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.NEAREST\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n\r\n};\r\n\r\nmodule.exports = ScaleModes;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n *\r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('boot', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#BOOT\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n *\r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n *\r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n *\r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('create', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#CREATE\r\n * @type {string}\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('destroy', listener)`.\r\n *\r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n *\r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n *\r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('pause', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('postupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author samme\r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre-Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_RENDER\r\n * @type {string}\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'prerender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('preupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('ready', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#READY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('render', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n *\r\n * @event Phaser.Scenes.Events#RENDER\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n *\r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('resume', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#RESUME\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('shutdown', listener)`.\r\n *\r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n *\r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n *\r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('sleep', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('start', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioncomplete', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioninit', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n *\r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionout', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n *\r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n *\r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionstart', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionwake', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists and the Scene is in a Running state, otherwise this is skipped.\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('update', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n *\r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('wake', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#WAKE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\r\n BOOT: require('./BOOT_EVENT'),\r\n CREATE: require('./CREATE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n PAUSE: require('./PAUSE_EVENT'),\r\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\r\n RENDER: require('./RENDER_EVENT'),\r\n RESUME: require('./RESUME_EVENT'),\r\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\r\n SLEEP: require('./SLEEP_EVENT'),\r\n START: require('./START_EVENT'),\r\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\r\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\r\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\r\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\r\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\r\n UPDATE: require('./UPDATE_EVENT'),\r\n WAKE: require('./WAKE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Clamp = require('../math/Clamp');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @classdesc\r\n * A Frame is a section of a Texture.\r\n *\r\n * @class Frame\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\r\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n */\r\nvar Frame = new Class({\r\n\r\n initialize:\r\n\r\n function Frame (texture, name, sourceIndex, x, y, width, height)\r\n {\r\n /**\r\n * The Texture this Frame is a part of.\r\n *\r\n * @name Phaser.Textures.Frame#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The name of this Frame.\r\n * The name is unique within the Texture.\r\n *\r\n * @name Phaser.Textures.Frame#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The TextureSource this Frame is part of.\r\n *\r\n * @name Phaser.Textures.Frame#source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @since 3.0.0\r\n */\r\n this.source = texture.source[sourceIndex];\r\n\r\n /**\r\n * The index of the TextureSource in the Texture sources array.\r\n *\r\n * @name Phaser.Textures.Frame#sourceIndex\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.sourceIndex = sourceIndex;\r\n\r\n /**\r\n * A reference to the Texture Source WebGL Texture that this Frame is using.\r\n *\r\n * @name Phaser.Textures.Frame#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this.glTexture = this.source.glTexture;\r\n\r\n /**\r\n * X position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutX;\r\n\r\n /**\r\n * Y position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutY;\r\n\r\n /**\r\n * The width of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutWidth;\r\n\r\n /**\r\n * The height of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutHeight;\r\n\r\n /**\r\n * The X rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The Y rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The rendering width of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width;\r\n\r\n /**\r\n * The rendering height of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height;\r\n\r\n /**\r\n * Half the width, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth;\r\n\r\n /**\r\n * Half the height, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight;\r\n\r\n /**\r\n * The x center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerX;\r\n\r\n /**\r\n * The y center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerY;\r\n\r\n /**\r\n * The horizontal pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotX = 0;\r\n\r\n /**\r\n * The vertical pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotY = 0;\r\n\r\n /**\r\n * Does this Frame have a custom pivot point?\r\n *\r\n * @name Phaser.Textures.Frame#customPivot\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customPivot = false;\r\n\r\n /**\r\n * **CURRENTLY UNSUPPORTED**\r\n *\r\n * Is this frame is rotated or not in the Texture?\r\n * Rotation allows you to use rotated frames in texture atlas packing.\r\n * It has nothing to do with Sprite rotation.\r\n *\r\n * @name Phaser.Textures.Frame#rotated\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rotated = false;\r\n\r\n /**\r\n * Over-rides the Renderer setting.\r\n * -1 = use Renderer Setting\r\n * 0 = No rounding\r\n * 1 = Round\r\n *\r\n * @name Phaser.Textures.Frame#autoRound\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.autoRound = -1;\r\n\r\n /**\r\n * Any Frame specific custom data can be stored here.\r\n *\r\n * @name Phaser.Textures.Frame#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * WebGL UV u0 value.\r\n *\r\n * @name Phaser.Textures.Frame#u0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u0 = 0;\r\n\r\n /**\r\n * WebGL UV v0 value.\r\n *\r\n * @name Phaser.Textures.Frame#v0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v0 = 0;\r\n\r\n /**\r\n * WebGL UV u1 value.\r\n *\r\n * @name Phaser.Textures.Frame#u1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u1 = 0;\r\n\r\n /**\r\n * WebGL UV v1 value.\r\n *\r\n * @name Phaser.Textures.Frame#v1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v1 = 0;\r\n\r\n /**\r\n * The un-modified source frame, trim and UV data.\r\n *\r\n * @name Phaser.Textures.Frame#data\r\n * @type {object}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n cut: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n trim: false,\r\n sourceSize: {\r\n w: 0,\r\n h: 0\r\n },\r\n spriteSourceSize: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n radius: 0,\r\n drawImage: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n }\r\n };\r\n\r\n this.setSize(width, height, x, y);\r\n },\r\n\r\n /**\r\n * Sets the width, height, x and y of this Frame.\r\n *\r\n * This is called automatically by the constructor\r\n * and should rarely be changed on-the-fly.\r\n *\r\n * @method Phaser.Textures.Frame#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {number} width - The width of the frame before being trimmed.\r\n * @param {number} height - The height of the frame before being trimmed.\r\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\r\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setSize: function (width, height, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.cutX = x;\r\n this.cutY = y;\r\n this.cutWidth = width;\r\n this.cutHeight = height;\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width * 0.5);\r\n this.halfHeight = Math.floor(height * 0.5);\r\n\r\n this.centerX = Math.floor(width / 2);\r\n this.centerY = Math.floor(height / 2);\r\n\r\n var data = this.data;\r\n var cut = data.cut;\r\n\r\n cut.x = x;\r\n cut.y = y;\r\n cut.w = width;\r\n cut.h = height;\r\n cut.r = x + width;\r\n cut.b = y + height;\r\n\r\n data.sourceSize.w = width;\r\n data.sourceSize.h = height;\r\n\r\n data.spriteSourceSize.w = width;\r\n data.spriteSourceSize.h = height;\r\n\r\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\r\n\r\n var drawImage = data.drawImage;\r\n\r\n drawImage.x = x;\r\n drawImage.y = y;\r\n drawImage.width = width;\r\n drawImage.height = height;\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\r\n *\r\n * @method Phaser.Textures.Frame#setTrim\r\n * @since 3.0.0\r\n *\r\n * @param {number} actualWidth - The width of the frame before being trimmed.\r\n * @param {number} actualHeight - The height of the frame before being trimmed.\r\n * @param {number} destX - The destination X position of the trimmed frame for display.\r\n * @param {number} destY - The destination Y position of the trimmed frame for display.\r\n * @param {number} destWidth - The destination width of the trimmed frame for display.\r\n * @param {number} destHeight - The destination height of the trimmed frame for display.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\r\n {\r\n var data = this.data;\r\n var ss = data.spriteSourceSize;\r\n\r\n // Store actual values\r\n\r\n data.trim = true;\r\n\r\n data.sourceSize.w = actualWidth;\r\n data.sourceSize.h = actualHeight;\r\n\r\n ss.x = destX;\r\n ss.y = destY;\r\n ss.w = destWidth;\r\n ss.h = destHeight;\r\n ss.r = destX + destWidth;\r\n ss.b = destY + destHeight;\r\n\r\n // Adjust properties\r\n this.x = destX;\r\n this.y = destY;\r\n\r\n this.width = destWidth;\r\n this.height = destHeight;\r\n\r\n this.halfWidth = destWidth * 0.5;\r\n this.halfHeight = destHeight * 0.5;\r\n\r\n this.centerX = Math.floor(destWidth / 2);\r\n this.centerY = Math.floor(destHeight / 2);\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * Takes a crop data object and, based on the rectangular region given, calculates the\r\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\r\n *\r\n * This is called directly by the Game Object Texture Components `setCrop` method.\r\n * Please use that method to crop a Game Object.\r\n *\r\n * @method Phaser.Textures.Frame#setCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\r\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\r\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\r\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\r\n {\r\n // Clamp the input values\r\n\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n var rw = this.realWidth;\r\n var rh = this.realHeight;\r\n\r\n x = Clamp(x, 0, rw);\r\n y = Clamp(y, 0, rh);\r\n\r\n width = Clamp(width, 0, rw - x);\r\n height = Clamp(height, 0, rh - y);\r\n\r\n var ox = cx + x;\r\n var oy = cy + y;\r\n var ow = width;\r\n var oh = height;\r\n\r\n var data = this.data;\r\n\r\n if (data.trim)\r\n {\r\n var ss = data.spriteSourceSize;\r\n\r\n // Need to check for intersection between the cut area and the crop area\r\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\r\n\r\n width = Clamp(width, 0, cw - x);\r\n height = Clamp(height, 0, ch - y);\r\n\r\n var cropRight = x + width;\r\n var cropBottom = y + height;\r\n\r\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\r\n\r\n if (intersects)\r\n {\r\n var ix = Math.max(ss.x, x);\r\n var iy = Math.max(ss.y, y);\r\n var iw = Math.min(ss.r, cropRight) - ix;\r\n var ih = Math.min(ss.b, cropBottom) - iy;\r\n\r\n ow = iw;\r\n oh = ih;\r\n\r\n if (flipX)\r\n {\r\n ox = cx + (cw - (ix - ss.x) - iw);\r\n }\r\n else\r\n {\r\n ox = cx + (ix - ss.x);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - (iy - ss.y) - ih);\r\n }\r\n else\r\n {\r\n oy = cy + (iy - ss.y);\r\n }\r\n\r\n x = ix;\r\n y = iy;\r\n\r\n width = iw;\r\n height = ih;\r\n }\r\n else\r\n {\r\n ox = 0;\r\n oy = 0;\r\n ow = 0;\r\n oh = 0;\r\n }\r\n }\r\n else\r\n {\r\n if (flipX)\r\n {\r\n ox = cx + (cw - x - width);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - y - height);\r\n }\r\n }\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n // Map the given coordinates into UV space, clamping to the 0-1 range.\r\n\r\n crop.u0 = Math.max(0, ox / tw);\r\n crop.v0 = Math.max(0, oy / th);\r\n crop.u1 = Math.min(1, (ox + ow) / tw);\r\n crop.v1 = Math.min(1, (oy + oh) / th);\r\n\r\n crop.x = x;\r\n crop.y = y;\r\n\r\n crop.cx = ox;\r\n crop.cy = oy;\r\n crop.cw = ow;\r\n crop.ch = oh;\r\n\r\n crop.width = width;\r\n crop.height = height;\r\n\r\n crop.flipX = flipX;\r\n crop.flipY = flipY;\r\n\r\n return crop;\r\n },\r\n\r\n /**\r\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\r\n * Called automatically by `setFrame`.\r\n *\r\n * @method Phaser.Textures.Frame#updateCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n updateCropUVs: function (crop, flipX, flipY)\r\n {\r\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\r\n },\r\n\r\n /**\r\n * Directly sets the canvas and WebGL UV data for this frame.\r\n *\r\n * Use this if you need to override the values that are generated automatically\r\n * when the Frame is created.\r\n *\r\n * @method Phaser.Textures.Frame#setUVs\r\n * @since 3.50.0\r\n *\r\n * @param {number} width - Width of this frame for the Canvas data.\r\n * @param {number} height - Height of this frame for the Canvas data.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setUVs: function (width, height, u0, v0, u1, v1)\r\n {\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = width;\r\n cd.height = height;\r\n\r\n // WebGL data\r\n\r\n this.u0 = u0;\r\n this.v0 = v0;\r\n\r\n this.u1 = u1;\r\n this.v1 = v1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache and the drawImage cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVs\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVs: function ()\r\n {\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = cw;\r\n cd.height = ch;\r\n\r\n // WebGL data\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = cx / tw;\r\n this.v0 = cy / th;\r\n\r\n this.u1 = (cx + cw) / tw;\r\n this.v1 = (cy + ch) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVsInverted\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVsInverted: function ()\r\n {\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = (this.cutX + this.cutHeight) / tw;\r\n this.v0 = this.cutY / th;\r\n\r\n this.u1 = this.cutX / tw;\r\n this.v1 = (this.cutY + this.cutWidth) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clones this Frame into a new Frame object.\r\n *\r\n * @method Phaser.Textures.Frame#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} A clone of this Frame.\r\n */\r\n clone: function ()\r\n {\r\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\r\n\r\n clone.cutX = this.cutX;\r\n clone.cutY = this.cutY;\r\n clone.cutWidth = this.cutWidth;\r\n clone.cutHeight = this.cutHeight;\r\n\r\n clone.x = this.x;\r\n clone.y = this.y;\r\n\r\n clone.width = this.width;\r\n clone.height = this.height;\r\n\r\n clone.halfWidth = this.halfWidth;\r\n clone.halfHeight = this.halfHeight;\r\n\r\n clone.centerX = this.centerX;\r\n clone.centerY = this.centerY;\r\n\r\n clone.rotated = this.rotated;\r\n\r\n clone.data = Extend(true, clone.data, this.data);\r\n\r\n clone.updateUVs();\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\r\n *\r\n * @method Phaser.Textures.Frame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.source = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n this.customData = null;\r\n this.data = null;\r\n },\r\n\r\n /**\r\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.w;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.h;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\r\n *\r\n * @name Phaser.Textures.Frame#radius\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.data.radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Frame trimmed or not?\r\n *\r\n * @name Phaser.Textures.Frame#trimmed\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n trimmed: {\r\n\r\n get: function ()\r\n {\r\n return this.data.trim;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Canvas drawImage data object.\r\n *\r\n * @name Phaser.Textures.Frame#canvasData\r\n * @type {object}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canvasData: {\r\n\r\n get: function ()\r\n {\r\n return this.data.drawImage;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Frame;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {boolean} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Tween States.\r\n *\r\n * @namespace Phaser.Tweens.States\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\n/**\r\n * Phaser Tween state constants.\r\n *\r\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.CREATED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n // 1 used to be INIT prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n // 3 used to be OFFSET_DELAY prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_RENDER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_FORWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.HOLD_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.REPEAT_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state. The Tween has been created but has not yet been added to the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING: 20,\r\n\r\n /**\r\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\r\n * or was playing and is currently paused, but in both cases it's still being processed by\r\n * the Tween Manager, so is considered 'active'.\r\n *\r\n * @name Phaser.Tweens.States.ACTIVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 21,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a loop countdown to elapse.\r\n *\r\n * @name Phaser.Tweens.States.LOOP_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a complete delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 23,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a starting delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.START_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n START_DELAY: 24,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_REMOVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state. The Tween has been removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.REMOVED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\r\n * so will not be automatically removed by the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.FINISHED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n FINISHED: 27,\r\n\r\n /**\r\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.DESTROYED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DESTROYED: 28,\r\n\r\n /**\r\n * A large integer value used for 'infinite' style countdowns.\r\n *\r\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\r\n * supported on IE.\r\n *\r\n * @name Phaser.Tweens.States.MAX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n MAX: 999999999999\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @ignore\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @ignore\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * Existing elements in the array are shifted up.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {number} [index=0] - The index in the array where the item will be inserted.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {number} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {number} startIndex - The start index to search from.\r\n * @param {number} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array and flattens it, returning a shallow-copy flattened array.\r\n *\r\n * @function Phaser.Utils.Array.Flatten\r\n * @since 3.60.0\r\n *\r\n * @param {array} array - The array to flatten.\r\n * @param {array} [output] - An array to hold the results in.\r\n *\r\n * @return {array} The flattened output array.\r\n */\r\nvar Flatten = function (array, output)\r\n{\r\n if (output === undefined) { output = []; }\r\n\r\n for (var i = 0; i < array.length; i++)\r\n {\r\n if (Array.isArray(array[i]))\r\n {\r\n Flatten(array[i], output);\r\n }\r\n else\r\n {\r\n output.push(array[i]);\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = Flatten;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element above another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveAbove\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move above base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveAbove = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex > baseIndex)\r\n {\r\n // item1 is already above item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === array.length - 1)\r\n {\r\n array.push(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveAbove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element below another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveBelow\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move below base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveBelow = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex < baseIndex)\r\n {\r\n // item1 is already below item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === 0)\r\n {\r\n array.unshift(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveBelow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {number} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\r\n\r\n/**\r\n * Create an array of numbers (positive and/or negative) progressing from `start`\r\n * up to but not including `end` by advancing by `step`.\r\n *\r\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\r\n *\r\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\r\n * for forward compatibility make sure to pass in actual numbers.\r\n *\r\n * @example\r\n * NumberArrayStep(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * NumberArrayStep(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * NumberArrayStep(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * NumberArrayStep(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * NumberArrayStep(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * NumberArrayStep(0);\r\n * // => []\r\n *\r\n * @function Phaser.Utils.Array.NumberArrayStep\r\n * @since 3.0.0\r\n *\r\n * @param {number} [start=0] - The start of the range.\r\n * @param {number} [end=null] - The end of the range.\r\n * @param {number} [step=1] - The value to increment or decrement by.\r\n *\r\n * @return {number[]} The array of number values.\r\n */\r\nvar NumberArrayStep = function (start, end, step)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (end === undefined) { end = null; }\r\n if (step === undefined) { step = 1; }\r\n\r\n if (end === null)\r\n {\r\n end = start;\r\n start = 0;\r\n }\r\n\r\n var result = [];\r\n\r\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n result.push(start);\r\n start += step;\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArrayStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {number} k - The k-th element index.\r\n * @param {number} [left=0] - The index of the left part of the range.\r\n * @param {number} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = require('../object/GetValue');\r\nvar Shuffle = require('./Shuffle');\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n *\r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n *\r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n *\r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n *\r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n *\r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n *\r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n var removed = [];\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n removed.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return removed;\r\n};\r\n\r\nmodule.exports = Remove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} startIndex - The start index to remove from.\r\n * @param {number} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {number} [start=0] - The array index to start the search from.\r\n * @param {number} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search within.\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The \"rotation\" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The \"rotation\" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n *\r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {number} startIndex - The start index.\r\n * @param {number} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {number} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n","/**\r\n * @author Richard Davey \r\n * @author Angry Bytes (and contributors)\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Device = require('../../device');\r\n\r\n/**\r\n * The comparator function.\r\n *\r\n * @ignore\r\n *\r\n * @param {*} a - The first item to test.\r\n * @param {*} b - The second itemt to test.\r\n *\r\n * @return {boolean} True if they localCompare, otherwise false.\r\n */\r\nfunction Compare (a, b)\r\n{\r\n return String(a).localeCompare(b);\r\n}\r\n\r\n/**\r\n * Process the array contents.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} array - The array to process.\r\n * @param {function} compare - The comparison function.\r\n *\r\n * @return {array} - The processed array.\r\n */\r\nfunction Process (array, compare)\r\n{\r\n // Short-circuit when there's nothing to sort.\r\n var len = array.length;\r\n\r\n if (len <= 1)\r\n {\r\n return array;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n\r\n for (var chk = 1; chk < len; chk *= 2)\r\n {\r\n RunPass(array, compare, chk, buffer);\r\n\r\n var tmp = array;\r\n\r\n array = buffer;\r\n\r\n buffer = tmp;\r\n }\r\n\r\n return array;\r\n}\r\n\r\n/**\r\n * Run a single pass with the given chunk size.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} arr - The array to run the pass on.\r\n * @param {function} comp - The comparison function.\r\n * @param {number} chk - The number of iterations.\r\n * @param {array} result - The array to store the result in.\r\n */\r\nfunction RunPass (arr, comp, chk, result)\r\n{\r\n var len = arr.length;\r\n var i = 0;\r\n\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl)\r\n {\r\n r = l + chk;\r\n e = r + chk;\r\n\r\n if (r > len)\r\n {\r\n r = len;\r\n }\r\n\r\n if (e > len)\r\n {\r\n e = len;\r\n }\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n\r\n while (true)\r\n {\r\n // Compare the chunks.\r\n if (li < r && ri < e)\r\n {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0)\r\n {\r\n result[i++] = arr[li++];\r\n }\r\n else\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n else if (li < r)\r\n {\r\n // Nothing to compare, just flush what's left.\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e)\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n else\r\n {\r\n // Both iterators are at the chunk ends.\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\r\n *\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The input array to be sorted.\r\n * @param {function} [compare] - The comparison function.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar StableSort = function (array, compare)\r\n{\r\n if (compare === undefined) { compare = Compare; }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n if (!array || array.length < 2)\r\n {\r\n return array;\r\n }\r\n\r\n if (Device.features.stableSort)\r\n {\r\n return array.sort(compare);\r\n }\r\n\r\n var result = Process(array, compare);\r\n\r\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\r\n if (result !== array)\r\n {\r\n RunPass(result, null, array.length, array);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = StableSort;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: require('./matrix'),\r\n\r\n Add: require('./Add'),\r\n AddAt: require('./AddAt'),\r\n BringToTop: require('./BringToTop'),\r\n CountAllMatching: require('./CountAllMatching'),\r\n Each: require('./Each'),\r\n EachInRange: require('./EachInRange'),\r\n FindClosestInSorted: require('./FindClosestInSorted'),\r\n Flatten: require('./Flatten'),\r\n GetAll: require('./GetAll'),\r\n GetFirst: require('./GetFirst'),\r\n GetRandom: require('./GetRandom'),\r\n MoveDown: require('./MoveDown'),\r\n MoveTo: require('./MoveTo'),\r\n MoveUp: require('./MoveUp'),\r\n MoveAbove: require('./MoveAbove'),\r\n MoveBelow: require('./MoveBelow'),\r\n NumberArray: require('./NumberArray'),\r\n NumberArrayStep: require('./NumberArrayStep'),\r\n QuickSelect: require('./QuickSelect'),\r\n Range: require('./Range'),\r\n Remove: require('./Remove'),\r\n RemoveAt: require('./RemoveAt'),\r\n RemoveBetween: require('./RemoveBetween'),\r\n RemoveRandomElement: require('./RemoveRandomElement'),\r\n Replace: require('./Replace'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateRight: require('./RotateRight'),\r\n SafeRange: require('./SafeRange'),\r\n SendToBack: require('./SendToBack'),\r\n SetAll: require('./SetAll'),\r\n Shuffle: require('./Shuffle'),\r\n SortByDigits: require('./SortByDigits'),\r\n SpliceOne: require('./SpliceOne'),\r\n StableSort: require('./StableSort'),\r\n Swap: require('./Swap')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = require('../../string/Pad');\r\nvar CheckMatrix = require('./CheckMatrix');\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = require('./CheckMatrix');\r\nvar TransposeMatrix = require('./TransposeMatrix');\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateLeft = require('../RotateLeft');\r\nvar RotateRight = require('../RotateRight');\r\n\r\n/**\r\n * Translates the given Array Matrix by shifting each column and row the\r\n * amount specified.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Translate\r\n * @since 3.50.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to translate.\r\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\r\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\r\n *\r\n * @return {T[][]} The translated matrix.\r\n */\r\nvar TranslateMatrix = function (matrix, x, y)\r\n{\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n // Vertical translation\r\n\r\n if (y !== 0)\r\n {\r\n if (y < 0)\r\n {\r\n // Shift Up\r\n RotateLeft(matrix, Math.abs(y));\r\n }\r\n else\r\n {\r\n // Shift Down\r\n RotateRight(matrix, y);\r\n }\r\n }\r\n\r\n // Horizontal translation\r\n\r\n if (x !== 0)\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n var row = matrix[i];\r\n\r\n if (x < 0)\r\n {\r\n RotateLeft(row, Math.abs(x));\r\n }\r\n else\r\n {\r\n RotateRight(row, x);\r\n }\r\n }\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = TranslateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n *\r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: require('./CheckMatrix'),\r\n MatrixToString: require('./MatrixToString'),\r\n ReverseColumns: require('./ReverseColumns'),\r\n ReverseRows: require('./ReverseRows'),\r\n Rotate180: require('./Rotate180'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateMatrix: require('./RotateMatrix'),\r\n RotateRight: require('./RotateRight'),\r\n Translate: require('./TranslateMatrix'),\r\n TransposeMatrix: require('./TransposeMatrix')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Deep Copy the given object or array.\r\n *\r\n * @function Phaser.Utils.Objects.DeepCopy\r\n * @since 3.50.0\r\n *\r\n * @param {object} obj - The object to deep copy.\r\n *\r\n * @return {object} A deep copy of the original object.\r\n */\r\nvar DeepCopy = function (inObject)\r\n{\r\n var outObject;\r\n var value;\r\n var key;\r\n\r\n if (typeof inObject !== 'object' || inObject === null)\r\n {\r\n // inObject is not an object\r\n return inObject;\r\n }\r\n\r\n // Create an array or object to hold the values\r\n outObject = Array.isArray(inObject) ? [] : {};\r\n\r\n for (key in inObject)\r\n {\r\n value = inObject[key];\r\n\r\n // Recursively (deep) copy for nested objects, including arrays\r\n outObject[key] = DeepCopy(value);\r\n }\r\n\r\n return outObject;\r\n};\r\n\r\nmodule.exports = DeepCopy;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n *\r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n *\r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\r\n *\r\n * The key is a string, which can be split based on the use of the period character.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * const source = {\r\n * lives: 3,\r\n * render: {\r\n * screen: {\r\n * width: 1024\r\n * }\r\n * }\r\n * }\r\n *\r\n * const lives = GetValue(source, 'lives', 1);\r\n * const width = GetValue(source, 'render.screen.width', 800);\r\n * const height = GetValue(source, 'render.screen.height', 600);\r\n * ```\r\n *\r\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\r\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\r\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue, altSource)\r\n{\r\n if ((!source && !altSource) || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source && source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (altSource && altSource.hasOwnProperty(key))\r\n {\r\n return altSource[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parentA = source;\r\n var parentB = altSource;\r\n var valueA = defaultValue;\r\n var valueB = defaultValue;\r\n var valueAFound = true;\r\n var valueBFound = true;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parentA && parentA.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentA has a key property, let's carry on down\r\n valueA = parentA[keys[i]];\r\n parentA = parentA[keys[i]];\r\n }\r\n else\r\n {\r\n valueAFound = false;\r\n }\r\n\r\n if (parentB && parentB.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentB has a key property, let's carry on down\r\n valueB = parentB[keys[i]];\r\n parentB = parentB[keys[i]];\r\n }\r\n else\r\n {\r\n valueBFound = false;\r\n }\r\n }\r\n\r\n if (valueAFound)\r\n {\r\n return valueA;\r\n }\r\n else if (valueBFound)\r\n {\r\n return valueB;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (!obj || typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and pads it out, to the length required, using the character\r\n * specified. For example if you need a string to be 6 characters long, you can call:\r\n *\r\n * `pad('bob', 6, '-', 2)`\r\n *\r\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\r\n *\r\n * You can also use it to pad numbers (they are always returned as strings):\r\n *\r\n * `pad(512, 6, '0', 1)`\r\n *\r\n * Would return: `000512` with the string padded to the left.\r\n *\r\n * If you don't specify a direction it'll pad to both sides:\r\n *\r\n * `pad('c64', 7, '*')`\r\n *\r\n * Would return: `**c64**`\r\n *\r\n * @function Phaser.Utils.String.Pad\r\n * @since 3.0.0\r\n *\r\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\r\n * @param {number} [len=0] - The number of characters to be added.\r\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\r\n * @param {number} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\r\n *\r\n * @return {string} The padded string.\r\n */\r\nvar Pad = function (str, len, pad, dir)\r\n{\r\n if (len === undefined) { len = 0; }\r\n if (pad === undefined) { pad = ' '; }\r\n if (dir === undefined) { dir = 3; }\r\n\r\n str = str.toString();\r\n\r\n var padlen = 0;\r\n\r\n if (len + 1 >= str.length)\r\n {\r\n switch (dir)\r\n {\r\n case 1:\r\n str = new Array(len + 1 - str.length).join(pad) + str;\r\n break;\r\n\r\n case 3:\r\n var right = Math.ceil((padlen = len - str.length) / 2);\r\n var left = padlen - right;\r\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\r\n break;\r\n\r\n default:\r\n str = str + new Array(len + 1 - str.length).join(pad);\r\n break;\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = Pad;\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./SpinePlugin.js\");\n",""],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/spine/dist/SpineWebGLPlugin.js b/plugins/spine/dist/SpineWebGLPlugin.js index 0cfeb8d93..b5b508a85 100644 --- a/plugins/spine/dist/SpineWebGLPlugin.js +++ b/plugins/spine/dist/SpineWebGLPlugin.js @@ -23501,7 +23501,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } @@ -53153,4 +53153,4 @@ module.exports = Pad; /******/ window.SpinePlugin = __webpack_exports__; /******/ /******/ })() -; +; \ No newline at end of file diff --git a/plugins/spine/dist/SpineWebGLPluginDebug.js b/plugins/spine/dist/SpineWebGLPluginDebug.js index e17f0117c..c721da7e0 100644 --- a/plugins/spine/dist/SpineWebGLPluginDebug.js +++ b/plugins/spine/dist/SpineWebGLPluginDebug.js @@ -23196,7 +23196,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } @@ -53313,4 +53313,4 @@ module.exports = Pad; /******/ /******/ })() ; -//# sourceMappingURL=SpineWebGLPluginDebug.js.map +//# sourceMappingURL=SpineWebGLPluginDebug.js.map \ No newline at end of file diff --git a/plugins/spine/dist/SpineWebGLPluginDebug.js.map b/plugins/spine/dist/SpineWebGLPluginDebug.js.map index 8a815299e..4b543bd2c 100644 --- a/plugins/spine/dist/SpineWebGLPluginDebug.js.map +++ b/plugins/spine/dist/SpineWebGLPluginDebug.js.map @@ -1 +1 @@ -{"version":3,"file":"SpineWebGLPluginDebug.js","mappings":";;;;;;;;;;AAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0DAA0D,OAAO;AACjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,SAAS;AACnD;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA,gBAAgB,YAAY;AAC5B;;AAEA;AACA,4DAA4D;AAC5D,gEAAgE;AAChE,oEAAoE;AACpE,wEAAwE;AACxE;AACA,2DAA2D,SAAS;AACpE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,4DAA4D,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;;;AC/UA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,mBAAmB,mBAAO,CAAC,yFAAwC;AACnE,gBAAgB,mBAAO,CAAC,8FAA4C;AACpE,oBAAoB,mBAAO,CAAC,2FAAyC;AACrE,eAAe,mBAAO,CAAC,4FAA2C;AAClE,gBAAgB,mBAAO,CAAC,0EAAkC;AAC1D,eAAe,mBAAO,CAAC,4FAA2C;AAClE;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,kDAAkD;AAC7D,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,mBAAmB;AAC9B,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sFAAsF;AAC7H;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,wCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sGAAsG;AACrH,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC,eAAe,SAAS;AACxB,eAAe,uCAAuC;AACtD,eAAe,uCAAuC;AACtD,eAAe,QAAQ,yDAAyD;AAChF;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;;;;;;;;;;;AC9uCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,iFAA+B;AACzD;;AAEA,IAAI,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,gBAAgB;AAC3B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC,8CAAe;AAClC,iBAAiB,mBAAO,CAAC,0DAAqB;AAC9C,WAAW,mBAAO,CAAC,8CAAe;;AAElC;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,8EAAoC;AAC/D,YAAY,mBAAO,CAAC,8DAA4B;AAChD,YAAY,mBAAO,CAAC,gEAA6B;AACjD,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,sBAAsB,mBAAO,CAAC,kGAA8C;AAC5E,qBAAqB,mBAAO,CAAC,gGAA6C;AAC1E,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oCAAoC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,mCAAmC;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;;AAEA,IAAI,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;AAC/B;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0DAA0D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtsBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;AACxC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ,qGAAqG;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,0BAA0B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,mBAAmB,+IAA+I;AACpN;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,GAAG,uBAAuB,OAAO;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,kBAAkB;AAChC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,0BAA0B;AACxC,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;AAC9C;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5qBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,wCAAwC;AACxC,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,2BAA2B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,oDAAoD;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAgE;AAC/E;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3OA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,6BAA6B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,4BAA4B;AAC9D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACpTA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC,0CAA0C;AAC1C,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B,+BAA+B;AAC/B,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,oCAAoC;AACpC,sCAAsC;AACtC,yCAAyC;AACzC,mCAAmC;AACnC,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,mCAAmC;AACnC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjKA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,sBAAsB,mBAAO,CAAC,mEAAwB;AACtD,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACrEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACpEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,2CAA2C;AAC3C,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,iCAAiC;AACjC,iCAAiC;AACjC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,mCAAmC;AACnC,qCAAqC;AACrC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,uCAAuC;AACvC,sCAAsC;AACtC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,oCAAoC;AACpC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,uCAAuC;AACvC,kCAAkC;AAClC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,2CAAU;AAC9B,gBAAgB,mBAAO,CAAC,mDAAc;AACtC,WAAW,mBAAO,CAAC,yCAAS;AAC5B,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,YAAY,mBAAO,CAAC,2CAAU;AAC9B,iBAAiB,mBAAO,CAAC,qDAAe;AACxC,kBAAkB,mBAAO,CAAC,uDAAgB;AAC1C,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,cAAc,mBAAO,CAAC,+CAAY;AAClC,cAAc,mBAAO,CAAC,+CAAY;AAClC,YAAY,mBAAO,CAAC,2CAAU;AAC9B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,cAAc,mBAAO,CAAC,+CAAY;AAClC,UAAU,mBAAO,CAAC,uCAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,+BAA+B;AAC1C,WAAW,2CAA2C;AACtD;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW,KAAK,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB,KAAK,gBAAgB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,KAAK,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAA0D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,oCAAoC;AACnD,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2DAA2D;AAC1E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACl5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mFAAmF;AACpG;AACA,eAAe,mFAAmF;AAClG;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,4FAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC;AAClD;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,cAAc,mBAAO,CAAC,2CAAW;AACjC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC,eAAe,QAAQ;AACvB;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA,4GAA4G,sCAAsC;AAClJ,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/lBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA,eAAe,gCAAgC;AAC/C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChWA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAmE;AAClF;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,iBAAiB,gCAAgC;AACjD,oBAAoB,YAAY;AAChC;AACA,eAAe,gEAAgE;AAC/E,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,kCAAkC;AACjD,eAAe,uCAAuC;AACtD;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,6BAA6B;AAC9C,iBAAiB,0BAA0B;AAC3C,oBAAoB,OAAO;AAC3B;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wDAAwD;AACnF;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,wGAAwG;AACvH;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wGAAwG,UAAU;AACjI,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,SAAS,mBAAO,CAAC,mEAAkB;AACnC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uIAAuI;AACtJ,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,mGAAmG;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uDAAuD;AACtE;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAkC;AACjD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iDAAiD;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6FAA6F;AAC5G;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAoD;AAC5D;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,sBAAsB;AACtB,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3mBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,sDAAsD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,cAAc;AAC7B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,6DAAS;AAC5B,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,eAAe,mBAAO,CAAC,qEAAa;AACpC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,eAAe,mBAAO,CAAC,qEAAa;AACpC,qBAAqB,mBAAO,CAAC,iFAAmB;AAChD,aAAa,mBAAO,CAAC,iEAAW;AAChC;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,KAAK;AACzB;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC37CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;AACA;AACA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;AACA;AACA,IAAI,KAAsB;AAC1B,EAEC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;;AAEpD;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,sDAAY;AACnC,gBAAgB,mBAAO,CAAC,wDAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,aAAa,mBAAO,CAAC,kDAAU;AAC/B,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,mBAAmB;AAC9B;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,2DAAY;AACnC,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,WAAW,mBAAO,CAAC,oDAAc;AACjC,aAAa,mBAAO,CAAC,uDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjjBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,uCAAuC;AAClD;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3SA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,uCAAuC;AAClD;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,sCAAsC;AACtC,+BAA+B;AAC/B,8BAA8B;AAC9B,kCAAkC;AAClC,iCAAiC;AACjC,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,4BAA4B;AACvC,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,wDAAwD;AAClJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,oFAAoF,oDAAoD;AACxI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mBAAO,CAAC,4DAAa;AAC9B,cAAc,mBAAO,CAAC,sEAAkB;AACxC,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,uBAAuB,mBAAO,CAAC,wFAA2B;AAC1D,qBAAqB,mBAAO,CAAC,oFAAyB;AACtD,eAAe,mBAAO,CAAC,wEAAmB;AAC1C,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,kBAAkB,mBAAO,CAAC,8EAAsB;AAChD,cAAc,mBAAO,CAAC,sEAAkB;AACxC,WAAW,mBAAO,CAAC,gEAAe;AAClC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D,aAAa,mBAAO,CAAC,gDAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,wDAAwD;AACnE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,gDAAgD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wGAAwG;AACnH,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9VA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,mDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpRA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1vDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,gDAAgD;AAC3D;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AClxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/gCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACthBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,uCAAuC;AAClF;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,iCAAiC;AAC5E;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4CAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,yDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0CAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,0CAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;AACxC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;AAChC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iGAAoC;;;;;;;;;;;ACNpC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,oGAAqC;;;;;;;;;;;ACVrC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;AAClC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;AAC3B;AACA;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;AAC9E;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;AAC1B;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,oDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,8CAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;AACvD;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;AAC1C;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,kDAAkD;AAClD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wCAAwC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;AAC1B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,uCAAuC;AACnG;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,0CAA0C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,4CAA4C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1MA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,yCAAyC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8CAA8C;AACrF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,sDAAsD;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,uDAAuD;AACnI;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,YAAY,mBAAO,CAAC,iEAAgB;AACpC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,cAAc,mBAAO,CAAC,qEAAkB;AACxC,WAAW,mBAAO,CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;AAChC;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1NA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzPA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,oCAAoC;AACpC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,sDAAsD;AACtD,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE,qEAAqE;AACrE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,wBAAwB,mBAAO,CAAC,4EAA8B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,6BAA6B;AAC7B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA,6BAA6B,mBAAmB;AAChD;AACA,4BAA4B,SAAS;AACrC;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA,WAAW,KAAK;AAChB;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAc;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,0DAAU;AAC9B;AACA,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;AAC1B;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,iEAAa;AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;AAChD;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,8CAA8C,cAAc,oBAAoB;AAChF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UCrEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack:///../../../node_modules/eventemitter3/index.js","webpack:///./runtimes/spine-webgl.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///../../../src/const.js","webpack:///../../../src/data/DataManager.js","webpack:///../../../src/data/events/CHANGE_DATA_EVENT.js","webpack:///../../../src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///../../../src/data/events/DESTROY_EVENT.js","webpack:///../../../src/data/events/REMOVE_DATA_EVENT.js","webpack:///../../../src/data/events/SET_DATA_EVENT.js","webpack:///../../../src/data/events/index.js","webpack:///../../../src/device/Audio.js","webpack:///../../../src/device/Browser.js","webpack:///../../../src/device/CanvasFeatures.js","webpack:///../../../src/device/Features.js","webpack:///../../../src/device/Fullscreen.js","webpack:///../../../src/device/Input.js","webpack:///../../../src/device/OS.js","webpack:///../../../src/device/Video.js","webpack:///../../../src/device/index.js","webpack:///../../../src/display/ColorMatrix.js","webpack:///../../../src/display/canvas/CanvasPool.js","webpack:///../../../src/display/canvas/Smoothing.js","webpack:///../../../src/display/mask/BitmapMask.js","webpack:///../../../src/display/mask/GeometryMask.js","webpack:///../../../src/fx/Barrel.js","webpack:///../../../src/fx/Bloom.js","webpack:///../../../src/fx/Blur.js","webpack:///../../../src/fx/Bokeh.js","webpack:///../../../src/fx/Circle.js","webpack:///../../../src/fx/ColorMatrix.js","webpack:///../../../src/fx/Controller.js","webpack:///../../../src/fx/Displacement.js","webpack:///../../../src/fx/Glow.js","webpack:///../../../src/fx/Gradient.js","webpack:///../../../src/fx/Pixelate.js","webpack:///../../../src/fx/Shadow.js","webpack:///../../../src/fx/Shine.js","webpack:///../../../src/fx/Vignette.js","webpack:///../../../src/fx/Wipe.js","webpack:///../../../src/fx/const.js","webpack:///../../../src/fx/index.js","webpack:///../../../src/gameobjects/BuildGameObject.js","webpack:///../../../src/gameobjects/GameObject.js","webpack:///../../../src/gameobjects/GameObjectFactory.js","webpack:///../../../src/gameobjects/GetCalcMatrix.js","webpack:///../../../src/gameobjects/components/Alpha.js","webpack:///../../../src/gameobjects/components/AlphaSingle.js","webpack:///../../../src/gameobjects/components/BlendMode.js","webpack:///../../../src/gameobjects/components/ComputedSize.js","webpack:///../../../src/gameobjects/components/Crop.js","webpack:///../../../src/gameobjects/components/Depth.js","webpack:///../../../src/gameobjects/components/FX.js","webpack:///../../../src/gameobjects/components/Flip.js","webpack:///../../../src/gameobjects/components/GetBounds.js","webpack:///../../../src/gameobjects/components/Mask.js","webpack:///../../../src/gameobjects/components/Origin.js","webpack:///../../../src/gameobjects/components/PathFollower.js","webpack:///../../../src/gameobjects/components/Pipeline.js","webpack:///../../../src/gameobjects/components/PostPipeline.js","webpack:///../../../src/gameobjects/components/ScrollFactor.js","webpack:///../../../src/gameobjects/components/Size.js","webpack:///../../../src/gameobjects/components/Texture.js","webpack:///../../../src/gameobjects/components/TextureCrop.js","webpack:///../../../src/gameobjects/components/Tint.js","webpack:///../../../src/gameobjects/components/ToJSON.js","webpack:///../../../src/gameobjects/components/Transform.js","webpack:///../../../src/gameobjects/components/TransformMatrix.js","webpack:///../../../src/gameobjects/components/Visible.js","webpack:///../../../src/gameobjects/components/index.js","webpack:///../../../src/gameobjects/container/Container.js","webpack:///../../../src/gameobjects/container/ContainerRender.js","webpack:///../../../src/gameobjects/container/ContainerWebGLRenderer.js","webpack:///../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/DESTROY_EVENT.js","webpack:///../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/index.js","webpack:///../../../src/geom/const.js","webpack:///../../../src/geom/line/GetPoint.js","webpack:///../../../src/geom/line/GetPoints.js","webpack:///../../../src/geom/line/Length.js","webpack:///../../../src/geom/line/Line.js","webpack:///../../../src/geom/line/Random.js","webpack:///../../../src/geom/point/Point.js","webpack:///../../../src/geom/rectangle/Contains.js","webpack:///../../../src/geom/rectangle/GetPoint.js","webpack:///../../../src/geom/rectangle/GetPoints.js","webpack:///../../../src/geom/rectangle/Perimeter.js","webpack:///../../../src/geom/rectangle/Random.js","webpack:///../../../src/geom/rectangle/Rectangle.js","webpack:///../../../src/geom/rectangle/Union.js","webpack:///../../../src/loader/File.js","webpack:///../../../src/loader/FileTypesManager.js","webpack:///../../../src/loader/GetURL.js","webpack:///../../../src/loader/MergeXHRSettings.js","webpack:///../../../src/loader/MultiFile.js","webpack:///../../../src/loader/XHRLoader.js","webpack:///../../../src/loader/XHRSettings.js","webpack:///../../../src/loader/const.js","webpack:///../../../src/loader/events/ADD_EVENT.js","webpack:///../../../src/loader/events/COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_EVENT.js","webpack:///../../../src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///../../../src/loader/events/POST_PROCESS_EVENT.js","webpack:///../../../src/loader/events/PROGRESS_EVENT.js","webpack:///../../../src/loader/events/START_EVENT.js","webpack:///../../../src/loader/events/index.js","webpack:///../../../src/loader/filetypes/ImageFile.js","webpack:///../../../src/loader/filetypes/JSONFile.js","webpack:///../../../src/loader/filetypes/TextFile.js","webpack:///../../../src/math/Average.js","webpack:///../../../src/math/Bernstein.js","webpack:///../../../src/math/Between.js","webpack:///../../../src/math/CatmullRom.js","webpack:///../../../src/math/CeilTo.js","webpack:///../../../src/math/Clamp.js","webpack:///../../../src/math/DegToRad.js","webpack:///../../../src/math/Difference.js","webpack:///../../../src/math/Euler.js","webpack:///../../../src/math/Factorial.js","webpack:///../../../src/math/FloatBetween.js","webpack:///../../../src/math/FloorTo.js","webpack:///../../../src/math/FromPercent.js","webpack:///../../../src/math/GetSpeed.js","webpack:///../../../src/math/IsEven.js","webpack:///../../../src/math/IsEvenStrict.js","webpack:///../../../src/math/Linear.js","webpack:///../../../src/math/LinearXY.js","webpack:///../../../src/math/Matrix3.js","webpack:///../../../src/math/Matrix4.js","webpack:///../../../src/math/MaxAdd.js","webpack:///../../../src/math/Median.js","webpack:///../../../src/math/MinSub.js","webpack:///../../../src/math/Percent.js","webpack:///../../../src/math/Quaternion.js","webpack:///../../../src/math/RadToDeg.js","webpack:///../../../src/math/RandomXY.js","webpack:///../../../src/math/RandomXYZ.js","webpack:///../../../src/math/RandomXYZW.js","webpack:///../../../src/math/Rotate.js","webpack:///../../../src/math/RotateAround.js","webpack:///../../../src/math/RotateAroundDistance.js","webpack:///../../../src/math/RotateTo.js","webpack:///../../../src/math/RotateVec3.js","webpack:///../../../src/math/RoundAwayFromZero.js","webpack:///../../../src/math/RoundTo.js","webpack:///../../../src/math/SinCosTableGenerator.js","webpack:///../../../src/math/SmoothStep.js","webpack:///../../../src/math/SmootherStep.js","webpack:///../../../src/math/ToXY.js","webpack:///../../../src/math/TransformXY.js","webpack:///../../../src/math/Vector2.js","webpack:///../../../src/math/Vector3.js","webpack:///../../../src/math/Vector4.js","webpack:///../../../src/math/Within.js","webpack:///../../../src/math/Wrap.js","webpack:///../../../src/math/angle/Between.js","webpack:///../../../src/math/angle/BetweenPoints.js","webpack:///../../../src/math/angle/BetweenPointsY.js","webpack:///../../../src/math/angle/BetweenY.js","webpack:///../../../src/math/angle/CounterClockwise.js","webpack:///../../../src/math/angle/Normalize.js","webpack:///../../../src/math/angle/Random.js","webpack:///../../../src/math/angle/RandomDegrees.js","webpack:///../../../src/math/angle/Reverse.js","webpack:///../../../src/math/angle/RotateTo.js","webpack:///../../../src/math/angle/ShortestBetween.js","webpack:///../../../src/math/angle/Wrap.js","webpack:///../../../src/math/angle/WrapDegrees.js","webpack:///../../../src/math/angle/index.js","webpack:///../../../src/math/const.js","webpack:///../../../src/math/distance/DistanceBetween.js","webpack:///../../../src/math/distance/DistanceBetweenPoints.js","webpack:///../../../src/math/distance/DistanceBetweenPointsSquared.js","webpack:///../../../src/math/distance/DistanceChebyshev.js","webpack:///../../../src/math/distance/DistancePower.js","webpack:///../../../src/math/distance/DistanceSnake.js","webpack:///../../../src/math/distance/DistanceSquared.js","webpack:///../../../src/math/distance/index.js","webpack:///../../../src/math/easing/back/In.js","webpack:///../../../src/math/easing/back/InOut.js","webpack:///../../../src/math/easing/back/Out.js","webpack:///../../../src/math/easing/back/index.js","webpack:///../../../src/math/easing/bounce/In.js","webpack:///../../../src/math/easing/bounce/InOut.js","webpack:///../../../src/math/easing/bounce/Out.js","webpack:///../../../src/math/easing/bounce/index.js","webpack:///../../../src/math/easing/circular/In.js","webpack:///../../../src/math/easing/circular/InOut.js","webpack:///../../../src/math/easing/circular/Out.js","webpack:///../../../src/math/easing/circular/index.js","webpack:///../../../src/math/easing/cubic/In.js","webpack:///../../../src/math/easing/cubic/InOut.js","webpack:///../../../src/math/easing/cubic/Out.js","webpack:///../../../src/math/easing/cubic/index.js","webpack:///../../../src/math/easing/elastic/In.js","webpack:///../../../src/math/easing/elastic/InOut.js","webpack:///../../../src/math/easing/elastic/Out.js","webpack:///../../../src/math/easing/elastic/index.js","webpack:///../../../src/math/easing/expo/In.js","webpack:///../../../src/math/easing/expo/InOut.js","webpack:///../../../src/math/easing/expo/Out.js","webpack:///../../../src/math/easing/expo/index.js","webpack:///../../../src/math/easing/index.js","webpack:///../../../src/math/easing/linear/Linear.js","webpack:///../../../src/math/easing/linear/index.js","webpack:///../../../src/math/easing/quadratic/In.js","webpack:///../../../src/math/easing/quadratic/InOut.js","webpack:///../../../src/math/easing/quadratic/Out.js","webpack:///../../../src/math/easing/quadratic/index.js","webpack:///../../../src/math/easing/quartic/In.js","webpack:///../../../src/math/easing/quartic/InOut.js","webpack:///../../../src/math/easing/quartic/Out.js","webpack:///../../../src/math/easing/quartic/index.js","webpack:///../../../src/math/easing/quintic/In.js","webpack:///../../../src/math/easing/quintic/InOut.js","webpack:///../../../src/math/easing/quintic/Out.js","webpack:///../../../src/math/easing/quintic/index.js","webpack:///../../../src/math/easing/sine/In.js","webpack:///../../../src/math/easing/sine/InOut.js","webpack:///../../../src/math/easing/sine/Out.js","webpack:///../../../src/math/easing/sine/index.js","webpack:///../../../src/math/easing/stepped/Stepped.js","webpack:///../../../src/math/easing/stepped/index.js","webpack:///../../../src/math/fuzzy/Ceil.js","webpack:///../../../src/math/fuzzy/Equal.js","webpack:///../../../src/math/fuzzy/Floor.js","webpack:///../../../src/math/fuzzy/GreaterThan.js","webpack:///../../../src/math/fuzzy/LessThan.js","webpack:///../../../src/math/fuzzy/index.js","webpack:///../../../src/math/index.js","webpack:///../../../src/math/interpolation/BezierInterpolation.js","webpack:///../../../src/math/interpolation/CatmullRomInterpolation.js","webpack:///../../../src/math/interpolation/CubicBezierInterpolation.js","webpack:///../../../src/math/interpolation/LinearInterpolation.js","webpack:///../../../src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///../../../src/math/interpolation/SmoothStepInterpolation.js","webpack:///../../../src/math/interpolation/SmootherStepInterpolation.js","webpack:///../../../src/math/interpolation/index.js","webpack:///../../../src/math/pow2/GetPowerOfTwo.js","webpack:///../../../src/math/pow2/IsSizePowerOfTwo.js","webpack:///../../../src/math/pow2/IsValuePowerOfTwo.js","webpack:///../../../src/math/pow2/index.js","webpack:///../../../src/math/random-data-generator/RandomDataGenerator.js","webpack:///../../../src/math/snap/SnapCeil.js","webpack:///../../../src/math/snap/SnapFloor.js","webpack:///../../../src/math/snap/SnapTo.js","webpack:///../../../src/math/snap/index.js","webpack:///../../../src/plugins/BasePlugin.js","webpack:///../../../src/plugins/PluginCache.js","webpack:///../../../src/plugins/ScenePlugin.js","webpack:///../../../src/renderer/BlendModes.js","webpack:///../../../src/renderer/ScaleModes.js","webpack:///../../../src/scale/events/RESIZE_EVENT.js","webpack:///../../../src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/scene/events/BOOT_EVENT.js","webpack:///../../../src/scene/events/CREATE_EVENT.js","webpack:///../../../src/scene/events/DESTROY_EVENT.js","webpack:///../../../src/scene/events/PAUSE_EVENT.js","webpack:///../../../src/scene/events/POST_UPDATE_EVENT.js","webpack:///../../../src/scene/events/PRE_RENDER_EVENT.js","webpack:///../../../src/scene/events/PRE_UPDATE_EVENT.js","webpack:///../../../src/scene/events/READY_EVENT.js","webpack:///../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/scene/events/RENDER_EVENT.js","webpack:///../../../src/scene/events/RESUME_EVENT.js","webpack:///../../../src/scene/events/SHUTDOWN_EVENT.js","webpack:///../../../src/scene/events/SLEEP_EVENT.js","webpack:///../../../src/scene/events/START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///../../../src/scene/events/UPDATE_EVENT.js","webpack:///../../../src/scene/events/WAKE_EVENT.js","webpack:///../../../src/scene/events/index.js","webpack:///../../../src/textures/Frame.js","webpack:///../../../src/tweens/builders/GetBoolean.js","webpack:///../../../src/tweens/tween/const.js","webpack:///../../../src/utils/Class.js","webpack:///../../../src/utils/NOOP.js","webpack:///../../../src/utils/array/Add.js","webpack:///../../../src/utils/array/AddAt.js","webpack:///../../../src/utils/array/BringToTop.js","webpack:///../../../src/utils/array/CountAllMatching.js","webpack:///../../../src/utils/array/Each.js","webpack:///../../../src/utils/array/EachInRange.js","webpack:///../../../src/utils/array/FindClosestInSorted.js","webpack:///../../../src/utils/array/Flatten.js","webpack:///../../../src/utils/array/GetAll.js","webpack:///../../../src/utils/array/GetFirst.js","webpack:///../../../src/utils/array/GetRandom.js","webpack:///../../../src/utils/array/MoveAbove.js","webpack:///../../../src/utils/array/MoveBelow.js","webpack:///../../../src/utils/array/MoveDown.js","webpack:///../../../src/utils/array/MoveTo.js","webpack:///../../../src/utils/array/MoveUp.js","webpack:///../../../src/utils/array/NumberArray.js","webpack:///../../../src/utils/array/NumberArrayStep.js","webpack:///../../../src/utils/array/QuickSelect.js","webpack:///../../../src/utils/array/Range.js","webpack:///../../../src/utils/array/Remove.js","webpack:///../../../src/utils/array/RemoveAt.js","webpack:///../../../src/utils/array/RemoveBetween.js","webpack:///../../../src/utils/array/RemoveRandomElement.js","webpack:///../../../src/utils/array/Replace.js","webpack:///../../../src/utils/array/RotateLeft.js","webpack:///../../../src/utils/array/RotateRight.js","webpack:///../../../src/utils/array/SafeRange.js","webpack:///../../../src/utils/array/SendToBack.js","webpack:///../../../src/utils/array/SetAll.js","webpack:///../../../src/utils/array/Shuffle.js","webpack:///../../../src/utils/array/SortByDigits.js","webpack:///../../../src/utils/array/SpliceOne.js","webpack:///../../../src/utils/array/StableSort.js","webpack:///../../../src/utils/array/Swap.js","webpack:///../../../src/utils/array/index.js","webpack:///../../../src/utils/array/matrix/CheckMatrix.js","webpack:///../../../src/utils/array/matrix/MatrixToString.js","webpack:///../../../src/utils/array/matrix/ReverseColumns.js","webpack:///../../../src/utils/array/matrix/ReverseRows.js","webpack:///../../../src/utils/array/matrix/Rotate180.js","webpack:///../../../src/utils/array/matrix/RotateLeft.js","webpack:///../../../src/utils/array/matrix/RotateMatrix.js","webpack:///../../../src/utils/array/matrix/RotateRight.js","webpack:///../../../src/utils/array/matrix/TranslateMatrix.js","webpack:///../../../src/utils/array/matrix/TransposeMatrix.js","webpack:///../../../src/utils/array/matrix/index.js","webpack:///../../../src/utils/object/DeepCopy.js","webpack:///../../../src/utils/object/Extend.js","webpack:///../../../src/utils/object/GetAdvancedValue.js","webpack:///../../../src/utils/object/GetFastValue.js","webpack:///../../../src/utils/object/GetValue.js","webpack:///../../../src/utils/object/IsPlainObject.js","webpack:///../../../src/utils/string/Pad.js","webpack:///webpack/bootstrap","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["'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","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Animation = (function () {\r\n function Animation(name, timelines, duration) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (timelines == null)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n Animation.prototype.hasTimeline = function (id) {\r\n return this.timelineIds[id] == true;\r\n };\r\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n var timelines = this.timelines;\r\n for (var i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n };\r\n Animation.binarySearch = function (values, target, step) {\r\n if (step === void 0) { step = 1; }\r\n var low = 0;\r\n var high = values.length / step - 2;\r\n if (high == 0)\r\n return step;\r\n var current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high)\r\n return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n };\r\n Animation.linearSearch = function (values, target, step) {\r\n for (var i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target)\r\n return i;\r\n return -1;\r\n };\r\n return Animation;\r\n }());\r\n spine.Animation = Animation;\r\n var MixBlend;\r\n (function (MixBlend) {\r\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\r\n var MixDirection;\r\n (function (MixDirection) {\r\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n var TimelineType;\r\n (function (TimelineType) {\r\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n var CurveTimeline = (function () {\r\n function CurveTimeline(frameCount) {\r\n if (frameCount <= 0)\r\n throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n CurveTimeline.prototype.getFrameCount = function () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n };\r\n CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n };\r\n CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n };\r\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length)\r\n return CurveTimeline.LINEAR;\r\n var type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR)\r\n return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED)\r\n return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n };\r\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n var x = dfx, y = dfy;\r\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n };\r\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n percent = spine.MathUtils.clamp(percent, 0, 1);\r\n var curves = this.curves;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var type = curves[i];\r\n if (type == CurveTimeline.LINEAR)\r\n return percent;\r\n if (type == CurveTimeline.STEPPED)\r\n return 0;\r\n i++;\r\n var x = 0;\r\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n var prevX = void 0, prevY = void 0;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n }\r\n else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n var y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x);\r\n };\r\n CurveTimeline.LINEAR = 0;\r\n CurveTimeline.STEPPED = 1;\r\n CurveTimeline.BEZIER = 2;\r\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n return CurveTimeline;\r\n }());\r\n spine.CurveTimeline = CurveTimeline;\r\n var RotateTimeline = (function (_super) {\r\n __extends(RotateTimeline, _super);\r\n function RotateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n return _this;\r\n }\r\n RotateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n };\r\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n };\r\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n var r_1 = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r_2 * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r_2 += bone.data.rotation - bone.rotation;\r\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n case MixBlend.add:\r\n bone.rotation += r_2 * alpha;\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n };\r\n RotateTimeline.ENTRIES = 2;\r\n RotateTimeline.PREV_TIME = -2;\r\n RotateTimeline.PREV_ROTATION = -1;\r\n RotateTimeline.ROTATION = 1;\r\n return RotateTimeline;\r\n }(CurveTimeline));\r\n spine.RotateTimeline = RotateTimeline;\r\n var TranslateTimeline = (function (_super) {\r\n __extends(TranslateTimeline, _super);\r\n function TranslateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TranslateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n };\r\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n };\r\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n };\r\n TranslateTimeline.ENTRIES = 3;\r\n TranslateTimeline.PREV_TIME = -3;\r\n TranslateTimeline.PREV_X = -2;\r\n TranslateTimeline.PREV_Y = -1;\r\n TranslateTimeline.X = 1;\r\n TranslateTimeline.Y = 2;\r\n return TranslateTimeline;\r\n }(CurveTimeline));\r\n spine.TranslateTimeline = TranslateTimeline;\r\n var ScaleTimeline = (function (_super) {\r\n __extends(ScaleTimeline, _super);\r\n function ScaleTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ScaleTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n };\r\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n }\r\n else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n }\r\n else {\r\n var bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = spine.MathUtils.signum(x);\r\n by = spine.MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n };\r\n return ScaleTimeline;\r\n }(TranslateTimeline));\r\n spine.ScaleTimeline = ScaleTimeline;\r\n var ShearTimeline = (function (_super) {\r\n __extends(ShearTimeline, _super);\r\n function ShearTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ShearTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n };\r\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n };\r\n return ShearTimeline;\r\n }(TranslateTimeline));\r\n spine.ShearTimeline = ShearTimeline;\r\n var ColorTimeline = (function (_super) {\r\n __extends(ColorTimeline, _super);\r\n function ColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n ColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n };\r\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n };\r\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n var color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n var color = slot.color;\r\n if (blend == MixBlend.setup)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n };\r\n ColorTimeline.ENTRIES = 5;\r\n ColorTimeline.PREV_TIME = -5;\r\n ColorTimeline.PREV_R = -4;\r\n ColorTimeline.PREV_G = -3;\r\n ColorTimeline.PREV_B = -2;\r\n ColorTimeline.PREV_A = -1;\r\n ColorTimeline.R = 1;\r\n ColorTimeline.G = 2;\r\n ColorTimeline.B = 3;\r\n ColorTimeline.A = 4;\r\n return ColorTimeline;\r\n }(CurveTimeline));\r\n spine.ColorTimeline = ColorTimeline;\r\n var TwoColorTimeline = (function (_super) {\r\n __extends(TwoColorTimeline, _super);\r\n function TwoColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TwoColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n };\r\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n };\r\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n }\r\n else {\r\n var light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n };\r\n TwoColorTimeline.ENTRIES = 8;\r\n TwoColorTimeline.PREV_TIME = -8;\r\n TwoColorTimeline.PREV_R = -7;\r\n TwoColorTimeline.PREV_G = -6;\r\n TwoColorTimeline.PREV_B = -5;\r\n TwoColorTimeline.PREV_A = -4;\r\n TwoColorTimeline.PREV_R2 = -3;\r\n TwoColorTimeline.PREV_G2 = -2;\r\n TwoColorTimeline.PREV_B2 = -1;\r\n TwoColorTimeline.R = 1;\r\n TwoColorTimeline.G = 2;\r\n TwoColorTimeline.B = 3;\r\n TwoColorTimeline.A = 4;\r\n TwoColorTimeline.R2 = 5;\r\n TwoColorTimeline.G2 = 6;\r\n TwoColorTimeline.B2 = 7;\r\n return TwoColorTimeline;\r\n }(CurveTimeline));\r\n spine.TwoColorTimeline = TwoColorTimeline;\r\n var AttachmentTimeline = (function () {\r\n function AttachmentTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n AttachmentTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n };\r\n AttachmentTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n };\r\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frameIndex = 0;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n var attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n return AttachmentTimeline;\r\n }());\r\n spine.AttachmentTimeline = AttachmentTimeline;\r\n var zeros = null;\r\n var DeformTimeline = (function (_super) {\r\n __extends(DeformTimeline, _super);\r\n function DeformTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount);\r\n _this.frameVertices = new Array(frameCount);\r\n if (zeros == null)\r\n zeros = spine.Utils.newFloatArray(64);\r\n return _this;\r\n }\r\n DeformTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n };\r\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n };\r\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var slotAttachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\r\n return;\r\n var deformArray = slot.deform;\r\n if (deformArray.length == 0)\r\n blend = MixBlend.setup;\r\n var frameVertices = this.frameVertices;\r\n var vertexCount = frameVertices[0].length;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n var vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n }\r\n else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) {\r\n var lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n }\r\n }\r\n else {\r\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n deform[i_2] += lastVertices[i_2];\r\n }\r\n }\r\n else {\r\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_1 = slotAttachment;\r\n if (vertexAttachment_1.bones == null) {\r\n var setupVertices = vertexAttachment_1.vertices;\r\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n var setup = setupVertices[i_3];\r\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n deform[i_4] = lastVertices[i_4] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n deform[i_7] += lastVertices[i_7] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time);\r\n var prevVertices = frameVertices[frame - 1];\r\n var nextVertices = frameVertices[frame];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n var prev = prevVertices[i_8];\r\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n }\r\n }\r\n else {\r\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n var prev = prevVertices[i_9];\r\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n var prev = prevVertices[i_10];\r\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_2 = slotAttachment;\r\n if (vertexAttachment_2.bones == null) {\r\n var setupVertices = vertexAttachment_2.vertices;\r\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n var prev = prevVertices[i_12];\r\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n var prev = prevVertices[i_13];\r\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n var prev = prevVertices[i_14];\r\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n var prev = prevVertices[i_15];\r\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n return DeformTimeline;\r\n }(CurveTimeline));\r\n spine.DeformTimeline = DeformTimeline;\r\n var EventTimeline = (function () {\r\n function EventTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n EventTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.event << 24;\r\n };\r\n EventTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n };\r\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (firedEvents == null)\r\n return;\r\n var frames = this.frames;\r\n var frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n }\r\n else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n var frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n var frameTime = frames[frame];\r\n while (frame > 0) {\r\n if (frames[frame - 1] != frameTime)\r\n break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n };\r\n return EventTimeline;\r\n }());\r\n spine.EventTimeline = EventTimeline;\r\n var DrawOrderTimeline = (function () {\r\n function DrawOrderTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n DrawOrderTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.drawOrder << 24;\r\n };\r\n DrawOrderTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n };\r\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var drawOrder = skeleton.drawOrder;\r\n var slots = skeleton.slots;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frame = 0;\r\n if (time >= frames[frames.length - 1])\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n var drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n };\r\n return DrawOrderTimeline;\r\n }());\r\n spine.DrawOrderTimeline = DrawOrderTimeline;\r\n var IkConstraintTimeline = (function (_super) {\r\n __extends(IkConstraintTimeline, _super);\r\n function IkConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n IkConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n };\r\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n };\r\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n };\r\n IkConstraintTimeline.ENTRIES = 6;\r\n IkConstraintTimeline.PREV_TIME = -6;\r\n IkConstraintTimeline.PREV_MIX = -5;\r\n IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n IkConstraintTimeline.PREV_COMPRESS = -2;\r\n IkConstraintTimeline.PREV_STRETCH = -1;\r\n IkConstraintTimeline.MIX = 1;\r\n IkConstraintTimeline.SOFTNESS = 2;\r\n IkConstraintTimeline.BEND_DIRECTION = 3;\r\n IkConstraintTimeline.COMPRESS = 4;\r\n IkConstraintTimeline.STRETCH = 5;\r\n return IkConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.IkConstraintTimeline = IkConstraintTimeline;\r\n var TransformConstraintTimeline = (function (_super) {\r\n __extends(TransformConstraintTimeline, _super);\r\n function TransformConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n };\r\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n };\r\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n var data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n };\r\n TransformConstraintTimeline.ENTRIES = 5;\r\n TransformConstraintTimeline.PREV_TIME = -5;\r\n TransformConstraintTimeline.PREV_ROTATE = -4;\r\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n TransformConstraintTimeline.PREV_SCALE = -2;\r\n TransformConstraintTimeline.PREV_SHEAR = -1;\r\n TransformConstraintTimeline.ROTATE = 1;\r\n TransformConstraintTimeline.TRANSLATE = 2;\r\n TransformConstraintTimeline.SCALE = 3;\r\n TransformConstraintTimeline.SHEAR = 4;\r\n return TransformConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n var PathConstraintPositionTimeline = (function (_super) {\r\n __extends(PathConstraintPositionTimeline, _super);\r\n function PathConstraintPositionTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n };\r\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n var position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n };\r\n PathConstraintPositionTimeline.ENTRIES = 2;\r\n PathConstraintPositionTimeline.PREV_TIME = -2;\r\n PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n PathConstraintPositionTimeline.VALUE = 1;\r\n return PathConstraintPositionTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n var PathConstraintSpacingTimeline = (function (_super) {\r\n __extends(PathConstraintSpacingTimeline, _super);\r\n function PathConstraintSpacingTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n var spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n };\r\n return PathConstraintSpacingTimeline;\r\n }(PathConstraintPositionTimeline));\r\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n var PathConstraintMixTimeline = (function (_super) {\r\n __extends(PathConstraintMixTimeline, _super);\r\n function PathConstraintMixTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n };\r\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n };\r\n PathConstraintMixTimeline.ENTRIES = 3;\r\n PathConstraintMixTimeline.PREV_TIME = -3;\r\n PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n PathConstraintMixTimeline.ROTATE = 1;\r\n PathConstraintMixTimeline.TRANSLATE = 2;\r\n return PathConstraintMixTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationState = (function () {\r\n function AnimationState(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new spine.IntSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n this.data = data;\r\n }\r\n AnimationState.prototype.update = function (delta) {\r\n delta *= this.timeScale;\r\n var tracks = this.tracks;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n var currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n var next = current.next;\r\n if (next != null) {\r\n var nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n }\r\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n var from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null)\r\n from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n var from = to.mixingFrom;\r\n if (from == null)\r\n return true;\r\n var finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n };\r\n AnimationState.prototype.apply = function (skeleton) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n var events = this.events;\r\n var tracks = this.tracks;\r\n var applied = false;\r\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\r\n var current = tracks[i_16];\r\n if (current == null || current.delay > 0)\r\n continue;\r\n applied = true;\r\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\r\n var mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n var timelineCount = current.animation.timelines.length;\r\n var timelines = current.animation.timelines;\r\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n else {\r\n var timelineMode = current.timelineMode;\r\n var firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = current.timelinesRotation;\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n var timeline_1 = timelines[ii];\r\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\r\n if (timeline_1 instanceof spine.RotateTimeline) {\r\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n }\r\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\r\n }\r\n else {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n };\r\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n var from = to.mixingFrom;\r\n if (from.mixingFrom != null)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n var mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == spine.MixBlend.first)\r\n blend = spine.MixBlend.setup;\r\n }\r\n else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != spine.MixBlend.first)\r\n blend = from.mixBlend;\r\n }\r\n var events = mix < from.eventThreshold ? this.events : null;\r\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n var timelineCount = from.animation.timelines.length;\r\n var timelines = from.animation.timelines;\r\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == spine.MixBlend.add) {\r\n for (var i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\r\n }\r\n else {\r\n var timelineMode = from.timelineMode;\r\n var timelineHoldMix = from.timelineHoldMix;\r\n var firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = from.timelinesRotation;\r\n from.totalAlpha = 0;\r\n for (var i = 0; i < timelineCount; i++) {\r\n var timeline = timelines[i];\r\n var direction = spine.MixDirection.mixOut;\r\n var timelineBlend = void 0;\r\n var alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = spine.MixBlend.setup;\r\n var holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof spine.RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n spine.Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\r\n direction = spine.MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n };\r\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = timeline.frames;\r\n if (time < frames[0]) {\r\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n };\r\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n };\r\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\r\n return;\r\n }\r\n var rotateTimeline = timeline;\r\n var frames = rotateTimeline.frames;\r\n var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n var r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case spine.MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case spine.MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n }\r\n else {\r\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n else {\r\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n var total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n }\r\n else {\r\n var lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n }\r\n else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n var current = diff > 0, dir = lastTotal >= 0;\r\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * spine.MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n };\r\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n var duration = animationEnd - animationStart;\r\n var trackLastWrapped = entry.trackLast % duration;\r\n var events = this.events;\r\n var i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n var event_1 = events[i];\r\n if (event_1.time < trackLastWrapped)\r\n break;\r\n if (event_1.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event_1);\r\n }\r\n var complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n var event_2 = events[i];\r\n if (event_2.time < animationStart)\r\n continue;\r\n this.queue.event(entry, events[i]);\r\n }\r\n };\r\n AnimationState.prototype.clearTracks = function () {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.clearTrack = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n var current = this.tracks[trackIndex];\r\n if (current == null)\r\n return;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n var entry = current;\r\n while (true) {\r\n var from = entry.mixingFrom;\r\n if (from == null)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n var from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n if (from != null) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n };\r\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n };\r\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var interrupt = true;\r\n var current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n }\r\n else\r\n this.disposeNext(current);\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n };\r\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n };\r\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n }\r\n else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n var duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n }\r\n else\r\n delay = last.trackTime;\r\n }\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n if (delay <= 0)\r\n delay -= mixDuration;\r\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var current = this.tracks[i];\r\n if (current != null)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.expandToIndex = function (index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n };\r\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n var entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = spine.MixBlend.replace;\r\n return entry;\r\n };\r\n AnimationState.prototype.disposeNext = function (entry) {\r\n var next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n };\r\n AnimationState.prototype._animationsChanged = function () {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var entry = this.tracks[i];\r\n if (entry == null)\r\n continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null);\r\n }\r\n };\r\n AnimationState.prototype.computeHold = function (entry) {\r\n var to = entry.mixingTo;\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n var propertyIDs = this.propertyIDs;\r\n if (to != null && to.holdPrevious) {\r\n for (var i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n outer: for (var i = 0; i < timelinesCount; i++) {\r\n var timeline = timelines[i];\r\n var id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\r\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n }\r\n else {\r\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.getCurrent = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n };\r\n AnimationState.prototype.addListener = function (listener) {\r\n if (listener == null)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n };\r\n AnimationState.prototype.removeListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n };\r\n AnimationState.prototype.clearListeners = function () {\r\n this.listeners.length = 0;\r\n };\r\n AnimationState.prototype.clearListenerNotifications = function () {\r\n this.queue.clear();\r\n };\r\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n AnimationState.SUBSEQUENT = 0;\r\n AnimationState.FIRST = 1;\r\n AnimationState.HOLD_SUBSEQUENT = 2;\r\n AnimationState.HOLD_FIRST = 3;\r\n AnimationState.HOLD_MIX = 4;\r\n AnimationState.SETUP = 1;\r\n AnimationState.CURRENT = 2;\r\n return AnimationState;\r\n }());\r\n spine.AnimationState = AnimationState;\r\n var TrackEntry = (function () {\r\n function TrackEntry() {\r\n this.mixBlend = spine.MixBlend.replace;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n TrackEntry.prototype.reset = function () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n };\r\n TrackEntry.prototype.getAnimationTime = function () {\r\n if (this.loop) {\r\n var duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n };\r\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n };\r\n TrackEntry.prototype.isComplete = function () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n };\r\n TrackEntry.prototype.resetRotationDirections = function () {\r\n this.timelinesRotation.length = 0;\r\n };\r\n return TrackEntry;\r\n }());\r\n spine.TrackEntry = TrackEntry;\r\n var EventQueue = (function () {\r\n function EventQueue(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n EventQueue.prototype.start = function (entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.interrupt = function (entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.end = function (entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.dispose = function (entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.complete = function (entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.event = function (entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n };\r\n EventQueue.prototype.drain = function () {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n var objects = this.objects;\r\n var listeners = this.animState.listeners;\r\n for (var i = 0; i < objects.length; i += 2) {\r\n var type = objects[i];\r\n var entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start)\r\n listeners[ii].start(entry);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt)\r\n listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end)\r\n listeners[ii].end(entry);\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose)\r\n listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete)\r\n listeners[ii].complete(entry);\r\n break;\r\n case EventType.event:\r\n var event_3 = objects[i++ + 2];\r\n if (entry.listener != null && entry.listener.event)\r\n entry.listener.event(entry, event_3);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event)\r\n listeners[ii].event(entry, event_3);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n };\r\n EventQueue.prototype.clear = function () {\r\n this.objects.length = 0;\r\n };\r\n return EventQueue;\r\n }());\r\n spine.EventQueue = EventQueue;\r\n var EventType;\r\n (function (EventType) {\r\n EventType[EventType[\"start\"] = 0] = \"start\";\r\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType[EventType[\"end\"] = 2] = \"end\";\r\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n EventType[EventType[\"event\"] = 5] = \"event\";\r\n })(EventType = spine.EventType || (spine.EventType = {}));\r\n var AnimationStateAdapter = (function () {\r\n function AnimationStateAdapter() {\r\n }\r\n AnimationStateAdapter.prototype.start = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.end = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.dispose = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.complete = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.event = function (entry, event) {\r\n };\r\n return AnimationStateAdapter;\r\n }());\r\n spine.AnimationStateAdapter = AnimationStateAdapter;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationStateData = (function () {\r\n function AnimationStateData(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (skeletonData == null)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n var from = this.skeletonData.findAnimation(fromName);\r\n if (from == null)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n var to = this.skeletonData.findAnimation(toName);\r\n if (to == null)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n };\r\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n if (from == null)\r\n throw new Error(\"from cannot be null.\");\r\n if (to == null)\r\n throw new Error(\"to cannot be null.\");\r\n var key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n };\r\n AnimationStateData.prototype.getMix = function (from, to) {\r\n var key = from.name + \".\" + to.name;\r\n var value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n };\r\n return AnimationStateData;\r\n }());\r\n spine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AssetManager = (function () {\r\n function AssetManager(textureLoader, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.rawDataUris = {};\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n }\r\n AssetManager.prototype.downloadText = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(request.responseText);\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.downloadBinary = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(new Uint8Array(request.response));\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.setRawDataURI = function (path, data) {\r\n this.rawDataUris[this.pathPrefix + path] = data;\r\n };\r\n AssetManager.prototype.loadBinary = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadBinary(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadText = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadTexture = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n var storagePath = path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[storagePath] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \".concat(path));\r\n };\r\n if (this.rawDataUris[path])\r\n path = this.rawDataUris[path];\r\n img.src = path;\r\n };\r\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (atlasData) {\r\n var pagesLoaded = { count: 0 };\r\n var atlasPages = new Array();\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\r\n var image = document.createElement(\"img\");\r\n image.width = 16;\r\n image.height = 16;\r\n return new spine.FakeTexture(image);\r\n });\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n return;\r\n }\r\n var _loop_1 = function (atlasPage) {\r\n var pageLoadError = false;\r\n _this.loadTexture(atlasPage, function (imagePath, image) {\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n if (!pageLoadError) {\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\r\n });\r\n _this.assets[path] = atlas;\r\n if (success)\r\n success(path, atlas);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(path));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n }, function (imagePath, errorMessage) {\r\n pageLoadError = true;\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(path));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n });\r\n };\r\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n var atlasPage = atlasPages_1[_i];\r\n _loop_1(atlasPage);\r\n }\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.get = function (path) {\r\n path = this.pathPrefix + path;\r\n return this.assets[path];\r\n };\r\n AssetManager.prototype.remove = function (path) {\r\n path = this.pathPrefix + path;\r\n var asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n this.assets[path] = null;\r\n };\r\n AssetManager.prototype.removeAll = function () {\r\n for (var key in this.assets) {\r\n var asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n };\r\n AssetManager.prototype.isLoadingComplete = function () {\r\n return this.toLoad == 0;\r\n };\r\n AssetManager.prototype.getToLoad = function () {\r\n return this.toLoad;\r\n };\r\n AssetManager.prototype.getLoaded = function () {\r\n return this.loaded;\r\n };\r\n AssetManager.prototype.dispose = function () {\r\n this.removeAll();\r\n };\r\n AssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n AssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return AssetManager;\r\n }());\r\n spine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AtlasAttachmentLoader = (function () {\r\n function AtlasAttachmentLoader(atlas) {\r\n this.atlas = atlas;\r\n }\r\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.RegionAttachment(name);\r\n attachment.setRegion(region);\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n return new spine.BoundingBoxAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n return new spine.PathAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n return new spine.PointAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n return new spine.ClippingAttachment(name);\r\n };\r\n return AtlasAttachmentLoader;\r\n }());\r\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BlendMode;\r\n (function (BlendMode) {\r\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Bone = (function () {\r\n function Bone(data, skeleton, parent) {\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.appliedValid = false;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n Bone.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n Bone.prototype.update = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransform = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n var skeleton = this.skeleton;\r\n var rotationY = rotation + 90 + shearY;\r\n var sx = skeleton.scaleX;\r\n var sy = skeleton.scaleY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case spine.TransformMode.Normal: {\r\n var rotationY = rotation + 90 + shearY;\r\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case spine.TransformMode.OnlyTranslation: {\r\n var rotationY = rotation + 90 + shearY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case spine.TransformMode.NoRotationOrReflection: {\r\n var s = pa * pa + pc * pc;\r\n var prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n }\r\n var rx = rotation + shearX - prx;\r\n var ry = rotation + shearY - prx + 90;\r\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection: {\r\n var cos = spine.MathUtils.cosDeg(rotation);\r\n var sin = spine.MathUtils.sinDeg(rotation);\r\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n var s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == spine.TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n var r = Math.PI / 2 + Math.atan2(zc, za);\r\n var zb = Math.cos(r) * s;\r\n var zd = Math.sin(r) * s;\r\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n };\r\n Bone.prototype.setToSetupPose = function () {\r\n var data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n };\r\n Bone.prototype.getWorldRotationX = function () {\r\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldRotationY = function () {\r\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldScaleX = function () {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n };\r\n Bone.prototype.getWorldScaleY = function () {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n };\r\n Bone.prototype.updateAppliedTransform = function () {\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n this.ax = this.worldX;\r\n this.ay = this.worldY;\r\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n var pid = 1 / (pa * pd - pb * pc);\r\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = (dx * pd * pid - dy * pb * pid);\r\n this.ay = (dy * pa * pid - dx * pc * pid);\r\n var ia = pid * pd;\r\n var id = pid * pa;\r\n var ib = pid * pb;\r\n var ic = pid * pc;\r\n var ra = ia * this.a - ib * this.c;\r\n var rb = ia * this.b - ib * this.d;\r\n var rc = id * this.c - ic * this.a;\r\n var rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n var det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n }\r\n };\r\n Bone.prototype.worldToLocal = function (world) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var invDet = 1 / (a * d - b * c);\r\n var x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n };\r\n Bone.prototype.localToWorld = function (local) {\r\n var x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n };\r\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\r\n };\r\n Bone.prototype.localToWorldRotation = function (localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.rotateWorld = function (degrees) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n };\r\n return Bone;\r\n }());\r\n spine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoneData = (function () {\r\n function BoneData(index, name, parent) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new spine.Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n return BoneData;\r\n }());\r\n spine.BoneData = BoneData;\r\n var TransformMode;\r\n (function (TransformMode) {\r\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ConstraintData = (function () {\r\n function ConstraintData(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n return ConstraintData;\r\n }());\r\n spine.ConstraintData = ConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Event = (function () {\r\n function Event(time, data) {\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n return Event;\r\n }());\r\n spine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var EventData = (function () {\r\n function EventData(name) {\r\n this.name = name;\r\n }\r\n return EventData;\r\n }());\r\n spine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraint = (function () {\r\n function IkConstraint(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n IkConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n IkConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n IkConstraint.prototype.update = function () {\r\n var target = this.target;\r\n var bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n };\r\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var p = bone.parent;\r\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case spine.TransformMode.NoRotationOrReflection:\r\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n var sa = pa / bone.skeleton.scaleX;\r\n var sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\r\n default:\r\n var x = targetX - p.worldX, y = targetY - p.worldY;\r\n var d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n var sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n var s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n };\r\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid)\r\n parent.updateAppliedTransform();\r\n if (!child.appliedValid)\r\n child.updateAppliedTransform();\r\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n var os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n }\r\n else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n }\r\n else\r\n os2 = 0;\r\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n var u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n }\r\n else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n var pp = parent.parent;\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n var dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n var p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer: if (u) {\r\n l2 *= psx;\r\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch)\r\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n }\r\n else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n var c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n var q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) / 2;\r\n var r0 = q / c2, r1 = c / q;\r\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n }\r\n else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n var os = Math.atan2(cy, cx) * s2;\r\n var rotation = parent.arotation;\r\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n };\r\n return IkConstraint;\r\n }());\r\n spine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraintData = (function (_super) {\r\n __extends(IkConstraintData, _super);\r\n function IkConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.bendDirection = 1;\r\n _this.compress = false;\r\n _this.stretch = false;\r\n _this.uniform = false;\r\n _this.mix = 1;\r\n _this.softness = 0;\r\n return _this;\r\n }\r\n return IkConstraintData;\r\n }(spine.ConstraintData));\r\n spine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraint = (function () {\r\n function PathConstraint(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n PathConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n PathConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n PathConstraint.prototype.update = function () {\r\n var attachment = this.target.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n var translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate)\r\n return;\r\n var data = this.data;\r\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\r\n var rotateMode = data.rotateMode;\r\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n var bones = this.bones;\r\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n var spacing = this.spacing;\r\n if (scale || !percentSpacing) {\r\n if (scale)\r\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\r\n for (var i = 0, n = spacesCount - 1; i < n;) {\r\n var bone = bones[i];\r\n var setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = 0;\r\n }\r\n else if (percentSpacing) {\r\n if (scale) {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_1 = Math.sqrt(x * x + y * y);\r\n lengths[i] = length_1;\r\n }\r\n spaces[++i] = spacing;\r\n }\r\n else {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_2 = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length_2;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\r\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n var tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == spine.RotateMode.Chain;\r\n else {\r\n tip = false;\r\n var p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n }\r\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n var bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * translateMix;\r\n bone.worldY += (boneY - bone.worldY) * translateMix;\r\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n var length_3 = lengths[i];\r\n if (length_3 != 0) {\r\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n var length_4 = bone.data.length;\r\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\r\n }\r\n else {\r\n r += offsetRotation;\r\n }\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n };\r\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n var target = this.target;\r\n var position = this.position;\r\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n var closed = path.closed;\r\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n var lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n var pathLength_1 = lengths[curveCount];\r\n if (percentPosition)\r\n position *= pathLength_1;\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength_1;\r\n }\r\n world = spine.Utils.setArraySize(this.world, 8);\r\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength_1;\r\n if (p < 0)\r\n p += pathLength_1;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength_1) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_5 = lengths[curve];\r\n if (p > length_5)\r\n continue;\r\n if (curve == 0)\r\n p /= length_5;\r\n else {\r\n var prev = lengths[curve - 1];\r\n p = (p - prev) / (length_5 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n }\r\n else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n if (closed) {\r\n verticesLength += 2;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n }\r\n else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n var pathLength = 0;\r\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition)\r\n position *= pathLength;\r\n else\r\n position *= pathLength / path.lengths[curveCount - 1];\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n var segments = this.segments;\r\n var curveLength = 0;\r\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_6 = curves[curve];\r\n if (p > length_6)\r\n continue;\r\n if (curve == 0)\r\n p /= length_6;\r\n else {\r\n var prev = curves[curve - 1];\r\n p = (p - prev) / (length_6 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n var ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (;; segment++) {\r\n var length_7 = segments[segment];\r\n if (p > length_7)\r\n continue;\r\n if (segment == 0)\r\n p /= length_7;\r\n else {\r\n var prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length_7 - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n };\r\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 0.001)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n };\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 0.00001;\r\n return PathConstraint;\r\n }());\r\n spine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraintData = (function (_super) {\r\n __extends(PathConstraintData, _super);\r\n function PathConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n return _this;\r\n }\r\n return PathConstraintData;\r\n }(spine.ConstraintData));\r\n spine.PathConstraintData = PathConstraintData;\r\n var PositionMode;\r\n (function (PositionMode) {\r\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n var SpacingMode;\r\n (function (SpacingMode) {\r\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n var RotateMode;\r\n (function (RotateMode) {\r\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Assets = (function () {\r\n function Assets(clientId) {\r\n this.toLoad = new Array();\r\n this.assets = {};\r\n this.clientId = clientId;\r\n }\r\n Assets.prototype.loaded = function () {\r\n var i = 0;\r\n for (var v in this.assets)\r\n i++;\r\n return i;\r\n };\r\n return Assets;\r\n }());\r\n var SharedAssetManager = (function () {\r\n function SharedAssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.clientAssets = {};\r\n this.queuedAssets = {};\r\n this.rawAssets = {};\r\n this.errors = {};\r\n this.pathPrefix = pathPrefix;\r\n }\r\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined) {\r\n clientAssets = new Assets(clientId);\r\n this.clientAssets[clientId] = clientAssets;\r\n }\r\n if (textureLoader !== null)\r\n clientAssets.textureLoader = textureLoader;\r\n clientAssets.toLoad.push(path);\r\n if (this.queuedAssets[path] === path) {\r\n return false;\r\n }\r\n else {\r\n this.queuedAssets[path] = path;\r\n return true;\r\n }\r\n };\r\n SharedAssetManager.prototype.loadText = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = request.responseText;\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(request.status, \", \").concat(request.responseText);\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = JSON.parse(request.responseText);\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(request.status, \", \").concat(request.responseText);\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, textureLoader, path))\r\n return;\r\n var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n if (isWebWorker) {\r\n var options = { mode: \"cors\" };\r\n fetch(path, options).then(function (response) {\r\n if (!response.ok) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n }\r\n return response.blob();\r\n }).then(function (blob) {\r\n return createImageBitmap(blob, {\r\n premultiplyAlpha: 'none',\r\n colorSpaceConversion: 'none'\r\n });\r\n }).then(function (bitmap) {\r\n _this.rawAssets[path] = bitmap;\r\n });\r\n }\r\n else {\r\n var img_1 = new Image();\r\n img_1.crossOrigin = \"anonymous\";\r\n img_1.onload = function (ev) {\r\n _this.rawAssets[path] = img_1;\r\n };\r\n img_1.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n };\r\n img_1.src = path;\r\n }\r\n };\r\n SharedAssetManager.prototype.get = function (clientId, path) {\r\n path = this.pathPrefix + path;\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n return clientAssets.assets[path];\r\n };\r\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n var path = clientAssets.toLoad[i];\r\n var asset = clientAssets.assets[path];\r\n if (asset === null || asset === undefined) {\r\n var rawAsset = this.rawAssets[path];\r\n if (rawAsset === null || rawAsset === undefined)\r\n continue;\r\n if (isWebWorker) {\r\n if (rawAsset instanceof ImageBitmap) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n else {\r\n if (rawAsset instanceof HTMLImageElement) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n this.updateClientAssets(clientAssets);\r\n return clientAssets.toLoad.length == clientAssets.loaded();\r\n };\r\n SharedAssetManager.prototype.dispose = function () {\r\n };\r\n SharedAssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n SharedAssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return SharedAssetManager;\r\n }());\r\n spine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Skeleton = (function () {\r\n function Skeleton(data) {\r\n this._updateCache = new Array();\r\n this.updateCacheReset = new Array();\r\n this.time = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++) {\r\n var boneData = data.bones[i];\r\n var bone = void 0;\r\n if (boneData.parent == null)\r\n bone = new spine.Bone(boneData, this, null);\r\n else {\r\n var parent_1 = this.bones[boneData.parent.index];\r\n bone = new spine.Bone(boneData, this, parent_1);\r\n parent_1.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (var i = 0; i < data.slots.length; i++) {\r\n var slotData = data.slots[i];\r\n var bone = this.bones[slotData.boneData.index];\r\n var slot = new spine.Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (var i = 0; i < data.ikConstraints.length; i++) {\r\n var ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (var i = 0; i < data.transformConstraints.length; i++) {\r\n var transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (var i = 0; i < data.pathConstraints.length; i++) {\r\n var pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n Skeleton.prototype.updateCache = function () {\r\n var updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin != null) {\r\n var skinBones = this.skin.bones;\r\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n var bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n var ikConstraints = this.ikConstraints;\r\n var transformConstraints = this.transformConstraints;\r\n var pathConstraints = this.pathConstraints;\r\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n var constraintCount = ikCount + transformCount + pathCount;\r\n outer: for (var i = 0; i < constraintCount; i++) {\r\n for (var ii = 0; ii < ikCount; ii++) {\r\n var constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < transformCount; ii++) {\r\n var constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < pathCount; ii++) {\r\n var constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n };\r\n Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var target = constraint.target;\r\n this.sortBone(target);\r\n var constrained = constraint.bones;\r\n var parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length > 1) {\r\n var child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var slot = constraint.target;\r\n var slotIndex = slot.data.index;\r\n var slotBone = slot.bone;\r\n if (this.skin != null)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (var i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n };\r\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (var i = 0; i < boneCount; i++) {\r\n var child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n var attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (var key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var pathBones = attachment.bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n var bones = this.bones;\r\n var i = 0;\r\n while (i < pathBones.length) {\r\n var boneCount = pathBones[i++];\r\n for (var n = i + boneCount; i < n; i++) {\r\n var boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n };\r\n Skeleton.prototype.sortBone = function (bone) {\r\n if (bone.sorted)\r\n return;\r\n var parent = bone.parent;\r\n if (parent != null)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n };\r\n Skeleton.prototype.sortReset = function (bones) {\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n };\r\n Skeleton.prototype.updateWorldTransform = function () {\r\n var updateCacheReset = this.updateCacheReset;\r\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n var bone = updateCacheReset[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n var updateCache = this._updateCache;\r\n for (var i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n };\r\n Skeleton.prototype.setToSetupPose = function () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n };\r\n Skeleton.prototype.setBonesToSetupPose = function () {\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n var data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n };\r\n Skeleton.prototype.setSlotsToSetupPose = function () {\r\n var slots = this.slots;\r\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n };\r\n Skeleton.prototype.getRootBone = function () {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n };\r\n Skeleton.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.setSkinByName = function (skinName) {\r\n var skin = this.data.findSkin(skinName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n };\r\n Skeleton.prototype.setSkin = function (newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var name_1 = slot.data.attachmentName;\r\n if (name_1 != null) {\r\n var attachment = newSkin.getAttachment(i, name_1);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n };\r\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n };\r\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n if (attachmentName == null)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin != null)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n };\r\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n var attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n };\r\n Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n if (temp === void 0) { temp = new Array(2); }\r\n if (offset == null)\r\n throw new Error(\"offset cannot be null.\");\r\n if (size == null)\r\n throw new Error(\"size cannot be null.\");\r\n var drawOrder = this.drawOrder;\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var verticesLength = 0;\r\n var vertices = null;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n };\r\n Skeleton.prototype.update = function (delta) {\r\n this.time += delta;\r\n };\r\n return Skeleton;\r\n }());\r\n spine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBinary = (function () {\r\n function SkeletonBinary(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n skeletonData.name = \"\";\r\n var input = new BinaryInput(binary);\r\n skeletonData.hash = input.readString();\r\n skeletonData.version = input.readString();\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n var nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n var n = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n input.strings.push(input.readString());\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var name_2 = input.readString();\r\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n var data = new spine.BoneData(i, name_2, parent_2);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var slotName = input.readString();\r\n var boneData = skeletonData.bones[input.readInt(true)];\r\n var data = new spine.SlotData(i, slotName, boneData);\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n var darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.IkConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.TransformConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n data.scaleMix = input.readFloat();\r\n data.shearMix = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.PathConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin != null) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n var i = skeletonData.skins.length;\r\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++)\r\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n }\r\n n = this.linkedMeshes.length;\r\n for (var i = 0; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_3 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_3);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var data = new spine.EventData(input.readStringRef());\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath != null) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n return skeletonData;\r\n };\r\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n var skin = null;\r\n var slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new spine.Skin(\"default\");\r\n }\r\n else {\r\n skin = new spine.Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (var i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (var i = 0; i < slotCount; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var name_3 = input.readStringRef();\r\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\r\n if (attachment != null)\r\n skin.setAttachment(slotIndex, name_3, attachment);\r\n }\r\n }\r\n return skin;\r\n };\r\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n var scale = this.scale;\r\n var name = input.readStringRef();\r\n if (name == null)\r\n name = attachmentName;\r\n var typeIndex = input.readByte();\r\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n switch (type) {\r\n case spine.AttachmentType.Region: {\r\n var path = input.readStringRef();\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var scaleX = input.readFloat();\r\n var scaleY = input.readFloat();\r\n var width = input.readFloat();\r\n var height = input.readFloat();\r\n var color = input.readInt32();\r\n if (path == null)\r\n path = name;\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n spine.Color.rgba8888ToColor(region.color, color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case spine.AttachmentType.BoundingBox: {\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case spine.AttachmentType.Mesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var vertexCount = input.readInt(true);\r\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n var triangles = this.readShortArray(input);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var hullLength = input.readInt(true);\r\n var edges = null;\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.hullLength = hullLength << 1;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case spine.AttachmentType.LinkedMesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var skinName = input.readStringRef();\r\n var parent_4 = input.readStringRef();\r\n var inheritDeform = input.readBoolean();\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\r\n return mesh;\r\n }\r\n case spine.AttachmentType.Path: {\r\n var closed_1 = input.readBoolean();\r\n var constantSpeed = input.readBoolean();\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n var color = nonessential ? input.readInt32() : 0;\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = closed_1;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case spine.AttachmentType.Point: {\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var color = nonessential ? input.readInt32() : 0;\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case spine.AttachmentType.Clipping: {\r\n var endSlotIndex = input.readInt(true);\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n var verticesLength = vertexCount << 1;\r\n var vertices = new Vertices();\r\n var scale = this.scale;\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n var weights = new Array();\r\n var bonesArray = new Array();\r\n for (var i = 0; i < vertexCount; i++) {\r\n var boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (var ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = spine.Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n };\r\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n var array = new Array(n);\r\n if (scale == 1) {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n }\r\n else {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readShortArray = function (input) {\r\n var n = input.readInt(true);\r\n var array = new Array(n);\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n var timelines = new Array();\r\n var scale = this.scale;\r\n var duration = 0;\r\n var tempColor1 = new spine.Color();\r\n var tempColor2 = new spine.Color();\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.SLOT_ATTACHMENT: {\r\n var timeline = new spine.AttachmentTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_COLOR: {\r\n var timeline = new spine.ColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_TWO_COLOR: {\r\n var timeline = new spine.TwoColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var boneIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.BONE_ROTATE: {\r\n var timeline = new spine.RotateTimeline(frameCount);\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.BONE_TRANSLATE:\r\n case SkeletonBinary.BONE_SCALE:\r\n case SkeletonBinary.BONE_SHEAR: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.BONE_SCALE)\r\n timeline = new spine.ScaleTimeline(frameCount);\r\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n timeline = new spine.ShearTimeline(frameCount);\r\n else {\r\n timeline = new spine.TranslateTimeline(frameCount);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.IkConstraintTimeline(frameCount);\r\n timeline.ikConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.TransformConstraintTimeline(frameCount);\r\n timeline.transformConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.PATH_POSITION:\r\n case SkeletonBinary.PATH_SPACING: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.PATH_MIX: {\r\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var skin = skeletonData.skins[input.readInt(true)];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var slotIndex = input.readInt(true);\r\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.DeformTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n var deform = void 0;\r\n var end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n }\r\n else {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (var v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, time, deform);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n }\r\n }\r\n }\r\n var drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\r\n var slotCount = skeletonData.slots.length;\r\n for (var i = 0; i < drawOrderCount; i++) {\r\n var time = input.readFloat();\r\n var offsetCount = input.readInt(true);\r\n var drawOrder = spine.Utils.newArray(slotCount, 0);\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var ii = 0; ii < offsetCount; ii++) {\r\n var slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n }\r\n var eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n var timeline = new spine.EventTimeline(eventCount);\r\n for (var i = 0; i < eventCount; i++) {\r\n var time = input.readFloat();\r\n var eventData = skeletonData.events[input.readInt(true)];\r\n var event_4 = new spine.Event(time, eventData);\r\n event_4.intValue = input.readInt(false);\r\n event_4.floatValue = input.readFloat();\r\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event_4.data.audioPath != null) {\r\n event_4.volume = input.readFloat();\r\n event_4.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event_4);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n }\r\n return new spine.Animation(name, timelines, duration);\r\n };\r\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n switch (input.readByte()) {\r\n case SkeletonBinary.CURVE_STEPPED:\r\n timeline.setStepped(frameIndex);\r\n break;\r\n case SkeletonBinary.CURVE_BEZIER:\r\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n break;\r\n }\r\n };\r\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n };\r\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\r\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\r\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\r\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\r\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\r\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\r\n SkeletonBinary.BONE_ROTATE = 0;\r\n SkeletonBinary.BONE_TRANSLATE = 1;\r\n SkeletonBinary.BONE_SCALE = 2;\r\n SkeletonBinary.BONE_SHEAR = 3;\r\n SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n SkeletonBinary.SLOT_COLOR = 1;\r\n SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n SkeletonBinary.PATH_POSITION = 0;\r\n SkeletonBinary.PATH_SPACING = 1;\r\n SkeletonBinary.PATH_MIX = 2;\r\n SkeletonBinary.CURVE_LINEAR = 0;\r\n SkeletonBinary.CURVE_STEPPED = 1;\r\n SkeletonBinary.CURVE_BEZIER = 2;\r\n return SkeletonBinary;\r\n }());\r\n spine.SkeletonBinary = SkeletonBinary;\r\n var BinaryInput = (function () {\r\n function BinaryInput(data, strings, index, buffer) {\r\n if (strings === void 0) { strings = new Array(); }\r\n if (index === void 0) { index = 0; }\r\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n BinaryInput.prototype.readByte = function () {\r\n return this.buffer.getInt8(this.index++);\r\n };\r\n BinaryInput.prototype.readShort = function () {\r\n var value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt32 = function () {\r\n var value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt = function (optimizePositive) {\r\n var b = this.readByte();\r\n var result = b & 0x7F;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 7;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 14;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 21;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n };\r\n BinaryInput.prototype.readStringRef = function () {\r\n var index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n };\r\n BinaryInput.prototype.readString = function () {\r\n var byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n var chars = \"\";\r\n var charCount = 0;\r\n for (var i = 0; i < byteCount;) {\r\n var b = this.readByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n };\r\n BinaryInput.prototype.readFloat = function () {\r\n var value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readBoolean = function () {\r\n return this.readByte() != 0;\r\n };\r\n return BinaryInput;\r\n }());\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n var Vertices = (function () {\r\n function Vertices(bones, vertices) {\r\n if (bones === void 0) { bones = null; }\r\n if (vertices === void 0) { vertices = null; }\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n return Vertices;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBounds = (function () {\r\n function SkeletonBounds() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return spine.Utils.newFloatArray(16);\r\n });\r\n }\r\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n var boundingBoxes = this.boundingBoxes;\r\n var polygons = this.polygons;\r\n var polygonPool = this.polygonPool;\r\n var slots = skeleton.slots;\r\n var slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (var i = 0; i < slotCount; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.BoundingBoxAttachment) {\r\n var boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n var polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n }\r\n else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n };\r\n SkeletonBounds.prototype.aabbCompute = function () {\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n var vertices = polygon;\r\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n var x = vertices[ii];\r\n var y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n };\r\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n var minX = this.minX;\r\n var minY = this.minY;\r\n var maxX = this.maxX;\r\n var maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n var m = (y2 - y1) / (x2 - x1);\r\n var y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n var x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n };\r\n SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var prevIndex = nn - 2;\r\n var inside = false;\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var vertexY = vertices[ii + 1];\r\n var prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n var vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n };\r\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var width12 = x1 - x2, height12 = y1 - y2;\r\n var det1 = x1 * y2 - y1 * x2;\r\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n var det2 = x3 * y4 - y3 * x4;\r\n var width34 = x3 - x4, height34 = y3 - y4;\r\n var det3 = width12 * height34 - height12 * width34;\r\n var x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n var y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n };\r\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n if (boundingBox == null)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n var index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n };\r\n SkeletonBounds.prototype.getWidth = function () {\r\n return this.maxX - this.minX;\r\n };\r\n SkeletonBounds.prototype.getHeight = function () {\r\n return this.maxY - this.minY;\r\n };\r\n return SkeletonBounds;\r\n }());\r\n spine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonClipping = (function () {\r\n function SkeletonClipping() {\r\n this.triangulator = new spine.Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n }\r\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n if (this.clipAttachment != null)\r\n return 0;\r\n this.clipAttachment = clip;\r\n var n = clip.worldVerticesLength;\r\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n var clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\r\n var polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n };\r\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n };\r\n SkeletonClipping.prototype.clipEnd = function () {\r\n if (this.clipAttachment == null)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n };\r\n SkeletonClipping.prototype.isClipping = function () {\r\n return this.clipAttachment != null;\r\n };\r\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n var clippedTriangles = this.clippedTriangles;\r\n var polygons = this.clippingPolygons;\r\n var polygonsCount = this.clippingPolygons.length;\r\n var vertexSize = twoColor ? 12 : 8;\r\n var index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer: for (var i = 0; i < trianglesLength; i += 3) {\r\n var vertexOffset = triangles[i] << 1;\r\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (var p = 0; p < polygonsCount; p++) {\r\n var s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n var clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n var clipOutputCount = clipOutputLength >> 1;\r\n var clipOutputItems = this.clipOutput;\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n var c0 = x - x3, c1 = y - y3;\r\n var a = (d0 * c0 + d1 * c1) * d;\r\n var b = (d4 * c0 + d2 * c1) * d;\r\n var c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (var ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + ii);\r\n clippedTrianglesItems[s + 2] = (index + ii + 1);\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n }\r\n else {\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n }\r\n else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + 1);\r\n clippedTrianglesItems[s + 2] = (index + 2);\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n };\r\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n var originalOutput = output;\r\n var clipped = false;\r\n var input = null;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n }\r\n else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n var clippingVertices = clippingArea;\r\n var clippingVerticesLast = clippingArea.length - 4;\r\n for (var i = 0;; i += 2) {\r\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n var inputVertices = input;\r\n var inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n }\r\n else if (side2) {\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n var temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (var i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n }\r\n else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n };\r\n SkeletonClipping.makeClockwise = function (polygon) {\r\n var vertices = polygon;\r\n var verticeslength = polygon.length;\r\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n var x = vertices[i], y = vertices[i + 1];\r\n var other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n };\r\n return SkeletonClipping;\r\n }());\r\n spine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonData = (function () {\r\n function SkeletonData() {\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.fps = 0;\r\n }\r\n SkeletonData.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSkin = function (skinName) {\r\n if (skinName == null)\r\n throw new Error(\"skinName cannot be null.\");\r\n var skins = this.skins;\r\n for (var i = 0, n = skins.length; i < n; i++) {\r\n var skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findEvent = function (eventDataName) {\r\n if (eventDataName == null)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n var events = this.events;\r\n for (var i = 0, n = events.length; i < n; i++) {\r\n var event_5 = events[i];\r\n if (event_5.name == eventDataName)\r\n return event_5;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findAnimation = function (animationName) {\r\n if (animationName == null)\r\n throw new Error(\"animationName cannot be null.\");\r\n var animations = this.animations;\r\n for (var i = 0, n = animations.length; i < n; i++) {\r\n var animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n if (pathConstraintName == null)\r\n throw new Error(\"pathConstraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName)\r\n return i;\r\n return -1;\r\n };\r\n return SkeletonData;\r\n }());\r\n spine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonJson = (function () {\r\n function SkeletonJson(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonJson.prototype.readSkeletonData = function (json) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n var skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (var i = 0; i < root.bones.length; i++) {\r\n var boneMap = root.bones[i];\r\n var parent_5 = null;\r\n var parentName = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent_5 = skeletonData.findBone(parentName);\r\n if (parent_5 == null)\r\n throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (var i = 0; i < root.slots.length; i++) {\r\n var slotMap = root.slots[i];\r\n var slotName = slotMap.name;\r\n var boneName = slotMap.bone;\r\n var boneData = skeletonData.findBone(boneName);\r\n if (boneData == null)\r\n throw new Error(\"Slot bone not found: \" + boneName);\r\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n var color = this.getValue(slotMap, \"color\", null);\r\n if (color != null)\r\n data.color.setFromString(color);\r\n var dark = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new spine.Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (var i = 0; i < root.ik.length; i++) {\r\n var constraintMap = root.ik[i];\r\n var data = new spine.IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"IK target bone not found: \" + targetName);\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (var i = 0; i < root.transform.length; i++) {\r\n var constraintMap = root.transform[i];\r\n var data = new spine.TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (var i = 0; i < root.path.length; i++) {\r\n var constraintMap = root.path[i];\r\n var data = new spine.PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Path target slot not found: \" + targetName);\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (var i = 0; i < root.skins.length; i++) {\r\n var skinMap = root.skins[i];\r\n var skin = new spine.Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null)\r\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (var slotName in skinMap.attachments) {\r\n var slot = skeletonData.findSlot(slotName);\r\n if (slot == null)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n var slotMap = skinMap.attachments[slotName];\r\n for (var entryName in slotMap) {\r\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_6 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_6);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (var eventName in root.events) {\r\n var eventMap = root.events[eventName];\r\n var data = new spine.EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (var animationName in root.animations) {\r\n var animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n };\r\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n var scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n var type = this.getValue(map, \"type\", \"region\");\r\n switch (type) {\r\n case \"region\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n region.color.setFromString(color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n mesh.color.setFromString(color);\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n var parent_7 = this.getValue(map, \"parent\", null);\r\n if (parent_7 != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n var uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n var end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n var slot = skeletonData.findSlot(end);\r\n if (slot == null)\r\n throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n var scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n var vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n var scaledVertices = spine.Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (var i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n var weights = new Array();\r\n var bones = new Array();\r\n for (var i = 0, n = vertices.length; i < n;) {\r\n var boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = spine.Utils.toFloatArray(weights);\r\n };\r\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n var scale = this.scale;\r\n var timelines = new Array();\r\n var duration = 0;\r\n if (map.slots) {\r\n for (var slotName in map.slots) {\r\n var slotMap = map.slots[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n else if (timelineName == \"color\") {\r\n var timeline = new spine.ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var color = new spine.Color();\r\n color.setFromString(valueMap.color);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n }\r\n else if (timelineName == \"twoColor\") {\r\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var light = new spine.Color();\r\n var dark = new spine.Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (var boneName in map.bones) {\r\n var boneMap = map.bones[boneName];\r\n var boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n for (var timelineName in boneMap) {\r\n var timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n var timeline = new spine.RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n var timeline = null;\r\n var timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new spine.ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n }\r\n else if (timelineName === \"shear\")\r\n timeline = new spine.ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new spine.TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (var constraintName in map.ik) {\r\n var constraintMap = map.ik[constraintName];\r\n var constraint = skeletonData.findIkConstraint(constraintName);\r\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.transform) {\r\n for (var constraintName in map.transform) {\r\n var constraintMap = map.transform[constraintName];\r\n var constraint = skeletonData.findTransformConstraint(constraintName);\r\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.path) {\r\n for (var constraintName in map.path) {\r\n var constraintMap = map.path[constraintName];\r\n var index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var timelineName in constraintMap) {\r\n var timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n var timeline = null;\r\n var timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"mix\") {\r\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n if (map.deform) {\r\n for (var deformName in map.deform) {\r\n var deformMap = map.deform[deformName];\r\n var skin = skeletonData.findSkin(deformName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + deformName);\r\n for (var slotName in deformMap) {\r\n var slotMap = deformMap[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n var attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null)\r\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var timeline = new spine.DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n var frameIndex = 0;\r\n for (var j = 0; j < timelineMap.length; j++) {\r\n var valueMap = timelineMap[j];\r\n var deform = void 0;\r\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = this.getValue(valueMap, \"offset\", 0);\r\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (var i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n var drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null)\r\n drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n var slotCount = skeletonData.slots.length;\r\n var frameIndex = 0;\r\n for (var j = 0; j < drawOrderNode.length; j++) {\r\n var drawOrderMap = drawOrderNode[j];\r\n var drawOrder = null;\r\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = spine.Utils.newArray(slotCount, -1);\r\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var i = 0; i < offsets.length; i++) {\r\n var offsetMap = offsets[i];\r\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1)\r\n drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (map.events) {\r\n var timeline = new spine.EventTimeline(map.events.length);\r\n var frameIndex = 0;\r\n for (var i = 0; i < map.events.length; i++) {\r\n var eventMap = map.events[i];\r\n var eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event_6.data.audioPath != null) {\r\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\r\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event_6);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n };\r\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n if (!map.hasOwnProperty(\"curve\"))\r\n return;\r\n if (map.curve == \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n var curve = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n };\r\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n };\r\n SkeletonJson.blendModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.BlendMode.Normal;\r\n if (str == \"additive\")\r\n return spine.BlendMode.Additive;\r\n if (str == \"multiply\")\r\n return spine.BlendMode.Multiply;\r\n if (str == \"screen\")\r\n return spine.BlendMode.Screen;\r\n throw new Error(\"Unknown blend mode: \".concat(str));\r\n };\r\n SkeletonJson.positionModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\")\r\n return spine.PositionMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.PositionMode.Percent;\r\n throw new Error(\"Unknown position mode: \".concat(str));\r\n };\r\n SkeletonJson.spacingModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"length\")\r\n return spine.SpacingMode.Length;\r\n if (str == \"fixed\")\r\n return spine.SpacingMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.SpacingMode.Percent;\r\n throw new Error(\"Unknown position mode: \".concat(str));\r\n };\r\n SkeletonJson.rotateModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\")\r\n return spine.RotateMode.Tangent;\r\n if (str == \"chain\")\r\n return spine.RotateMode.Chain;\r\n if (str == \"chainscale\")\r\n return spine.RotateMode.ChainScale;\r\n throw new Error(\"Unknown rotate mode: \".concat(str));\r\n };\r\n SkeletonJson.transformModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.TransformMode.Normal;\r\n if (str == \"onlytranslation\")\r\n return spine.TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\")\r\n return spine.TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\")\r\n return spine.TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\")\r\n return spine.TransformMode.NoScaleOrReflection;\r\n throw new Error(\"Unknown transform mode: \".concat(str));\r\n };\r\n return SkeletonJson;\r\n }());\r\n spine.SkeletonJson = SkeletonJson;\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkinEntry = (function () {\r\n function SkinEntry(slotIndex, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n return SkinEntry;\r\n }());\r\n spine.SkinEntry = SkinEntry;\r\n var Skin = (function () {\r\n function Skin(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n if (attachment == null)\r\n throw new Error(\"attachment cannot be null.\");\r\n var attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n };\r\n Skin.prototype.addSkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n };\r\n Skin.prototype.copySkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null)\r\n continue;\r\n if (attachment.attachment instanceof spine.MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n };\r\n Skin.prototype.getAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n };\r\n Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n dictionary[name] = null;\r\n };\r\n Skin.prototype.getAttachments = function () {\r\n var entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n var slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (var name_4 in slotAttachments) {\r\n var attachment = slotAttachments[name_4];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name_4, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n };\r\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n var slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (var name_5 in slotAttachments) {\r\n var attachment = slotAttachments[name_5];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\r\n }\r\n }\r\n };\r\n Skin.prototype.clear = function () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n };\r\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n var slotIndex = 0;\r\n for (var i = 0; i < skeleton.slots.length; i++) {\r\n var slot = skeleton.slots[i];\r\n var slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n var dictionary = oldSkin.attachments[slotIndex];\r\n for (var key in dictionary) {\r\n var skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n var attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n };\r\n return Skin;\r\n }());\r\n spine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Slot = (function () {\r\n function Slot(data, bone) {\r\n this.deform = new Array();\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (bone == null)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new spine.Color();\r\n this.darkColor = data.darkColor == null ? null : new spine.Color();\r\n this.setToSetupPose();\r\n }\r\n Slot.prototype.getSkeleton = function () {\r\n return this.bone.skeleton;\r\n };\r\n Slot.prototype.getAttachment = function () {\r\n return this.attachment;\r\n };\r\n Slot.prototype.setAttachment = function (attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n };\r\n Slot.prototype.setAttachmentTime = function (time) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n };\r\n Slot.prototype.getAttachmentTime = function () {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n };\r\n Slot.prototype.setToSetupPose = function () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n };\r\n return Slot;\r\n }());\r\n spine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SlotData = (function () {\r\n function SlotData(index, name, boneData) {\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (boneData == null)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n return SlotData;\r\n }());\r\n spine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Texture = (function () {\r\n function Texture(image) {\r\n this._image = image;\r\n }\r\n Texture.prototype.getImage = function () {\r\n return this._image;\r\n };\r\n Texture.filterFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(\"Unknown texture filter \".concat(text));\r\n }\r\n };\r\n Texture.wrapFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(\"Unknown texture wrap \".concat(text));\r\n }\r\n };\r\n return Texture;\r\n }());\r\n spine.Texture = Texture;\r\n var TextureFilter;\r\n (function (TextureFilter) {\r\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n var TextureWrap;\r\n (function (TextureWrap) {\r\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n var TextureRegion = (function () {\r\n function TextureRegion() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.rotate = false;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n return TextureRegion;\r\n }());\r\n spine.TextureRegion = TextureRegion;\r\n var FakeTexture = (function (_super) {\r\n __extends(FakeTexture, _super);\r\n function FakeTexture() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n FakeTexture.prototype.dispose = function () { };\r\n return FakeTexture;\r\n }(Texture));\r\n spine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TextureAtlas = (function () {\r\n function TextureAtlas(atlasText, textureLoader) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n this.load(atlasText, textureLoader);\r\n }\r\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n var reader = new TextureAtlasReader(atlasText);\r\n var tuple = new Array(4);\r\n var page = null;\r\n while (true) {\r\n var line = reader.readLine();\r\n if (line == null)\r\n break;\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n if (reader.readTuple(tuple) == 2) {\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n reader.readTuple(tuple);\r\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n var direction = reader.readValue();\r\n page.uWrap = spine.TextureWrap.ClampToEdge;\r\n page.vWrap = spine.TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n page.texture = textureLoader(line);\r\n page.texture.setFilters(page.minFilter, page.magFilter);\r\n page.texture.setWraps(page.uWrap, page.vWrap);\r\n page.width = page.texture.getImage().width;\r\n page.height = page.texture.getImage().height;\r\n this.pages.push(page);\r\n }\r\n else {\r\n var region = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n var rotateValue = reader.readValue();\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n region.degrees = 90;\r\n }\r\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n region.degrees = 0;\r\n }\r\n else {\r\n region.degrees = parseFloat(rotateValue);\r\n }\r\n region.rotate = region.degrees == 90;\r\n reader.readTuple(tuple);\r\n var x = parseInt(tuple[0]);\r\n var y = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n var width = parseInt(tuple[0]);\r\n var height = parseInt(tuple[1]);\r\n region.u = x / page.width;\r\n region.v = y / page.height;\r\n if (region.rotate) {\r\n region.u2 = (x + height) / page.width;\r\n region.v2 = (y + width) / page.height;\r\n }\r\n else {\r\n region.u2 = (x + width) / page.width;\r\n region.v2 = (y + height) / page.height;\r\n }\r\n region.x = x;\r\n region.y = y;\r\n region.width = Math.abs(width);\r\n region.height = Math.abs(height);\r\n if (reader.readTuple(tuple) == 4) {\r\n if (reader.readTuple(tuple) == 4) {\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n region.originalWidth = parseInt(tuple[0]);\r\n region.originalHeight = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n region.offsetX = parseInt(tuple[0]);\r\n region.offsetY = parseInt(tuple[1]);\r\n region.index = parseInt(reader.readValue());\r\n region.texture = page.texture;\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n TextureAtlas.prototype.findRegion = function (name) {\r\n for (var i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n };\r\n TextureAtlas.prototype.dispose = function () {\r\n for (var i = 0; i < this.pages.length; i++) {\r\n this.pages[i].texture.dispose();\r\n }\r\n };\r\n return TextureAtlas;\r\n }());\r\n spine.TextureAtlas = TextureAtlas;\r\n var TextureAtlasReader = (function () {\r\n function TextureAtlasReader(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n TextureAtlasReader.prototype.readLine = function () {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n };\r\n TextureAtlasReader.prototype.readValue = function () {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n };\r\n TextureAtlasReader.prototype.readTuple = function (tuple) {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n var i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n var comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1)\r\n break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n };\r\n return TextureAtlasReader;\r\n }());\r\n var TextureAtlasPage = (function () {\r\n function TextureAtlasPage() {\r\n }\r\n return TextureAtlasPage;\r\n }());\r\n spine.TextureAtlasPage = TextureAtlasPage;\r\n var TextureAtlasRegion = (function (_super) {\r\n __extends(TextureAtlasRegion, _super);\r\n function TextureAtlasRegion() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return TextureAtlasRegion;\r\n }(spine.TextureRegion));\r\n spine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraint = (function () {\r\n function TransformConstraint(data, skeleton) {\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.scaleMix = 0;\r\n this.shearMix = 0;\r\n this.temp = new spine.Vector2();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n TransformConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n TransformConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n TransformConstraint.prototype.update = function () {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n }\r\n else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * translateMix;\r\n bone.worldY += (temp.y - bone.worldY) * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n var ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var b = bone.b, d = bone.d;\r\n var by = Math.atan2(d, b);\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * translateMix;\r\n bone.worldY += temp.y * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n var b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n var r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0) {\r\n var r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0)\r\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001)\r\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0)\r\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n return TransformConstraint;\r\n }());\r\n spine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraintData = (function (_super) {\r\n __extends(TransformConstraintData, _super);\r\n function TransformConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.rotateMix = 0;\r\n _this.translateMix = 0;\r\n _this.scaleMix = 0;\r\n _this.shearMix = 0;\r\n _this.offsetRotation = 0;\r\n _this.offsetX = 0;\r\n _this.offsetY = 0;\r\n _this.offsetScaleX = 0;\r\n _this.offsetScaleY = 0;\r\n _this.offsetShearY = 0;\r\n _this.relative = false;\r\n _this.local = false;\r\n return _this;\r\n }\r\n return TransformConstraintData;\r\n }(spine.ConstraintData));\r\n spine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Triangulator = (function () {\r\n function Triangulator() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n }\r\n Triangulator.prototype.triangulate = function (verticesArray) {\r\n var vertices = verticesArray;\r\n var vertexCount = verticesArray.length >> 1;\r\n var indices = this.indicesArray;\r\n indices.length = 0;\r\n for (var i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n var isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (var i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n var triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n var previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer: if (!isConcave[i]) {\r\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n var v = indices[ii] << 1;\r\n var vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n var previousIndex = (vertexCount + i - 1) % vertexCount;\r\n var nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n };\r\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\r\n var vertices = verticesArray;\r\n var convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n var convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n var polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n var polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n var fanBaseIndex = -1, lastWinding = 0;\r\n for (var i = 0, n = triangles.length; i < n; i += 3) {\r\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n var merged = false;\r\n if (fanBaseIndex == t1) {\r\n var o = polygon.length - 4;\r\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n var firstIndex = polygonIndices[0];\r\n var lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n var o = polygon.length - 4;\r\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n var firstX = polygon[0], firstY = polygon[1];\r\n var secondX = polygon[2], secondY = polygon[3];\r\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (var ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n var otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n var otherFirstIndex = otherIndices[0];\r\n var otherSecondIndex = otherIndices[1];\r\n var otherLastIndex = otherIndices[2];\r\n var otherPoly = convexPolygons[ii];\r\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n };\r\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n var current = indices[index] << 1;\r\n var next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n };\r\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n };\r\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n var px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n };\r\n return Triangulator;\r\n }());\r\n spine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IntSet = (function () {\r\n function IntSet() {\r\n this.array = new Array();\r\n }\r\n IntSet.prototype.add = function (value) {\r\n var contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n };\r\n IntSet.prototype.contains = function (value) {\r\n return this.array[value | 0] != undefined;\r\n };\r\n IntSet.prototype.remove = function (value) {\r\n this.array[value | 0] = undefined;\r\n };\r\n IntSet.prototype.clear = function () {\r\n this.array.length = 0;\r\n };\r\n return IntSet;\r\n }());\r\n spine.IntSet = IntSet;\r\n var Color = (function () {\r\n function Color(r, g, b, a) {\r\n if (r === void 0) { r = 0; }\r\n if (g === void 0) { g = 0; }\r\n if (b === void 0) { b = 0; }\r\n if (a === void 0) { a = 0; }\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n Color.prototype.set = function (r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.setFromColor = function (c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n };\r\n Color.prototype.setFromString = function (hex) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n };\r\n Color.prototype.add = function (r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.clamp = function () {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n };\r\n Color.rgba8888ToColor = function (color, value) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.rgb888ToColor = function (color, value) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.WHITE = new Color(1, 1, 1, 1);\r\n Color.RED = new Color(1, 0, 0, 1);\r\n Color.GREEN = new Color(0, 1, 0, 1);\r\n Color.BLUE = new Color(0, 0, 1, 1);\r\n Color.MAGENTA = new Color(1, 0, 1, 1);\r\n return Color;\r\n }());\r\n spine.Color = Color;\r\n var MathUtils = (function () {\r\n function MathUtils() {\r\n }\r\n MathUtils.clamp = function (value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n MathUtils.cosDeg = function (degrees) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.sinDeg = function (degrees) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.signum = function (value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n };\r\n MathUtils.toInt = function (x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n };\r\n MathUtils.cbrt = function (x) {\r\n var y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n };\r\n MathUtils.randomTriangular = function (min, max) {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n };\r\n MathUtils.randomTriangularWith = function (min, max, mode) {\r\n var u = Math.random();\r\n var d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n };\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n MathUtils.degRad = MathUtils.degreesToRadians;\r\n return MathUtils;\r\n }());\r\n spine.MathUtils = MathUtils;\r\n var Interpolation = (function () {\r\n function Interpolation() {\r\n }\r\n Interpolation.prototype.apply = function (start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n };\r\n return Interpolation;\r\n }());\r\n spine.Interpolation = Interpolation;\r\n var Pow = (function (_super) {\r\n __extends(Pow, _super);\r\n function Pow(power) {\r\n var _this = _super.call(this) || this;\r\n _this.power = 2;\r\n _this.power = power;\r\n return _this;\r\n }\r\n Pow.prototype.applyInternal = function (a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n };\r\n return Pow;\r\n }(Interpolation));\r\n spine.Pow = Pow;\r\n var PowOut = (function (_super) {\r\n __extends(PowOut, _super);\r\n function PowOut(power) {\r\n return _super.call(this, power) || this;\r\n }\r\n PowOut.prototype.applyInternal = function (a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n };\r\n return PowOut;\r\n }(Pow));\r\n spine.PowOut = PowOut;\r\n var Utils = (function () {\r\n function Utils() {\r\n }\r\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n };\r\n Utils.setArraySize = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n var oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (var i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n };\r\n Utils.ensureArrayCapacity = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n if (array.length >= size)\r\n return array;\r\n return Utils.setArraySize(array, size, value);\r\n };\r\n Utils.newArray = function (size, defaultValue) {\r\n var array = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n };\r\n Utils.newFloatArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.newShortArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.toFloatArray = function (array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n };\r\n Utils.toSinglePrecision = function (value) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n };\r\n Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n };\r\n Utils.contains = function (array, element, identity) {\r\n if (identity === void 0) { identity = true; }\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] == element)\r\n return true;\r\n }\r\n return false;\r\n };\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n return Utils;\r\n }());\r\n spine.Utils = Utils;\r\n var DebugUtils = (function () {\r\n function DebugUtils() {\r\n }\r\n DebugUtils.logBones = function (skeleton) {\r\n for (var i = 0; i < skeleton.bones.length; i++) {\r\n var bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n };\r\n return DebugUtils;\r\n }());\r\n spine.DebugUtils = DebugUtils;\r\n var Pool = (function () {\r\n function Pool(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n Pool.prototype.obtain = function () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n };\r\n Pool.prototype.free = function (item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n };\r\n Pool.prototype.freeAll = function (items) {\r\n for (var i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n };\r\n Pool.prototype.clear = function () {\r\n this.items.length = 0;\r\n };\r\n return Pool;\r\n }());\r\n spine.Pool = Pool;\r\n var Vector2 = (function () {\r\n function Vector2(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n }\r\n Vector2.prototype.set = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2.prototype.length = function () {\r\n var x = this.x;\r\n var y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n };\r\n Vector2.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n };\r\n return Vector2;\r\n }());\r\n spine.Vector2 = Vector2;\r\n var TimeKeeper = (function () {\r\n function TimeKeeper() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1000;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n TimeKeeper.prototype.update = function () {\r\n var now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n };\r\n return TimeKeeper;\r\n }());\r\n spine.TimeKeeper = TimeKeeper;\r\n var WindowedMean = (function () {\r\n function WindowedMean(windowSize) {\r\n if (windowSize === void 0) { windowSize = 32; }\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n WindowedMean.prototype.hasEnoughData = function () {\r\n return this.addedValues >= this.values.length;\r\n };\r\n WindowedMean.prototype.addValue = function (value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n };\r\n WindowedMean.prototype.getMean = function () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n var mean = 0;\r\n for (var i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n return WindowedMean;\r\n }());\r\n spine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n if (!Math.fround) {\r\n Math.fround = (function (array) {\r\n return function (x) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Attachment = (function () {\r\n function Attachment(name) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n return Attachment;\r\n }());\r\n spine.Attachment = Attachment;\r\n var VertexAttachment = (function (_super) {\r\n __extends(VertexAttachment, _super);\r\n function VertexAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n _this.worldVerticesLength = 0;\r\n _this.deformAttachment = _this;\r\n return _this;\r\n }\r\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n var skeleton = slot.bone.skeleton;\r\n var deformArray = slot.deform;\r\n var vertices = this.vertices;\r\n var bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n var bone = slot.bone;\r\n var x = bone.worldX;\r\n var y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n var v = 0, skip = 0;\r\n for (var i = 0; i < start; i += 2) {\r\n var n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n var skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n else {\r\n var deform = deformArray;\r\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n };\r\n VertexAttachment.prototype.copyTo = function (attachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n }\r\n else\r\n attachment.bones = null;\r\n if (this.vertices != null) {\r\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\r\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n else\r\n attachment.vertices = null;\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n };\r\n VertexAttachment.nextID = 0;\r\n return VertexAttachment;\r\n }(Attachment));\r\n spine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AttachmentType;\r\n (function (AttachmentType) {\r\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoundingBoxAttachment = (function (_super) {\r\n __extends(BoundingBoxAttachment, _super);\r\n function BoundingBoxAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n BoundingBoxAttachment.prototype.copy = function () {\r\n var copy = new BoundingBoxAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return BoundingBoxAttachment;\r\n }(spine.VertexAttachment));\r\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ClippingAttachment = (function (_super) {\r\n __extends(ClippingAttachment, _super);\r\n function ClippingAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n return _this;\r\n }\r\n ClippingAttachment.prototype.copy = function () {\r\n var copy = new ClippingAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return ClippingAttachment;\r\n }(spine.VertexAttachment));\r\n spine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var MeshAttachment = (function (_super) {\r\n __extends(MeshAttachment, _super);\r\n function MeshAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.tempColor = new spine.Color(0, 0, 0, 0);\r\n return _this;\r\n }\r\n MeshAttachment.prototype.updateUVs = function () {\r\n var regionUVs = this.regionUVs;\r\n if (this.uvs == null || this.uvs.length != regionUVs.length)\r\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n var uvs = this.uvs;\r\n var n = this.uvs.length;\r\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof spine.TextureAtlasRegion) {\r\n var region = this.region;\r\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n }\r\n else if (this.region == null) {\r\n u = v = 0;\r\n width = height = 1;\r\n }\r\n else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n };\r\n MeshAttachment.prototype.getParentMesh = function () {\r\n return this.parentMesh;\r\n };\r\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n };\r\n MeshAttachment.prototype.copy = function () {\r\n if (this.parentMesh != null)\r\n return this.newLinkedMesh();\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n };\r\n MeshAttachment.prototype.newLinkedMesh = function () {\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n copy.updateUVs();\r\n return copy;\r\n };\r\n return MeshAttachment;\r\n }(spine.VertexAttachment));\r\n spine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathAttachment = (function (_super) {\r\n __extends(PathAttachment, _super);\r\n function PathAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.closed = false;\r\n _this.constantSpeed = false;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n PathAttachment.prototype.copy = function () {\r\n var copy = new PathAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PathAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PointAttachment = (function (_super) {\r\n __extends(PointAttachment, _super);\r\n function PointAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n return _this;\r\n }\r\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n };\r\n PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n var x = cos * bone.a + sin * bone.b;\r\n var y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n };\r\n PointAttachment.prototype.copy = function () {\r\n var copy = new PointAttachment(this.name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PointAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var RegionAttachment = (function (_super) {\r\n __extends(RegionAttachment, _super);\r\n function RegionAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.scaleX = 1;\r\n _this.scaleY = 1;\r\n _this.rotation = 0;\r\n _this.width = 0;\r\n _this.height = 0;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.offset = spine.Utils.newFloatArray(8);\r\n _this.uvs = spine.Utils.newFloatArray(8);\r\n _this.tempColor = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n RegionAttachment.prototype.updateOffset = function () {\r\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n var localX2 = localX + this.region.width * regionScaleX;\r\n var localY2 = localY + this.region.height * regionScaleY;\r\n var radians = this.rotation * Math.PI / 180;\r\n var cos = Math.cos(radians);\r\n var sin = Math.sin(radians);\r\n var localXCos = localX * cos + this.x;\r\n var localXSin = localX * sin;\r\n var localYCos = localY * cos + this.y;\r\n var localYSin = localY * sin;\r\n var localX2Cos = localX2 * cos + this.x;\r\n var localX2Sin = localX2 * sin;\r\n var localY2Cos = localY2 * cos + this.y;\r\n var localY2Sin = localY2 * sin;\r\n var offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n };\r\n RegionAttachment.prototype.setRegion = function (region) {\r\n this.region = region;\r\n var uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n }\r\n else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n };\r\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n var vertexOffset = this.offset;\r\n var x = bone.worldX, y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n };\r\n RegionAttachment.prototype.copy = function () {\r\n var copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n RegionAttachment.OX1 = 0;\r\n RegionAttachment.OY1 = 1;\r\n RegionAttachment.OX2 = 2;\r\n RegionAttachment.OY2 = 3;\r\n RegionAttachment.OX3 = 4;\r\n RegionAttachment.OY3 = 5;\r\n RegionAttachment.OX4 = 6;\r\n RegionAttachment.OY4 = 7;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n return RegionAttachment;\r\n }(spine.Attachment));\r\n spine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var JitterEffect = (function () {\r\n function JitterEffect(jitterX, jitterY) {\r\n this.jitterX = 0;\r\n this.jitterY = 0;\r\n this.jitterX = jitterX;\r\n this.jitterY = jitterY;\r\n }\r\n JitterEffect.prototype.begin = function (skeleton) {\r\n };\r\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n };\r\n JitterEffect.prototype.end = function () {\r\n };\r\n return JitterEffect;\r\n }());\r\n spine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SwirlEffect = (function () {\r\n function SwirlEffect(radius) {\r\n this.centerX = 0;\r\n this.centerY = 0;\r\n this.radius = 0;\r\n this.angle = 0;\r\n this.worldX = 0;\r\n this.worldY = 0;\r\n this.radius = radius;\r\n }\r\n SwirlEffect.prototype.begin = function (skeleton) {\r\n this.worldX = skeleton.x + this.centerX;\r\n this.worldY = skeleton.y + this.centerY;\r\n };\r\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n var x = position.x - this.worldX;\r\n var y = position.y - this.worldY;\r\n var dist = Math.sqrt(x * x + y * y);\r\n if (dist < this.radius) {\r\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n var cos = Math.cos(theta);\r\n var sin = Math.sin(theta);\r\n position.x = cos * x - sin * y + this.worldX;\r\n position.y = sin * x + cos * y + this.worldY;\r\n }\r\n };\r\n SwirlEffect.prototype.end = function () {\r\n };\r\n SwirlEffect.interpolation = new spine.PowOut(2);\r\n return SwirlEffect;\r\n }());\r\n spine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(context, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) {\r\n return new spine.webgl.GLTexture(context, image);\r\n }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n webgl.AssetManager = AssetManager;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var OrthoCamera = (function () {\r\n function OrthoCamera(viewportWidth, viewportHeight) {\r\n this.position = new webgl.Vector3(0, 0, 0);\r\n this.direction = new webgl.Vector3(0, 0, -1);\r\n this.up = new webgl.Vector3(0, 1, 0);\r\n this.near = 0;\r\n this.far = 100;\r\n this.zoom = 1;\r\n this.viewportWidth = 0;\r\n this.viewportHeight = 0;\r\n this.projectionView = new webgl.Matrix4();\r\n this.inverseProjectionView = new webgl.Matrix4();\r\n this.projection = new webgl.Matrix4();\r\n this.view = new webgl.Matrix4();\r\n this.tmp = new webgl.Vector3();\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n this.update();\r\n }\r\n OrthoCamera.prototype.update = function () {\r\n var projection = this.projection;\r\n var view = this.view;\r\n var projectionView = this.projectionView;\r\n var inverseProjectionView = this.inverseProjectionView;\r\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\r\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\r\n view.lookAt(this.position, this.direction, this.up);\r\n projectionView.set(projection.values);\r\n projectionView.multiply(view);\r\n inverseProjectionView.set(projectionView.values).invert();\r\n };\r\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\r\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\r\n var tmp = this.tmp;\r\n tmp.x = (2 * x) / screenWidth - 1;\r\n tmp.y = (2 * y) / screenHeight - 1;\r\n tmp.z = (2 * screenCoords.z) - 1;\r\n tmp.project(this.inverseProjectionView);\r\n screenCoords.set(tmp.x, tmp.y, tmp.z);\r\n return screenCoords;\r\n };\r\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n };\r\n return OrthoCamera;\r\n }());\r\n webgl.OrthoCamera = OrthoCamera;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var GLTexture = (function (_super) {\r\n __extends(GLTexture, _super);\r\n function GLTexture(context, image, useMipMaps) {\r\n if (useMipMaps === void 0) { useMipMaps = false; }\r\n var _this = _super.call(this, image) || this;\r\n _this.texture = null;\r\n _this.boundUnit = 0;\r\n _this.useMipMaps = false;\r\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n _this.useMipMaps = useMipMaps;\r\n _this.restore();\r\n _this.context.addRestorable(_this);\r\n return _this;\r\n }\r\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\r\n };\r\n GLTexture.validateMagFilter = function (magFilter) {\r\n switch (magFilter) {\r\n case spine.TextureFilter.MipMap:\r\n case spine.TextureFilter.MipMapLinearLinear:\r\n case spine.TextureFilter.MipMapLinearNearest:\r\n case spine.TextureFilter.MipMapNearestLinear:\r\n case spine.TextureFilter.MipMapNearestNearest:\r\n return spine.TextureFilter.Linear;\r\n default:\r\n return magFilter;\r\n }\r\n };\r\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\r\n };\r\n GLTexture.prototype.update = function (useMipMaps) {\r\n var gl = this.context.gl;\r\n if (!this.texture) {\r\n this.texture = this.context.gl.createTexture();\r\n }\r\n this.bind();\r\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n };\r\n GLTexture.prototype.restore = function () {\r\n this.texture = null;\r\n this.update(this.useMipMaps);\r\n };\r\n GLTexture.prototype.bind = function (unit) {\r\n if (unit === void 0) { unit = 0; }\r\n var gl = this.context.gl;\r\n this.boundUnit = unit;\r\n gl.activeTexture(gl.TEXTURE0 + unit);\r\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\r\n };\r\n GLTexture.prototype.unbind = function () {\r\n var gl = this.context.gl;\r\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\r\n gl.bindTexture(gl.TEXTURE_2D, null);\r\n };\r\n GLTexture.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteTexture(this.texture);\r\n };\r\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\r\n return GLTexture;\r\n }(spine.Texture));\r\n webgl.GLTexture = GLTexture;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n webgl.M00 = 0;\r\n webgl.M01 = 4;\r\n webgl.M02 = 8;\r\n webgl.M03 = 12;\r\n webgl.M10 = 1;\r\n webgl.M11 = 5;\r\n webgl.M12 = 9;\r\n webgl.M13 = 13;\r\n webgl.M20 = 2;\r\n webgl.M21 = 6;\r\n webgl.M22 = 10;\r\n webgl.M23 = 14;\r\n webgl.M30 = 3;\r\n webgl.M31 = 7;\r\n webgl.M32 = 11;\r\n webgl.M33 = 15;\r\n var Matrix4 = (function () {\r\n function Matrix4() {\r\n this.temp = new Float32Array(16);\r\n this.values = new Float32Array(16);\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M11] = 1;\r\n v[webgl.M22] = 1;\r\n v[webgl.M33] = 1;\r\n }\r\n Matrix4.prototype.set = function (values) {\r\n this.values.set(values);\r\n return this;\r\n };\r\n Matrix4.prototype.transpose = function () {\r\n var t = this.temp;\r\n var v = this.values;\r\n t[webgl.M00] = v[webgl.M00];\r\n t[webgl.M01] = v[webgl.M10];\r\n t[webgl.M02] = v[webgl.M20];\r\n t[webgl.M03] = v[webgl.M30];\r\n t[webgl.M10] = v[webgl.M01];\r\n t[webgl.M11] = v[webgl.M11];\r\n t[webgl.M12] = v[webgl.M21];\r\n t[webgl.M13] = v[webgl.M31];\r\n t[webgl.M20] = v[webgl.M02];\r\n t[webgl.M21] = v[webgl.M12];\r\n t[webgl.M22] = v[webgl.M22];\r\n t[webgl.M23] = v[webgl.M32];\r\n t[webgl.M30] = v[webgl.M03];\r\n t[webgl.M31] = v[webgl.M13];\r\n t[webgl.M32] = v[webgl.M23];\r\n t[webgl.M33] = v[webgl.M33];\r\n return this.set(t);\r\n };\r\n Matrix4.prototype.identity = function () {\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M01] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M03] = 0;\r\n v[webgl.M10] = 0;\r\n v[webgl.M11] = 1;\r\n v[webgl.M12] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M21] = 0;\r\n v[webgl.M22] = 1;\r\n v[webgl.M23] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M32] = 0;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.invert = function () {\r\n var v = this.values;\r\n var t = this.temp;\r\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n if (l_det == 0)\r\n throw new Error(\"non-invertible matrix\");\r\n var inv_det = 1.0 / l_det;\r\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\r\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\r\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\r\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\r\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\r\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\r\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\r\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\r\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\r\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\r\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\r\n v[webgl.M00] = t[webgl.M00] * inv_det;\r\n v[webgl.M01] = t[webgl.M01] * inv_det;\r\n v[webgl.M02] = t[webgl.M02] * inv_det;\r\n v[webgl.M03] = t[webgl.M03] * inv_det;\r\n v[webgl.M10] = t[webgl.M10] * inv_det;\r\n v[webgl.M11] = t[webgl.M11] * inv_det;\r\n v[webgl.M12] = t[webgl.M12] * inv_det;\r\n v[webgl.M13] = t[webgl.M13] * inv_det;\r\n v[webgl.M20] = t[webgl.M20] * inv_det;\r\n v[webgl.M21] = t[webgl.M21] * inv_det;\r\n v[webgl.M22] = t[webgl.M22] * inv_det;\r\n v[webgl.M23] = t[webgl.M23] * inv_det;\r\n v[webgl.M30] = t[webgl.M30] * inv_det;\r\n v[webgl.M31] = t[webgl.M31] * inv_det;\r\n v[webgl.M32] = t[webgl.M32] * inv_det;\r\n v[webgl.M33] = t[webgl.M33] * inv_det;\r\n return this;\r\n };\r\n Matrix4.prototype.determinant = function () {\r\n var v = this.values;\r\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n };\r\n Matrix4.prototype.translate = function (x, y, z) {\r\n var v = this.values;\r\n v[webgl.M03] += x;\r\n v[webgl.M13] += y;\r\n v[webgl.M23] += z;\r\n return this;\r\n };\r\n Matrix4.prototype.copy = function () {\r\n return new Matrix4().set(this.values);\r\n };\r\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\r\n this.identity();\r\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\r\n var l_a1 = (far + near) / (near - far);\r\n var l_a2 = (2 * far * near) / (near - far);\r\n var v = this.values;\r\n v[webgl.M00] = l_fd / aspectRatio;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = l_fd;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = l_a1;\r\n v[webgl.M32] = -1;\r\n v[webgl.M03] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M23] = l_a2;\r\n v[webgl.M33] = 0;\r\n return this;\r\n };\r\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\r\n return this.ortho(x, x + width, y, y + height, 0, 1);\r\n };\r\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\r\n this.identity();\r\n var x_orth = 2 / (right - left);\r\n var y_orth = 2 / (top - bottom);\r\n var z_orth = -2 / (far - near);\r\n var tx = -(right + left) / (right - left);\r\n var ty = -(top + bottom) / (top - bottom);\r\n var tz = -(far + near) / (far - near);\r\n var v = this.values;\r\n v[webgl.M00] = x_orth;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = y_orth;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = z_orth;\r\n v[webgl.M32] = 0;\r\n v[webgl.M03] = tx;\r\n v[webgl.M13] = ty;\r\n v[webgl.M23] = tz;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.multiply = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\r\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\r\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\r\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\r\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\r\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\r\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\r\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\r\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\r\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\r\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\r\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\r\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\r\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\r\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\r\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.multiplyLeft = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\r\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\r\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\r\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\r\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\r\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\r\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\r\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\r\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\r\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\r\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\r\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\r\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\r\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\r\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\r\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.lookAt = function (position, direction, up) {\r\n Matrix4.initTemps();\r\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\r\n zAxis.setFrom(direction).normalize();\r\n xAxis.setFrom(direction).normalize();\r\n xAxis.cross(up).normalize();\r\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\r\n this.identity();\r\n var val = this.values;\r\n val[webgl.M00] = xAxis.x;\r\n val[webgl.M01] = xAxis.y;\r\n val[webgl.M02] = xAxis.z;\r\n val[webgl.M10] = yAxis.x;\r\n val[webgl.M11] = yAxis.y;\r\n val[webgl.M12] = yAxis.z;\r\n val[webgl.M20] = -zAxis.x;\r\n val[webgl.M21] = -zAxis.y;\r\n val[webgl.M22] = -zAxis.z;\r\n Matrix4.tmpMatrix.identity();\r\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\r\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\r\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\r\n this.multiply(Matrix4.tmpMatrix);\r\n return this;\r\n };\r\n Matrix4.initTemps = function () {\r\n if (Matrix4.xAxis === null)\r\n Matrix4.xAxis = new webgl.Vector3();\r\n if (Matrix4.yAxis === null)\r\n Matrix4.yAxis = new webgl.Vector3();\r\n if (Matrix4.zAxis === null)\r\n Matrix4.zAxis = new webgl.Vector3();\r\n };\r\n Matrix4.xAxis = null;\r\n Matrix4.yAxis = null;\r\n Matrix4.zAxis = null;\r\n Matrix4.tmpMatrix = new Matrix4();\r\n return Matrix4;\r\n }());\r\n webgl.Matrix4 = Matrix4;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Mesh = (function () {\r\n function Mesh(context, attributes, maxVertices, maxIndices) {\r\n this.attributes = attributes;\r\n this.verticesLength = 0;\r\n this.dirtyVertices = false;\r\n this.indicesLength = 0;\r\n this.dirtyIndices = false;\r\n this.elementsPerVertex = 0;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.elementsPerVertex = 0;\r\n for (var i = 0; i < attributes.length; i++) {\r\n this.elementsPerVertex += attributes[i].numElements;\r\n }\r\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\r\n this.indices = new Uint16Array(maxIndices);\r\n this.context.addRestorable(this);\r\n }\r\n Mesh.prototype.getAttributes = function () { return this.attributes; };\r\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\r\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\r\n Mesh.prototype.setVerticesLength = function (length) {\r\n this.dirtyVertices = true;\r\n this.verticesLength = length;\r\n };\r\n Mesh.prototype.getVertices = function () { return this.vertices; };\r\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\r\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\r\n Mesh.prototype.setIndicesLength = function (length) {\r\n this.dirtyIndices = true;\r\n this.indicesLength = length;\r\n };\r\n Mesh.prototype.getIndices = function () { return this.indices; };\r\n ;\r\n Mesh.prototype.getVertexSizeInFloats = function () {\r\n var size = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attribute = this.attributes[i];\r\n size += attribute.numElements;\r\n }\r\n return size;\r\n };\r\n Mesh.prototype.setVertices = function (vertices) {\r\n this.dirtyVertices = true;\r\n if (vertices.length > this.vertices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\r\n this.vertices.set(vertices, 0);\r\n this.verticesLength = vertices.length;\r\n };\r\n Mesh.prototype.setIndices = function (indices) {\r\n this.dirtyIndices = true;\r\n if (indices.length > this.indices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\r\n this.indices.set(indices, 0);\r\n this.indicesLength = indices.length;\r\n };\r\n Mesh.prototype.draw = function (shader, primitiveType) {\r\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\r\n };\r\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices || this.dirtyIndices)\r\n this.update();\r\n this.bind(shader);\r\n if (this.indicesLength > 0) {\r\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\r\n }\r\n else {\r\n gl.drawArrays(primitiveType, offset, count);\r\n }\r\n this.unbind(shader);\r\n };\r\n Mesh.prototype.bind = function (shader) {\r\n var gl = this.context.gl;\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n var offset = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_1 = shader.getAttributeLocation(attrib.name);\r\n gl.enableVertexAttribArray(location_1);\r\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\r\n offset += attrib.numElements;\r\n }\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n };\r\n Mesh.prototype.unbind = function (shader) {\r\n var gl = this.context.gl;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_2 = shader.getAttributeLocation(attrib.name);\r\n gl.disableVertexAttribArray(location_2);\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\r\n };\r\n Mesh.prototype.update = function () {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices) {\r\n if (!this.verticesBuffer) {\r\n this.verticesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyVertices = false;\r\n }\r\n if (this.dirtyIndices) {\r\n if (!this.indicesBuffer) {\r\n this.indicesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyIndices = false;\r\n }\r\n };\r\n Mesh.prototype.restore = function () {\r\n this.verticesBuffer = null;\r\n this.indicesBuffer = null;\r\n this.update();\r\n };\r\n Mesh.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteBuffer(this.verticesBuffer);\r\n gl.deleteBuffer(this.indicesBuffer);\r\n };\r\n return Mesh;\r\n }());\r\n webgl.Mesh = Mesh;\r\n var VertexAttribute = (function () {\r\n function VertexAttribute(name, type, numElements) {\r\n this.name = name;\r\n this.type = type;\r\n this.numElements = numElements;\r\n }\r\n return VertexAttribute;\r\n }());\r\n webgl.VertexAttribute = VertexAttribute;\r\n var Position2Attribute = (function (_super) {\r\n __extends(Position2Attribute, _super);\r\n function Position2Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\r\n }\r\n return Position2Attribute;\r\n }(VertexAttribute));\r\n webgl.Position2Attribute = Position2Attribute;\r\n var Position3Attribute = (function (_super) {\r\n __extends(Position3Attribute, _super);\r\n function Position3Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\r\n }\r\n return Position3Attribute;\r\n }(VertexAttribute));\r\n webgl.Position3Attribute = Position3Attribute;\r\n var TexCoordAttribute = (function (_super) {\r\n __extends(TexCoordAttribute, _super);\r\n function TexCoordAttribute(unit) {\r\n if (unit === void 0) { unit = 0; }\r\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\r\n }\r\n return TexCoordAttribute;\r\n }(VertexAttribute));\r\n webgl.TexCoordAttribute = TexCoordAttribute;\r\n var ColorAttribute = (function (_super) {\r\n __extends(ColorAttribute, _super);\r\n function ColorAttribute() {\r\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\r\n }\r\n return ColorAttribute;\r\n }(VertexAttribute));\r\n webgl.ColorAttribute = ColorAttribute;\r\n var Color2Attribute = (function (_super) {\r\n __extends(Color2Attribute, _super);\r\n function Color2Attribute() {\r\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\r\n }\r\n return Color2Attribute;\r\n }(VertexAttribute));\r\n webgl.Color2Attribute = Color2Attribute;\r\n var VertexAttributeType;\r\n (function (VertexAttributeType) {\r\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\r\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var PolygonBatcher = (function () {\r\n function PolygonBatcher(context, twoColorTint, maxVertices) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n var attributes = twoColorTint ?\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\r\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n PolygonBatcher.prototype.begin = function (shader) {\r\n var gl = this.context.gl;\r\n if (this.isDrawing)\r\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\r\n this.drawCalls = 0;\r\n this.shader = shader;\r\n this.lastTexture = null;\r\n this.isDrawing = true;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\r\n if (texture != this.lastTexture) {\r\n this.flush();\r\n this.lastTexture = texture;\r\n }\r\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\r\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\r\n this.flush();\r\n }\r\n var indexStart = this.mesh.numVertices();\r\n this.mesh.getVertices().set(vertices, this.verticesLength);\r\n this.verticesLength += vertices.length;\r\n this.mesh.setVerticesLength(this.verticesLength);\r\n var indicesArray = this.mesh.getIndices();\r\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\r\n indicesArray[i] = indices[j] + indexStart;\r\n this.indicesLength += indices.length;\r\n this.mesh.setIndicesLength(this.indicesLength);\r\n };\r\n PolygonBatcher.prototype.flush = function () {\r\n var gl = this.context.gl;\r\n if (this.verticesLength == 0)\r\n return;\r\n this.lastTexture.bind();\r\n this.mesh.draw(this.shader, gl.TRIANGLES);\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.mesh.setVerticesLength(0);\r\n this.mesh.setIndicesLength(0);\r\n this.drawCalls++;\r\n };\r\n PolygonBatcher.prototype.end = function () {\r\n var gl = this.context.gl;\r\n if (!this.isDrawing)\r\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\r\n if (this.verticesLength > 0 || this.indicesLength > 0)\r\n this.flush();\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.isDrawing = false;\r\n gl.disable(gl.BLEND);\r\n };\r\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\r\n PolygonBatcher.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return PolygonBatcher;\r\n }());\r\n webgl.PolygonBatcher = PolygonBatcher;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SceneRenderer = (function () {\r\n function SceneRenderer(canvas, context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.twoColorTint = false;\r\n this.activeRenderer = null;\r\n this.QUAD = [\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n ];\r\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n this.WHITE = new spine.Color(1, 1, 1, 1);\r\n this.canvas = canvas;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.twoColorTint = twoColorTint;\r\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\r\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\r\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\r\n this.shapesShader = webgl.Shader.newColored(this.context);\r\n this.shapes = new webgl.ShapeRenderer(this.context);\r\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\r\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\r\n }\r\n SceneRenderer.prototype.begin = function () {\r\n this.camera.update();\r\n this.enableRenderer(this.batcher);\r\n };\r\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n this.enableRenderer(this.batcher);\r\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\r\n };\r\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n this.enableRenderer(this.shapes);\r\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\r\n };\r\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var worldOriginX = x + pivotX;\r\n var worldOriginY = y + pivotY;\r\n var fx = -pivotX;\r\n var fy = -pivotY;\r\n var fx2 = width - pivotX;\r\n var fy2 = height - pivotY;\r\n var p1x = fx;\r\n var p1y = fy;\r\n var p2x = fx;\r\n var p2y = fy2;\r\n var p3x = fx2;\r\n var p3y = fy2;\r\n var p4x = fx2;\r\n var p4y = fy;\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 0;\r\n var y2 = 0;\r\n var x3 = 0;\r\n var y3 = 0;\r\n var x4 = 0;\r\n var y4 = 0;\r\n if (angle != 0) {\r\n var cos = spine.MathUtils.cosDeg(angle);\r\n var sin = spine.MathUtils.sinDeg(angle);\r\n x1 = cos * p1x - sin * p1y;\r\n y1 = sin * p1x + cos * p1y;\r\n x4 = cos * p2x - sin * p2y;\r\n y4 = sin * p2x + cos * p2y;\r\n x3 = cos * p3x - sin * p3y;\r\n y3 = sin * p3x + cos * p3y;\r\n x2 = x3 + (x1 - x4);\r\n y2 = y3 + (y1 - y4);\r\n }\r\n else {\r\n x1 = p1x;\r\n y1 = p1y;\r\n x4 = p2x;\r\n y4 = p2y;\r\n x3 = p3x;\r\n y3 = p3y;\r\n x2 = p4x;\r\n y2 = p4y;\r\n }\r\n x1 += worldOriginX;\r\n y1 += worldOriginY;\r\n x2 += worldOriginX;\r\n y2 += worldOriginY;\r\n x3 += worldOriginX;\r\n y3 += worldOriginY;\r\n x4 += worldOriginX;\r\n y4 += worldOriginY;\r\n var i = 0;\r\n quad[i++] = x1;\r\n quad[i++] = y1;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x2;\r\n quad[i++] = y2;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x3;\r\n quad[i++] = y3;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x4;\r\n quad[i++] = y4;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.line(x, y, x2, y2, color);\r\n };\r\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\r\n };\r\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\r\n };\r\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rect(filled, x, y, width, height, color);\r\n };\r\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\r\n };\r\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.polygon(polygonVertices, offset, count, color);\r\n };\r\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.circle(filled, x, y, radius, color, segments);\r\n };\r\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\r\n };\r\n SceneRenderer.prototype.end = function () {\r\n if (this.activeRenderer === this.batcher)\r\n this.batcher.end();\r\n else if (this.activeRenderer === this.shapes)\r\n this.shapes.end();\r\n this.activeRenderer = null;\r\n };\r\n SceneRenderer.prototype.resize = function (resizeMode) {\r\n var canvas = this.canvas;\r\n var w = canvas.clientWidth;\r\n var h = canvas.clientHeight;\r\n if (canvas.width != w || canvas.height != h) {\r\n canvas.width = w;\r\n canvas.height = h;\r\n }\r\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\r\n if (resizeMode === ResizeMode.Stretch) {\r\n }\r\n else if (resizeMode === ResizeMode.Expand) {\r\n this.camera.setViewport(w, h);\r\n }\r\n else if (resizeMode === ResizeMode.Fit) {\r\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\r\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\r\n var targetRatio = targetHeight / targetWidth;\r\n var sourceRatio = sourceHeight / sourceWidth;\r\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\r\n this.camera.viewportWidth = sourceWidth * scale;\r\n this.camera.viewportHeight = sourceHeight * scale;\r\n }\r\n this.camera.update();\r\n };\r\n SceneRenderer.prototype.enableRenderer = function (renderer) {\r\n if (this.activeRenderer === renderer)\r\n return;\r\n this.end();\r\n if (renderer instanceof webgl.PolygonBatcher) {\r\n this.batcherShader.bind();\r\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.batcherShader.setUniformi(\"u_texture\", 0);\r\n this.batcher.begin(this.batcherShader);\r\n this.activeRenderer = this.batcher;\r\n }\r\n else if (renderer instanceof webgl.ShapeRenderer) {\r\n this.shapesShader.bind();\r\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.shapes.begin(this.shapesShader);\r\n this.activeRenderer = this.shapes;\r\n }\r\n else {\r\n this.activeRenderer = this.skeletonDebugRenderer;\r\n }\r\n };\r\n SceneRenderer.prototype.dispose = function () {\r\n this.batcher.dispose();\r\n this.batcherShader.dispose();\r\n this.shapes.dispose();\r\n this.shapesShader.dispose();\r\n this.skeletonDebugRenderer.dispose();\r\n };\r\n return SceneRenderer;\r\n }());\r\n webgl.SceneRenderer = SceneRenderer;\r\n var ResizeMode;\r\n (function (ResizeMode) {\r\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\r\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\r\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\r\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Shader = (function () {\r\n function Shader(context, vertexShader, fragmentShader) {\r\n this.vertexShader = vertexShader;\r\n this.fragmentShader = fragmentShader;\r\n this.vs = null;\r\n this.fs = null;\r\n this.program = null;\r\n this.tmp2x2 = new Float32Array(2 * 2);\r\n this.tmp3x3 = new Float32Array(3 * 3);\r\n this.tmp4x4 = new Float32Array(4 * 4);\r\n this.vsSource = vertexShader;\r\n this.fsSource = fragmentShader;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.context.addRestorable(this);\r\n this.compile();\r\n }\r\n Shader.prototype.getProgram = function () { return this.program; };\r\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\r\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\r\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\r\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\r\n Shader.prototype.compile = function () {\r\n var gl = this.context.gl;\r\n try {\r\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\r\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\r\n this.program = this.compileProgram(this.vs, this.fs);\r\n }\r\n catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n };\r\n Shader.prototype.compileShader = function (type, source) {\r\n var gl = this.context.gl;\r\n var shader = gl.createShader(type);\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\r\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\r\n gl.deleteShader(shader);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return shader;\r\n };\r\n Shader.prototype.compileProgram = function (vs, fs) {\r\n var gl = this.context.gl;\r\n var program = gl.createProgram();\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\r\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\r\n gl.deleteProgram(program);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return program;\r\n };\r\n Shader.prototype.restore = function () {\r\n this.compile();\r\n };\r\n Shader.prototype.bind = function () {\r\n this.context.gl.useProgram(this.program);\r\n };\r\n Shader.prototype.unbind = function () {\r\n this.context.gl.useProgram(null);\r\n };\r\n Shader.prototype.setUniformi = function (uniform, value) {\r\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniformf = function (uniform, value) {\r\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\r\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\r\n };\r\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\r\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\r\n };\r\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\r\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\r\n };\r\n Shader.prototype.setUniform2x2f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp2x2.set(value);\r\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\r\n };\r\n Shader.prototype.setUniform3x3f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp3x3.set(value);\r\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\r\n };\r\n Shader.prototype.setUniform4x4f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp4x4.set(value);\r\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\r\n };\r\n Shader.prototype.getUniformLocation = function (uniform) {\r\n var gl = this.context.gl;\r\n var location = gl.getUniformLocation(this.program, uniform);\r\n if (!location && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for uniform \".concat(uniform));\r\n return location;\r\n };\r\n Shader.prototype.getAttributeLocation = function (attribute) {\r\n var gl = this.context.gl;\r\n var location = gl.getAttribLocation(this.program, attribute);\r\n if (location == -1 && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for attribute \".concat(attribute));\r\n return location;\r\n };\r\n Shader.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n if (this.vs) {\r\n gl.deleteShader(this.vs);\r\n this.vs = null;\r\n }\r\n if (this.fs) {\r\n gl.deleteShader(this.fs);\r\n this.fs = null;\r\n }\r\n if (this.program) {\r\n gl.deleteProgram(this.program);\r\n this.program = null;\r\n }\r\n };\r\n Shader.newColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(Shader.MVP_MATRIX, \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(Shader.POSITION, \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\");\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newTwoColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(Shader.MVP_MATRIX, \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_dark = \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(Shader.POSITION, \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\");\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newColored = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(Shader.MVP_MATRIX, \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(Shader.POSITION, \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\");\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.MVP_MATRIX = \"u_projTrans\";\r\n Shader.POSITION = \"a_position\";\r\n Shader.COLOR = \"a_color\";\r\n Shader.COLOR2 = \"a_color2\";\r\n Shader.TEXCOORDS = \"a_texCoords\";\r\n Shader.SAMPLER = \"u_texture\";\r\n return Shader;\r\n }());\r\n webgl.Shader = Shader;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ShapeRenderer = (function () {\r\n function ShapeRenderer(context, maxVertices) {\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shapeType = ShapeType.Filled;\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.vertexIndex = 0;\r\n this.tmp = new spine.Vector2();\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n ShapeRenderer.prototype.begin = function (shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has already been called\");\r\n this.shader = shader;\r\n this.vertexIndex = 0;\r\n this.isDrawing = true;\r\n var gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n ShapeRenderer.prototype.setColor = function (color) {\r\n this.color.setFromColor(color);\r\n };\r\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\r\n this.color.set(r, g, b, a);\r\n };\r\n ShapeRenderer.prototype.point = function (x, y, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Point, 1);\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n };\r\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, 2);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color);\r\n this.vertex(x3, y3, color2);\r\n this.vertex(x3, y3, color);\r\n this.vertex(x, y, color2);\r\n }\r\n };\r\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (color4 === null)\r\n color4 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\r\n };\r\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\r\n if (color === null)\r\n color = this.color;\r\n var t = this.tmp.set(y2 - y1, x1 - x2);\r\n t.normalize();\r\n width *= 0.5;\r\n var tx = t.x * width;\r\n var ty = t.y * width;\r\n if (!filled) {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n else {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.x = function (x, y, size) {\r\n this.line(x - size, y - size, x + size, y + size);\r\n this.line(x - size, y + size, x + size, y - size);\r\n };\r\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n if (count < 3)\r\n throw new Error(\"Polygon must contain at least 3 vertices\");\r\n this.check(ShapeType.Line, count * 2);\r\n if (color === null)\r\n color = this.color;\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n offset <<= 1;\r\n count <<= 1;\r\n var firstX = polygonVertices[offset];\r\n var firstY = polygonVertices[offset + 1];\r\n var last = offset + count;\r\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\r\n var x1 = polygonVertices[i];\r\n var y1 = polygonVertices[i + 1];\r\n var x2 = 0;\r\n var y2 = 0;\r\n if (i + 2 >= last) {\r\n x2 = firstX;\r\n y2 = firstY;\r\n }\r\n else {\r\n x2 = polygonVertices[i + 2];\r\n y2 = polygonVertices[i + 3];\r\n }\r\n this.vertex(x1, y1, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n if (segments === 0)\r\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\r\n if (segments <= 0)\r\n throw new Error(\"segments must be > 0.\");\r\n if (color === null)\r\n color = this.color;\r\n var angle = 2 * spine.MathUtils.PI / segments;\r\n var cos = Math.cos(angle);\r\n var sin = Math.sin(angle);\r\n var cx = radius, cy = 0;\r\n if (!filled) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_1 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_1 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n else {\r\n this.check(ShapeType.Filled, segments * 3 + 3);\r\n segments--;\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n var temp = cx;\r\n cx = radius;\r\n cy = 0;\r\n this.vertex(x + cx, y + cy, color);\r\n };\r\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n if (color === null)\r\n color = this.color;\r\n var subdiv_step = 1 / segments;\r\n var subdiv_step2 = subdiv_step * subdiv_step;\r\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\r\n var pre1 = 3 * subdiv_step;\r\n var pre2 = 3 * subdiv_step2;\r\n var pre4 = 6 * subdiv_step2;\r\n var pre5 = 6 * subdiv_step3;\r\n var tmp1x = x1 - cx1 * 2 + cx2;\r\n var tmp1y = y1 - cy1 * 2 + cy2;\r\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\r\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\r\n var fx = x1;\r\n var fy = y1;\r\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\r\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\r\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\r\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\r\n var dddfx = tmp2x * pre5;\r\n var dddfy = tmp2y * pre5;\r\n while (segments-- > 0) {\r\n this.vertex(fx, fy, color);\r\n fx += dfx;\r\n fy += dfy;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n this.vertex(fx, fy, color);\r\n }\r\n this.vertex(fx, fy, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.vertex = function (x, y, color) {\r\n var idx = this.vertexIndex;\r\n var vertices = this.mesh.getVertices();\r\n vertices[idx++] = x;\r\n vertices[idx++] = y;\r\n vertices[idx++] = color.r;\r\n vertices[idx++] = color.g;\r\n vertices[idx++] = color.b;\r\n vertices[idx++] = color.a;\r\n this.vertexIndex = idx;\r\n };\r\n ShapeRenderer.prototype.end = function () {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n this.flush();\r\n this.context.gl.disable(this.context.gl.BLEND);\r\n this.isDrawing = false;\r\n };\r\n ShapeRenderer.prototype.flush = function () {\r\n if (this.vertexIndex == 0)\r\n return;\r\n this.mesh.setVerticesLength(this.vertexIndex);\r\n this.mesh.draw(this.shader, this.shapeType);\r\n this.vertexIndex = 0;\r\n };\r\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n if (this.shapeType == shapeType) {\r\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\r\n this.flush();\r\n else\r\n return;\r\n }\r\n else {\r\n this.flush();\r\n this.shapeType = shapeType;\r\n }\r\n };\r\n ShapeRenderer.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return ShapeRenderer;\r\n }());\r\n webgl.ShapeRenderer = ShapeRenderer;\r\n var ShapeType;\r\n (function (ShapeType) {\r\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\r\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\r\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\r\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SkeletonDebugRenderer = (function () {\r\n function SkeletonDebugRenderer(context) {\r\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\r\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\r\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\r\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\r\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\r\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\r\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\r\n this.drawBones = true;\r\n this.drawRegionAttachments = true;\r\n this.drawBoundingBoxes = true;\r\n this.drawMeshHull = true;\r\n this.drawMeshTriangles = true;\r\n this.drawPaths = true;\r\n this.drawSkeletonXY = false;\r\n this.drawClipping = true;\r\n this.premultipliedAlpha = false;\r\n this.scale = 1;\r\n this.boneWidth = 2;\r\n this.bounds = new spine.SkeletonBounds();\r\n this.temp = new Array();\r\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n }\r\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n var skeletonX = skeleton.x;\r\n var skeletonY = skeleton.y;\r\n var gl = this.context.gl;\r\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\r\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\r\n var bones = skeleton.bones;\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneLineColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n if (bone.parent == null)\r\n continue;\r\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\r\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\r\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\r\n }\r\n if (this.drawSkeletonXY)\r\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\r\n }\r\n if (this.drawRegionAttachments) {\r\n shapes.setColor(this.attachmentLineColor);\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n var vertices = this.vertices;\r\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\r\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\r\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\r\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\r\n }\r\n }\r\n }\r\n if (this.drawMeshHull || this.drawMeshTriangles) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.MeshAttachment))\r\n continue;\r\n var mesh = attachment;\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\r\n var triangles = mesh.triangles;\r\n var hullLength = mesh.hullLength;\r\n if (this.drawMeshTriangles) {\r\n shapes.setColor(this.triangleLineColor);\r\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\r\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\r\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\r\n }\r\n }\r\n if (this.drawMeshHull && hullLength > 0) {\r\n shapes.setColor(this.attachmentLineColor);\r\n hullLength = (hullLength >> 1) * 2;\r\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\r\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n shapes.line(x, y, lastX, lastY);\r\n lastX = x;\r\n lastY = y;\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawBoundingBoxes) {\r\n var bounds = this.bounds;\r\n bounds.update(skeleton, true);\r\n shapes.setColor(this.aabbColor);\r\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\r\n var polygons = bounds.polygons;\r\n var boxes = bounds.boundingBoxes;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n shapes.setColor(boxes[i].color);\r\n shapes.polygon(polygon, 0, polygon.length);\r\n }\r\n }\r\n if (this.drawPaths) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n continue;\r\n var path = attachment;\r\n var nn = path.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n var color = this.pathColor;\r\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\r\n if (path.closed) {\r\n shapes.setColor(color);\r\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\r\n x2 = world[nn - 4];\r\n y2 = world[nn - 3];\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n }\r\n nn -= 4;\r\n for (var ii = 4; ii < nn; ii += 6) {\r\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\r\n x2 = world[ii + 4];\r\n y2 = world[ii + 5];\r\n shapes.setColor(color);\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n }\r\n }\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneOriginColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\r\n }\r\n }\r\n if (this.drawClipping) {\r\n var slots = skeleton.slots;\r\n shapes.setColor(this.clipColor);\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.ClippingAttachment))\r\n continue;\r\n var clip = attachment;\r\n var nn = clip.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\r\n var x = world[i_17];\r\n var y = world[i_17 + 1];\r\n var x2 = world[(i_17 + 2) % world.length];\r\n var y2 = world[(i_17 + 3) % world.length];\r\n shapes.line(x, y, x2, y2);\r\n }\r\n }\r\n }\r\n };\r\n SkeletonDebugRenderer.prototype.dispose = function () {\r\n };\r\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\r\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\r\n return SkeletonDebugRenderer;\r\n }());\r\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Renderable = (function () {\r\n function Renderable(vertices, numVertices, numFloats) {\r\n this.vertices = vertices;\r\n this.numVertices = numVertices;\r\n this.numFloats = numFloats;\r\n }\r\n return Renderable;\r\n }());\r\n ;\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.premultipliedAlpha = false;\r\n this.vertexEffect = null;\r\n this.tempColor = new spine.Color();\r\n this.tempColor2 = new spine.Color();\r\n this.vertexSize = 2 + 2 + 4;\r\n this.twoColorTint = false;\r\n this.renderable = new Renderable(null, 0, 0);\r\n this.clipper = new spine.SkeletonClipping();\r\n this.temp = new spine.Vector2();\r\n this.temp2 = new spine.Vector2();\r\n this.temp3 = new spine.Color();\r\n this.temp4 = new spine.Color();\r\n this.twoColorTint = twoColorTint;\r\n if (twoColorTint)\r\n this.vertexSize += 4;\r\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\r\n }\r\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n var clipper = this.clipper;\r\n var premultipliedAlpha = this.premultipliedAlpha;\r\n var twoColorTint = this.twoColorTint;\r\n var blendMode = null;\r\n var tempPos = this.temp;\r\n var tempUv = this.temp2;\r\n var tempLight = this.temp3;\r\n var tempDark = this.temp4;\r\n var renderable = this.renderable;\r\n var uvs = null;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n var attachmentColor = null;\r\n var skeletonColor = skeleton.color;\r\n var vertexSize = twoColorTint ? 12 : 8;\r\n var inRange = false;\r\n if (slotRangeStart == -1)\r\n inRange = true;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\r\n inRange = true;\r\n }\r\n if (!inRange) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\r\n inRange = false;\r\n }\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var region = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = 4;\r\n renderable.numFloats = clippedVertexSize << 2;\r\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n uvs = region.uvs;\r\n texture = region.region.renderObject.texture;\r\n attachmentColor = region.color;\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\r\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\r\n if (renderable.numFloats > renderable.vertices.length) {\r\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\r\n }\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture;\r\n uvs = mesh.uvs;\r\n attachmentColor = mesh.color;\r\n }\r\n else if (attachment instanceof spine.ClippingAttachment) {\r\n var clip = (attachment);\r\n clipper.clipStart(slot, clip);\r\n continue;\r\n }\r\n else {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (texture != null) {\r\n var slotColor = slot.color;\r\n var finalColor = this.tempColor;\r\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\r\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\r\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\r\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n if (premultipliedAlpha) {\r\n finalColor.r *= finalColor.a;\r\n finalColor.g *= finalColor.a;\r\n finalColor.b *= finalColor.a;\r\n }\r\n var darkColor = this.tempColor2;\r\n if (slot.darkColor == null)\r\n darkColor.set(0, 0, 0, 1.0);\r\n else {\r\n if (premultipliedAlpha) {\r\n darkColor.r = slot.darkColor.r * finalColor.a;\r\n darkColor.g = slot.darkColor.g * finalColor.a;\r\n darkColor.b = slot.darkColor.b * finalColor.a;\r\n }\r\n else {\r\n darkColor.setFromColor(slot.darkColor);\r\n }\r\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\r\n }\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\r\n }\r\n if (clipper.isClipping()) {\r\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\r\n var clippedVertices = new Float32Array(clipper.clippedVertices);\r\n var clippedTriangles = clipper.clippedTriangles;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n var verts = clippedVertices;\r\n if (!twoColorTint) {\r\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n batcher.draw(texture, clippedVertices, clippedTriangles);\r\n }\r\n else {\r\n var verts = renderable.vertices;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n if (!twoColorTint) {\r\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.setFromColor(darkColor);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n else {\r\n if (!twoColorTint) {\r\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n }\r\n }\r\n else {\r\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n verts[v + 6] = darkColor.r;\r\n verts[v + 7] = darkColor.g;\r\n verts[v + 8] = darkColor.b;\r\n verts[v + 9] = darkColor.a;\r\n }\r\n }\r\n }\r\n var view = renderable.vertices.subarray(0, renderable.numFloats);\r\n batcher.draw(texture, view, triangles);\r\n }\r\n }\r\n clipper.clipEndWithSlot(slot);\r\n }\r\n clipper.clipEnd();\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n return SkeletonRenderer;\r\n }());\r\n webgl.SkeletonRenderer = SkeletonRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Vector3 = (function () {\r\n function Vector3(x, y, z) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n if (z === void 0) { z = 0; }\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n Vector3.prototype.setFrom = function (v) {\r\n this.x = v.x;\r\n this.y = v.y;\r\n this.z = v.z;\r\n return this;\r\n };\r\n Vector3.prototype.set = function (x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n };\r\n Vector3.prototype.add = function (v) {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n return this;\r\n };\r\n Vector3.prototype.sub = function (v) {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n return this;\r\n };\r\n Vector3.prototype.scale = function (s) {\r\n this.x *= s;\r\n this.y *= s;\r\n this.z *= s;\r\n return this;\r\n };\r\n Vector3.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len == 0)\r\n return this;\r\n len = 1 / len;\r\n this.x *= len;\r\n this.y *= len;\r\n this.z *= len;\r\n return this;\r\n };\r\n Vector3.prototype.cross = function (v) {\r\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\r\n };\r\n Vector3.prototype.multiply = function (matrix) {\r\n var l_mat = matrix.values;\r\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\r\n };\r\n Vector3.prototype.project = function (matrix) {\r\n var l_mat = matrix.values;\r\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\r\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\r\n };\r\n Vector3.prototype.dot = function (v) {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n };\r\n Vector3.prototype.length = function () {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n };\r\n Vector3.prototype.distance = function (v) {\r\n var a = v.x - this.x;\r\n var b = v.y - this.y;\r\n var c = v.z - this.z;\r\n return Math.sqrt(a * a + b * b + c * c);\r\n };\r\n return Vector3;\r\n }());\r\n webgl.Vector3 = Vector3;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ManagedWebGLRenderingContext = (function () {\r\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\r\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\r\n this.restorables = new Array();\r\n if (!((canvasOrContext instanceof WebGLRenderingContext) || (canvasOrContext instanceof WebGL2RenderingContext))) {\r\n this.setupCanvas(canvasOrContext, contextConfig);\r\n }\r\n else {\r\n this.gl = canvasOrContext;\r\n this.canvas = this.gl.canvas;\r\n }\r\n }\r\n ManagedWebGLRenderingContext.prototype.setupCanvas = function (canvas, contextConfig) {\r\n var _this = this;\r\n this.gl = (canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig));\r\n this.canvas = canvas;\r\n canvas.addEventListener(\"webglcontextlost\", function (e) {\r\n var event = e;\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n });\r\n canvas.addEventListener(\"webglcontextrestored\", function (e) {\r\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\r\n _this.restorables[i].restore();\r\n }\r\n });\r\n };\r\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\r\n this.restorables.push(restorable);\r\n };\r\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\r\n var index = this.restorables.indexOf(restorable);\r\n if (index > -1)\r\n this.restorables.splice(index, 1);\r\n };\r\n return ManagedWebGLRenderingContext;\r\n }());\r\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\r\n var WebGLBlendModeConverter = (function () {\r\n function WebGLBlendModeConverter() {\r\n }\r\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.ZERO = 0;\r\n WebGLBlendModeConverter.ONE = 1;\r\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\r\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\r\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\r\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\r\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\r\n return WebGLBlendModeConverter;\r\n }());\r\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-webgl.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\r\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\r\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\r\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\r\nvar MultiFile = require('../../../src/loader/MultiFile.js');\r\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\r\n\r\n/**\r\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\r\n *\r\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Spine File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\r\n *\r\n * @class SpineFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar SpineFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\r\n {\r\n var i;\r\n var json;\r\n var atlas;\r\n var files = [];\r\n var cache = loader.cacheManager.custom.spine;\r\n\r\n // atlas can be an array of atlas files, not just a single one\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n json = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'jsonURL'),\r\n extension: GetFastValue(config, 'jsonExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\r\n });\r\n\r\n atlasURL = GetFastValue(config, 'atlasURL');\r\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, {\r\n key: key + '!' + i,\r\n url: atlasURL[i],\r\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n else\r\n {\r\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, key + '!' + i, atlasURL[i], atlasXhrSettings);\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n\r\n files.unshift(json);\r\n\r\n MultiFile.call(this, loader, 'spine', key, files);\r\n\r\n this.config.preMultipliedAlpha = preMultipliedAlpha;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'text')\r\n {\r\n // Inspect the data for the files to now load\r\n var content = file.data.split('\\n');\r\n\r\n // Extract the textures\r\n var textures = [];\r\n\r\n for (var t = 0; t < content.length; t++)\r\n {\r\n var line = content[t];\r\n\r\n if (line.trim() === '' && t < content.length - 1)\r\n {\r\n line = content[t + 1];\r\n\r\n textures.push(line);\r\n }\r\n }\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\r\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\r\n var prefix = GetFastValue(config, 'prefix', this.prefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n var textureURL = textures[i];\r\n\r\n var key = this.key + ':' + textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n if (!loader.keyExists(image))\r\n {\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\r\n * @since 3.19.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var atlasCache;\r\n var atlasKey = '';\r\n var combinedAtlasData = '';\r\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\r\n var textureManager = this.loader.textureManager;\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'text')\r\n {\r\n atlasKey = file.key.replace(/![\\d]$/, '');\r\n\r\n atlasCache = file.cache;\r\n\r\n combinedAtlasData = combinedAtlasData.concat(file.data);\r\n }\r\n else\r\n {\r\n var src = file.key.trim();\r\n var pos = src.indexOf('!');\r\n var key = src.substr(pos + 1);\r\n\r\n if (!textureManager.exists(key))\r\n {\r\n textureManager.addImage(key, file.data);\r\n }\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetValue = require('../../../src/utils/object/GetValue');\r\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\r\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\r\nvar Spine = require('Spine');\r\nvar SpineFile = require('./SpineFile');\r\nvar SpineGameObject = require('./gameobject/SpineGameObject');\r\nvar SpineContainer = require('./container/SpineContainer');\r\nvar NOOP = require('../../../src/utils/NOOP');\r\n\r\n/**\r\n * @classdesc\r\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\r\n *\r\n * Find more details about Spine itself at http://esotericsoftware.com/.\r\n *\r\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\r\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\r\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\r\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\r\n *\r\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\r\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\r\n *\r\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\r\n *\r\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\r\n *\r\n * ```javascript\r\n * import * as SpinePlugin from './SpinePlugin.js';\r\n * ```\r\n *\r\n * and then adding it to your Phaser Game configuration:\r\n *\r\n * ```javascript\r\n * plugins: {\r\n * scene: [\r\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\r\n * ]\r\n * }\r\n * ```\r\n *\r\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\r\n * Game Configuration object, like this:\r\n *\r\n * ```javascript\r\n * scene: {\r\n * preload: preload,\r\n * create: create,\r\n * pack: {\r\n * files: [\r\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\r\n * ]\r\n * }\r\n * }\r\n * ```\r\n *\r\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\r\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\r\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\r\n * subsequent Scenes.\r\n *\r\n * ## A note about inlined data:\r\n *\r\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\r\n * at all. Instead, call the functions directly as required:\r\n *\r\n * scene.cache.json.add\r\n * scene.cache.custom.spine.add\r\n * scene.textures.addBase64\r\n *\r\n * ## Using the plugin\r\n *\r\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\r\n *\r\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\r\n * Spine files directly, i.e.:\r\n *\r\n * ```javascript\r\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\r\n * ```\r\n *\r\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\r\n * and Spine Containers:\r\n *\r\n * ```javascript\r\n * const man = this.add.spine(512, 650, 'stretchyman');\r\n *\r\n * const container = this.add.spineContainer();\r\n *\r\n * container.add(man);\r\n * ```\r\n *\r\n * The first argument is the key which you used when importing the Spine data. There are lots of\r\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\r\n * see the respective documentation and examples for further details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\r\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\r\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\r\n * load arguments, or you may see black outlines around skeleton textures.\r\n *\r\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\r\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\r\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\r\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\r\n * game, regardless if the Scene loaded the Spine data or not.\r\n *\r\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\r\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\r\n *\r\n * ```javascript\r\n * this.plugins.removeScenePlugin('SpinePlugin');\r\n * ```\r\n *\r\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\r\n *\r\n * @class SpinePlugin\r\n * @extends Phaser.Plugins.ScenePlugin\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar SpinePlugin = new Class({\r\n\r\n Extends: ScenePlugin,\r\n\r\n initialize:\r\n\r\n function SpinePlugin (scene, pluginManager, pluginKey)\r\n {\r\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\r\n\r\n var game = pluginManager.game;\r\n\r\n /**\r\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\r\n *\r\n * @name SpinePlugin#isWebGL\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isWebGL = (game.config.renderType === 2);\r\n\r\n /**\r\n * A custom cache that stores the Spine atlas data.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.cache = game.cache.addCustom('spine');\r\n\r\n /**\r\n * A custom cache that stores the Spine Textures.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#spineTextures\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.spineTextures = game.cache.addCustom('spineTextures');\r\n\r\n /**\r\n * A reference to the global JSON Cache.\r\n *\r\n * @name SpinePlugin#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.json = game.cache.json;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name SpinePlugin#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.19.0\r\n */\r\n this.textures = game.textures;\r\n\r\n /**\r\n * A flag that sets if the Skeleton Renderers will render debug information over the top\r\n * of the skeleton or not.\r\n *\r\n * @name SpinePlugin#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The underlying WebGL context of the Phaser renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.19.0\r\n */\r\n this.gl;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name SpinePlugin#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.renderer;\r\n\r\n /**\r\n * An instance of the Spine WebGL Scene Renderer.\r\n *\r\n * There is only one instance of the Scene Renderer shared across the whole plugin.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#sceneRenderer\r\n * @type {spine.webgl.SceneRenderer}\r\n * @since 3.19.0\r\n */\r\n this.sceneRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Renderer.\r\n *\r\n * @name SpinePlugin#skeletonRenderer\r\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.skeletonRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Debug Renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#skeletonDebugRenderer\r\n * @type {spine.webgl.skeletonDebugRenderer}\r\n * @since 3.19.0\r\n */\r\n this.skeletonDebugRenderer;\r\n\r\n /**\r\n * A reference to the Spine runtime.\r\n * This is the runtime created by Esoteric Software.\r\n *\r\n * @name SpinePlugin#plugin\r\n * @type {spine}\r\n * @since 3.19.0\r\n */\r\n this.plugin = Spine;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp1\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp1;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp2\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp2;\r\n\r\n if (this.isWebGL)\r\n {\r\n this.runtime = Spine.webgl;\r\n\r\n this.renderer = game.renderer;\r\n this.gl = game.renderer.gl;\r\n\r\n this.getAtlas = this.getAtlasWebGL;\r\n }\r\n else\r\n {\r\n this.runtime = Spine.canvas;\r\n\r\n this.renderer = game.renderer;\r\n\r\n this.getAtlas = this.getAtlasCanvas;\r\n }\r\n\r\n // Headless mode?\r\n if (!this.renderer)\r\n {\r\n this.renderer = {\r\n width: game.scale.width,\r\n height: game.scale.height,\r\n preRender: NOOP,\r\n postRender: NOOP,\r\n render: NOOP,\r\n destroy: NOOP\r\n };\r\n }\r\n\r\n var isWebGL = this.isWebGL;\r\n\r\n var add = function (x, y, key, animationName, loop)\r\n {\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.clear();\r\n }\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, x, y, key, animationName, loop);\r\n\r\n this.displayList.add(spineGO);\r\n this.updateList.add(spineGO);\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.rebind();\r\n }\r\n\r\n return spineGO;\r\n };\r\n\r\n var make = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.clear();\r\n }\r\n\r\n var key = GetValue(config, 'key', null);\r\n var animationName = GetValue(config, 'animationName', null);\r\n var loop = GetValue(config, 'loop', false);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 0, 0, key, animationName, loop);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, spineGO, config);\r\n\r\n // Spine specific\r\n var skinName = GetValue(config, 'skinName', false);\r\n\r\n if (skinName)\r\n {\r\n spineGO.setSkinByName(skinName);\r\n }\r\n\r\n var slotName = GetValue(config, 'slotName', false);\r\n var attachmentName = GetValue(config, 'attachmentName', null);\r\n\r\n if (slotName)\r\n {\r\n spineGO.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.rebind();\r\n }\r\n\r\n return spineGO.refresh();\r\n };\r\n\r\n var addContainer = function (x, y, children)\r\n {\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n this.displayList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var makeContainer = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetValue(config, 'x', 0);\r\n var y = GetValue(config, 'y', 0);\r\n var children = GetValue(config, 'children', null);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var container = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n\r\n return container;\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\r\n },\r\n\r\n /**\r\n * Internal boot handler.\r\n *\r\n * @method SpinePlugin#boot\r\n * @private\r\n * @since 3.19.0\r\n */\r\n boot: function ()\r\n {\r\n if (this.isWebGL)\r\n {\r\n this.bootWebGL();\r\n this.onResize();\r\n this.game.scale.on(ResizeEvent, this.onResize, this);\r\n }\r\n else\r\n {\r\n this.bootCanvas();\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n eventEmitter.once('destroy', this.destroy, this);\r\n\r\n this.game.events.once('destroy', this.gameDestroy, this);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the Canvas Renderer.\r\n *\r\n * @method SpinePlugin#bootCanvas\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootCanvas: function ()\r\n {\r\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the WebGL Renderer.\r\n *\r\n * @method SpinePlugin#bootWebGL\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootWebGL: function ()\r\n {\r\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\r\n\r\n var setBlendMode = function (srcBlend, dstBlend)\r\n {\r\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\r\n {\r\n var gl = this.context.gl;\r\n\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n\r\n if (this.isDrawing)\r\n {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n }\r\n };\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (!sceneRenderer)\r\n {\r\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n sceneRenderer.batcher.setBlendMode = setBlendMode;\r\n sceneRenderer.shapes.setBlendMode = setBlendMode;\r\n\r\n this.renderer.spineSceneRenderer = sceneRenderer;\r\n }\r\n\r\n // All scene share the same instance\r\n this.sceneRenderer = sceneRenderer;\r\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer;\r\n\r\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\r\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasCanvas\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasCanvas: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage());\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasWebGL\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasWebGL: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n var gl = this.sceneRenderer.context.gl;\r\n\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage(), false);\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\r\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\r\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\r\n * outlines around skeleton textures.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\r\n * Loading a file using a key that is already taken will result in a warning.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.spine({\r\n * key: 'mainmenu',\r\n * jsonURL: 'boy.json',\r\n * atlasURL: 'boy.atlas',\r\n * preMultipliedAlpha: true\r\n * });\r\n * ```\r\n *\r\n * If you need to load multiple Spine atlas files, provide them as an array:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\r\n * }\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the data from the Spine plugin.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spine\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.19.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {object} [settings] - An external Settings configuration object { prefix: '' }\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\r\n {\r\n var multifile;\r\n settings = settings || {};\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new SpineFile(this, key[i]);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#worldToLocal\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The screen space x coordinate to convert.\r\n * @param {number} y - The screen space y coordinate to convert.\r\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\r\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\r\n *\r\n * @return {spine.Vector2} A Vector2 containing the translated point.\r\n */\r\n worldToLocal: function (x, y, skeleton, bone)\r\n {\r\n var temp1 = this.temp1;\r\n var temp2 = this.temp2;\r\n var camera = this.sceneRenderer.camera;\r\n\r\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\r\n\r\n var width = camera.viewportWidth;\r\n var height = camera.viewportHeight;\r\n\r\n camera.screenToWorld(temp1, width, height);\r\n\r\n if (bone && bone.parent !== null)\r\n {\r\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\r\n\r\n return new Spine.Vector2(temp2.x, temp2.y);\r\n }\r\n else if (bone)\r\n {\r\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\r\n }\r\n else\r\n {\r\n return new Spine.Vector2(temp1.x, temp1.y);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x and y values.\r\n *\r\n * @method SpinePlugin#getVector2\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector2: function (x, y)\r\n {\r\n return new Spine.Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x, y and z values.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#getVector3\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n * @param {number} z - The Vector z value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector3: function (x, y, z)\r\n {\r\n return new Spine.webgl.Vector3(x, y, z);\r\n },\r\n\r\n /**\r\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBones\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBones: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBones = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugRegionAttachments\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugRegionAttachments: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawRegionAttachments = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBoundingBoxes\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBoundingBoxes: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshHull\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshHull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshHull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshTriangles\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshTriangles: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshTriangles = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugPaths\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugPaths: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawPaths = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugSkeletonXY\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugSkeletonXY: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawSkeletonXY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugClipping\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugClipping: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawClipping = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the given vertex effect on the Spine Skeleton Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setEffect\r\n * @since 3.19.0\r\n *\r\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setEffect: function (effect)\r\n {\r\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\r\n *\r\n * The Skeleton data should have already been loaded before calling this method.\r\n *\r\n * @method SpinePlugin#createSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\r\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\r\n *\r\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\r\n */\r\n createSkeleton: function (key, skeletonJSON)\r\n {\r\n var atlasKey = key;\r\n var jsonKey = key;\r\n var split = (key.indexOf('.') !== -1);\r\n\r\n if (split)\r\n {\r\n var parts = key.split('.');\r\n\r\n atlasKey = parts.shift();\r\n jsonKey = parts.join('.');\r\n }\r\n\r\n var atlasData = this.cache.get(atlasKey);\r\n var atlas = this.getAtlas(atlasKey);\r\n\r\n if (!atlas)\r\n {\r\n return null;\r\n }\r\n\r\n if (!this.spineTextures.has(atlasKey))\r\n {\r\n this.spineTextures.add(atlasKey, atlas);\r\n }\r\n\r\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\r\n\r\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\r\n\r\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\r\n\r\n var data;\r\n\r\n if (skeletonJSON)\r\n {\r\n data = skeletonJSON;\r\n }\r\n else\r\n {\r\n var json = this.json.get(atlasKey);\r\n\r\n data = (split) ? GetValue(json, jsonKey) : json;\r\n }\r\n\r\n if (data)\r\n {\r\n var skeletonData = skeletonJson.readSkeletonData(data);\r\n\r\n var skeleton = new Spine.Skeleton(skeletonData);\r\n\r\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Animation State and Animation State Data for the given skeleton.\r\n *\r\n * The returned object contains two properties: `state` and `stateData` respectively.\r\n *\r\n * @method SpinePlugin#createAnimationState\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\r\n *\r\n * @return {any} An object containing the Animation State and Animation State Data instances.\r\n */\r\n createAnimationState: function (skeleton)\r\n {\r\n var stateData = new Spine.AnimationStateData(skeleton.data);\r\n\r\n var state = new Spine.AnimationState(stateData);\r\n\r\n return { stateData: stateData, state: state };\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpinePlugin#getBounds\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function (skeleton)\r\n {\r\n var offset = new Spine.Vector2();\r\n var size = new Spine.Vector2();\r\n\r\n skeleton.getBounds(offset, size, []);\r\n\r\n return { offset: offset, size: size };\r\n },\r\n\r\n /**\r\n * Internal handler for when the renderer resizes.\r\n *\r\n * Only called if running in WebGL.\r\n *\r\n * @method SpinePlugin#onResize\r\n * @since 3.19.0\r\n */\r\n onResize: function ()\r\n {\r\n var renderer = this.renderer;\r\n var sceneRenderer = this.sceneRenderer;\r\n\r\n var viewportWidth = renderer.width;\r\n var viewportHeight = renderer.height;\r\n\r\n sceneRenderer.camera.position.x = viewportWidth / 2;\r\n sceneRenderer.camera.position.y = viewportHeight / 2;\r\n\r\n sceneRenderer.camera.setViewport(viewportWidth, viewportHeight);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n *\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method SpinePlugin#shutdown\r\n * @private\r\n * @since 3.19.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n if (this.isWebGL)\r\n {\r\n this.game.scale.off(ResizeEvent, this.onResize, this);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n *\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method SpinePlugin#destroy\r\n * @private\r\n * @since 3.19.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.cache = null;\r\n this.spineTextures = null;\r\n this.json = null;\r\n this.textures = null;\r\n this.skeletonRenderer = null;\r\n this.gl = null;\r\n },\r\n\r\n /**\r\n * The Game that owns this plugin is being destroyed.\r\n *\r\n * Dispose of the Scene Renderer and remove the Game Objects.\r\n *\r\n * @method SpinePlugin#gameDestroy\r\n * @private\r\n * @since 3.50.0\r\n */\r\n gameDestroy: function ()\r\n {\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n this.pluginManager.removeGameObject('spineContainer', true, true);\r\n\r\n this.pluginManager = null;\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (sceneRenderer)\r\n {\r\n sceneRenderer.dispose();\r\n }\r\n\r\n this.renderer.spineSceneRenderer = null;\r\n this.sceneRenderer = null;\r\n }\r\n\r\n});\r\n\r\nSpinePlugin.SpineGameObject = SpineGameObject;\r\nSpinePlugin.SpineContainer = SpineContainer;\r\n\r\n/**\r\n * Creates a new Spine Game Object and adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\r\n *\r\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\r\n *\r\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\r\n * name, then use `SpinePlugin.make` instead.\r\n *\r\n * @method SpinePlugin#add\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\n/**\r\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 500, y: 500, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-idle', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * @method SpinePlugin#make\r\n * @since 3.19.0\r\n *\r\n * @param {any} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\nmodule.exports = SpinePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../../src/utils/Class');\r\nvar Container = require('../../../../src/gameobjects/container/Container');\r\nvar SpineContainerRender = require('./SpineContainerRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\r\n *\r\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\r\n * for Spine Game Objects. You must only add ever Spine Game Objects, or other Spine Containers, to this type of Container.\r\n * Although Phaser will not prevent you from adding other types, they will not render and are likely to throw runtime errors.\r\n *\r\n * To create one in a Scene, use the factory methods:\r\n *\r\n * ```javascript\r\n * this.add.spineContainer();\r\n * ```\r\n *\r\n * or\r\n *\r\n * ```javascript\r\n * this.make.spineContainer();\r\n * ```\r\n *\r\n * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\r\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\r\n * Spine Containers. In short, if you need masking, don't mix and match the types.\r\n *\r\n * See the Container documentation for further details about what Containers can do.\r\n *\r\n * @class SpineContainer\r\n * @extends Phaser.GameObjects.Container\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\r\n */\r\nvar SpineContainer = new Class({\r\n\r\n Extends: Container,\r\n\r\n Mixins: [\r\n SpineContainerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineContainer (scene, plugin, x, y, children)\r\n {\r\n Container.call(this, scene, x, y, children);\r\n\r\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\r\n this.type = 'Spine';\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineContainer#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.50.0\r\n */\r\n this.plugin = plugin;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineContainer#preDestroy\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineContainer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineContainerWebGLRenderer#renderWebGL\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineContainer} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n var plugin = container.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n }\r\n\r\n return;\r\n }\r\n\r\n camera.addToRenderList(container);\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var rendererNextType = renderer.nextTypeMatch;\r\n\r\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\r\n renderer.nextTypeMatch = true;\r\n renderer.newType = false;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (child.willRender(camera, container))\r\n {\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.preRenderWebGL(renderer, child, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.postRenderWebGL(renderer, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n }\r\n }\r\n\r\n renderer.nextTypeMatch = rendererNextType;\r\n\r\n if (!rendererNextType || container.mask)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineContainerWebGLRenderer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AngleBetween = require('../../../../src/math/angle/Between');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar Class = require('../../../../src/utils/Class');\r\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\r\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\r\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\r\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\r\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\r\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar DegToRad = require('../../../../src/math/DegToRad');\r\nvar GameObject = require('../../../../src/gameobjects/GameObject');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar SpineEvents = require('../events/');\r\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\r\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\r\n * easily change the skin, slot attachment, bone positions and more.\r\n *\r\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\r\n * You can only create them if the Spine plugin has been loaded into Phaser.\r\n *\r\n * The quickest way is the Game Object Factory:\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\r\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\r\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\r\n * animation to loop. Look at the documentation for further details on each of these options.\r\n *\r\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\r\n * Configuration object:\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 512, y: 550, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-think', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\r\n * overall scale.\r\n *\r\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\r\n * update and render, it must be added to the display and update lists of your Scene:\r\n *\r\n * ```javascript\r\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\r\n * this.sys.displayList.add(jelly);\r\n * this.sys.updateList.add(jelly);\r\n * ```\r\n *\r\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\r\n * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup\r\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\r\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\r\n * input shape being created. If it's not suitable, provide your own shape to the `setInteractive` method.\r\n *\r\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\r\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\r\n * Object position with it. See the examples for further details.\r\n *\r\n * If your Spine Game Object has black outlines around the different parts of the texture when it\r\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\r\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\r\n *\r\n * @class SpineGameObject\r\n * @extends Phaser.GameObjects.GameObject\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n */\r\nvar SpineGameObject = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsComputedSize,\r\n ComponentsDepth,\r\n ComponentsFlip,\r\n ComponentsScrollFactor,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n SpineGameObjectRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\r\n {\r\n GameObject.call(this, scene, 'Spine');\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineGameObject#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.19.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The Spine Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeleton\r\n * @type {spine.Skeleton}\r\n * @since 3.19.0\r\n */\r\n this.skeleton = null;\r\n\r\n /**\r\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeletonData\r\n * @type {spine.SkeletonData}\r\n * @since 3.19.0\r\n */\r\n this.skeletonData = null;\r\n\r\n /**\r\n * The Spine Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#state\r\n * @type {spine.AnimationState}\r\n * @since 3.19.0\r\n */\r\n this.state = null;\r\n\r\n /**\r\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#stateData\r\n * @type {spine.AnimationStateData}\r\n * @since 3.19.0\r\n */\r\n this.stateData = null;\r\n\r\n /**\r\n * A reference to the root bone of the Skeleton.\r\n *\r\n * @name SpineGameObject#root\r\n * @type {spine.Bone}\r\n * @since 3.19.0\r\n */\r\n this.root = null;\r\n\r\n /**\r\n * This object holds the calculated bounds of the current\r\n * pose, as set when a new Skeleton is applied.\r\n *\r\n * @name SpineGameObject#bounds\r\n * @type {any}\r\n * @since 3.19.0\r\n */\r\n this.bounds = null;\r\n\r\n /**\r\n * A Game Object level flag that allows you to enable debug drawing\r\n * to the Skeleton Debug Renderer by toggling it.\r\n *\r\n * @name SpineGameObject#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The factor to scale the Animation update time by.\r\n *\r\n * @name SpineGameObject#timeScale\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginX\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginY\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * A flag that stores if the texture associated with the current\r\n * Skin being used by this Game Object, has its alpha pre-multiplied\r\n * into it, or not.\r\n *\r\n * @name SpineGameObject#preMultipliedAlpha\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.preMultipliedAlpha = false;\r\n\r\n /**\r\n * A default Blend Mode. You cannot change the blend mode of a\r\n * Spine Game Object.\r\n *\r\n * @name SpineGameObject#blendMode\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.blendMode = -1;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key)\r\n {\r\n this.setSkeleton(key, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Returns `true` if this Spine Game Object both has a skeleton and\r\n * also passes the render tests for the given Camera.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n *\r\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function (camera, container)\r\n {\r\n var GameObjectRenderMask = 15;\r\n\r\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\r\n\r\n if (!container && !result && this.parentContainer)\r\n {\r\n var plugin = this.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\r\n {\r\n sceneRenderer.end();\r\n\r\n plugin.renderer.pipelines.rebind();\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Set the Alpha level for the whole Skeleton of this Game Object.\r\n *\r\n * The alpha controls the opacity of the Game Object as it renders.\r\n *\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method SpineGameObject#setAlpha\r\n * @since 3.19.0\r\n *\r\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value, slotName)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n slot.color.a = Clamp(value, 0, 1);\r\n }\r\n }\r\n else\r\n {\r\n this.alpha = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#alpha\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.a = v;\r\n }\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~2;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 2;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of red used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#red\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.r = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of green used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#green\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.g = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of blue used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#blue\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.b = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\r\n *\r\n * @method SpineGameObject#setColor\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\r\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setColor: function (color, slotName)\r\n {\r\n if (color === undefined) { color = 0xffffff; }\r\n\r\n var red = (color >> 16 & 0xFF) / 255;\r\n var green = (color >> 8 & 0xFF) / 255;\r\n var blue = (color & 0xFF) / 255;\r\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\r\n\r\n var target = this.skeleton;\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n target = slot;\r\n }\r\n }\r\n\r\n target.color.r = red;\r\n target.color.g = green;\r\n target.color.b = blue;\r\n\r\n if (alpha !== null)\r\n {\r\n target.color.a = alpha;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\r\n * that contains the Skeleton data.\r\n *\r\n * @method SpineGameObject#setSkeletonFromJSON\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\r\n {\r\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on its cache key.\r\n *\r\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\r\n * or slot attachment, or any other property to adjust it.\r\n *\r\n * @method SpineGameObject#setSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\r\n\r\n this.skeletonData = data.skeletonData;\r\n\r\n this.preMultipliedAlpha = data.preMultipliedAlpha;\r\n\r\n var skeleton = data.skeleton;\r\n\r\n skeleton.setSkin();\r\n skeleton.setToSetupPose();\r\n\r\n this.skeleton = skeleton;\r\n\r\n // AnimationState\r\n data = this.plugin.createAnimationState(skeleton);\r\n\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.state = data.state;\r\n this.stateData = data.stateData;\r\n\r\n this.state.addListener({\r\n event: this.onEvent.bind(this),\r\n complete: this.onComplete.bind(this),\r\n start: this.onStart.bind(this),\r\n end: this.onEnd.bind(this),\r\n dispose: this.onDispose.bind(this),\r\n interrupted: this.onInterrupted.bind(this)\r\n });\r\n\r\n if (animationName)\r\n {\r\n this.setAnimation(0, animationName, loop);\r\n }\r\n\r\n this.root = this.getRootBone();\r\n\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.state.apply(skeleton);\r\n\r\n skeleton.updateCache();\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onComplete event via this Game Object.\r\n *\r\n * @method SpineGameObject#onComplete\r\n * @fires SpinePluginEvents#COMPLETE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onComplete: function (entry)\r\n {\r\n this.emit(SpineEvents.COMPLETE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onDispose event via this Game Object.\r\n *\r\n * @method SpineGameObject#onDispose\r\n * @fires SpinePluginEvents#DISPOSE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onDispose: function (entry)\r\n {\r\n this.emit(SpineEvents.DISPOSE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onEnd event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEnd\r\n * @fires SpinePluginEvents#END\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onEnd: function (entry)\r\n {\r\n this.emit(SpineEvents.END, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine Event event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEvent\r\n * @fires SpinePluginEvents#EVENT\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n * @param {spine.Event} event - The Spine event.\r\n */\r\n onEvent: function (entry, event)\r\n {\r\n this.emit(SpineEvents.EVENT, entry, event);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\r\n *\r\n * @method SpineGameObject#onInterrupted\r\n * @fires SpinePluginEvents#INTERRUPTED\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onInterrupted: function (entry)\r\n {\r\n this.emit(SpineEvents.INTERRUPTED, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onStart event via this Game Object.\r\n *\r\n * @method SpineGameObject#onStart\r\n * @fires SpinePluginEvents#START\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onStart: function (entry)\r\n {\r\n this.emit(SpineEvents.START, entry);\r\n },\r\n\r\n /**\r\n * Refreshes the data about the current Skeleton.\r\n *\r\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\r\n *\r\n * Call this method if you need to access the Skeleton data directly, and it may have changed\r\n * recently.\r\n *\r\n * @method SpineGameObject#refresh\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n refresh: function ()\r\n {\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.updateSize();\r\n\r\n this.skeleton.updateCache();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n *\r\n * If no arguments are given it uses the current skeleton data dimensions.\r\n *\r\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\r\n * when the skeleton data doesn't match what is required in-game.\r\n *\r\n * @method SpineGameObject#setSize\r\n * @since 3.19.0\r\n *\r\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\r\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSize: function (width, height, offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (width === undefined) { width = skeleton.data.width; }\r\n if (height === undefined) { height = skeleton.data.height; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of this Game Object from the Skeleton position.\r\n *\r\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\r\n *\r\n * @method SpineGameObject#setOffset\r\n * @since 3.19.0\r\n *\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setOffset: function (offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\r\n * It then syncs the skeleton bounds back to this Game Object.\r\n *\r\n * This method is called automatically as needed internally, however, it's also exposed should\r\n * you require overriding the size settings.\r\n *\r\n * @method SpineGameObject#updateSize\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n updateSize: function ()\r\n {\r\n var skeleton = this.skeleton;\r\n var renderer = this.plugin.renderer;\r\n\r\n var height = renderer.height;\r\n\r\n var oldScaleX = this.scaleX;\r\n var oldScaleY = this.scaleY;\r\n\r\n skeleton.x = this.x;\r\n skeleton.y = height - this.y;\r\n skeleton.scaleX = 1;\r\n skeleton.scaleY = 1;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n var bounds = this.getBounds();\r\n\r\n this.width = bounds.size.x;\r\n this.height = bounds.size.y;\r\n\r\n this.displayOriginX = this.x - bounds.offset.x;\r\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\r\n\r\n skeleton.scaleX = oldScaleX;\r\n skeleton.scaleY = oldScaleY;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the bones in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getBoneList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\r\n */\r\n getBoneList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.bones.length; i++)\r\n {\r\n output.push(skeletonData.bones[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the skins in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getSkinList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\r\n */\r\n getSkinList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.skins.length; i++)\r\n {\r\n output.push(skeletonData.skins[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the slots in the Skeleton.\r\n *\r\n * @method SpineGameObject#getSlotList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\r\n */\r\n getSlotList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeleton = this.skeleton;\r\n\r\n for (var i = 0; i < skeleton.slots.length; i++)\r\n {\r\n output.push(skeleton.slots[i].data.name);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the animations in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getAnimationList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\r\n */\r\n getAnimationList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.animations.length; i++)\r\n {\r\n output.push(skeletonData.animations[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the current animation being played on the given track, if any.\r\n *\r\n * @method SpineGameObject#getCurrentAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\r\n *\r\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\r\n */\r\n getCurrentAnimation: function (trackIndex)\r\n {\r\n if (trackIndex === undefined) { trackIndex = 0; }\r\n\r\n var current = this.state.getCurrent(trackIndex);\r\n\r\n if (current)\r\n {\r\n return current.animation;\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#play\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\r\n */\r\n play: function (animationName, loop, ignoreIfPlaying)\r\n {\r\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#setAnimation\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to play the animation on.\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n\r\n if (ignoreIfPlaying && this.state)\r\n {\r\n var currentTrack = this.state.getCurrent(trackIndex);\r\n\r\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (this.findAnimation(animationName))\r\n {\r\n return this.state.setAnimation(trackIndex, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an animation to be played after the current or last queued animation for a track.\r\n * If the track is empty, it is equivalent to calling setAnimation.\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\r\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\r\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\r\n * If the previous entry is looping, its next loop completion is used instead of its duration.\r\n *\r\n * @method SpineGameObject#addAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {string} animationName - The string-based key of the animation to add.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n addAnimation: function (trackIndex, animationName, loop, delay)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (delay === undefined) { delay = 0; }\r\n\r\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\r\n },\r\n\r\n /**\r\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\r\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n *\r\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\r\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\r\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\r\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\r\n * A mix duration of 0 still mixes out over one frame.\r\n *\r\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\r\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\r\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\r\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\r\n * property to the value keyed in the new animation.\r\n *\r\n * @method SpineGameObject#setEmptyAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {spine.TrackEntry} The returned Track Entry.\r\n */\r\n setEmptyAnimation: function (trackIndex, mixDuration)\r\n {\r\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\r\n },\r\n\r\n /**\r\n * Removes all animations from the track, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTrack\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTrack: function (trackIndex)\r\n {\r\n this.state.clearTrack(trackIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all animations from all tracks, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTracks\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTracks: function ()\r\n {\r\n this.state.clearTracks();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkinByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to set.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkinByName: function (skinName)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkinByName(skinName);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkin\r\n * @since 3.19.0\r\n *\r\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkin: function (newSkin)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkin(newSkin);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mix duration when changing from the specified animation to the other.\r\n *\r\n * @method SpineGameObject#setMix\r\n * @since 3.19.0\r\n *\r\n * @param {string} fromName - The animation to mix from.\r\n * @param {string} toName - The animation to mix to.\r\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMix: function (fromName, toName, duration)\r\n {\r\n this.stateData.setMix(fromName, toName, duration);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot\r\n * index and attachment name. First the skin is checked and if the attachment was not found,\r\n * the default skin is checked.\r\n *\r\n * @method SpineGameObject#getAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {integer} slotIndex - The slot index to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachment: function (slotIndex, attachmentName)\r\n {\r\n return this.skeleton.getAttachment(slotIndex, attachmentName);\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\r\n *\r\n * @method SpineGameObject#getAttachmentByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachmentByName: function (slotName, attachmentName)\r\n {\r\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n },\r\n\r\n /**\r\n * A convenience method to set an attachment by finding the slot with findSlot,\r\n * finding the attachment with getAttachment, then setting the slot's attachment.\r\n *\r\n * @method SpineGameObject#setAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to add the attachment to.\r\n * @param {string} attachmentName - The attachment name to add.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAttachment: function (slotName, attachmentName)\r\n {\r\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\r\n {\r\n for (var i = 0; i < slotName.length; i++)\r\n {\r\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\r\n }\r\n }\r\n else\r\n {\r\n this.skeleton.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setToSetupPose: function ()\r\n {\r\n this.skeleton.setToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the slots and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setSlotsToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSlotsToSetupPose: function ()\r\n {\r\n this.skeleton.setSlotsToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones and constraints to their setup pose values.\r\n *\r\n * @method SpineGameObject#setBonesToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBonesToSetupPose: function ()\r\n {\r\n this.skeleton.setBonesToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the root bone, or null.\r\n *\r\n * @method SpineGameObject#getRootBone\r\n * @since 3.19.0\r\n *\r\n * @return {spine.Bone} The root bone, or null.\r\n */\r\n getRootBone: function ()\r\n {\r\n return this.skeleton.getRootBone();\r\n },\r\n\r\n /**\r\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\r\n * towards the given position. You can set an optional angle offset, should the bone be\r\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\r\n *\r\n * @method SpineGameObject#angleBoneToXY\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\r\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\r\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\r\n * @param {number} [offset=0] - An offset to add to the rotation angle.\r\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\r\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n if (minAngle === undefined) { minAngle = 0; }\r\n if (maxAngle === undefined) { maxAngle = 360; }\r\n\r\n var renderer = this.plugin.renderer;\r\n var height = renderer.height;\r\n\r\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\r\n\r\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBone\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {spine.Bone} The bone, or null.\r\n */\r\n findBone: function (boneName)\r\n {\r\n return this.skeleton.findBone(boneName);\r\n },\r\n\r\n /**\r\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBoneIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {integer} The bone index. Or -1 if the bone was not found.\r\n */\r\n findBoneIndex: function (boneName)\r\n {\r\n return this.skeleton.findBoneIndex(boneName);\r\n },\r\n\r\n /**\r\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlot\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {spine.Slot} The Slot. May be null.\r\n */\r\n findSlot: function (slotName)\r\n {\r\n return this.skeleton.findSlot(slotName);\r\n },\r\n\r\n /**\r\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlotIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {integer} The slot index. Or -1 if the Slot was not found.\r\n */\r\n findSlotIndex: function (slotName)\r\n {\r\n return this.skeleton.findSlotIndex(slotName);\r\n },\r\n\r\n /**\r\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\r\n * this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSkin\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to find.\r\n *\r\n * @return {spine.Skin} The Skin. May be null.\r\n */\r\n findSkin: function (skinName)\r\n {\r\n return this.skeletonData.findSkin(skinName);\r\n },\r\n\r\n /**\r\n * Finds an event by comparing each events's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findEvent\r\n * @since 3.19.0\r\n *\r\n * @param {string} eventDataName - The name of the event to find.\r\n *\r\n * @return {spine.EventData} The Event Data. May be null.\r\n */\r\n findEvent: function (eventDataName)\r\n {\r\n return this.skeletonData.findEvent(eventDataName);\r\n },\r\n\r\n /**\r\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The name of the animation to find.\r\n *\r\n * @return {spine.Animation} The Animation. May be null.\r\n */\r\n findAnimation: function (animationName)\r\n {\r\n return this.skeletonData.findAnimation(animationName);\r\n },\r\n\r\n /**\r\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findIkConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.IkConstraintData} The IK constraint. May be null.\r\n */\r\n findIkConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findIkConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds an transform constraint by comparing each transform constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findTransformConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\r\n */\r\n findTransformConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findTransformConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.PathConstraintData} The path constraint. May be null.\r\n */\r\n findPathConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds the index of a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraintIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\r\n */\r\n findPathConstraintIndex: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraintIndex(constraintName);\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpineGameObject#getBounds\r\n * @since 3.19.0\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function ()\r\n {\r\n return this.plugin.getBounds(this.skeleton);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method SpineGameObject#preUpdate\r\n * @protected\r\n * @since 3.19.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n this.state.update((delta / 1000) * this.timeScale);\r\n\r\n this.state.apply(skeleton);\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineGameObject#preDestroy\r\n * @protected\r\n * @since 3.19.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.plugin = null;\r\n\r\n this.skeleton = null;\r\n this.skeletonData = null;\r\n\r\n this.state = null;\r\n this.stateData = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineGameObject;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Directly renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderDirect\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n }\r\n\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLDirect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderWebGL\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n\r\n // The Spine debug draw has reset the batcher, so we need to do this regardless:\r\n sceneRenderer.end();\r\n renderer.pipelines.rebind();\r\n }\r\n else if (!renderer.nextTypeMatch)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Global constants.\r\n *\r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Phaser Release Version\r\n *\r\n * @name Phaser.VERSION\r\n * @const\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n VERSION: '3.60.0-beta.20',\r\n\r\n BlendModes: require('./renderer/BlendModes'),\r\n\r\n ScaleModes: require('./renderer/ScaleModes'),\r\n\r\n /**\r\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\r\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\r\n *\r\n * @name Phaser.AUTO\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n AUTO: 0,\r\n\r\n /**\r\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\r\n * WebGL or not.\r\n *\r\n * @name Phaser.CANVAS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n CANVAS: 1,\r\n\r\n /**\r\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\r\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\r\n * message to the user.\r\n *\r\n * @name Phaser.WEBGL\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n WEBGL: 2,\r\n\r\n /**\r\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\r\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\r\n * not for running Phaser on the server, which is something you really shouldn't do.\r\n *\r\n * @name Phaser.HEADLESS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n HEADLESS: 3,\r\n\r\n /**\r\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\r\n * to help you remember what the value is doing in your code.\r\n *\r\n * @name Phaser.FOREVER\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FOREVER: -1,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.NONE\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n NONE: 4,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.UP\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n UP: 5,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.DOWN\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DOWN: 6,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.LEFT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LEFT: 7,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.RIGHT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 8\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n *\r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once(Events.DESTROY, this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n *\r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {number} [data=1] - The amount to increase the given key by. Pass a negative value to decrease the key.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n\r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n *\r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n *\r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n *\r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.on('changedata', listener)`.\r\n *\r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Data Manager Destroy Event.\r\n *\r\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\r\n *\r\n * @event Phaser.Data.Events#DESTROY\r\n * @type {string}\r\n * @since 3.50.0\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.audio` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Audio\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} audioData - Can this device play HTML Audio tags?\r\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\r\n * @property {boolean} m4a - Can this device can play m4a files.\r\n * @property {boolean} aac - Can this device can play aac files.\r\n * @property {boolean} flac - Can this device can play flac files.\r\n * @property {boolean} mp3 - Can this device play mp3 files?\r\n * @property {boolean} ogg - Can this device play ogg files?\r\n * @property {boolean} opus - Can this device play opus files?\r\n * @property {boolean} wav - Can this device play wav files?\r\n * @property {boolean} webAudio - Does this device have the Web Audio API?\r\n * @property {boolean} webm - Can this device play webm files?\r\n */\r\nvar Audio = {\r\n\r\n flac: false,\r\n aac: false,\r\n audioData: false,\r\n dolby: false,\r\n m4a: false,\r\n mp3: false,\r\n ogg: false,\r\n opus: false,\r\n wav: false,\r\n webAudio: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Audio;\r\n }\r\n\r\n Audio.audioData = !!(window['Audio']);\r\n\r\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\r\n\r\n var audioElement = document.createElement('audio');\r\n var result = !!audioElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n var CanPlay = function (type1, type2)\r\n {\r\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\r\n\r\n if (type2)\r\n {\r\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\r\n }\r\n else\r\n {\r\n return Boolean(canPlayType1);\r\n }\r\n };\r\n\r\n // wav Mimetypes accepted:\r\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\r\n\r\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\r\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\r\n Audio.mp3 = CanPlay('mpeg');\r\n Audio.wav = CanPlay('wav');\r\n Audio.m4a = CanPlay('x-m4a');\r\n Audio.aac = CanPlay('aac');\r\n Audio.flac = CanPlay('flac', 'x-flac');\r\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\r\n\r\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\r\n {\r\n if (Browser.edge)\r\n {\r\n Audio.dolby = true;\r\n }\r\n else if (Browser.safari && Browser.safariVersion >= 9)\r\n {\r\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\r\n {\r\n var major = parseInt(RegExp.$1, 10);\r\n var minor = parseInt(RegExp.$2, 10);\r\n\r\n if ((major === 10 && minor >= 11) || major > 10)\r\n {\r\n Audio.dolby = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do here\r\n }\r\n\r\n return Audio;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\n\r\n/**\r\n * Determines the browser type and version running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.browser` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Browser\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} chrome - Set to true if running in Chrome.\r\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\r\n * @property {boolean} firefox - Set to true if running in Firefox.\r\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\r\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\r\n * @property {boolean} opera - Set to true if running in Opera.\r\n * @property {boolean} safari - Set to true if running in Safari.\r\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\r\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\r\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\r\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\r\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\r\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\r\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\r\n */\r\nvar Browser = {\r\n\r\n chrome: false,\r\n chromeVersion: 0,\r\n edge: false,\r\n firefox: false,\r\n firefoxVersion: 0,\r\n ie: false,\r\n ieVersion: 0,\r\n mobileSafari: false,\r\n opera: false,\r\n safari: false,\r\n safariVersion: 0,\r\n silk: false,\r\n trident: false,\r\n tridentVersion: 0,\r\n es2019: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Edg\\/\\d+/).test(ua))\r\n {\r\n Browser.edge = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/OPR/).test(ua))\r\n {\r\n Browser.opera = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.chrome = true;\r\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.chromeVersion > 69);\r\n }\r\n else if ((/Firefox\\D+(\\d+)/).test(ua))\r\n {\r\n Browser.firefox = true;\r\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.firefoxVersion > 10);\r\n }\r\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\r\n {\r\n Browser.mobileSafari = true;\r\n }\r\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.ieVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.safari = true;\r\n Browser.safariVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.safariVersion > 10);\r\n }\r\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.trident = true;\r\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\r\n Browser.ieVersion = parseInt(RegExp.$3, 10);\r\n }\r\n\r\n // Silk gets its own if clause because its ua also contains 'Safari'\r\n if ((/Silk/).test(ua))\r\n {\r\n Browser.silk = true;\r\n }\r\n\r\n return Browser;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the canvas features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.CanvasFeatures\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\r\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\r\n */\r\nvar CanvasFeatures = {\r\n\r\n supportInverseAlpha: false,\r\n supportNewBlendModes: false\r\n\r\n};\r\n\r\nfunction checkBlendMode ()\r\n{\r\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\r\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\r\n\r\n var magenta = new Image();\r\n\r\n magenta.onload = function ()\r\n {\r\n var yellow = new Image();\r\n\r\n yellow.onload = function ()\r\n {\r\n var canvas = CanvasPool.create2D(yellow, 6);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.globalCompositeOperation = 'multiply';\r\n\r\n context.drawImage(magenta, 0, 0);\r\n context.drawImage(yellow, 2, 0);\r\n\r\n if (!context.getImageData(2, 0, 1, 1))\r\n {\r\n return false;\r\n }\r\n\r\n var data = context.getImageData(2, 0, 1, 1).data;\r\n\r\n CanvasPool.remove(yellow);\r\n\r\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\r\n };\r\n\r\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\r\n };\r\n\r\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\r\n\r\n return false;\r\n}\r\n\r\nfunction checkInverseAlpha ()\r\n{\r\n var canvas = CanvasPool.create2D(this, 2);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\r\n\r\n // Draw a single pixel\r\n context.fillRect(0, 0, 1, 1);\r\n\r\n // Get the color values\r\n var s1 = context.getImageData(0, 0, 1, 1);\r\n\r\n if (s1 === null)\r\n {\r\n return false;\r\n }\r\n\r\n // Plot them to x2\r\n context.putImageData(s1, 1, 0);\r\n\r\n // Get those values\r\n var s2 = context.getImageData(1, 0, 1, 1);\r\n\r\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\r\n\r\n CanvasPool.remove(this);\r\n\r\n // Compare and return\r\n return result;\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts !== 'function' && document !== undefined)\r\n {\r\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\r\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\r\n }\r\n\r\n return CanvasFeatures;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\nvar Browser = require('./Browser');\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.features` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Features\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} canvas - Is canvas available?\r\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\r\n * @property {boolean} file - Is file available?\r\n * @property {boolean} fileSystem - Is fileSystem available?\r\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\r\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\r\n * @property {boolean} localStorage - Is localStorage available?\r\n * @property {boolean} pointerLock - Is Pointer Lock available?\r\n * @property {boolean} stableSort - Is Array.sort stable?\r\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\r\n * @property {boolean} vibration - Does the device support the Vibration API?\r\n * @property {boolean} webGL - Is webGL available?\r\n * @property {boolean} worker - Is worker available?\r\n */\r\nvar Features = {\r\n\r\n canvas: false,\r\n canvasBitBltShift: null,\r\n file: false,\r\n fileSystem: false,\r\n getUserMedia: true,\r\n littleEndian: false,\r\n localStorage: false,\r\n pointerLock: false,\r\n stableSort: false,\r\n support32bit: false,\r\n vibration: false,\r\n webGL: false,\r\n worker: false\r\n\r\n};\r\n\r\n// Check Little or Big Endian system.\r\n// @author Matt DesLauriers (@mattdesl)\r\nfunction checkIsLittleEndian ()\r\n{\r\n var a = new ArrayBuffer(4);\r\n var b = new Uint8Array(a);\r\n var c = new Uint32Array(a);\r\n\r\n b[0] = 0xa1;\r\n b[1] = 0xb2;\r\n b[2] = 0xc3;\r\n b[3] = 0xd4;\r\n\r\n if (c[0] === 0xd4c3b2a1)\r\n {\r\n return true;\r\n }\r\n\r\n if (c[0] === 0xa1b2c3d4)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n // Could not determine endianness\r\n return null;\r\n }\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Features;\r\n }\r\n\r\n Features.canvas = !!window['CanvasRenderingContext2D'];\r\n\r\n try\r\n {\r\n Features.localStorage = !!localStorage.getItem;\r\n }\r\n catch (error)\r\n {\r\n Features.localStorage = false;\r\n }\r\n\r\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\r\n Features.fileSystem = !!window['requestFileSystem'];\r\n\r\n var isUint8 = false;\r\n\r\n var testWebGL = function ()\r\n {\r\n if (window['WebGLRenderingContext'])\r\n {\r\n try\r\n {\r\n var canvas = CanvasPool.createWebGL(this);\r\n\r\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\r\n\r\n var canvas2D = CanvasPool.create2D(this);\r\n\r\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\r\n\r\n // Can't be done on a webgl context\r\n var image = ctx2D.createImageData(1, 1);\r\n\r\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\r\n // @author Matt DesLauriers (@mattdesl)\r\n isUint8 = image.data instanceof Uint8ClampedArray;\r\n\r\n CanvasPool.remove(canvas);\r\n CanvasPool.remove(canvas2D);\r\n\r\n return !!ctx;\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n Features.webGL = testWebGL();\r\n\r\n Features.worker = !!window['Worker'];\r\n\r\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\r\n\r\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\r\n\r\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\r\n\r\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\r\n\r\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\r\n if (Browser.firefox && Browser.firefoxVersion < 21)\r\n {\r\n Features.getUserMedia = false;\r\n }\r\n\r\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\r\n // is safer to not try and use the fast copy-over method.\r\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\r\n {\r\n Features.canvasBitBltShift = true;\r\n }\r\n\r\n // Known not to work\r\n if (Browser.safari || Browser.mobileSafari)\r\n {\r\n Features.canvasBitBltShift = false;\r\n }\r\n\r\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\r\n\r\n if (navigator.vibrate)\r\n {\r\n Features.vibration = true;\r\n }\r\n\r\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\r\n {\r\n Features.littleEndian = checkIsLittleEndian();\r\n }\r\n\r\n Features.support32bit = (\r\n typeof ArrayBuffer !== 'undefined' &&\r\n typeof Uint8ClampedArray !== 'undefined' &&\r\n typeof Int32Array !== 'undefined' &&\r\n Features.littleEndian !== null &&\r\n isUint8\r\n );\r\n\r\n return Features;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the full screen support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.fullscreen` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Fullscreen\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} available - Does the browser support the Full Screen API?\r\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\r\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\r\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\r\n */\r\nvar Fullscreen = {\r\n\r\n available: false,\r\n cancel: '',\r\n keyboard: false,\r\n request: ''\r\n\r\n};\r\n\r\n/**\r\n* Checks for support of the Full Screen API.\r\n*\r\n* @ignore\r\n*/\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Fullscreen;\r\n }\r\n\r\n var i;\r\n\r\n var suffix1 = 'Fullscreen';\r\n var suffix2 = 'FullScreen';\r\n\r\n var fs = [\r\n 'request' + suffix1,\r\n 'request' + suffix2,\r\n 'webkitRequest' + suffix1,\r\n 'webkitRequest' + suffix2,\r\n 'msRequest' + suffix1,\r\n 'msRequest' + suffix2,\r\n 'mozRequest' + suffix2,\r\n 'mozRequest' + suffix1\r\n ];\r\n\r\n for (i = 0; i < fs.length; i++)\r\n {\r\n if (document.documentElement[fs[i]])\r\n {\r\n Fullscreen.available = true;\r\n Fullscreen.request = fs[i];\r\n break;\r\n }\r\n }\r\n\r\n var cfs = [\r\n 'cancel' + suffix2,\r\n 'exit' + suffix1,\r\n 'webkitCancel' + suffix2,\r\n 'webkitExit' + suffix1,\r\n 'msCancel' + suffix2,\r\n 'msExit' + suffix1,\r\n 'mozCancel' + suffix2,\r\n 'mozExit' + suffix1\r\n ];\r\n\r\n if (Fullscreen.available)\r\n {\r\n for (i = 0; i < cfs.length; i++)\r\n {\r\n if (document[cfs[i]])\r\n {\r\n Fullscreen.cancel = cfs[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Keyboard Input?\r\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\r\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\r\n {\r\n Fullscreen.keyboard = true;\r\n }\r\n\r\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\r\n\r\n return Fullscreen;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the input support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.input` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Input\r\n * @since 3.0.0\r\n *\r\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\r\n * @property {boolean} gamepads - Is navigator.getGamepads available?\r\n * @property {boolean} mspointer - Is mspointer available?\r\n * @property {boolean} touch - Is touch available?\r\n */\r\nvar Input = {\r\n\r\n gamepads: false,\r\n mspointer: false,\r\n touch: false,\r\n wheelEvent: null\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Input;\r\n }\r\n\r\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\r\n {\r\n Input.touch = true;\r\n }\r\n\r\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\r\n {\r\n Input.mspointer = true;\r\n }\r\n\r\n if (navigator.getGamepads)\r\n {\r\n Input.gamepads = true;\r\n }\r\n\r\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\r\n {\r\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\r\n Input.wheelEvent = 'wheel';\r\n }\r\n else if ('onmousewheel' in window)\r\n {\r\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\r\n Input.wheelEvent = 'mousewheel';\r\n }\r\n else if (Browser.firefox && 'MouseScrollEvent' in window)\r\n {\r\n // FF prior to 17. This should probably be scrubbed.\r\n Input.wheelEvent = 'DOMMouseScroll';\r\n }\r\n\r\n return Input;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the operating system of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.os` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.OS\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} android - Is running on android?\r\n * @property {boolean} chromeOS - Is running on chromeOS?\r\n * @property {boolean} cordova - Is the game running under Apache Cordova?\r\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\r\n * @property {boolean} desktop - Is running on a desktop?\r\n * @property {boolean} ejecta - Is the game running under Ejecta?\r\n * @property {boolean} electron - Is the game running under GitHub Electron?\r\n * @property {boolean} iOS - Is running on iOS?\r\n * @property {boolean} iPad - Is running on iPad?\r\n * @property {boolean} iPhone - Is running on iPhone?\r\n * @property {boolean} kindle - Is running on an Amazon Kindle?\r\n * @property {boolean} linux - Is running on linux?\r\n * @property {boolean} macOS - Is running on macOS?\r\n * @property {boolean} node - Is the game running under Node.js?\r\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\r\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\r\n * @property {boolean} windows - Is running on windows?\r\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\r\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\r\n * @property {number} pixelRatio - PixelRatio of the host device?\r\n */\r\nvar OS = {\r\n\r\n android: false,\r\n chromeOS: false,\r\n cordova: false,\r\n crosswalk: false,\r\n desktop: false,\r\n ejecta: false,\r\n electron: false,\r\n iOS: false,\r\n iOSVersion: 0,\r\n iPad: false,\r\n iPhone: false,\r\n kindle: false,\r\n linux: false,\r\n macOS: false,\r\n node: false,\r\n nodeWebkit: false,\r\n pixelRatio: 1,\r\n webApp: false,\r\n windows: false,\r\n windowsPhone: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return OS;\r\n }\r\n\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Windows/).test(ua))\r\n {\r\n OS.windows = true;\r\n }\r\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\r\n {\r\n // Because iOS 13 identifies as Mac OS:\r\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\r\n {\r\n OS.iOS = true;\r\n OS.iPad = true;\r\n\r\n (navigator.appVersion).match(/Version\\/(\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else\r\n {\r\n OS.macOS = true;\r\n }\r\n }\r\n else if ((/Android/).test(ua))\r\n {\r\n OS.android = true;\r\n }\r\n else if ((/Linux/).test(ua))\r\n {\r\n OS.linux = true;\r\n }\r\n else if ((/iP[ao]d|iPhone/i).test(ua))\r\n {\r\n OS.iOS = true;\r\n\r\n (navigator.appVersion).match(/OS (\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n\r\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\r\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\r\n }\r\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\r\n {\r\n OS.kindle = true;\r\n\r\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\r\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\r\n }\r\n else if ((/CrOS/).test(ua))\r\n {\r\n OS.chromeOS = true;\r\n }\r\n\r\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\r\n {\r\n OS.android = false;\r\n OS.iOS = false;\r\n OS.macOS = false;\r\n OS.windows = true;\r\n OS.windowsPhone = true;\r\n }\r\n\r\n var silk = (/Silk/).test(ua);\r\n\r\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\r\n {\r\n OS.desktop = true;\r\n }\r\n\r\n // Windows Phone / Table reset\r\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\r\n {\r\n OS.desktop = false;\r\n }\r\n\r\n // WebApp mode in iOS\r\n if (navigator.standalone)\r\n {\r\n OS.webApp = true;\r\n }\r\n\r\n if (typeof importScripts !== 'function')\r\n {\r\n if (window.cordova !== undefined)\r\n {\r\n OS.cordova = true;\r\n }\r\n\r\n if (window.ejecta !== undefined)\r\n {\r\n OS.ejecta = true;\r\n }\r\n }\r\n\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\r\n {\r\n OS.node = true;\r\n }\r\n\r\n if (OS.node && typeof process.versions === 'object')\r\n {\r\n OS.nodeWebkit = !!process.versions['node-webkit'];\r\n\r\n OS.electron = !!process.versions.electron;\r\n }\r\n\r\n if ((/Crosswalk/).test(ua))\r\n {\r\n OS.crosswalk = true;\r\n }\r\n\r\n OS.pixelRatio = window['devicePixelRatio'] || 1;\r\n\r\n return OS;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the video support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.video` from within any Scene.\r\n *\r\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\r\n *\r\n * @typedef {object} Phaser.Device.Video\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\r\n * @property {boolean} hls - Can this device play hls video files?\r\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\r\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\r\n * @property {boolean} ogg - Can this device play ogg video files?\r\n * @property {boolean} vp9 - Can this device play vp9 video files?\r\n * @property {boolean} webm - Can this device play webm video files?\r\n */\r\nvar Video = {\r\n\r\n h264: false,\r\n hls: false,\r\n mp4: false,\r\n m4v: false,\r\n ogg: false,\r\n vp9: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Video;\r\n }\r\n\r\n var videoElement = document.createElement('video');\r\n var result = !!videoElement.canPlayType;\r\n var no = /^no$/;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\r\n {\r\n Video.ogg = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\r\n Video.h264 = true;\r\n Video.mp4 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\r\n {\r\n Video.m4v = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\r\n {\r\n Video.webm = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\r\n {\r\n Video.vp9 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n Video.hls = true;\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do\r\n }\r\n\r\n return Video;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// This singleton is instantiated as soon as Phaser loads,\r\n// before a Phaser.Game instance has even been created.\r\n// Which means all instances of Phaser Games can share it,\r\n// without having to re-poll the device all over again\r\n\r\n/**\r\n * @namespace Phaser.Device\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.DeviceConf\r\n *\r\n * @property {Phaser.Device.OS} os - The OS Device functions.\r\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\r\n * @property {Phaser.Device.Features} features - The Features Device functions.\r\n * @property {Phaser.Device.Input} input - The Input Device functions.\r\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\r\n * @property {Phaser.Device.Video} video - The Video Device functions.\r\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\r\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\r\n */\r\n\r\nmodule.exports = {\r\n\r\n os: require('./OS'),\r\n browser: require('./Browser'),\r\n features: require('./Features'),\r\n input: require('./Input'),\r\n audio: require('./Audio'),\r\n video: require('./Video'),\r\n fullscreen: require('./Fullscreen'),\r\n canvasFeatures: require('./CanvasFeatures')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar tempMatrix = new Float32Array(20);\r\n\r\n/**\r\n * @classdesc\r\n * The ColorMatrix class creates a 5x4 matrix that can be used in shaders and graphics\r\n * operations. It provides methods required to modify the color values, such as adjusting\r\n * the brightness, setting a sepia tone, hue rotation and more.\r\n *\r\n * Use the method `getData` to return a Float32Array containing the current color values.\r\n *\r\n * @class ColorMatrix\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.50.0\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function ColorMatrix ()\r\n {\r\n /**\r\n * Internal ColorMatrix array.\r\n *\r\n * @name Phaser.Display.ColorMatrix#_matrix\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._matrix = new Float32Array(20);\r\n\r\n /**\r\n * The value that determines how much of the original color is used\r\n * when mixing the colors. A value between 0 (all original) and 1 (all final)\r\n *\r\n * @name Phaser.Display.ColorMatrix#alpha\r\n * @type {number}\r\n * @since 3.50.0\r\n */\r\n this.alpha = 1;\r\n\r\n /**\r\n * Is the ColorMatrix array dirty?\r\n *\r\n * @name Phaser.Display.ColorMatrix#_dirty\r\n * @type {boolean}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._dirty = true;\r\n\r\n /**\r\n * The matrix data as a Float32Array.\r\n *\r\n * Returned by the `getData` method.\r\n *\r\n * @name Phaser.Display.ColorMatrix#data\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._data = new Float32Array(20);\r\n\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix from the given array of color values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#set\r\n * @since 3.50.0\r\n *\r\n * @param {(number[]|Float32Array)} value - The ColorMatrix values to set. Must have 20 elements.\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n set: function (value)\r\n {\r\n this._matrix.set(value);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the ColorMatrix to default values and also resets\r\n * the `alpha` property back to 1.\r\n *\r\n * @method Phaser.Display.ColorMatrix#reset\r\n * @since 3.50.0\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n reset: function ()\r\n {\r\n var m = this._matrix;\r\n\r\n m.fill(0);\r\n\r\n m[0] = 1;\r\n m[6] = 1;\r\n m[12] = 1;\r\n m[18] = 1;\r\n\r\n this.alpha = 1;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the ColorMatrix as a Float32Array.\r\n *\r\n * Can be used directly as a 1fv shader uniform value.\r\n *\r\n * @method Phaser.Display.ColorMatrix#getData\r\n * @since 3.50.0\r\n *\r\n * @return {Float32Array} The ColorMatrix as a Float32Array.\r\n */\r\n getData: function ()\r\n {\r\n var data = this._data;\r\n\r\n if (this._dirty)\r\n {\r\n data.set(this._matrix);\r\n\r\n data[4] /= 255;\r\n data[9] /= 255;\r\n data[14] /= 255;\r\n data[19] /= 255;\r\n\r\n this._dirty = false;\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Changes the brightness of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brightness\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of brightness to apply to this ColorMatrix. Between 0 (black) and 1.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brightness: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var b = value;\r\n\r\n return this.multiply([\r\n b, 0, 0, 0, 0,\r\n 0, b, 0, 0, 0,\r\n 0, 0, b, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Changes the saturation of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturate\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of saturation to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n saturate: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var x = (value * 2 / 3) + 1;\r\n var y = ((x - 1) * -0.5);\r\n\r\n return this.multiply([\r\n x, y, y, 0, 0,\r\n y, x, y, 0, 0,\r\n y, y, x, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Desaturates this ColorMatrix (removes color from it).\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturation\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturate: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-1, multiply);\r\n },\r\n\r\n /**\r\n * Rotates the hues of this ColorMatrix by the value given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#hue\r\n * @since 3.50.0\r\n *\r\n * @param {number} [rotation=0] - The amount of hue rotation to apply to this ColorMatrix, in degrees.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n hue: function (rotation, multiply)\r\n {\r\n if (rotation === undefined) { rotation = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n rotation = rotation / 180 * Math.PI;\r\n\r\n var cos = Math.cos(rotation);\r\n var sin = Math.sin(rotation);\r\n var lumR = 0.213;\r\n var lumG = 0.715;\r\n var lumB = 0.072;\r\n\r\n return this.multiply([\r\n lumR + cos * (1 - lumR) + sin * (-lumR),lumG + cos * (-lumG) + sin * (-lumG),lumB + cos * (-lumB) + sin * (1 - lumB), 0, 0,\r\n lumR + cos * (-lumR) + sin * (0.143),lumG + cos * (1 - lumG) + sin * (0.140),lumB + cos * (-lumB) + sin * (-0.283), 0, 0,\r\n lumR + cos * (-lumR) + sin * (-(1 - lumR)),lumG + cos * (-lumG) + sin * (lumG),lumB + cos * (1 - lumB) + sin * (lumB), 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be grayscale.\r\n *\r\n * @method Phaser.Display.ColorMatrix#grayscale\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=1] - The grayscale scale (0 is black).\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n grayscale: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-value, multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be black and white.\r\n *\r\n * @method Phaser.Display.ColorMatrix#blackWhite\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n blackWhite: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BLACK_WHITE, multiply);\r\n },\r\n\r\n /**\r\n * Change the contrast of this ColorMatrix by the amount given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#contrast\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of contrast to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n contrast: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var v = value + 1;\r\n var o = -0.5 * (v - 1);\r\n\r\n return this.multiply([\r\n v, 0, 0, 0, o,\r\n 0, v, 0, 0, o,\r\n 0, 0, v, 0, o,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Converts this ColorMatrix to have negative values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#negative\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n negative: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.NEGATIVE, multiply);\r\n },\r\n\r\n /**\r\n * Apply a desaturated luminance to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#desaturateLuminance\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturateLuminance: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.DESATURATE_LUMINANCE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a sepia tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#sepia\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n sepia: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SEPIA, multiply);\r\n },\r\n\r\n /**\r\n * Applies a night vision tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#night\r\n * @since 3.50.0\r\n *\r\n * @param {number} [intensity=0.1] - The intensity of this effect.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n night: function (intensity, multiply)\r\n {\r\n if (intensity === undefined) { intensity = 0.1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply([\r\n intensity * (-2.0), -intensity, 0, 0, 0,\r\n -intensity, 0, intensity, 0, 0,\r\n 0, intensity, intensity * 2.0, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Applies a trippy color tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#lsd\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n lsd: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.LSD, multiply);\r\n },\r\n\r\n /**\r\n * Applies a brown tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brown\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brown: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BROWN, multiply);\r\n },\r\n\r\n /**\r\n * Applies a vintage pinhole color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#vintagePinhole\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n vintagePinhole: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.VINTAGE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a kodachrome color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#kodachrome\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n kodachrome: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.KODACHROME, multiply);\r\n },\r\n\r\n /**\r\n * Applies a technicolor color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#technicolor\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n technicolor: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.TECHNICOLOR, multiply);\r\n },\r\n\r\n /**\r\n * Applies a polaroid color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#polaroid\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n polaroid: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.POLAROID, multiply);\r\n },\r\n\r\n /**\r\n * Shifts the values of this ColorMatrix into BGR order.\r\n *\r\n * @method Phaser.Display.ColorMatrix#shiftToBGR\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n shiftToBGR: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SHIFT_BGR, multiply);\r\n },\r\n\r\n /**\r\n * Multiplies the two given matrices.\r\n *\r\n * @method Phaser.Display.ColorMatrix#multiply\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} a - The 5x4 array to multiply with ColorMatrix._matrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n multiply: function (a, multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n // Duplicate _matrix into c\r\n\r\n if (!multiply)\r\n {\r\n this.reset();\r\n }\r\n\r\n var m = this._matrix;\r\n var c = tempMatrix;\r\n\r\n // copy _matrix to tempMatrox\r\n c.set(m);\r\n\r\n m.set([\r\n // R\r\n (c[0] * a[0]) + (c[1] * a[5]) + (c[2] * a[10]) + (c[3] * a[15]),\r\n (c[0] * a[1]) + (c[1] * a[6]) + (c[2] * a[11]) + (c[3] * a[16]),\r\n (c[0] * a[2]) + (c[1] * a[7]) + (c[2] * a[12]) + (c[3] * a[17]),\r\n (c[0] * a[3]) + (c[1] * a[8]) + (c[2] * a[13]) + (c[3] * a[18]),\r\n (c[0] * a[4]) + (c[1] * a[9]) + (c[2] * a[14]) + (c[3] * a[19]) + c[4],\r\n\r\n // G\r\n (c[5] * a[0]) + (c[6] * a[5]) + (c[7] * a[10]) + (c[8] * a[15]),\r\n (c[5] * a[1]) + (c[6] * a[6]) + (c[7] * a[11]) + (c[8] * a[16]),\r\n (c[5] * a[2]) + (c[6] * a[7]) + (c[7] * a[12]) + (c[8] * a[17]),\r\n (c[5] * a[3]) + (c[6] * a[8]) + (c[7] * a[13]) + (c[8] * a[18]),\r\n (c[5] * a[4]) + (c[6] * a[9]) + (c[7] * a[14]) + (c[8] * a[19]) + c[9],\r\n\r\n // B\r\n (c[10] * a[0]) + (c[11] * a[5]) + (c[12] * a[10]) + (c[13] * a[15]),\r\n (c[10] * a[1]) + (c[11] * a[6]) + (c[12] * a[11]) + (c[13] * a[16]),\r\n (c[10] * a[2]) + (c[11] * a[7]) + (c[12] * a[12]) + (c[13] * a[17]),\r\n (c[10] * a[3]) + (c[11] * a[8]) + (c[12] * a[13]) + (c[13] * a[18]),\r\n (c[10] * a[4]) + (c[11] * a[9]) + (c[12] * a[14]) + (c[13] * a[19]) + c[14],\r\n\r\n // A\r\n (c[15] * a[0]) + (c[16] * a[5]) + (c[17] * a[10]) + (c[18] * a[15]),\r\n (c[15] * a[1]) + (c[16] * a[6]) + (c[17] * a[11]) + (c[18] * a[16]),\r\n (c[15] * a[2]) + (c[16] * a[7]) + (c[17] * a[12]) + (c[18] * a[17]),\r\n (c[15] * a[3]) + (c[16] * a[8]) + (c[17] * a[13]) + (c[18] * a[18]),\r\n (c[15] * a[4]) + (c[16] * a[9]) + (c[17] * a[14]) + (c[18] * a[19]) + c[19]\r\n\r\n ]);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for black_white operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BLACK_WHITE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BLACK_WHITE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for negative operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.NEGATIVE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.NEGATIVE = [ -1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for desatured luminance operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.DESATURATE_LUMINANCE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.DESATURATE_LUMINANCE = [ 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for sepia operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SEPIA\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SEPIA = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for lsd operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.LSD\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.LSD = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for brown operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BROWN\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BROWN = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for vintage pinhole operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.VINTAGE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.VINTAGE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for kodachrome operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.KODACHROME\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.KODACHROME = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for technicolor operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.TECHNICOLOR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.TECHNICOLOR = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for polaroid shift operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.POLAROID\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.POLAROID = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for shift BGR operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SHIFT_BGR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SHIFT_BGR = [ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0 ];\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../../const');\r\nvar Smoothing = require('./Smoothing');\r\n\r\n// The pool into which the canvas elements are placed.\r\nvar pool = [];\r\n\r\n// Automatically apply smoothing(false) to created Canvas elements\r\nvar _disableContextSmoothing = false;\r\n\r\n/**\r\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\r\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\r\n * which is useless for some of the Phaser pipelines / renderer.\r\n *\r\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\r\n * Which means all instances of Phaser Games on the same page can share the one single pool.\r\n *\r\n * @namespace Phaser.Display.Canvas.CanvasPool\r\n * @since 3.0.0\r\n */\r\nvar CanvasPool = function ()\r\n{\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\r\n *\r\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\r\n */\r\n var create = function (parent, width, height, canvasType, selfParent)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = 1; }\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n if (selfParent === undefined) { selfParent = false; }\r\n\r\n var canvas;\r\n var container = first(canvasType);\r\n\r\n if (container === null)\r\n {\r\n container = {\r\n parent: parent,\r\n canvas: document.createElement('canvas'),\r\n type: canvasType\r\n };\r\n\r\n if (canvasType === CONST.CANVAS)\r\n {\r\n pool.push(container);\r\n }\r\n\r\n canvas = container.canvas;\r\n }\r\n else\r\n {\r\n container.parent = parent;\r\n\r\n canvas = container.canvas;\r\n }\r\n\r\n if (selfParent)\r\n {\r\n container.parent = canvas;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\r\n {\r\n Smoothing.disable(canvas.getContext('2d', { willReadFrequently: false }));\r\n }\r\n\r\n return canvas;\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create2D\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created canvas.\r\n */\r\n var create2D = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.CANVAS);\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created WebGL canvas.\r\n */\r\n var createWebGL = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.WEBGL);\r\n };\r\n\r\n /**\r\n * Gets the first free canvas index from the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.first\r\n * @since 3.0.0\r\n *\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n *\r\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\r\n */\r\n var first = function (canvasType)\r\n {\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n\r\n if (canvasType === CONST.WEBGL)\r\n {\r\n return null;\r\n }\r\n\r\n for (var i = 0; i < pool.length; i++)\r\n {\r\n var container = pool[i];\r\n\r\n if (!container.parent && container.type === canvasType)\r\n {\r\n return container;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\r\n * The canvas has its width and height set to 1, and its parent attribute nulled.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.remove\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The canvas or the parent of the canvas to free.\r\n */\r\n var remove = function (parent)\r\n {\r\n // Check to see if the parent is a canvas object\r\n var isCanvas = parent instanceof HTMLCanvasElement;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\r\n {\r\n container.parent = null;\r\n container.canvas.width = 1;\r\n container.canvas.height = 1;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the total number of used canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.total\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of used canvases.\r\n */\r\n var total = function ()\r\n {\r\n var c = 0;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if (container.parent)\r\n {\r\n c++;\r\n }\r\n });\r\n\r\n return c;\r\n };\r\n\r\n /**\r\n * Gets the total number of free canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.free\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of free canvases.\r\n */\r\n var free = function ()\r\n {\r\n return pool.length - total();\r\n };\r\n\r\n /**\r\n * Disable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\r\n * @since 3.0.0\r\n */\r\n var disableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = true;\r\n };\r\n\r\n /**\r\n * Enable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\r\n * @since 3.0.0\r\n */\r\n var enableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = false;\r\n };\r\n\r\n return {\r\n create2D: create2D,\r\n create: create,\r\n createWebGL: createWebGL,\r\n disableSmoothing: disableSmoothing,\r\n enableSmoothing: enableSmoothing,\r\n first: first,\r\n free: free,\r\n pool: pool,\r\n remove: remove,\r\n total: total\r\n };\r\n};\r\n\r\n// If we export the called function here, it'll only be invoked once (not every time it's required).\r\nmodule.exports = CanvasPool();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Browser specific prefix, so not going to change between contexts, only between browsers\r\nvar prefix = '';\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.Smoothing\r\n * @since 3.0.0\r\n */\r\nvar Smoothing = function ()\r\n{\r\n /**\r\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\r\n *\r\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\r\n */\r\n var getPrefix = function (context)\r\n {\r\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\r\n\r\n for (var i = 0; i < vendors.length; i++)\r\n {\r\n var s = vendors[i] + 'mageSmoothingEnabled';\r\n\r\n if (s in context)\r\n {\r\n return s;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.enable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var enable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = true;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.disable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var disable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = false;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\r\n * Returns null if no smoothing prefix is available.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\r\n *\r\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\r\n */\r\n var isEnabled = function (context)\r\n {\r\n return (prefix !== null) ? context[prefix] : null;\r\n };\r\n\r\n return {\r\n disable: disable,\r\n enable: enable,\r\n getPrefix: getPrefix,\r\n isEnabled: isEnabled\r\n };\r\n\r\n};\r\n\r\nmodule.exports = Smoothing();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object or Dynamic Texture to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this mask is being added.\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, maskObject, x, y, texture, frame)\r\n {\r\n if (!maskObject)\r\n {\r\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\r\n }\r\n\r\n /**\r\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = maskObject;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel.\r\n *\r\n * Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask? This is false by default and should not be changed.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n },\r\n\r\n /**\r\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\r\n *\r\n * If a Game Object it must have a texture, such as a Sprite.\r\n *\r\n * You can update the source of the mask as often as you like.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\r\n */\r\n setBitmap: function (maskObject)\r\n {\r\n this.bitmapMask = maskObject;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\r\n */\r\n postRenderWebGL: function (renderer, camera, renderTarget)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object, or Dynamic Texture, to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\r\n * @since 3.60.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\r\n */\r\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\r\n{\r\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level. This can change dynamically at runtime\r\n * and is set in the applyStencil method.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n *\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n var mask = 0xff;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n\r\n // Do this _after_ we set the stencilFunc\r\n level++;\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n this.level = level;\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, mask);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var current = renderer.currentMask;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n current.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n current.mask = prev.mask;\r\n current.camera = prev.camera;\r\n }\r\n else\r\n {\r\n current.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Barrel FX Controller.\r\n *\r\n * This FX controller manages the barrel distortion effect for a Game Object.\r\n *\r\n * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to\r\n * a Game Object. The amount of the effect can be modified in real-time.\r\n *\r\n * A Barrel effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBarrel();\r\n * sprite.postFX.addBarrel();\r\n * ```\r\n *\r\n * @class Barrel\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n */\r\nvar Barrel = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Barrel (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.BARREL, gameObject);\r\n\r\n /**\r\n * The amount of distortion applied to the barrel effect.\r\n *\r\n * Typically keep this within the range 1 (no distortion) to +- 1.\r\n *\r\n * @name Phaser.FX.Barrel#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Barrel;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Bloom\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n */\r\nvar Bloom = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bloom (gameObject, color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n if (offsetX === undefined) { offsetX = 1; }\r\n if (offsetY === undefined) { offsetY = 1; }\r\n if (blurStrength === undefined) { blurStrength = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLOOM, gameObject);\r\n\r\n /**\r\n * The number of steps to run the Bloom effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the Bloom,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Bloom#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The horizontal offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetX = offsetX;\r\n\r\n /**\r\n * The vertical offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetY = offsetY;\r\n\r\n /**\r\n * The strength of the blur process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#blurStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurStrength = blurStrength;\r\n\r\n /**\r\n * The strength of the blend process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Bloom#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the bloom as a number value.\r\n *\r\n * @name Phaser.FX.Bloom#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bloom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Blur\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n */\r\nvar Blur = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Blur (gameObject, quality, x, y, strength, color, steps)\r\n {\r\n if (quality === undefined) { quality = 0; }\r\n if (x === undefined) { x = 2; }\r\n if (y === undefined) { y = 2; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLUR, gameObject);\r\n\r\n /**\r\n * The quality of the blur effect.\r\n *\r\n * This can be:\r\n *\r\n * 0 for Low Quality\r\n * 1 for Medium Quality\r\n * 2 for High Quality\r\n *\r\n * The higher the quality, the more complex shader is used\r\n * and the more processing time is spent on the GPU calculating\r\n * the final blur. This value is used in conjunction with the\r\n * `steps` value, as one has a direct impact on the other.\r\n *\r\n * Keep this value as low as you can, while still achieving the\r\n * desired effect you need for your game.\r\n *\r\n * @name Phaser.FX.Blur#quality\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.quality = 0;\r\n\r\n /**\r\n * The horizontal offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The number of steps to run the Blur effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the blur,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Blur#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The strength of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Blur#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the blur as a number value.\r\n *\r\n * @name Phaser.FX.Blur#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Blur;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Bokeh\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {boolean} [isTiltShift=false] - Is this a bokeh or Tile Shift effect?\r\n * @param {number} [blurX=1] - If Tilt Shift, the amount of horizontal blur.\r\n * @param {number} [blurY=1] - If Tilt Shift, the amount of vertical blur.\r\n * @param {number} [strength=1] - If Tilt Shift, the strength of the blur.\r\n */\r\nvar Bokeh = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bokeh (gameObject, radius, amount, contrast, isTiltShift, blurX, blurY, strength)\r\n {\r\n if (radius === undefined) { radius = 0.5; }\r\n if (amount === undefined) { amount = 1; }\r\n if (contrast === undefined) { contrast = 0.2; }\r\n if (isTiltShift === undefined) { isTiltShift = false; }\r\n if (blurX === undefined) { blurX = 1; }\r\n if (blurY === undefined) { blurY = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n\r\n Controller.call(this, FX_CONST.BOKEH, gameObject);\r\n\r\n this.radius = radius;\r\n this.amount = amount;\r\n this.contrast = contrast;\r\n\r\n this.isTiltShift = isTiltShift;\r\n this.strength = strength;\r\n this.blurX = blurX;\r\n this.blurY = blurY;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bokeh;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Circle\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=16724914] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n */\r\nvar Circle = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Circle (gameObject, thickness, color, backgroundColor, scale, feather)\r\n {\r\n if (thickness === undefined) { thickness = 8; }\r\n if (scale === undefined) { scale = 1; }\r\n if (feather === undefined) { feather = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.CIRCLE, gameObject);\r\n\r\n /**\r\n * The scale of the circle. The default scale is 1, which is a circle\r\n * the full size of the underlying texture. Reduce this value to create\r\n * a smaller circle, or increase it to create a circle that extends off\r\n * the edges of the texture.\r\n *\r\n * @name Phaser.FX.Circle#scale\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.scale = scale;\r\n\r\n /**\r\n * The amount of feathering to apply to the circle from the ring,\r\n * extending into the middle of the circle. The default is 0.005,\r\n * which is a very low amount of feathering just making sure the ring\r\n * has a smooth edge. Increase this amount to a value such as 0.5\r\n * or 0.025 for larger amounts of feathering.\r\n *\r\n * @name Phaser.FX.Circle#feather\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.feather = feather;\r\n\r\n /**\r\n * The width of the circle around the texture, in pixels. This value\r\n * doesn't factor in the feather, which can extend the thickness\r\n * internally depending on its value.\r\n *\r\n * @name Phaser.FX.Circle#thickness\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.thickness = thickness;\r\n\r\n /**\r\n * The internal gl color array for the ring color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 0.2, 0.7 ];\r\n\r\n /**\r\n * The internal gl color array for the background color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 1, 0, 0, 0.4 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n\r\n if (backgroundColor !== undefined && backgroundColor !== null)\r\n {\r\n this.backgroundColor = backgroundColor;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the circular ring, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of the background, behind the texture, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#backgroundColor\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n backgroundColor: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Circle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar BaseColorMatrix = require('../display/ColorMatrix');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class ColorMatrix\r\n * @extends Phaser.Display.ColorMatrix\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n Extends: BaseColorMatrix,\r\n\r\n initialize:\r\n\r\n function ColorMatrix (gameObject)\r\n {\r\n BaseColorMatrix.call(this);\r\n\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = FX_CONST.COLOR_MATRIX;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * @name Phaser.FX.ColorMatrix#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this._matrix = null;\r\n this._data = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {number} type - The FX Type constant.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar Controller = new Class({\r\n\r\n initialize:\r\n\r\n function Controller (type, gameObject)\r\n {\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.Controller#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.Controller#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * @name Phaser.FX.Controller#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n /**\r\n * Destroys this FX Controller.\r\n *\r\n * @method Phaser.FX.Controller#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this.active = false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Controller;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Displacement\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {string} [key='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply.\r\n */\r\nvar Displacement = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Displacement (gameObject, displacementTexture, x, y)\r\n {\r\n if (displacementTexture === undefined) { displacementTexture = '__WHITE'; }\r\n if (x === undefined) { x = 0.005; }\r\n if (y === undefined) { y = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.DISPLACEMENT, gameObject);\r\n\r\n /**\r\n * The amount of horizontal displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The amount of vertical displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The underlying WebGLTexture used for displacement.\r\n *\r\n * @name Phaser.FX.Displacement#glTexture\r\n * @type {WebGLTexture}\r\n * @since 3.60.0\r\n */\r\n this.glTexture;\r\n\r\n this.setTexture(displacementTexture);\r\n },\r\n\r\n setTexture: function (texture)\r\n {\r\n var phaserTexture = this.gameObject.scene.sys.textures.getFrame(texture);\r\n\r\n if (phaserTexture)\r\n {\r\n this.glTexture = phaserTexture.glTexture;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Displacement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Glow FX Controller.\r\n *\r\n * This FX controller manages the glow effect for a Game Object.\r\n *\r\n * A glow effect allows you to apply a soft, blurred 'glow' around either the outside,\r\n * inside, or both of a Game Object. The color and strength of the glow can be modified.\r\n *\r\n * You can modify most of its properties in real-time to adjust the visual effect.\r\n *\r\n * A Glow effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addGlow();\r\n * sprite.postFX.addGlow();\r\n * ```\r\n *\r\n * @class Glow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n */\r\nvar Glow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Glow (gameObject, color, outerStrength, innerStrength, knockout)\r\n {\r\n if (outerStrength === undefined) { outerStrength = 4; }\r\n if (innerStrength === undefined) { innerStrength = 0; }\r\n if (knockout === undefined) { knockout = false; }\r\n\r\n Controller.call(this, FX_CONST.GLOW, gameObject);\r\n\r\n /**\r\n * The strength of the glow outward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#outerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.outerStrength = outerStrength;\r\n\r\n /**\r\n * The strength of the glow inward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#innerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.innerStrength = innerStrength;\r\n\r\n /**\r\n * If `true` only the glow is drawn, not the texture itself.\r\n *\r\n * @name Phaser.FX.Glow#knockout\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.knockout = knockout;\r\n\r\n /**\r\n * A 4 element array of gl color values.\r\n *\r\n * @name Phaser.FX.Glow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1, 1 ];\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the glow as a number value.\r\n *\r\n * @name Phaser.FX.Glow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Glow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Gradient\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n */\r\nvar Gradient = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Gradient (gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n if (alpha === undefined) { alpha = 0.2; }\r\n if (fromX === undefined) { fromX = 0; }\r\n if (fromY === undefined) { fromY = 0; }\r\n if (toX === undefined) { toX = 0; }\r\n if (toY === undefined) { toY = 1; }\r\n if (size === undefined) { size = 0; }\r\n\r\n Controller.call(this, FX_CONST.GRADIENT, gameObject);\r\n\r\n /**\r\n * The alpha value of the gradient effect.\r\n *\r\n * @name Phaser.FX.Gradient#alpha\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.alpha = alpha;\r\n\r\n /**\r\n * Sets how many 'chunks' the gradient is divided in to, as spread over the\r\n * entire height of the texture. Leave this at zero for a smooth gradient,\r\n * or set to a higher number to split the gradient into that many sections, giving\r\n * a more banded 'retro' effect.\r\n *\r\n * @name Phaser.FX.Gradient#size\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.size = size;\r\n\r\n /**\r\n * The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromX = fromX;\r\n\r\n /**\r\n * The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromY = fromY;\r\n\r\n /**\r\n * The horizontal position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toX = toX;\r\n\r\n /**\r\n * The vertical position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toY = toY;\r\n\r\n /**\r\n * The internal gl color array for the starting color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor1\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor1 = [ 255, 0, 0 ];\r\n\r\n /**\r\n * The internal gl color array for the ending color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 0, 255, 0 ];\r\n\r\n if (color1 !== undefined && color1 !== null)\r\n {\r\n this.color1 = color1;\r\n }\r\n\r\n if (color2 !== undefined && color2 !== null)\r\n {\r\n this.color2 = color2;\r\n }\r\n },\r\n\r\n /**\r\n * The first gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color1\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color1: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor1;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor1;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The second gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color2\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color2: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Gradient;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Pixelate\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n */\r\nvar Pixelate = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Pixelate (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.PIXELATE, gameObject);\r\n\r\n /**\r\n * The amount of pixelation to apply.\r\n *\r\n * @name Phaser.FX.Pixelate#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pixelate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Shadow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n */\r\nvar Shadow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shadow (gameObject, x, y, decay, power, color, samples, intensity)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (decay === undefined) { decay = 0.1; }\r\n if (power === undefined) { power = 1; }\r\n if (samples === undefined) { samples = 6; }\r\n if (intensity === undefined) { intensity = 1; }\r\n\r\n Controller.call(this, FX_CONST.SHADOW, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The amount of decay for the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#decay\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.decay = decay;\r\n\r\n /**\r\n * The power of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#power\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.power = power;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Shadow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 0, 0, 0, 1 ];\r\n\r\n /**\r\n * The number of samples that the shadow effect will run for.\r\n *\r\n * This should be an integer with a minimum value of 1 and a maximum of 12.\r\n *\r\n * @name Phaser.FX.Shadow#samples\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.samples = samples;\r\n\r\n /**\r\n * The intensity of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#intensity\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.intensity = intensity;\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the shadow.\r\n *\r\n * @name Phaser.FX.Shadow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shadow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Shine\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n */\r\nvar Shine = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shine (gameObject, speed, lineWidth, gradient, reveal)\r\n {\r\n if (speed === undefined) { speed = 0.5; }\r\n if (lineWidth === undefined) { lineWidth = 0.5; }\r\n if (gradient === undefined) { gradient = 3; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.SHINE, gameObject);\r\n\r\n /**\r\n * The speed of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#speed\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.speed = speed;\r\n\r\n /**\r\n * The line width of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#lineWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.lineWidth = lineWidth;\r\n\r\n /**\r\n * The gradient of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#gradient\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.gradient = gradient;\r\n\r\n /**\r\n * Does this Shine effect reveal or get added to its target?\r\n *\r\n * @name Phaser.FX.Shine#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shine;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Vignette\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n */\r\nvar Vignette = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Vignette (gameObject, x, y, radius, strength)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = 0.5; }\r\n if (radius === undefined) { radius = 0.5; }\r\n if (strength === undefined) { strength = 0.5; }\r\n\r\n Controller.call(this, FX_CONST.VIGNETTE, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#radius\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The strength of the vignette effect.\r\n *\r\n * @name Phaser.FX.Vignette#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Vignette;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Wipe\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n * @param {boolean} [reveal=false] - Is this a reveal (true) or a fade (false) effect?\r\n */\r\nvar Wipe = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Wipe (gameObject, wipeWidth, direction, axis, reveal)\r\n {\r\n if (wipeWidth === undefined) { wipeWidth = 0.1; }\r\n if (direction === undefined) { direction = 0; }\r\n if (axis === undefined) { axis = 0; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.WIPE, gameObject);\r\n\r\n // left to right: direction 0, axis 0\r\n // right to left: direction 1, axis 0\r\n // top to bottom: direction 1, axis 1\r\n // bottom to top: direction 1, axis 0\r\n // wipe: reveal 0\r\n // reveal: reveal 1\r\n // progress: 0 - 1\r\n\r\n /**\r\n * The progress of the Wipe effect. This value is normalized to the range 0 to 1.\r\n *\r\n * Adjust this value to make the wipe transition (i.e. via a Tween)\r\n *\r\n * @name Phaser.FX.Wipe#progress\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Wipe#wipeWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.wipeWidth = wipeWidth;\r\n\r\n /**\r\n * The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n *\r\n * @name Phaser.FX.Wipe#direction\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.direction = direction;\r\n\r\n /**\r\n * The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @name Phaser.FX.Wipe#axis\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.axis = axis;\r\n\r\n /**\r\n * Is this a reveal (true) or a fade (false) effect?\r\n *\r\n * @name Phaser.FX.Wipe#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Wipe;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FX_CONST = {\r\n\r\n /**\r\n * The Glow FX.\r\n *\r\n * @name Phaser.FX.GLOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GLOW: 4,\r\n\r\n /**\r\n * The Shadow FX.\r\n *\r\n * @name Phaser.FX.SHADOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHADOW: 5,\r\n\r\n /**\r\n * The Pixelate FX.\r\n *\r\n * @name Phaser.FX.PIXELATE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n PIXELATE: 6,\r\n\r\n /**\r\n * The Vignette FX.\r\n *\r\n * @name Phaser.FX.VIGNETTE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n VIGNETTE: 7,\r\n\r\n /**\r\n * The Shine FX.\r\n *\r\n * @name Phaser.FX.SHINE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHINE: 8,\r\n\r\n /**\r\n * The Blur FX.\r\n *\r\n * @name Phaser.FX.BLUR\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLUR: 9, // uses 3 shaders, slots 9, 10 and 11\r\n\r\n /**\r\n * The Gradient FX.\r\n *\r\n * @name Phaser.FX.GRADIENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GRADIENT: 12,\r\n\r\n /**\r\n * The Bloom FX.\r\n *\r\n * @name Phaser.FX.BLOOM\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLOOM: 13,\r\n\r\n /**\r\n * The Color Matrix FX.\r\n *\r\n * @name Phaser.FX.COLOR_MATRIX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n COLOR_MATRIX: 14,\r\n\r\n /**\r\n * The Circle FX.\r\n *\r\n * @name Phaser.FX.CIRCLE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n CIRCLE: 15,\r\n\r\n /**\r\n * The Barrel FX.\r\n *\r\n * @name Phaser.FX.BARREL\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BARREL: 16,\r\n\r\n /**\r\n * The Displacement FX.\r\n *\r\n * @name Phaser.FX.DISPLACEMENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DISPLACEMENT: 17,\r\n\r\n /**\r\n * The Wipe FX.\r\n *\r\n * @name Phaser.FX.WIPE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n WIPE: 18,\r\n\r\n /**\r\n * The Bokeh and Tilt Shift FX.\r\n *\r\n * @name Phaser.FX.BOKEH\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BOKEH: 19\r\n\r\n};\r\n\r\nmodule.exports = FX_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @namespace Phaser.FX\r\n */\r\n\r\nvar FX = {\r\n\r\n Barrel: require('./Barrel'),\r\n Controller: require('./Controller'),\r\n Bloom: require('./Bloom'),\r\n Blur: require('./Blur'),\r\n Bokeh: require('./Bokeh'),\r\n Circle: require('./Circle'),\r\n ColorMatrix: require('./ColorMatrix'),\r\n Displacement: require('./Displacement'),\r\n Glow: require('./Glow'),\r\n Gradient: require('./Gradient'),\r\n Pixelate: require('./Pixelate'),\r\n Shadow: require('./Shadow'),\r\n Shine: require('./Shine'),\r\n Vignette: require('./Vignette'),\r\n Wipe: require('./Wipe')\r\n\r\n};\r\n\r\nFX = Extend(false, FX, FX_CONST);\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar ComponentsToJSON = require('./components/ToJSON');\r\nvar DataManager = require('../data/DataManager');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The base class that all Game Objects extend.\r\n * You don't create GameObjects directly and they cannot be added to the display list.\r\n * Instead, use them as the base for your own custom classes.\r\n *\r\n * @class GameObject\r\n * @memberof Phaser.GameObjects\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\r\n */\r\nvar GameObject = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GameObject (scene, type)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene to which this Game Object belongs.\r\n *\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * You should consider this property as being read-only. You cannot move a\r\n * Game Object to another Scene by simply changing it.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Holds a reference to the Display List that contains this Game Object.\r\n *\r\n * This is set automatically when this Game Object is added to a Scene or Layer.\r\n *\r\n * You should treat this property as being read-only.\r\n *\r\n * @name Phaser.GameObjects.GameObject#displayList\r\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\r\n * @default null\r\n * @since 3.50.0\r\n */\r\n this.displayList = null;\r\n\r\n /**\r\n * A textual representation of this Game Object, i.e. `sprite`.\r\n * Used internally by Phaser but is available for your own custom classes to populate.\r\n *\r\n * @name Phaser.GameObjects.GameObject#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The current state of this Game Object.\r\n *\r\n * Phaser itself will never modify this value, although plugins may do so.\r\n *\r\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\r\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\r\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @name Phaser.GameObjects.GameObject#state\r\n * @type {(number|string)}\r\n * @since 3.16.0\r\n */\r\n this.state = 0;\r\n\r\n /**\r\n * The parent Container of this Game Object, if it has one.\r\n *\r\n * @name Phaser.GameObjects.GameObject#parentContainer\r\n * @type {Phaser.GameObjects.Container}\r\n * @since 3.4.0\r\n */\r\n this.parentContainer = null;\r\n\r\n /**\r\n * The name of this Game Object.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.GameObject#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The active state of this Game Object.\r\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\r\n * An active object is one which is having its logic and internal systems updated.\r\n *\r\n * @name Phaser.GameObjects.GameObject#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The Tab Index of the Game Object.\r\n * Reserved for future use by plugins and the Input Manager.\r\n *\r\n * @name Phaser.GameObjects.GameObject#tabIndex\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.tabIndex = -1;\r\n\r\n /**\r\n * A Data Manager.\r\n * It allows you to store, query and get key/value paired information specific to this Game Object.\r\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#data\r\n * @type {Phaser.Data.DataManager}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.data = null;\r\n\r\n /**\r\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\r\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\r\n * If those components are not used by your custom class then you can use this bitmask as you wish.\r\n *\r\n * @name Phaser.GameObjects.GameObject#renderFlags\r\n * @type {number}\r\n * @default 15\r\n * @since 3.0.0\r\n */\r\n this.renderFlags = 15;\r\n\r\n /**\r\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\r\n * Not usually set directly, instead call `Camera.ignore`, however you can\r\n * set this property directly using the Camera.id property:\r\n *\r\n * @example\r\n * this.cameraFilter |= camera.id\r\n *\r\n * @name Phaser.GameObjects.GameObject#cameraFilter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cameraFilter = 0;\r\n\r\n /**\r\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\r\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#input\r\n * @type {?Phaser.Types.Input.InteractiveObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.input = null;\r\n\r\n /**\r\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\r\n * This includes calls that may come from a Group, Container or the Scene itself.\r\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\r\n * responsible for managing references to and from this Game Object.\r\n *\r\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.ignoreDestroy = false;\r\n\r\n this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\r\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\r\n\r\n // Tell the Scene to re-sort the children\r\n scene.sys.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\r\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\r\n * The `name` property is not populated by Phaser and is presented for your own use.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The name to be given to this Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setName: function (value)\r\n {\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current state of this Game Object.\r\n *\r\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\r\n *\r\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\r\n * The state value should typically be an integer (ideally mapped to a constant\r\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setState\r\n * @since 3.16.0\r\n *\r\n * @param {(number|string)} value - The state of the Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setState: function (value)\r\n {\r\n this.state = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a Data Manager component to this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setDataEnabled\r\n * @since 3.0.0\r\n * @see Phaser.Data.DataManager\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setDataEnabled: function ()\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Allows you to store a key value pair within this Game Objects Data Manager.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * sprite.setData('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `getData`:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setData\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.set(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#incData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n incData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.inc(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toggleData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n toggleData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.toggle(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * sprite.getData([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n getData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this.data.get(key);\r\n },\r\n\r\n /**\r\n * Pass this Game Object to the Input Manager to enable it for Input.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @example\r\n * sprite.setInteractive();\r\n *\r\n * @example\r\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\r\n *\r\n * @example\r\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\r\n *\r\n * @method Phaser.GameObjects.GameObject#setInteractive\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\r\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will disable it.\r\n *\r\n * An object that is disabled for input stops processing or being considered for\r\n * input events, but can be turned back on again at any time by simply calling\r\n * `setInteractive()` with no arguments provided.\r\n *\r\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#disableInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n disableInteractive: function ()\r\n {\r\n this.scene.sys.input.disable(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will queue it\r\n * for removal, causing it to no longer be interactive. The removal happens on\r\n * the next game step, it is not immediate.\r\n *\r\n * The Interactive Object that was assigned to this Game Object will be destroyed,\r\n * removed from the Input Manager and cleared from this Game Object.\r\n *\r\n * If you wish to re-enable this Game Object at a later date you will need to\r\n * re-create its InteractiveObject by calling `setInteractive` again.\r\n *\r\n * If you wish to only temporarily stop an object from receiving input then use\r\n * `disableInteractive` instead, as that toggles the interactive state, where-as\r\n * this erases it completely.\r\n *\r\n * If you wish to resize a hit area, don't remove and then set it as being\r\n * interactive. Instead, access the hitarea object directly and resize the shape\r\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\r\n * shape is a Rectangle, which it is by default.)\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n removeInteractive: function ()\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is added to a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to add themselves into the Update List.\r\n *\r\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addedToScene\r\n * @since 3.50.0\r\n */\r\n addedToScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is removed from a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to removed themselves from the Update List.\r\n *\r\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removedFromScene\r\n * @since 3.50.0\r\n */\r\n removedFromScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\r\n *\r\n * @method Phaser.GameObjects.GameObject#update\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - args\r\n */\r\n update: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Returns a JSON representation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n return ComponentsToJSON(this);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.GameObject#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\r\n\r\n return !(!listWillRender || GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n },\r\n\r\n /**\r\n * Returns an array containing the display list index of either this Game Object, or if it has one,\r\n * its parent Container. It then iterates up through all of the parent containers until it hits the\r\n * root of the display list (which is index 0 in the returned array).\r\n *\r\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\r\n * this Game Object and all of its ancestors.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getIndexList\r\n * @since 3.4.0\r\n *\r\n * @return {number[]} An array of display list position indexes.\r\n */\r\n getIndexList: function ()\r\n {\r\n // eslint-disable-next-line consistent-this\r\n var child = this;\r\n var parent = this.parentContainer;\r\n\r\n var indexes = [];\r\n\r\n while (parent)\r\n {\r\n indexes.unshift(parent.getIndex(child));\r\n\r\n child = parent;\r\n\r\n if (!parent.parentContainer)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n parent = parent.parentContainer;\r\n }\r\n }\r\n\r\n if (this.displayList)\r\n {\r\n indexes.unshift(this.displayList.getIndex(child));\r\n }\r\n else\r\n {\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n }\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the given Display List.\r\n *\r\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\r\n * this Game Object belongs.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\r\n *\r\n * If this Game Object is already on another Display List when this method is called, it will first\r\n * be removed from it, before being added to the new list.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToDisplayList\r\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToDisplayList: function (displayList)\r\n {\r\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\r\n\r\n if (this.displayList && this.displayList !== displayList)\r\n {\r\n this.removeFromDisplayList();\r\n }\r\n\r\n // Don't repeat if it's already on this list\r\n if (!displayList.exists(this))\r\n {\r\n this.displayList = displayList;\r\n\r\n displayList.add(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the Update List belonging to the Scene.\r\n *\r\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\r\n * every game frame. This method is passed two parameters: `delta` and `time`.\r\n *\r\n * If you wish to run your own logic within `preUpdate` then you should always call\r\n * `super.preUpdate(delta, time)` within it, or it may fail to process required operations,\r\n * such as Sprite animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Display List it is currently on.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\r\n * and added back at a later stage.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\r\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromDisplayList: function ()\r\n {\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n if (displayList && displayList.exists(this))\r\n {\r\n displayList.remove(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.displayList = null;\r\n\r\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Scene's Update List.\r\n *\r\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\r\n * every game frame. Calling this method will remove it from the list, preventing this.\r\n *\r\n * Removing a Game Object from the Update List will stop most internal functions working.\r\n * For example, removing a Sprite from the Update List will prevent it from being able to\r\n * run animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.remove(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Game Object removing it from the Display List and Update List and\r\n * severing all ties to parent resources.\r\n *\r\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\r\n *\r\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\r\n * As long as no reference to it exists within your own code it should become free for\r\n * garbage collection by the browser.\r\n *\r\n * If you just want to temporarily disable an object then look at using the\r\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\r\n *\r\n * @method Phaser.GameObjects.GameObject#destroy\r\n * @fires Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [fromScene=false] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\n destroy: function (fromScene)\r\n {\r\n // This Game Object has already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n if (fromScene === undefined) { fromScene = false; }\r\n\r\n if (this.preDestroy)\r\n {\r\n this.preDestroy.call(this);\r\n }\r\n\r\n this.emit(Events.DESTROY, this, fromScene);\r\n\r\n this.removeAllListeners();\r\n\r\n if (this.postPipelines)\r\n {\r\n this.resetPostPipeline(true);\r\n }\r\n\r\n this.removeFromDisplayList();\r\n this.removeFromUpdateList();\r\n\r\n if (this.input)\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n }\r\n\r\n if (this.data)\r\n {\r\n this.data.destroy();\r\n\r\n this.data = undefined;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.body.destroy();\r\n\r\n this.body = undefined;\r\n }\r\n\r\n if (this.preFX)\r\n {\r\n this.preFX.destroy();\r\n\r\n this.preFX = undefined;\r\n }\r\n\r\n if (this.postFX)\r\n {\r\n this.postFX.destroy();\r\n\r\n this.postFX = undefined;\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n this.parentContainer = undefined;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\r\n *\r\n * @constant {number} RENDER_MASK\r\n * @memberof Phaser.GameObjects.GameObject\r\n * @default\r\n */\r\nGameObject.RENDER_MASK = 15;\r\n\r\nmodule.exports = GameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar PluginCache = require('../plugins/PluginCache');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and have them automatically registered with the Scene.\r\n *\r\n * Game Objects directly register themselves with the Factory and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectFactory\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectFactory = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectFactory (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Factory belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n this.events = scene.sys.events;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n this.events.once(SceneEvents.BOOT, this.boot, this);\r\n this.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Game Object to this Scene.\r\n *\r\n * If the Game Object renders, it will be added to the Display List.\r\n * If it has a `preUpdate` method, it will be added to the Update List.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#existing\r\n * @since 3.0.0\r\n *\r\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\r\n */\r\n existing: function (child)\r\n {\r\n if (child.renderCanvas || child.renderWebGL)\r\n {\r\n this.displayList.add(child);\r\n }\r\n\r\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\r\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\r\n if (child.preUpdate)\r\n {\r\n this.updateList.add(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.events = null;\r\n\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\r\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\r\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.register\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\r\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\r\n */\r\nGameObjectFactory.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectFactory.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\r\n * providing a its `factoryType`.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.remove\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\r\n */\r\nGameObjectFactory.remove = function (factoryType)\r\n{\r\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectFactory.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\r\n\r\nmodule.exports = GameObjectFactory;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TransformMatrix = require('./components/TransformMatrix');\r\n\r\nvar tempMatrix1 = new TransformMatrix();\r\nvar tempMatrix2 = new TransformMatrix();\r\nvar tempMatrix3 = new TransformMatrix();\r\n\r\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\r\n\r\n/**\r\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\r\n * the parent matrix if provided.\r\n *\r\n * Note that the object this results contains _references_ to the Transform Matrices,\r\n * not new instances of them. Therefore, you should use their values immediately, or\r\n * copy them to your own matrix, as they will be replaced as soon as another Game\r\n * Object is rendered.\r\n *\r\n * @function Phaser.GameObjects.GetCalcMatrix\r\n * @memberof Phaser.GameObjects\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\r\n *\r\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\r\n */\r\nvar GetCalcMatrix = function (src, camera, parentMatrix)\r\n{\r\n var camMatrix = tempMatrix1;\r\n var spriteMatrix = tempMatrix2;\r\n var calcMatrix = tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = GetCalcMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha property of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.AlphaSingle\r\n * @since 3.22.0\r\n */\r\n\r\nvar AlphaSingle = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = AlphaSingle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../../renderer/BlendModes');\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string|number)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.displayList)\r\n {\r\n this.displayList.queueDepthSort();\r\n }\r\n\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Effects = require('../../fx/');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class FX\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.60.0\r\n * @webglOnly\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that owns this FX Component.\r\n * @param {boolean} isPost - Is this a Pre or Post FX Component?\r\n+- *\r\n */\r\nvar FX = new Class({\r\n\r\n initialize:\r\n\r\n function FX (gameObject, isPost)\r\n {\r\n /**\r\n * A reference to the Game Object that owns this FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Is this a Post FX Controller? or a Pre FX Controller?\r\n *\r\n * @name Phaser.GameObjects.Components.FX#isPost\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.isPost = isPost;\r\n\r\n /**\r\n * Has this FX Component been enabled?\r\n *\r\n * You should treat this property as read-only.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#enabled\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * An array containing all of the FX Controllers that\r\n * have been added to this FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#list\r\n * @type {Phaser.FX.Controller[]}\r\n * @since 3.60.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * The amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX or SpriteFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#padding\r\n * @type {number}\r\n * @default 0\r\n * @since 3.60.0\r\n */\r\n this.padding = 0;\r\n },\r\n\r\n /**\r\n * Sets the amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setPadding\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPadding: function (padding)\r\n {\r\n if (padding === undefined) { padding = 0; }\r\n\r\n this.padding = padding;\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is copied by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `copySprite` method.\r\n *\r\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFXCopy\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFXCopy: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is rendered by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `drawSprite` method.\r\n *\r\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFX\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFX: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Enables this FX Component and applies the FXPipeline to the parent Game Object.\r\n *\r\n * This is called automatically whenever you call a method such as `addBloom`, etc.\r\n *\r\n * You can check the `enabled` property to see if the Game Object is already enabled, or not.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#enable\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n */\r\n enable: function (padding)\r\n {\r\n var renderer = this.gameObject.scene.sys.renderer;\r\n\r\n if (renderer && renderer.pipelines)\r\n {\r\n this.gameObject.pipeline = renderer.pipelines.FX_PIPELINE;\r\n\r\n if (padding !== undefined)\r\n {\r\n this.padding = padding;\r\n }\r\n\r\n this.enabled = true;\r\n }\r\n else\r\n {\r\n this.enabled = false;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys and removes all FX Controllers that are part of this FX Component,\r\n * then disables it.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#clear\r\n * @since 3.60.0\r\n */\r\n clear: function ()\r\n {\r\n var list = this.list;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].destroy();\r\n }\r\n\r\n this.list = [];\r\n\r\n this.enabled = false;\r\n },\r\n\r\n /**\r\n * Searches for the given FX Controler within this FX Component.\r\n *\r\n * If found, the controller is removed from this compoent and then destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#remove\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX Component.\r\n */\r\n remove: function (fx)\r\n {\r\n var list = this.list;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n if (list[i] === fx)\r\n {\r\n SpliceOne(list, i);\r\n\r\n fx.destroy();\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Disables this FX Component.\r\n *\r\n * This will reset the pipeline on the Game Object that owns this component back to its\r\n * default and flag this component as disabled.\r\n *\r\n * You can re-enable it again by calling `enable`.\r\n *\r\n * Optionally, set `clear` to destroy all current FX Controllers.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#disable\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [clear=false] - Destroy and remove all FX Controllers that are part of this FX Component.\r\n */\r\n disable: function (clear)\r\n {\r\n if (clear === undefined) { clear = false; }\r\n\r\n this.gameObject.resetPipeline();\r\n\r\n this.enabled = false;\r\n\r\n if (clear)\r\n {\r\n this.clear();\r\n }\r\n },\r\n\r\n /**\r\n * Adds the given FX Controler to this FX Component.\r\n *\r\n * Note that adding an FX Controller does not remove any existing FX. They all stack-up\r\n * on-top of each other. If you don't want this, make sure to call either `remove` or\r\n * `clear` first.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#add\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX Component.\r\n * @param {object} [config] - Optional configuration object that is passed to the pipeline during instantiation.\r\n *\r\n * @return {Phaser.FX.Controller} The FX Controller.\r\n */\r\n add: function (fx, config)\r\n {\r\n if (this.isPost)\r\n {\r\n var type = String(fx.type);\r\n\r\n this.gameObject.setPostPipeline(type, config);\r\n\r\n var pipeline = this.gameObject.getPostPipeline(type);\r\n\r\n if (pipeline)\r\n {\r\n if (Array.isArray(pipeline))\r\n {\r\n pipeline = pipeline.pop();\r\n }\r\n\r\n if (pipeline) pipeline.controller = fx;\r\n\r\n return fx;\r\n }\r\n }\r\n else\r\n {\r\n if (!this.enabled)\r\n {\r\n this.enable();\r\n }\r\n\r\n this.list.push(fx);\r\n\r\n return fx;\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Glow effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGlow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n * @param {number} [quality=0.1] - Only available for PostFX. Sets the quality of this Glow effect. Default is 0.1. Cannot be changed post-creation.\r\n * @param {number} [distance=10] - Only available for PostFX. Sets the distance of this Glow effect. Default is 10. Cannot be changed post-creation.\r\n *\r\n * @return {Phaser.FX.Glow} The Glow FX Controller.\r\n */\r\n addGlow: function (color, outerStrength, innerStrength, knockout, quality, distance)\r\n {\r\n return this.add(new Effects.Glow(this.gameObject, color, outerStrength, innerStrength, knockout), { quality: quality, distance: distance });\r\n },\r\n\r\n /**\r\n * Adds a Shadow effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShadow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n *\r\n * @return {Phaser.FX.Shadow} The Shadow FX Controller.\r\n */\r\n addShadow: function (x, y, decay, power, color, samples, intensity)\r\n {\r\n return this.add(new Effects.Shadow(this.gameObject, x, y, decay, power, color, samples, intensity));\r\n },\r\n\r\n /**\r\n * Adds a Pixelate effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addPixelate\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n *\r\n * @return {Phaser.FX.Pixelate} The Pixelate FX Controller.\r\n */\r\n addPixelate: function (amount)\r\n {\r\n return this.add(new Effects.Pixelate(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Vignette effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addVignette\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n *\r\n * @return {Phaser.FX.Vignette} The Vignette FX Controller.\r\n */\r\n addVignette: function (x, y, radius, strength)\r\n {\r\n return this.add(new Effects.Vignette(this.gameObject, x, y, radius, strength));\r\n },\r\n\r\n /**\r\n * Adds a Shine effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShine\r\n * @since 3.60.0\r\n *\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n *\r\n * @return {Phaser.FX.Shine} The Shine FX Controller.\r\n */\r\n addShine: function (speed, lineWidth, gradient, reveal)\r\n {\r\n return this.add(new Effects.Shine(this.gameObject, speed, lineWidth, gradient, reveal));\r\n },\r\n\r\n /**\r\n * Adds a Blur effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBlur\r\n * @since 3.60.0\r\n *\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Blur} The Blur FX Controller.\r\n */\r\n addBlur: function (quality, x, y, strength, color, steps)\r\n {\r\n return this.add(new Effects.Blur(this.gameObject, quality, x, y, strength, color, steps));\r\n },\r\n\r\n /**\r\n * Adds a Gradient effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGradient\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n *\r\n * @return {Phaser.FX.Gradient} The Gradient FX Controller.\r\n */\r\n addGradient: function (color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n return this.add(new Effects.Gradient(this.gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size));\r\n },\r\n\r\n /**\r\n * Adds a Bloom effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBloom\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Bloom} The Bloom FX Controller.\r\n */\r\n addBloom: function (color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n return this.add(new Effects.Bloom(this.gameObject, color, offsetX, offsetY, blurStrength, strength, steps));\r\n },\r\n\r\n /**\r\n * Adds a ColorMatrix effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addColorMatrix\r\n * @since 3.60.0\r\n *\r\n * @return {Phaser.FX.ColorMatrix} The ColorMatrix FX Controller.\r\n */\r\n addColorMatrix: function ()\r\n {\r\n return this.add(new Effects.ColorMatrix(this.gameObject));\r\n },\r\n\r\n /**\r\n * Adds a Circle effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addCircle\r\n * @since 3.60.0\r\n *\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=16724914] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n *\r\n * @return {Phaser.FX.Circle} The Circle FX Controller.\r\n */\r\n addCircle: function (thickness, color, backgroundColor, scale, feather)\r\n {\r\n return this.add(new Effects.Circle(this.gameObject, thickness, color, backgroundColor, scale, feather));\r\n },\r\n\r\n /**\r\n * Adds a Barrel effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBarrel\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n *\r\n * @return {Phaser.FX.Barrel} The Barrel FX Controller.\r\n */\r\n addBarrel: function (amount)\r\n {\r\n return this.add(new Effects.Barrel(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Displacement effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addDisplacement\r\n * @since 3.60.0\r\n *\r\n * @param {string} [key='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply.\r\n *\r\n * @return {Phaser.FX.Displacement} The Displacement FX Controller.\r\n */\r\n addDisplacement: function (displacementTexture, x, y)\r\n {\r\n return this.add(new Effects.Displacement(this.gameObject, displacementTexture, x, y));\r\n },\r\n\r\n /**\r\n * Adds a Wipe effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addWipe\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addWipe: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis));\r\n },\r\n\r\n /**\r\n * Adds a Reveal Wipe effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addReveal\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addReveal: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis, true));\r\n },\r\n\r\n /**\r\n * Adds a Bokeh effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBokeh\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh FX Controller.\r\n */\r\n addBokeh: function (radius, amount, contrast)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast));\r\n },\r\n\r\n /**\r\n * Adds a TiltShift effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addTiltShift\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {number} [blurX=1] - If Tilt Shift, the amount of horizontal blur.\r\n * @param {number} [blurY=1] - If Tilt Shift, the amount of vertical blur.\r\n * @param {number} [strength=1] - If Tilt Shift, the strength of the blur.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh TiltShift FX Controller.\r\n */\r\n addTiltShift: function (radius, amount, contrast, blurX, blurY, strength)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast, true, blurX, blurY, strength));\r\n },\r\n\r\n /**\r\n * Destroys this FX Component.\r\n *\r\n * Called automatically when Game Objects are destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.clear();\r\n\r\n this.gameObject = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar RotateAround = require('../../math/RotateAround');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getCenter: function (output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is\r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = require('../../display/mask/BitmapMask');\r\nvar GeometryMask = require('../../display/mask/GeometryMask');\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n *\r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n *\r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one, or a Dynamic Texture.\r\n *\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable texture-based Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G\r\n * @generic {Phaser.Textures.DynamicTexture} T\r\n * @genericUse {(G|T|null)} [maskObject]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (maskObject, x, y, texture, frame)\r\n {\r\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n maskObject = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n *\r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G\r\n * @generic {Phaser.GameObjects.Shape} S\r\n * @genericUse {(G|S)} [graphics]\r\n *\r\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && (this.type === 'Graphics' || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = require('../../math/DegToRad');\r\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar TWEEN_CONST = require('../../tweens/tween/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The distance the follower has traveled from the previous point to the current one, at the last update.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathDelta\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.23.0\r\n */\r\n pathDelta: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.setTargetValue();\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n if (!this.pathDelta)\r\n {\r\n this.pathDelta = new Vector2();\r\n }\r\n\r\n this.pathDelta.reset();\r\n\r\n config.persist = true;\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n var pathDelta = this.pathDelta;\r\n var pathVector = this.pathVector;\r\n\r\n pathDelta.copy(pathVector).negate();\r\n\r\n if (tweenData.state === TWEEN_CONST.COMPLETE)\r\n {\r\n this.path.getPoint(tweenData.end, pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n return;\r\n }\r\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n pipelineData: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n *\r\n * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipeline)\r\n {\r\n this.pipelineData = {};\r\n\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return false;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n if (pipeline === undefined)\r\n {\r\n pipeline = pipelines.default;\r\n }\r\n\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.defaultPipeline = instance;\r\n this.pipeline = instance;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the main WebGL Pipeline of this Game Object.\r\n *\r\n * Also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipeline, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.pipeline = instance;\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipelineData: function (key, value)\r\n {\r\n var data = this.pipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n *\r\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\r\n */\r\n resetPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n this.pipeline = this.defaultPipeline;\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\nvar FX = require('../components/FX');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering post pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n\r\nvar PostPipeline = {\r\n\r\n /**\r\n * Does this Game Object have any Post Pipelines set?\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#hasPostPipeline\r\n * @type {boolean}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n hasPostPipeline: false,\r\n\r\n /**\r\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\r\n *\r\n * The pipelines are processed in the order in which they appear in this array.\r\n *\r\n * If you modify this array directly, be sure to set the\r\n * `hasPostPipeline` property accordingly.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelines\r\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelines: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelineData: null,\r\n\r\n /**\r\n * The Pre FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.preFX.addBloom();\r\n * ```\r\n *\r\n * Only the following Game Objects support Pre FX:\r\n *\r\n * * Image\r\n * * Sprite\r\n * * TileSprite\r\n * * Text\r\n * * RenderTexture\r\n * * Video\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#preFX\r\n * @type {Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n preFX: null,\r\n\r\n /**\r\n * The Post FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.postFX.addBloom();\r\n * ```\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postFX\r\n * @type {Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postFX: null,\r\n\r\n /**\r\n * This should only be called during the instantiation of the Game Object.\r\n *\r\n * It is called by default by all core Game Objects and doesn't need\r\n * calling again.\r\n *\r\n * After that, use `setPostPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#initPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [preFX=false] - Does this Game Object support Pre FX?\r\n */\r\n initPostPipeline: function (preFX)\r\n {\r\n this.postPipelines = [];\r\n this.postPipelineData = {};\r\n\r\n this.postFX = new FX(this, true);\r\n\r\n if (preFX)\r\n {\r\n this.preFX = new FX(this, false);\r\n }\r\n },\r\n\r\n /**\r\n * Sets one, or more, Post Pipelines on this Game Object.\r\n *\r\n * Post Pipelines are invoked after this Game Object has rendered to its target and\r\n * are commonly used for post-fx.\r\n *\r\n * The post pipelines are appended to the `postPipelines` array belonging to this\r\n * Game Object. When the renderer processes this Game Object, it iterates through the post\r\n * pipelines in the order in which they appear in the array. If you are stacking together\r\n * multiple effects, be aware that the order is important.\r\n *\r\n * If you call this method multiple times, the new pipelines will be appended to any existing\r\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\r\n *\r\n * You can optionally also set the `postPipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `postPipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `postPipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipeline: function (pipelines, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelineManager = renderer.pipelines;\r\n\r\n if (pipelineManager)\r\n {\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelineManager.getPostPipeline(pipelines[i], this, pipelineData);\r\n\r\n if (instance)\r\n {\r\n this.postPipelines.push(instance);\r\n }\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.postPipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `postPipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipelineData\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipelineData: function (key, value)\r\n {\r\n var data = this.postPipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#getPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} An array of all the Post Pipelines matching the name. This array will be empty if there was no match. If there was only one single match, that pipeline is returned directly, not in an array.\r\n */\r\n getPostPipeline: function (pipeline)\r\n {\r\n var isString = (typeof pipeline === 'string');\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n var results = [];\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\r\n {\r\n results.push(instance);\r\n }\r\n }\r\n\r\n return (results.length === 1) ? results[0] : results;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\r\n * the `destroy` method on each post pipeline and then clearing the local array.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#resetPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `postPipelineData` object to being an empty object?\r\n */\r\n resetPostPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n pipelines[i].destroy();\r\n }\r\n\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n\r\n if (resetData)\r\n {\r\n this.postPipelineData = {};\r\n }\r\n },\r\n\r\n /**\r\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\r\n *\r\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#removePostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removePostPipeline: function (pipeline)\r\n {\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = pipelines.length - 1; i >= 0; i--)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if (\r\n (typeof pipeline === 'string' && instance.name === pipeline) ||\r\n (typeof pipeline !== 'string' && instance instanceof pipeline))\r\n {\r\n instance.destroy();\r\n\r\n SpliceOne(pipelines, i);\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PostPipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleX * this.frame.realWidth);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleY * this.frame.realHeight);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame|boolean} [frame] - The frame to base the size of this Game Object on.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (!frame) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n var input = this.input;\r\n\r\n if (input && !input.customHitArea)\r\n {\r\n input.hitArea.width = this.width;\r\n input.hitArea.height = this.height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the tint of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Tint\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Tint = {\r\n\r\n /**\r\n * The tint value being applied to the top-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the top-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopRight: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomRight: 0xffffff,\r\n\r\n /**\r\n * The tint fill mode.\r\n *\r\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\r\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n tintFill: false,\r\n\r\n /**\r\n * Clears all tint values associated with this Game Object.\r\n *\r\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\r\n * which results in no visible change to the texture.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#clearTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearTint: function ()\r\n {\r\n this.setTint(0xffffff);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an additive tint on this Game Object.\r\n *\r\n * The tint works by taking the pixel color values from the Game Objects texture, and then\r\n * multiplying it by the color value of the tint. You can provide either one color value,\r\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\r\n * per corner. The colors are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 0xffffff; }\r\n\r\n if (topRight === undefined)\r\n {\r\n topRight = topLeft;\r\n bottomLeft = topLeft;\r\n bottomRight = topLeft;\r\n }\r\n\r\n this.tintTopLeft = topLeft;\r\n this.tintTopRight = topRight;\r\n this.tintBottomLeft = bottomLeft;\r\n this.tintBottomRight = bottomRight;\r\n\r\n this.tintFill = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a fill-based tint on this Game Object.\r\n *\r\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\r\n * with those in the tint. You can use this for effects such as making a player flash 'white'\r\n * if hit by something. You can provide either one color value, in which case the whole\r\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\r\n * are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTintFill\r\n * @webglOnly\r\n * @since 3.11.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n\r\n this.tintFill = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The tint value being applied to the whole of the Game Object.\r\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tint\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tint: {\r\n\r\n set: function (value)\r\n {\r\n this.setTint(value, value, value, value);\r\n }\r\n },\r\n\r\n /**\r\n * Does this Game Object have a tint applied?\r\n *\r\n * It checks to see if the 4 tint properties are set to the value 0xffffff\r\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#isTinted\r\n * @type {boolean}\r\n * @webglOnly\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n isTinted: {\r\n\r\n get: function ()\r\n {\r\n var white = 0xffffff;\r\n\r\n return (\r\n this.tintFill ||\r\n this.tintTopLeft !== white ||\r\n this.tintTopRight !== white ||\r\n this.tintBottomLeft !== white ||\r\n this.tintBottomRight !== white\r\n );\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Tint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../../math/const');\r\nvar TransformMatrix = require('./TransformMatrix');\r\nvar TransformXY = require('../../math/TransformXY');\r\nvar WrapAngle = require('../../math/angle/Wrap');\r\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Transform\r\n * @since 3.0.0\r\n */\r\n\r\nvar Transform = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\r\n * @type {boolean}\r\n * @readonly\r\n * @default true\r\n * @since 3.60.0\r\n */\r\n hasTransformComponent: true,\r\n\r\n /**\r\n * Private internal value. Holds the horizontal scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleX\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleX: 1,\r\n\r\n /**\r\n * Private internal value. Holds the vertical scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleY\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleY: 1,\r\n\r\n /**\r\n * Private internal value. Holds the rotation value in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _rotation: 0,\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: 0,\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: 0,\r\n\r\n /**\r\n * The z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: 0,\r\n\r\n /**\r\n * The w position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: 0,\r\n\r\n /**\r\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\r\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\r\n *\r\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\r\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.18.0\r\n */\r\n scale: {\r\n\r\n get: function ()\r\n {\r\n return (this._scaleX + this._scaleY) / 2;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleY !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleX !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The angle of this Game Object as expressed in degrees.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in radians, see the `rotation` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * The angle of this Game Object in radians.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\r\n * and -PI/2 is up.\r\n *\r\n * If you prefer to work in degrees, see the `angle` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#rotation\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of this Game Object.\r\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\r\n * @param {number} [z=0] - The z position of this Game Object.\r\n * @param {number} [w=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPosition: function (x, y, z, w)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n if (z === undefined) { z = 0; }\r\n if (w === undefined) { w = 0; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies an object's coordinates to this Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#copyPosition\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n copyPosition: function (source)\r\n {\r\n if (source.x !== undefined) { this.x = source.x; }\r\n if (source.y !== undefined) { this.y = source.y; }\r\n if (source.z !== undefined) { this.z = source.z; }\r\n if (source.w !== undefined) { this.w = source.w; }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object to be a random position within the confines of\r\n * the given area.\r\n *\r\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\r\n *\r\n * The position does not factor in the size of this Game Object, meaning that only the origin is\r\n * guaranteed to be within the area.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\r\n * @since 3.8.0\r\n *\r\n * @param {number} [x=0] - The x position of the top-left of the random area.\r\n * @param {number} [y=0] - The y position of the top-left of the random area.\r\n * @param {number} [width] - The width of the random area.\r\n * @param {number} [height] - The height of the random area.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRandomPosition: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n\r\n this.x = x + (Math.random() * width);\r\n this.y = y + (Math.random() * height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this.rotation = radians;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=1] - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScale: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scaleX = x;\r\n this.scaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the x position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The x position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setX: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the y position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The y position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setY: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The z position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setZ: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.z = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the w position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setW\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setW: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.w = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the local transform matrix for this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getLocalTransformMatrix: function (tempMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n },\r\n\r\n /**\r\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n var parent = this.parentContainer;\r\n\r\n if (!parent)\r\n {\r\n return this.getLocalTransformMatrix(tempMatrix);\r\n }\r\n\r\n if (!parentMatrix)\r\n {\r\n parentMatrix = new TransformMatrix();\r\n }\r\n\r\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n\r\n while (parent)\r\n {\r\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\r\n\r\n parentMatrix.multiply(tempMatrix, tempMatrix);\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return tempMatrix;\r\n },\r\n\r\n /**\r\n * Takes the given `x` and `y` coordinates and converts them into local space for this\r\n * Game Object, taking into account parent and local transforms, and the Display Origin.\r\n *\r\n * The returned Vector2 contains the translated point in its properties.\r\n *\r\n * A Camera needs to be provided in order to handle modified scroll factors. If no\r\n * camera is specified, it will use the `main` camera from the Scene to which this\r\n * Game Object belongs.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\r\n *\r\n * @return {Phaser.Math.Vector2} The translated point.\r\n */\r\n getLocalPoint: function (x, y, point, camera)\r\n {\r\n if (!point) { point = new Vector2(); }\r\n if (!camera) { camera = this.scene.sys.cameras.main; }\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n var px = x + (csx * this.scrollFactorX) - csx;\r\n var py = y + (csy * this.scrollFactorY) - csy;\r\n\r\n if (this.parentContainer)\r\n {\r\n this.getWorldTransformMatrix().applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\r\n }\r\n\r\n // Normalize origin\r\n if (this._originComponent)\r\n {\r\n point.x += this._displayOriginX;\r\n point.y += this._displayOriginY;\r\n }\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Gets the sum total rotation of all of this Game Objects parent Containers.\r\n *\r\n * The returned value is in radians and will be zero if this Game Object has no parent container.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\r\n * @since 3.18.0\r\n *\r\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\r\n */\r\n getParentRotation: function ()\r\n {\r\n var rotation = 0;\r\n\r\n var parent = this.parentContainer;\r\n\r\n while (parent)\r\n {\r\n rotation += parent.rotation;\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return rotation;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n\r\n /**\r\n * The temporary quad value cache.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\r\n * @type {Float32Array}\r\n * @since 3.60.0\r\n */\r\n this.quad = new Float32Array(8);\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n\r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n\r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? matrix : out.matrix;\r\n\r\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix[5] = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n *\r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point in to the local space of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {Phaser.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n *\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n *\r\n * The result must be applied in the following order to reproduce the current matrix:\r\n *\r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.DecomposeMatrixResults} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n *\r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Performs the 8 calculations required to create the vertices of\r\n * a quad based on this matrix and the given x/y/xw/yh values.\r\n *\r\n * The result is stored in `TransformMatrix.quad`, which is returned\r\n * from this method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\r\n * @since 3.60.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} xw - The xw value.\r\n * @param {number} yh - The yh value.\r\n * @param {boolean} roundPixels - Pass the results via Math.round?\r\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\r\n *\r\n * @return {Float32Array} The quad Float32Array.\r\n */\r\n setQuad: function (x, y, xw, yh, roundPixels, quad)\r\n {\r\n if (quad === undefined) { quad = this.quad; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var e = matrix[4];\r\n var f = matrix[5];\r\n\r\n quad[0] = x * a + y * c + e;\r\n quad[1] = x * b + y * d + f;\r\n\r\n quad[2] = x * a + yh * c + e;\r\n quad[3] = x * b + yh * d + f;\r\n\r\n quad[4] = xw * a + yh * c + e;\r\n quad[5] = xw * b + yh * d + f;\r\n\r\n quad[6] = xw * a + y * c + e;\r\n quad[7] = xw * b + y * d + f;\r\n\r\n if (roundPixels)\r\n {\r\n quad.forEach(function (value, index)\r\n {\r\n quad[index] = Math.round(value);\r\n });\r\n }\r\n\r\n return quad;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.quad = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: require('./Alpha'),\r\n AlphaSingle: require('./AlphaSingle'),\r\n BlendMode: require('./BlendMode'),\r\n ComputedSize: require('./ComputedSize'),\r\n Crop: require('./Crop'),\r\n Depth: require('./Depth'),\r\n Flip: require('./Flip'),\r\n FX: require('./FX'),\r\n GetBounds: require('./GetBounds'),\r\n Mask: require('./Mask'),\r\n Origin: require('./Origin'),\r\n PathFollower: require('./PathFollower'),\r\n Pipeline: require('./Pipeline'),\r\n PostPipeline: require('./PostPipeline'),\r\n ScrollFactor: require('./ScrollFactor'),\r\n Size: require('./Size'),\r\n Texture: require('./Texture'),\r\n TextureCrop: require('./TextureCrop'),\r\n Tint: require('./Tint'),\r\n ToJSON: require('./ToJSON'),\r\n Transform: require('./Transform'),\r\n TransformMatrix: require('./TransformMatrix'),\r\n Visible: require('./Visible')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = require('../../utils/array');\r\nvar BlendModes = require('../../renderer/BlendModes');\r\nvar Class = require('../../utils/Class');\r\nvar Components = require('../components');\r\nvar Events = require('../events');\r\nvar GameObject = require('../GameObject');\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar Render = require('./ContainerRender');\r\nvar Union = require('../../geom/rectangle/Union');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * The transform point of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\r\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\r\n * the Container, and position children positively and negative around it as required.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\r\n * or the input area will become misaligned.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.AlphaSingle\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.PostPipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.AlphaSingle,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.PostPipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {number}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.initPostPipeline();\r\n\r\n this.setPosition(x, y);\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {this} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\r\n\r\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\r\n }\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n var hasSetFirst = false;\r\n\r\n output.setEmpty();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getTextBounds)\r\n {\r\n var textBounds = entry.getTextBounds().global;\r\n tempRect.setTo(textBounds.x, textBounds.y, textBounds.width, textBounds.height);\r\n }\r\n else if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n }\r\n else\r\n {\r\n continue;\r\n }\r\n\r\n if (!hasSetFirst)\r\n {\r\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\r\n hasSetFirst = true;\r\n }\r\n else\r\n {\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.parentContainer = this;\r\n\r\n gameObject.removeFromDisplayList();\r\n\r\n gameObject.addedToScene();\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n\r\n gameObject.removedFromScene();\r\n\r\n gameObject.addToDisplayList();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n this.parentContainer.pointToContainer(source, output);\r\n }\r\n else\r\n {\r\n output.x = source.x;\r\n output.y = source.y;\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n *\r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {number} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {number} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {number} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {number} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object above another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveAbove\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveAbove: function (child1, child2)\r\n {\r\n ArrayUtils.MoveAbove(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object below another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveBelow\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveBelow: function (child1, child2)\r\n {\r\n ArrayUtils.MoveBelow(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var list = this.list;\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n if (list[i] && list[i].scene)\r\n {\r\n list[i].off(Events.DESTROY, this.remove, this);\r\n\r\n list[i].destroy();\r\n }\r\n }\r\n\r\n this.list = [];\r\n }\r\n else\r\n {\r\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [oldChild,newChild]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Container#setScrollFactor\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar NOOP = require('../../utils/NOOP');\r\nvar renderWebGL = NOOP;\r\nvar renderCanvas = NOOP;\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./ContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./ContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderWebGL\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n var childCount = children.length;\r\n\r\n if (childCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n renderer.pipelines.preBatch(container);\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container.alpha;\r\n\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlphaTopLeft;\r\n var childAlphaTopRight;\r\n var childAlphaBottomLeft;\r\n var childAlphaBottomRight;\r\n\r\n if (child.alphaTopLeft !== undefined)\r\n {\r\n childAlphaTopLeft = child.alphaTopLeft;\r\n childAlphaTopRight = child.alphaTopRight;\r\n childAlphaBottomLeft = child.alphaBottomLeft;\r\n childAlphaBottomRight = child.alphaBottomRight;\r\n }\r\n else\r\n {\r\n var childAlpha = child.alpha;\r\n\r\n childAlphaTopLeft = childAlpha;\r\n childAlphaTopRight = childAlpha;\r\n childAlphaBottomLeft = childAlpha;\r\n childAlphaBottomRight = childAlpha;\r\n }\r\n\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n mask.preRenderWebGL(renderer, child, camera);\r\n }\r\n\r\n var type = child.type;\r\n\r\n if (type !== renderer.currentType)\r\n {\r\n renderer.newType = true;\r\n renderer.currentType = type;\r\n }\r\n\r\n renderer.nextTypeMatch = (i < childCount - 1) ? (children[i + 1].type === renderer.currentType) : false;\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n\r\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\r\n\r\n // Render\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n // Restore original values\r\n\r\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\r\n\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n\r\n if (mask)\r\n {\r\n mask.postRenderWebGL(renderer, camera);\r\n }\r\n\r\n renderer.newType = false;\r\n }\r\n\r\n renderer.pipelines.postBatch(container);\r\n};\r\n\r\nmodule.exports = ContainerWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n *\r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n *\r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n *\r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n *\r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n *\r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {number} width - The width of the video.\r\n * @param {number} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n *\r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n *\r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n *\r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n *\r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n *\r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n *\r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n *\r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Timeout Event.\r\n *\r\n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\r\n * source to start playback.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\r\n */\r\nmodule.exports = 'timeout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n *\r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n *\r\n * @name Phaser.Geom.CIRCLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n *\r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n *\r\n * @name Phaser.Geom.LINE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n *\r\n * @name Phaser.Geom.POINT\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n *\r\n * @name Phaser.Geom.POLYGON\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = require('./Length');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Random = require('./Random');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GEOM_CONST = require('../const');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {this} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = require('./Perimeter');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = require('./GetPoint');\r\nvar Perimeter = require('./Perimeter');\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\r\n * @param {number} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Contains = require('./Contains');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Line = require('../line/Line');\r\nvar Random = require('./Random');\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('./Rectangle');\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\nvar GetURL = require('./GetURL');\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\nvar XHRLoader = require('./XHRLoader');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * @classdesc\r\n * The base File class used by all File Types that the Loader can support.\r\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class File\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\r\n */\r\nvar File = new Class({\r\n\r\n initialize:\r\n\r\n function File (loader, fileConfig)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.File#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\r\n *\r\n * @name Phaser.Loader.File#cache\r\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\r\n * @since 3.7.0\r\n */\r\n this.cache = GetFastValue(fileConfig, 'cache', false);\r\n\r\n /**\r\n * The file type string (image, json, etc) for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.File#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(fileConfig, 'type', false);\r\n\r\n if (!this.type)\r\n {\r\n throw new Error('Invalid File type: ' + this.type);\r\n }\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.File#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = GetFastValue(fileConfig, 'key', false);\r\n\r\n var loadKey = this.key;\r\n\r\n if (loader.prefix && loader.prefix !== '')\r\n {\r\n this.key = loader.prefix + loadKey;\r\n }\r\n\r\n if (!this.key)\r\n {\r\n throw new Error('Invalid File key: ' + this.key);\r\n }\r\n\r\n var url = GetFastValue(fileConfig, 'url');\r\n\r\n if (url === undefined)\r\n {\r\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n url = loader.path + url;\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n *\r\n * Automatically has Loader.path prepended to it if a string.\r\n *\r\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {object|string}\r\n * @since 3.0.0\r\n */\r\n this.url = url;\r\n\r\n /**\r\n * The final URL this file will load from, including baseURL and path.\r\n * Set automatically when the Loader calls 'load' on this file.\r\n *\r\n * @name Phaser.Loader.File#src\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.src = '';\r\n\r\n /**\r\n * The merged XHRSettings for this file.\r\n *\r\n * @name Phaser.Loader.File#xhrSettings\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\r\n\r\n if (GetFastValue(fileConfig, 'xhrSettings', false))\r\n {\r\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\r\n }\r\n\r\n /**\r\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\r\n *\r\n * @name Phaser.Loader.File#xhrLoader\r\n * @type {?XMLHttpRequest}\r\n * @since 3.0.0\r\n */\r\n this.xhrLoader = null;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.File#state\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\r\n\r\n /**\r\n * The total size of this file.\r\n * Set by onProgress and only if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesTotal\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bytesTotal = 0;\r\n\r\n /**\r\n * Updated as the file loads.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesLoaded\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.bytesLoaded = -1;\r\n\r\n /**\r\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#percentComplete\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.percentComplete = -1;\r\n\r\n /**\r\n * For CORs based loading.\r\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\r\n *\r\n * @name Phaser.Loader.File#crossOrigin\r\n * @type {(string|undefined)}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = undefined;\r\n\r\n /**\r\n * The processed file data, stored here after the file has loaded.\r\n *\r\n * @name Phaser.Loader.File#data\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.data = undefined;\r\n\r\n /**\r\n * A config object that can be used by file types to store transitional data.\r\n *\r\n * @name Phaser.Loader.File#config\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.config = GetFastValue(fileConfig, 'config', {});\r\n\r\n /**\r\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\r\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\r\n *\r\n * @name Phaser.Loader.File#multiFile\r\n * @type {?Phaser.Loader.MultiFile}\r\n * @since 3.7.0\r\n */\r\n this.multiFile;\r\n\r\n /**\r\n * Does this file have an associated linked file? Such as an image and a normal map.\r\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\r\n * actually bound by data, where-as a linkFile is.\r\n *\r\n * @name Phaser.Loader.File#linkFile\r\n * @type {?Phaser.Loader.File}\r\n * @since 3.7.0\r\n */\r\n this.linkFile;\r\n },\r\n\r\n /**\r\n * Links this File with another, so they depend upon each other for loading and processing.\r\n *\r\n * @method Phaser.Loader.File#setLink\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\r\n */\r\n setLink: function (fileB)\r\n {\r\n this.linkFile = fileB;\r\n\r\n fileB.linkFile = this;\r\n },\r\n\r\n /**\r\n * Resets the XHRLoader instance this file is using.\r\n *\r\n * @method Phaser.Loader.File#resetXHR\r\n * @since 3.0.0\r\n */\r\n resetXHR: function ()\r\n {\r\n if (this.xhrLoader)\r\n {\r\n this.xhrLoader.onload = undefined;\r\n this.xhrLoader.onerror = undefined;\r\n this.xhrLoader.onprogress = undefined;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.File#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\r\n this.loader.nextFile(this, true);\r\n }\r\n else\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n // The creation of this XHRLoader starts the load process going.\r\n // It will automatically call the following, based on the load outcome:\r\n //\r\n // xhr.onload = this.onLoad\r\n // xhr.onerror = this.onError\r\n // xhr.onprogress = this.onProgress\r\n\r\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onLoad\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\r\n */\r\n onLoad: function (xhr, event)\r\n {\r\n var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\r\n {\r\n return xhr.responseURL.indexOf(scheme) === 0;\r\n });\r\n\r\n var localFileOk = (isLocalFile && event.target.status === 0);\r\n\r\n var success = !(event.target && event.target.status !== 200) || localFileOk;\r\n\r\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\r\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\r\n {\r\n success = false;\r\n }\r\n\r\n this.state = CONST.FILE_LOADED;\r\n\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, success);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onError\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\r\n */\r\n onError: function ()\r\n {\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n *\r\n * @param {ProgressEvent} event - The DOM ProgressEvent.\r\n */\r\n onProgress: function (event)\r\n {\r\n if (event.lengthComputable)\r\n {\r\n this.bytesLoaded = event.loaded;\r\n this.bytesTotal = event.total;\r\n\r\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\r\n *\r\n * @method Phaser.Loader.File#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessComplete\r\n * @since 3.7.0\r\n */\r\n onProcessComplete: function ()\r\n {\r\n this.state = CONST.FILE_COMPLETE;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileComplete(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing but it generated an error.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessError\r\n * @since 3.7.0\r\n */\r\n onProcessError: function ()\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\r\n\r\n this.state = CONST.FILE_ERRORED;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileFailed(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Checks if a key matching the one used by this file exists in the target Cache or not.\r\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\r\n * loaded or will conflict.\r\n *\r\n * @method Phaser.Loader.File#hasCacheConflict\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\r\n */\r\n hasCacheConflict: function ()\r\n {\r\n return (this.cache && this.cache.exists(this.key));\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n * This method is often overridden by specific file types.\r\n *\r\n * @method Phaser.Loader.File#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.cache && this.data)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\r\n },\r\n\r\n /**\r\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.File#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.7.0\r\n */\r\n pendingDestroy: function (data)\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n if (data === undefined) { data = this.data; }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this File and any references it holds.\r\n *\r\n * @method Phaser.Loader.File#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.cache = null;\r\n this.xhrSettings = null;\r\n this.multiFile = null;\r\n this.linkFile = null;\r\n this.data = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\r\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\r\n *\r\n * @method Phaser.Loader.File.createObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\r\n * @param {Blob} blob - A Blob object to create an object URL for.\r\n * @param {string} defaultType - Default mime type used if blob type is not available.\r\n */\r\nFile.createObjectURL = function (image, blob, defaultType)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n image.src = URL.createObjectURL(blob);\r\n }\r\n else\r\n {\r\n var reader = new FileReader();\r\n\r\n reader.onload = function ()\r\n {\r\n image.removeAttribute('crossOrigin');\r\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\r\n };\r\n\r\n reader.onerror = image.onerror;\r\n\r\n reader.readAsDataURL(blob);\r\n }\r\n};\r\n\r\n/**\r\n * Static method for releasing an existing object URL which was previously created\r\n * by calling {@link File#createObjectURL} method.\r\n *\r\n * @method Phaser.Loader.File.revokeObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\r\n */\r\nFile.revokeObjectURL = function (image)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n URL.revokeObjectURL(image.src);\r\n }\r\n};\r\n\r\nmodule.exports = File;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n *\r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n *\r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n *\r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n var finalFiles = [];\r\n\r\n // Clean out any potential 'null' or 'undefined' file entries\r\n files.forEach(function (file)\r\n {\r\n if (file)\r\n {\r\n finalFiles.push(file);\r\n }\r\n });\r\n\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {number}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = finalFiles;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.MultiFile#state\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.state = CONST.FILE_PENDING;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {number}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = finalFiles.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < finalFiles.length; i++)\r\n {\r\n finalFiles[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n\r\n // eslint-disable-next-line no-console\r\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\r\n }\r\n },\r\n\r\n /**\r\n * Called once all children of this multi file have been added to their caches and is now\r\n * ready for deletion from the Loader.\r\n *\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.MultiFile#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.60.0\r\n */\r\n pendingDestroy: function ()\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n for (var i = 0; i < this.files.length; i++)\r\n {\r\n this.files[i].pendingDestroy();\r\n }\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this Multi File and any references it holds.\r\n *\r\n * @method Phaser.Loader.MultiFile#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.files = null;\r\n this.config = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {number} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n *\r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n *\r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n *\r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n *\r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n *\r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n *\r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n *\r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing.\r\n *\r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load.\r\n *\r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n *\r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n *\r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n *\r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request.\r\n *\r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19,\r\n\r\n /**\r\n * File is pending being destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING_DESTROY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n FILE_PENDING_DESTROY: 20\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n *\r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n *\r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n *\r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {number} totalComplete - The total number of files that successfully loaded.\r\n * @param {number} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n *\r\n * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n *\r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n *\r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n *\r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n *\r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n *\r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n *\r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n *\r\n * This event is dispatched even if there aren't any files in the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\nvar GetURL = require('../GetURL');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n\r\n this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\r\n\r\n if (this.useImageElementLoad)\r\n {\r\n this.load = this.loadImage;\r\n this.onProcess = this.onProcessImage;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Handles image load processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n onProcessImage: function ()\r\n {\r\n var result = this.state;\r\n\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n if (result === CONST.FILE_LOADED)\r\n {\r\n this.onProcessComplete();\r\n }\r\n else\r\n {\r\n this.onProcessError();\r\n }\r\n },\r\n\r\n /**\r\n * Loads the image using either XHR or an Image tag.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n loadImage: function ()\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n _this.state = CONST.FILE_LOADED;\r\n\r\n _this.loader.nextFile(_this, true);\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n _this.loader.nextFile(_this, false);\r\n };\r\n\r\n this.data.src = this.src;\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n // Check if we have a linked normal map\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile)\r\n {\r\n // We do, but has it loaded?\r\n if (linkFile.state >= CONST.FILE_COMPLETE)\r\n {\r\n // Both files have loaded\r\n if (this.type === 'normalMap')\r\n {\r\n // linkFile.data = Image\r\n // this.data = Normal Map\r\n this.cache.addImage(this.key, linkFile.data, this.data);\r\n }\r\n else\r\n {\r\n // linkFile.data = Normal Map\r\n // this.data = Image\r\n this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n }\r\n\r\n // Nothing to do here, we'll use the linkFile `addToCache` call\r\n // to process this pair\r\n }\r\n else\r\n {\r\n this.cache.addImage(this.key, this.data);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\r\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\r\n * via the Image tag instead.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\r\n *\r\n * @class JSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar JSONFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function JSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n var extension = 'json';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataKey = GetFastValue(config, 'dataKey', dataKey);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'json',\r\n cache: loader.cacheManager.json,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: dataKey\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\r\n if (IsPlainObject(url))\r\n {\r\n if (dataKey)\r\n {\r\n this.data = GetValue(url, dataKey);\r\n }\r\n else\r\n {\r\n this.data = url;\r\n }\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n try\r\n {\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n catch (e)\r\n {\r\n this.onProcessError();\r\n\r\n throw e;\r\n }\r\n\r\n var key = this.config;\r\n\r\n if (typeof key === 'string')\r\n {\r\n this.data = GetValue(json, key, json);\r\n }\r\n else\r\n {\r\n this.data = json;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON file, or array of JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.json({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n *\r\n * ```json\r\n * {\r\n * \"level1\": {\r\n * \"baddies\": {\r\n * \"aliens\": {},\r\n * \"boss\": {}\r\n * }\r\n * },\r\n * \"level2\": {},\r\n * \"level3\": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#json\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new JSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = JSONFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var type = 'text';\r\n var extension = 'txt';\r\n var cache = loader.cacheManager.text;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n type = GetFastValue(config, 'type', type);\r\n cache = GetFastValue(config, 'cache', cache);\r\n }\r\n\r\n var fileConfig = {\r\n type: type,\r\n cache: cache,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {number} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\nvar Class = require('../utils/Class');\r\nvar Matrix4 = require('./Matrix4');\r\nvar NOOP = require('../utils/NOOP');\r\n\r\nvar tempMatrix = new Matrix4();\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Euler\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Euler = new Class({\r\n\r\n initialize:\r\n\r\n function Euler (x, y, z, order)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (z === undefined) { z = 0; }\r\n if (order === undefined) { order = Euler.DefaultOrder; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback = NOOP;\r\n },\r\n\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n order: {\r\n get: function ()\r\n {\r\n return this._order;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._order = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n set: function (x, y, z, order)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n copy: function (euler)\r\n {\r\n return this.set(euler.x, euler.y, euler.z, euler.order);\r\n },\r\n\r\n setFromQuaternion: function (quaternion, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n tempMatrix.fromQuat(quaternion);\r\n\r\n return this.setFromRotationMatrix(tempMatrix, order, update);\r\n },\r\n\r\n setFromRotationMatrix: function (matrix, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n var elements = matrix.val;\r\n\r\n // Upper 3x3 of matrix is un-scaled rotation matrix\r\n var m11 = elements[0];\r\n var m12 = elements[4];\r\n var m13 = elements[8];\r\n var m21 = elements[1];\r\n var m22 = elements[5];\r\n var m23 = elements[9];\r\n var m31 = elements[2];\r\n var m32 = elements[6];\r\n var m33 = elements[10];\r\n\r\n var x = 0;\r\n var y = 0;\r\n var z = 0;\r\n var epsilon = 0.99999;\r\n\r\n switch (order)\r\n {\r\n case 'XYZ':\r\n {\r\n y = Math.asin(Clamp(m13, -1, 1));\r\n\r\n if (Math.abs(m13) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m33);\r\n z = Math.atan2(-m12, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(m32, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n x = Math.asin(-Clamp(m23, -1, 1));\r\n\r\n if (Math.abs(m23) < epsilon)\r\n {\r\n y = Math.atan2(m13, m33);\r\n z = Math.atan2(m21, m22);\r\n }\r\n else\r\n {\r\n y = Math.atan2(-m31, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n x = Math.asin(Clamp(m32, -1, 1));\r\n\r\n if (Math.abs(m32) < epsilon)\r\n {\r\n y = Math.atan2(-m31, m33);\r\n z = Math.atan2(-m12, m22);\r\n }\r\n else\r\n {\r\n z = Math.atan2(m21, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n y = Math.asin(-Clamp(m31, -1, 1));\r\n\r\n if (Math.abs(m31) < epsilon)\r\n {\r\n x = Math.atan2(m32, m33);\r\n z = Math.atan2(m21, m11);\r\n }\r\n else\r\n {\r\n z = Math.atan2(-m12, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n z = Math.asin(Clamp(m21, -1, 1));\r\n\r\n if (Math.abs(m21) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m22);\r\n y = Math.atan2(-m31, m11);\r\n }\r\n else\r\n {\r\n y = Math.atan2(m13, m33);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n z = Math.asin(-Clamp(m12, -1, 1));\r\n\r\n if (Math.abs(m12) < epsilon)\r\n {\r\n x = Math.atan2(m32, m22);\r\n y = Math.atan2(m13, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(-m23, m33);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\r\n\r\nEuler.DefaultOrder = 'XYZ';\r\n\r\nmodule.exports = Euler;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent + min;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {number} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Greg McLean \r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Interpolates two given Vectors and returns a new Vector between them.\r\n *\r\n * Does not modify either of the passed Vectors.\r\n *\r\n * @function Phaser.Math.LinearXY\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\r\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\r\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\r\n */\r\nvar LinearXY = function (vector1, vector2, t)\r\n{\r\n if (t === undefined) { t = 0; }\r\n\r\n return vector1.clone().lerp(vector2, t);\r\n};\r\n\r\nmodule.exports = LinearXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Sets all values of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#setValues\r\n * @since 3.50.0\r\n *\r\n * @param {number} m00 - The m00 value.\r\n * @param {number} m01 - The m01 value.\r\n * @param {number} m02 - The m02 value.\r\n * @param {number} m03 - The m03 value.\r\n * @param {number} m10 - The m10 value.\r\n * @param {number} m11 - The m11 value.\r\n * @param {number} m12 - The m12 value.\r\n * @param {number} m13 - The m13 value.\r\n * @param {number} m20 - The m20 value.\r\n * @param {number} m21 - The m21 value.\r\n * @param {number} m22 - The m22 value.\r\n * @param {number} m23 - The m23 value.\r\n * @param {number} m30 - The m30 value.\r\n * @param {number} m31 - The m31 value.\r\n * @param {number} m32 - The m32 value.\r\n * @param {number} m33 - The m33 value.\r\n *\r\n * @return {this} This Matrix4 instance.\r\n */\r\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = m00;\r\n out[1] = m01;\r\n out[2] = m02;\r\n out[3] = m03;\r\n out[4] = m10;\r\n out[5] = m11;\r\n out[6] = m12;\r\n out[7] = m13;\r\n out[8] = m20;\r\n out[9] = m21;\r\n out[10] = m22;\r\n out[11] = m23;\r\n out[12] = m30;\r\n out[13] = m31;\r\n out[14] = m32;\r\n out[15] = m33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var a = src.val;\r\n\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} a - The array to copy the values from. Must have at least 16 elements.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Generates a transform matrix based on the given position, scale and rotation.\r\n *\r\n * @method Phaser.Math.Matrix4#transform\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {Phaser.Math.Vector3} scale - The scale vector.\r\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transform: function (position, scale, rotation)\r\n {\r\n var rotMatrix = _tempMat1.fromQuat(rotation);\r\n\r\n var rm = rotMatrix.val;\r\n\r\n var sx = scale.x;\r\n var sy = scale.y;\r\n var sz = scale.z;\r\n\r\n return this.setValues(\r\n rm[0] * sx,\r\n rm[1] * sx,\r\n rm[2] * sx,\r\n 0,\r\n\r\n rm[4] * sy,\r\n rm[5] * sy,\r\n rm[6] * sy,\r\n 0,\r\n\r\n rm[8] * sz,\r\n rm[9] * sz,\r\n rm[10] * sz,\r\n 0,\r\n\r\n position.x,\r\n position.y,\r\n position.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies the given Matrix4 into this Matrix and then inverses it.\r\n *\r\n * @method Phaser.Math.Matrix4#getInverse\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n getInverse: function (m)\r\n {\r\n this.copy(m);\r\n\r\n return this.invert();\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return this;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n return this.setValues(\r\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\r\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\r\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\r\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\r\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\r\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\r\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\r\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\r\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\r\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\r\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\r\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\r\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\r\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\r\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\r\n (a20 * b03 - a21 * b01 + a22 * b00) * det\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n return this.setValues(\r\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\r\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\r\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\r\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\r\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\r\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\r\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\r\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\r\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\r\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\r\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\r\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\r\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\r\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\r\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\r\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n return this.setValues(\r\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\r\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\r\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\r\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\r\n\r\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\r\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\r\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\r\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\r\n\r\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\r\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\r\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\r\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\r\n\r\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\r\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\r\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\r\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\r\n );\r\n },\r\n\r\n /**\r\n * Multiplies the given Matrix4 object with this Matrix.\r\n *\r\n * This is the same as calling `multiplyMatrices(m, this)`.\r\n *\r\n * @method Phaser.Math.Matrix4#premultiply\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n premultiply: function (m)\r\n {\r\n return this.multiplyMatrices(m, this);\r\n },\r\n\r\n /**\r\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyMatrices\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\r\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyMatrices: function (a, b)\r\n {\r\n var am = a.val;\r\n var bm = b.val;\r\n\r\n var a11 = am[0];\r\n var a12 = am[4];\r\n var a13 = am[8];\r\n var a14 = am[12];\r\n var a21 = am[1];\r\n var a22 = am[5];\r\n var a23 = am[9];\r\n var a24 = am[13];\r\n var a31 = am[2];\r\n var a32 = am[6];\r\n var a33 = am[10];\r\n var a34 = am[14];\r\n var a41 = am[3];\r\n var a42 = am[7];\r\n var a43 = am[11];\r\n var a44 = am[15];\r\n\r\n var b11 = bm[0];\r\n var b12 = bm[4];\r\n var b13 = bm[8];\r\n var b14 = bm[12];\r\n var b21 = bm[1];\r\n var b22 = bm[5];\r\n var b23 = bm[9];\r\n var b24 = bm[13];\r\n var b31 = bm[2];\r\n var b32 = bm[6];\r\n var b33 = bm[10];\r\n var b34 = bm[14];\r\n var b41 = bm[3];\r\n var b42 = bm[7];\r\n var b43 = bm[11];\r\n var b44 = bm[15];\r\n\r\n return this.setValues(\r\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\r\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\r\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\r\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\r\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\r\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\r\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\r\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\r\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\r\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\r\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\r\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\r\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\r\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\r\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\r\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\r\n );\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n return this.translateXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n return this.scaleXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n return this.setValues(\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n );\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return this;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n return this.setValues(\r\n a00 * b00 + a10 * b01 + a20 * b02,\r\n a01 * b00 + a11 * b01 + a21 * b02,\r\n a02 * b00 + a12 * b01 + a22 * b02,\r\n a03 * b00 + a13 * b01 + a23 * b02,\r\n a00 * b10 + a10 * b11 + a20 * b12,\r\n a01 * b10 + a11 * b11 + a21 * b12,\r\n a02 * b10 + a12 * b11 + a22 * b12,\r\n a03 * b10 + a13 * b11 + a23 * b12,\r\n a00 * b20 + a10 * b21 + a20 * b22,\r\n a01 * b20 + a11 * b21 + a21 * b22,\r\n a02 * b20 + a12 * b21 + a22 * b22,\r\n a03 * b20 + a13 * b21 + a23 * b22,\r\n a30, a31, a32, a33\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n v.x,\r\n v.y,\r\n v.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 0,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n (near * 2) * rl,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (near * 2) * tb,\r\n 0,\r\n 0,\r\n\r\n (right + left) * rl,\r\n (top + bottom) * tb,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (far * near * 2) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n f / aspect,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n f,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (2 * far * near) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n return this.setValues(\r\n (2 * near) / width,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (2 * near) / height,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n -far / (near - far),\r\n 1,\r\n\r\n 0,\r\n 0,\r\n (near * far) / (near - far),\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n return this.setValues(\r\n -2 * lr,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n -2 * bt,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 2 * nf,\r\n 0,\r\n\r\n (left + right) * lr,\r\n (top + bottom) * bt,\r\n (far + near) * nf,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAtRH\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\r\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAtRH: function (eye, target, up)\r\n {\r\n var m = this.val;\r\n\r\n _z.subVectors(eye, target);\r\n\r\n if (_z.getLengthSquared() === 0)\r\n {\r\n // eye and target are in the same position\r\n _z.z = 1;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n\r\n if (_x.getLengthSquared() === 0)\r\n {\r\n // up and z are parallel\r\n\r\n if (Math.abs(up.z) === 1)\r\n {\r\n _z.x += 0.0001;\r\n }\r\n else\r\n {\r\n _z.z += 0.0001;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n }\r\n\r\n _x.normalize();\r\n _y.crossVectors(_z, _x);\r\n\r\n m[0] = _x.x;\r\n m[1] = _x.y;\r\n m[2] = _x.z;\r\n m[4] = _y.x;\r\n m[5] = _y.y;\r\n m[6] = _y.z;\r\n m[8] = _z.x;\r\n m[9] = _z.y;\r\n m[10] = _z.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n return this.setValues(\r\n x0,\r\n y0,\r\n z0,\r\n 0,\r\n\r\n x1,\r\n y1,\r\n z1,\r\n 0,\r\n\r\n x2,\r\n y2,\r\n z2,\r\n 0,\r\n\r\n -(x0 * eyex + x1 * eyey + x2 * eyez),\r\n -(y0 * eyex + y1 * eyey + y2 * eyez),\r\n -(z0 * eyex + z1 * eyey + z2 * eyez),\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyToMat4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\r\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\r\n */\r\n multiplyToMat4: function (src, out)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b03 = b[3];\r\n var b10 = b[4];\r\n var b11 = b[5];\r\n var b12 = b[6];\r\n var b13 = b[7];\r\n var b20 = b[8];\r\n var b21 = b[9];\r\n var b22 = b[10];\r\n var b23 = b[11];\r\n var b30 = b[12];\r\n var b31 = b[13];\r\n var b32 = b[14];\r\n var b33 = b[15];\r\n\r\n return out.setValues(\r\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\r\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\r\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\r\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\r\n\r\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\r\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\r\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\r\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\r\n\r\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\r\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\r\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\r\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\r\n\r\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\r\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\r\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\r\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\r\n );\r\n },\r\n\r\n /**\r\n * Takes the rotation and position vectors and builds this Matrix4 from them.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationXYTranslation: function (rotation, position, translateFirst)\r\n {\r\n var x = position.x;\r\n var y = position.y;\r\n var z = position.z;\r\n\r\n var sx = Math.sin(rotation.x);\r\n var cx = Math.cos(rotation.x);\r\n\r\n var sy = Math.sin(rotation.y);\r\n var cy = Math.cos(rotation.y);\r\n\r\n var a30 = x;\r\n var a31 = y;\r\n var a32 = z;\r\n\r\n // Rotate X\r\n\r\n var b21 = -sx;\r\n\r\n // Rotate Y\r\n\r\n var c01 = 0 - b21 * sy;\r\n\r\n var c02 = 0 - cx * sy;\r\n\r\n var c21 = b21 * cy;\r\n\r\n var c22 = cx * cy;\r\n\r\n // Translate\r\n if (!translateFirst)\r\n {\r\n // a30 = cy * x + 0 * y + sy * z;\r\n a30 = cy * x + sy * z;\r\n a31 = c01 * x + cx * y + c21 * z;\r\n a32 = c02 * x + sx * y + c22 * z;\r\n }\r\n\r\n return this.setValues(\r\n cy,\r\n c01,\r\n c02,\r\n 0,\r\n 0,\r\n cx,\r\n sx,\r\n 0,\r\n sy,\r\n c21,\r\n c22,\r\n 0,\r\n a30,\r\n a31,\r\n a32,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Returns the maximum axis scale from this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\r\n * @since 3.50.0\r\n *\r\n * @return {number} The maximum axis scale.\r\n */\r\n getMaxScaleOnAxis: function ()\r\n {\r\n var m = this.val;\r\n\r\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\r\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\r\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\r\n\r\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat1 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat2 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _x = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _y = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _z = new Vector3();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Vladislav Forsh \r\n * @copyright 2021 RoboWhale\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\r\n * In case of an even number of values, the average of the two middle values is returned.\r\n *\r\n * @function Phaser.Math.Median\r\n * @since 3.54.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The median value.\r\n */\r\nvar Median = function (values)\r\n{\r\n var valuesNum = values.length;\r\n if (valuesNum === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n values.sort(function (a, b) { return a - b; });\r\n\r\n var halfIndex = Math.floor(valuesNum / 2);\r\n\r\n return valuesNum % 2 === 0\r\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\r\n : values[halfIndex];\r\n};\r\n\r\nmodule.exports = Median;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Matrix3 = require('./Matrix3');\r\nvar NOOP = require('../utils/NOOP');\r\nvar Vector3 = require('./Vector3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x component.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=1] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_x\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_y\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_z\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_w\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * This callback is invoked, if set, each time a value in this quaternion is changed.\r\n * The callback is passed one argument, a reference to this quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#onChangeCallback\r\n * @type {function}\r\n * @since 3.50.0\r\n */\r\n this.onChangeCallback = NOOP;\r\n\r\n this.set(x, y, z, w);\r\n },\r\n\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: {\r\n get: function ()\r\n {\r\n return this._w;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._w = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n return this.set(src);\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n * @param {boolean} [update=true] - Call the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w, update)\r\n {\r\n if (update === undefined) { update = true; }\r\n\r\n if (typeof x === 'object')\r\n {\r\n this._x = x.x || 0;\r\n this._y = x.y || 0;\r\n this._z = x.z || 0;\r\n this._w = x.w || 0;\r\n }\r\n else\r\n {\r\n this._x = x || 0;\r\n this._y = y || 0;\r\n this._z = z || 0;\r\n this._w = w || 0;\r\n }\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this._x += v.x;\r\n this._y += v.y;\r\n this._z += v.z;\r\n this._w += v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this._x -= v.x;\r\n this._y -= v.y;\r\n this._z -= v.z;\r\n this._w -= v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this._x *= scale;\r\n this._y *= scale;\r\n this._z *= scale;\r\n this._w *= scale;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this._x = x * len;\r\n this._y = y * len;\r\n this._z = z * len;\r\n this._w = w * len;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n return this.set(\r\n ax + t * (v.x - ax),\r\n ay + t * (v.y - ay),\r\n az + t * (v.z - az),\r\n aw + t * (v.w - aw)\r\n );\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n return this.set(0, 0, 0, 1);\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this._x = tmpvec.x;\r\n this._y = tmpvec.y;\r\n this._z = tmpvec.z;\r\n this._w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n return this.set(0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n return this.set(\r\n s * axis.x,\r\n s * axis.y,\r\n s * axis.z,\r\n Math.cos(rad)\r\n );\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n return this.set(\r\n ax * bw + aw * bx + ay * bz - az * by,\r\n ay * bw + aw * by + az * bx - ax * bz,\r\n az * bw + aw * bz + ax * by - ay * bx,\r\n aw * bw - ax * bx - ay * by - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n return this.set(\r\n scale0 * ax + scale1 * bx,\r\n scale0 * ay + scale1 * by,\r\n scale0 * az + scale1 * bz,\r\n scale0 * aw + scale1 * bw\r\n );\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n return this.set(\r\n -a0 * invDot,\r\n -a1 * invDot,\r\n -a2 * invDot,\r\n a3 * invDot\r\n );\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this._x = -this.x;\r\n this._y = -this.y;\r\n this._z = -this.z;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + aw * bx,\r\n ay * bw + az * bx,\r\n az * bw - ay * bx,\r\n aw * bw - ax * bx\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw - az * by,\r\n ay * bw + aw * by,\r\n az * bw + ax * by,\r\n aw * bw - ay * by\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + ay * bz,\r\n ay * bw - ax * bz,\r\n az * bw + aw * bz,\r\n aw * bw - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set this Quaternion from the given Euler, based on Euler order.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromEuler\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\r\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromEuler: function (euler, update)\r\n {\r\n var x = euler.x / 2;\r\n var y = euler.y / 2;\r\n var z = euler.z / 2;\r\n\r\n var c1 = Math.cos(x);\r\n var c2 = Math.cos(y);\r\n var c3 = Math.cos(z);\r\n\r\n var s1 = Math.sin(x);\r\n var s2 = Math.sin(y);\r\n var s3 = Math.sin(z);\r\n\r\n switch (euler.order)\r\n {\r\n case 'XYZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Quaternion from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromRotationMatrix: function (mat4)\r\n {\r\n var m = mat4.val;\r\n\r\n var m11 = m[0];\r\n var m12 = m[4];\r\n var m13 = m[8];\r\n var m21 = m[1];\r\n var m22 = m[5];\r\n var m23 = m[9];\r\n var m31 = m[2];\r\n var m32 = m[6];\r\n var m33 = m[10];\r\n\r\n var trace = m11 + m22 + m33;\r\n var s;\r\n\r\n if (trace > 0)\r\n {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n this.set(\r\n (m32 - m23) * s,\r\n (m13 - m31) * s,\r\n (m21 - m12) * s,\r\n 0.25 / s\r\n );\r\n }\r\n else if (m11 > m22 && m11 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n this.set(\r\n 0.25 * s,\r\n (m12 + m21) / s,\r\n (m13 + m31) / s,\r\n (m32 - m23) / s\r\n );\r\n }\r\n else if (m22 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n this.set(\r\n (m12 + m21) / s,\r\n 0.25 * s,\r\n (m23 + m32) / s,\r\n (m13 - m31) / s\r\n );\r\n }\r\n else\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n this.set(\r\n (m13 + m31) / s,\r\n (m23 + m32) / s,\r\n 0.25 * s,\r\n (m21 - m12) / s\r\n );\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this._x = (m[7] - m[5]) * fRoot;\r\n this._y = (m[2] - m[6]) * fRoot;\r\n this._z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this._x = tmp[0];\r\n this._y = tmp[1];\r\n this._z = tmp[2];\r\n this._w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {number} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n *\r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n *\r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n *\r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {number} index - The position within the grid to get the x/y value for.\r\n * @param {number} width - The width of the grid.\r\n * @param {number} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n }\r\n\r\n return out.set(x, y);\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y=x] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n },\r\n\r\n /**\r\n * Project this Vector onto another.\r\n *\r\n * @method Phaser.Math.Vector2#project\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n project: function (src)\r\n {\r\n var scalar = this.dot(src) / src.dot(src);\r\n\r\n return this.copy(src).scale(scalar);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.min` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#min\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n min: function (v)\r\n {\r\n this.x = Math.min(this.x, v.x);\r\n this.y = Math.min(this.y, v.y);\r\n this.z = Math.min(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#max\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n max: function (v)\r\n {\r\n this.x = Math.max(this.x, v.x);\r\n this.y = Math.max(this.y, v.y);\r\n this.z = Math.max(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Adds the two given Vector3s and sets the results into this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#addVectors\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addVectors: function (a, b)\r\n {\r\n this.x = a.x + b.x;\r\n this.y = a.y + b.y;\r\n this.z = a.z + b.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the position of the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixPosition\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixPosition: function (m)\r\n {\r\n return this.fromArray(m.val, 12);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the Matrix4 column specified.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixColumn\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\r\n * @param {number} index - The column index.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixColumn: function (mat4, index)\r\n {\r\n return this.fromArray(mat4.val, index * 4);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the given array, based on the offset.\r\n *\r\n * Vector3.x = array[offset]\r\n * Vector3.y = array[offset + 1]\r\n * Vector3.z = array[offset + 2]\r\n *\r\n * @method Phaser.Math.Vector3#fromArray\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} array - The array of values to get this Vector from.\r\n * @param {number} [offset=0] - The offset index into the array.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n fromArray: function (array, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.x = array[offset];\r\n this.y = array[offset + 1];\r\n this.z = array[offset + 2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add the given value to each component of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#addScalar\r\n * @since 3.50.0\r\n *\r\n * @param {number} s - The amount to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScalar: function (s)\r\n {\r\n this.x += s;\r\n this.y += s;\r\n this.z += s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add and scale a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#addScale\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n * @param {number} scale - The amount to scale `v` by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScale: function (v, scale)\r\n {\r\n this.x += v.x * scale;\r\n this.y += v.y * scale;\r\n this.z += v.z * scale || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix3 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix3\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix3: function (mat3)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat3.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6] * z;\r\n this.y = m[1] * x + m[4] * y + m[7] * z;\r\n this.z = m[2] * x + m[5] * y + m[8] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix4 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix4: function (mat4)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat4.val;\r\n\r\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\r\n\r\n this.x = (m[0] * x + m[4] * y + m[8] * z + m[12]) * w;\r\n this.y = (m[1] * x + m[5] * y + m[9] * z + m[13]) * w;\r\n this.z = (m[2] * x + m[6] * y + m[10] * z + m[14]) * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given view and projection matrices.\r\n *\r\n * @method Phaser.Math.Vector3#projectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n projectViewMatrix: function (viewMatrix, projectionMatrix)\r\n {\r\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\r\n *\r\n * @method Phaser.Math.Vector3#unprojectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\r\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\r\n {\r\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max`.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n if (value >= min && value <= max)\r\n {\r\n // Skip modulo if already in range\r\n return value;\r\n }\r\n\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n *\r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n *\r\n * Yes, we undertstand that this should actually be PI * 2, but\r\n * it has been like this for so long we can't change it now.\r\n * If you need PI * 2, use the PI2 constant instead.\r\n *\r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n *\r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n *\r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n *\r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n *\r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Euler: require('./Euler'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n LinearXY: require('./LinearXY'),\r\n MaxAdd: require('./MaxAdd'),\r\n Median: require('./Median'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {number} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n *\r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n *\r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n *\r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar corePlugins = {};\r\n\r\n// Contains the plugins that the dev has loaded into their game\r\n// These are the source objects, not instantiated.\r\nvar customPlugins = {};\r\n\r\nvar PluginCache = {};\r\n\r\n/**\r\n * @namespace Phaser.Plugins.PluginCache\r\n */\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @method Phaser.Plugins.PluginCache.register\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\r\n */\r\nPluginCache.register = function (key, plugin, mapping, custom)\r\n{\r\n if (custom === undefined) { custom = false; }\r\n\r\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\r\n};\r\n\r\n/**\r\n * Stores a custom plugin in the global plugin cache.\r\n * The key must be unique, within the scope of the cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.registerCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {?any} data - A value to be passed to the plugin's `init` method.\r\n */\r\nPluginCache.registerCustom = function (key, plugin, mapping, data)\r\n{\r\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the core plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\r\n */\r\nPluginCache.hasCore = function (key)\r\n{\r\n return corePlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the custom plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\r\n */\r\nPluginCache.hasCustom = function (key)\r\n{\r\n return customPlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Returns the core plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\r\n */\r\nPluginCache.getCore = function (key)\r\n{\r\n return corePlugins[key];\r\n};\r\n\r\n/**\r\n * Returns the custom plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\r\n */\r\nPluginCache.getCustom = function (key)\r\n{\r\n return customPlugins[key];\r\n};\r\n\r\n/**\r\n * Returns an object from the custom cache based on the given key that can be instantiated.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustomClass\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {function} The custom plugin object.\r\n */\r\nPluginCache.getCustomClass = function (key)\r\n{\r\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\r\n};\r\n\r\n/**\r\n * Removes a core plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.remove\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to remove.\r\n */\r\nPluginCache.remove = function (key)\r\n{\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes a custom plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.removeCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to remove.\r\n */\r\nPluginCache.removeCustom = function (key)\r\n{\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Core Plugins.\r\n *\r\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\r\n * So be sure you only call this if you do not wish to run Phaser again.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCorePlugins = function ()\r\n{\r\n for (var key in corePlugins)\r\n {\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Custom Plugins.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCustomPlugins = function ()\r\n{\r\n for (var key in customPlugins)\r\n {\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = PluginCache;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager, pluginKey)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The key under which this plugin was installed into the Scene Systems.\r\n *\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#pluginKey\r\n * @type {string}\r\n * @readonly\r\n * @since 3.54.0\r\n */\r\n this.pluginKey = pluginKey;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n *\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n *\r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n *\r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.ADD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n *\r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n *\r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n *\r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n *\r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n *\r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n *\r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n *\r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n *\r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n *\r\n * @name Phaser.BlendModes.HUE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n *\r\n * @name Phaser.BlendModes.ERASE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n *\r\n * @name Phaser.BlendModes.COPY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n *\r\n * @name Phaser.BlendModes.XOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Modes.\r\n *\r\n * @namespace Phaser.ScaleModes\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScaleModes = {\r\n\r\n /**\r\n * Default Scale Mode (Linear).\r\n *\r\n * @name Phaser.ScaleModes.DEFAULT\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n DEFAULT: 0,\r\n\r\n /**\r\n * Linear Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.LINEAR\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.NEAREST\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n\r\n};\r\n\r\nmodule.exports = ScaleModes;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n *\r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('boot', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#BOOT\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n *\r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n *\r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n *\r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('create', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#CREATE\r\n * @type {string}\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('destroy', listener)`.\r\n *\r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n *\r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n *\r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('pause', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('postupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author samme\r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre-Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_RENDER\r\n * @type {string}\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'prerender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('preupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('ready', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#READY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('render', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n *\r\n * @event Phaser.Scenes.Events#RENDER\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n *\r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('resume', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#RESUME\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('shutdown', listener)`.\r\n *\r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n *\r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n *\r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('sleep', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('start', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioncomplete', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioninit', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n *\r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionout', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n *\r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n *\r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionstart', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionwake', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists and the Scene is in a Running state, otherwise this is skipped.\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('update', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n *\r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('wake', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#WAKE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\r\n BOOT: require('./BOOT_EVENT'),\r\n CREATE: require('./CREATE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n PAUSE: require('./PAUSE_EVENT'),\r\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\r\n RENDER: require('./RENDER_EVENT'),\r\n RESUME: require('./RESUME_EVENT'),\r\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\r\n SLEEP: require('./SLEEP_EVENT'),\r\n START: require('./START_EVENT'),\r\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\r\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\r\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\r\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\r\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\r\n UPDATE: require('./UPDATE_EVENT'),\r\n WAKE: require('./WAKE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Clamp = require('../math/Clamp');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @classdesc\r\n * A Frame is a section of a Texture.\r\n *\r\n * @class Frame\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\r\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n */\r\nvar Frame = new Class({\r\n\r\n initialize:\r\n\r\n function Frame (texture, name, sourceIndex, x, y, width, height)\r\n {\r\n /**\r\n * The Texture this Frame is a part of.\r\n *\r\n * @name Phaser.Textures.Frame#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The name of this Frame.\r\n * The name is unique within the Texture.\r\n *\r\n * @name Phaser.Textures.Frame#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The TextureSource this Frame is part of.\r\n *\r\n * @name Phaser.Textures.Frame#source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @since 3.0.0\r\n */\r\n this.source = texture.source[sourceIndex];\r\n\r\n /**\r\n * The index of the TextureSource in the Texture sources array.\r\n *\r\n * @name Phaser.Textures.Frame#sourceIndex\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.sourceIndex = sourceIndex;\r\n\r\n /**\r\n * A reference to the Texture Source WebGL Texture that this Frame is using.\r\n *\r\n * @name Phaser.Textures.Frame#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this.glTexture = this.source.glTexture;\r\n\r\n /**\r\n * X position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutX;\r\n\r\n /**\r\n * Y position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutY;\r\n\r\n /**\r\n * The width of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutWidth;\r\n\r\n /**\r\n * The height of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutHeight;\r\n\r\n /**\r\n * The X rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The Y rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The rendering width of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width;\r\n\r\n /**\r\n * The rendering height of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height;\r\n\r\n /**\r\n * Half the width, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth;\r\n\r\n /**\r\n * Half the height, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight;\r\n\r\n /**\r\n * The x center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerX;\r\n\r\n /**\r\n * The y center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerY;\r\n\r\n /**\r\n * The horizontal pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotX = 0;\r\n\r\n /**\r\n * The vertical pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotY = 0;\r\n\r\n /**\r\n * Does this Frame have a custom pivot point?\r\n *\r\n * @name Phaser.Textures.Frame#customPivot\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customPivot = false;\r\n\r\n /**\r\n * **CURRENTLY UNSUPPORTED**\r\n *\r\n * Is this frame is rotated or not in the Texture?\r\n * Rotation allows you to use rotated frames in texture atlas packing.\r\n * It has nothing to do with Sprite rotation.\r\n *\r\n * @name Phaser.Textures.Frame#rotated\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rotated = false;\r\n\r\n /**\r\n * Over-rides the Renderer setting.\r\n * -1 = use Renderer Setting\r\n * 0 = No rounding\r\n * 1 = Round\r\n *\r\n * @name Phaser.Textures.Frame#autoRound\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.autoRound = -1;\r\n\r\n /**\r\n * Any Frame specific custom data can be stored here.\r\n *\r\n * @name Phaser.Textures.Frame#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * WebGL UV u0 value.\r\n *\r\n * @name Phaser.Textures.Frame#u0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u0 = 0;\r\n\r\n /**\r\n * WebGL UV v0 value.\r\n *\r\n * @name Phaser.Textures.Frame#v0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v0 = 0;\r\n\r\n /**\r\n * WebGL UV u1 value.\r\n *\r\n * @name Phaser.Textures.Frame#u1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u1 = 0;\r\n\r\n /**\r\n * WebGL UV v1 value.\r\n *\r\n * @name Phaser.Textures.Frame#v1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v1 = 0;\r\n\r\n /**\r\n * The un-modified source frame, trim and UV data.\r\n *\r\n * @name Phaser.Textures.Frame#data\r\n * @type {object}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n cut: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n trim: false,\r\n sourceSize: {\r\n w: 0,\r\n h: 0\r\n },\r\n spriteSourceSize: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n radius: 0,\r\n drawImage: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n }\r\n };\r\n\r\n this.setSize(width, height, x, y);\r\n },\r\n\r\n /**\r\n * Sets the width, height, x and y of this Frame.\r\n *\r\n * This is called automatically by the constructor\r\n * and should rarely be changed on-the-fly.\r\n *\r\n * @method Phaser.Textures.Frame#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {number} width - The width of the frame before being trimmed.\r\n * @param {number} height - The height of the frame before being trimmed.\r\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\r\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setSize: function (width, height, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.cutX = x;\r\n this.cutY = y;\r\n this.cutWidth = width;\r\n this.cutHeight = height;\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width * 0.5);\r\n this.halfHeight = Math.floor(height * 0.5);\r\n\r\n this.centerX = Math.floor(width / 2);\r\n this.centerY = Math.floor(height / 2);\r\n\r\n var data = this.data;\r\n var cut = data.cut;\r\n\r\n cut.x = x;\r\n cut.y = y;\r\n cut.w = width;\r\n cut.h = height;\r\n cut.r = x + width;\r\n cut.b = y + height;\r\n\r\n data.sourceSize.w = width;\r\n data.sourceSize.h = height;\r\n\r\n data.spriteSourceSize.w = width;\r\n data.spriteSourceSize.h = height;\r\n\r\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\r\n\r\n var drawImage = data.drawImage;\r\n\r\n drawImage.x = x;\r\n drawImage.y = y;\r\n drawImage.width = width;\r\n drawImage.height = height;\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\r\n *\r\n * @method Phaser.Textures.Frame#setTrim\r\n * @since 3.0.0\r\n *\r\n * @param {number} actualWidth - The width of the frame before being trimmed.\r\n * @param {number} actualHeight - The height of the frame before being trimmed.\r\n * @param {number} destX - The destination X position of the trimmed frame for display.\r\n * @param {number} destY - The destination Y position of the trimmed frame for display.\r\n * @param {number} destWidth - The destination width of the trimmed frame for display.\r\n * @param {number} destHeight - The destination height of the trimmed frame for display.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\r\n {\r\n var data = this.data;\r\n var ss = data.spriteSourceSize;\r\n\r\n // Store actual values\r\n\r\n data.trim = true;\r\n\r\n data.sourceSize.w = actualWidth;\r\n data.sourceSize.h = actualHeight;\r\n\r\n ss.x = destX;\r\n ss.y = destY;\r\n ss.w = destWidth;\r\n ss.h = destHeight;\r\n ss.r = destX + destWidth;\r\n ss.b = destY + destHeight;\r\n\r\n // Adjust properties\r\n this.x = destX;\r\n this.y = destY;\r\n\r\n this.width = destWidth;\r\n this.height = destHeight;\r\n\r\n this.halfWidth = destWidth * 0.5;\r\n this.halfHeight = destHeight * 0.5;\r\n\r\n this.centerX = Math.floor(destWidth / 2);\r\n this.centerY = Math.floor(destHeight / 2);\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * Takes a crop data object and, based on the rectangular region given, calculates the\r\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\r\n *\r\n * This is called directly by the Game Object Texture Components `setCrop` method.\r\n * Please use that method to crop a Game Object.\r\n *\r\n * @method Phaser.Textures.Frame#setCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\r\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\r\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\r\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\r\n {\r\n // Clamp the input values\r\n\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n var rw = this.realWidth;\r\n var rh = this.realHeight;\r\n\r\n x = Clamp(x, 0, rw);\r\n y = Clamp(y, 0, rh);\r\n\r\n width = Clamp(width, 0, rw - x);\r\n height = Clamp(height, 0, rh - y);\r\n\r\n var ox = cx + x;\r\n var oy = cy + y;\r\n var ow = width;\r\n var oh = height;\r\n\r\n var data = this.data;\r\n\r\n if (data.trim)\r\n {\r\n var ss = data.spriteSourceSize;\r\n\r\n // Need to check for intersection between the cut area and the crop area\r\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\r\n\r\n width = Clamp(width, 0, cw - x);\r\n height = Clamp(height, 0, ch - y);\r\n\r\n var cropRight = x + width;\r\n var cropBottom = y + height;\r\n\r\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\r\n\r\n if (intersects)\r\n {\r\n var ix = Math.max(ss.x, x);\r\n var iy = Math.max(ss.y, y);\r\n var iw = Math.min(ss.r, cropRight) - ix;\r\n var ih = Math.min(ss.b, cropBottom) - iy;\r\n\r\n ow = iw;\r\n oh = ih;\r\n\r\n if (flipX)\r\n {\r\n ox = cx + (cw - (ix - ss.x) - iw);\r\n }\r\n else\r\n {\r\n ox = cx + (ix - ss.x);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - (iy - ss.y) - ih);\r\n }\r\n else\r\n {\r\n oy = cy + (iy - ss.y);\r\n }\r\n\r\n x = ix;\r\n y = iy;\r\n\r\n width = iw;\r\n height = ih;\r\n }\r\n else\r\n {\r\n ox = 0;\r\n oy = 0;\r\n ow = 0;\r\n oh = 0;\r\n }\r\n }\r\n else\r\n {\r\n if (flipX)\r\n {\r\n ox = cx + (cw - x - width);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - y - height);\r\n }\r\n }\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n // Map the given coordinates into UV space, clamping to the 0-1 range.\r\n\r\n crop.u0 = Math.max(0, ox / tw);\r\n crop.v0 = Math.max(0, oy / th);\r\n crop.u1 = Math.min(1, (ox + ow) / tw);\r\n crop.v1 = Math.min(1, (oy + oh) / th);\r\n\r\n crop.x = x;\r\n crop.y = y;\r\n\r\n crop.cx = ox;\r\n crop.cy = oy;\r\n crop.cw = ow;\r\n crop.ch = oh;\r\n\r\n crop.width = width;\r\n crop.height = height;\r\n\r\n crop.flipX = flipX;\r\n crop.flipY = flipY;\r\n\r\n return crop;\r\n },\r\n\r\n /**\r\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\r\n * Called automatically by `setFrame`.\r\n *\r\n * @method Phaser.Textures.Frame#updateCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n updateCropUVs: function (crop, flipX, flipY)\r\n {\r\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\r\n },\r\n\r\n /**\r\n * Directly sets the canvas and WebGL UV data for this frame.\r\n *\r\n * Use this if you need to override the values that are generated automatically\r\n * when the Frame is created.\r\n *\r\n * @method Phaser.Textures.Frame#setUVs\r\n * @since 3.50.0\r\n *\r\n * @param {number} width - Width of this frame for the Canvas data.\r\n * @param {number} height - Height of this frame for the Canvas data.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setUVs: function (width, height, u0, v0, u1, v1)\r\n {\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = width;\r\n cd.height = height;\r\n\r\n // WebGL data\r\n\r\n this.u0 = u0;\r\n this.v0 = v0;\r\n\r\n this.u1 = u1;\r\n this.v1 = v1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache and the drawImage cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVs\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVs: function ()\r\n {\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = cw;\r\n cd.height = ch;\r\n\r\n // WebGL data\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = cx / tw;\r\n this.v0 = cy / th;\r\n\r\n this.u1 = (cx + cw) / tw;\r\n this.v1 = (cy + ch) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVsInverted\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVsInverted: function ()\r\n {\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = (this.cutX + this.cutHeight) / tw;\r\n this.v0 = this.cutY / th;\r\n\r\n this.u1 = this.cutX / tw;\r\n this.v1 = (this.cutY + this.cutWidth) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clones this Frame into a new Frame object.\r\n *\r\n * @method Phaser.Textures.Frame#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} A clone of this Frame.\r\n */\r\n clone: function ()\r\n {\r\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\r\n\r\n clone.cutX = this.cutX;\r\n clone.cutY = this.cutY;\r\n clone.cutWidth = this.cutWidth;\r\n clone.cutHeight = this.cutHeight;\r\n\r\n clone.x = this.x;\r\n clone.y = this.y;\r\n\r\n clone.width = this.width;\r\n clone.height = this.height;\r\n\r\n clone.halfWidth = this.halfWidth;\r\n clone.halfHeight = this.halfHeight;\r\n\r\n clone.centerX = this.centerX;\r\n clone.centerY = this.centerY;\r\n\r\n clone.rotated = this.rotated;\r\n\r\n clone.data = Extend(true, clone.data, this.data);\r\n\r\n clone.updateUVs();\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\r\n *\r\n * @method Phaser.Textures.Frame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.source = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n this.customData = null;\r\n this.data = null;\r\n },\r\n\r\n /**\r\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.w;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.h;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\r\n *\r\n * @name Phaser.Textures.Frame#radius\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.data.radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Frame trimmed or not?\r\n *\r\n * @name Phaser.Textures.Frame#trimmed\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n trimmed: {\r\n\r\n get: function ()\r\n {\r\n return this.data.trim;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Canvas drawImage data object.\r\n *\r\n * @name Phaser.Textures.Frame#canvasData\r\n * @type {object}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canvasData: {\r\n\r\n get: function ()\r\n {\r\n return this.data.drawImage;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Frame;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {boolean} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Tween States.\r\n *\r\n * @namespace Phaser.Tweens.States\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\n/**\r\n * Phaser Tween state constants.\r\n *\r\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.CREATED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n // 1 used to be INIT prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n // 3 used to be OFFSET_DELAY prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_RENDER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_FORWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.HOLD_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.REPEAT_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state. The Tween has been created but has not yet been added to the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING: 20,\r\n\r\n /**\r\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\r\n * or was playing and is currently paused, but in both cases it's still being processed by\r\n * the Tween Manager, so is considered 'active'.\r\n *\r\n * @name Phaser.Tweens.States.ACTIVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 21,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a loop countdown to elapse.\r\n *\r\n * @name Phaser.Tweens.States.LOOP_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a complete delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 23,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a starting delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.START_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n START_DELAY: 24,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_REMOVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state. The Tween has been removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.REMOVED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\r\n * so will not be automatically removed by the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.FINISHED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n FINISHED: 27,\r\n\r\n /**\r\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.DESTROYED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DESTROYED: 28,\r\n\r\n /**\r\n * A large integer value used for 'infinite' style countdowns.\r\n *\r\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\r\n * supported on IE.\r\n *\r\n * @name Phaser.Tweens.States.MAX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n MAX: 999999999999\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @ignore\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @ignore\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * Existing elements in the array are shifted up.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {number} [index=0] - The index in the array where the item will be inserted.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {number} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {number} startIndex - The start index to search from.\r\n * @param {number} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array and flattens it, returning a shallow-copy flattened array.\r\n *\r\n * @function Phaser.Utils.Array.Flatten\r\n * @since 3.60.0\r\n *\r\n * @param {array} array - The array to flatten.\r\n * @param {array} [output] - An array to hold the results in.\r\n *\r\n * @return {array} The flattened output array.\r\n */\r\nvar Flatten = function (array, output)\r\n{\r\n if (output === undefined) { output = []; }\r\n\r\n for (var i = 0; i < array.length; i++)\r\n {\r\n if (Array.isArray(array[i]))\r\n {\r\n Flatten(array[i], output);\r\n }\r\n else\r\n {\r\n output.push(array[i]);\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = Flatten;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element above another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveAbove\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move above base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveAbove = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex > baseIndex)\r\n {\r\n // item1 is already above item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === array.length - 1)\r\n {\r\n array.push(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveAbove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element below another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveBelow\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move below base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveBelow = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex < baseIndex)\r\n {\r\n // item1 is already below item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === 0)\r\n {\r\n array.unshift(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveBelow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {number} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\r\n\r\n/**\r\n * Create an array of numbers (positive and/or negative) progressing from `start`\r\n * up to but not including `end` by advancing by `step`.\r\n *\r\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\r\n *\r\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\r\n * for forward compatibility make sure to pass in actual numbers.\r\n *\r\n * @example\r\n * NumberArrayStep(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * NumberArrayStep(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * NumberArrayStep(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * NumberArrayStep(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * NumberArrayStep(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * NumberArrayStep(0);\r\n * // => []\r\n *\r\n * @function Phaser.Utils.Array.NumberArrayStep\r\n * @since 3.0.0\r\n *\r\n * @param {number} [start=0] - The start of the range.\r\n * @param {number} [end=null] - The end of the range.\r\n * @param {number} [step=1] - The value to increment or decrement by.\r\n *\r\n * @return {number[]} The array of number values.\r\n */\r\nvar NumberArrayStep = function (start, end, step)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (end === undefined) { end = null; }\r\n if (step === undefined) { step = 1; }\r\n\r\n if (end === null)\r\n {\r\n end = start;\r\n start = 0;\r\n }\r\n\r\n var result = [];\r\n\r\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n result.push(start);\r\n start += step;\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArrayStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {number} k - The k-th element index.\r\n * @param {number} [left=0] - The index of the left part of the range.\r\n * @param {number} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = require('../object/GetValue');\r\nvar Shuffle = require('./Shuffle');\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n *\r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n *\r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n *\r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n *\r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n *\r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n *\r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n var removed = [];\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n removed.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return removed;\r\n};\r\n\r\nmodule.exports = Remove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} startIndex - The start index to remove from.\r\n * @param {number} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {number} [start=0] - The array index to start the search from.\r\n * @param {number} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search within.\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The \"rotation\" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The \"rotation\" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n *\r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {number} startIndex - The start index.\r\n * @param {number} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {number} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n","/**\r\n * @author Richard Davey \r\n * @author Angry Bytes (and contributors)\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Device = require('../../device');\r\n\r\n/**\r\n * The comparator function.\r\n *\r\n * @ignore\r\n *\r\n * @param {*} a - The first item to test.\r\n * @param {*} b - The second itemt to test.\r\n *\r\n * @return {boolean} True if they localCompare, otherwise false.\r\n */\r\nfunction Compare (a, b)\r\n{\r\n return String(a).localeCompare(b);\r\n}\r\n\r\n/**\r\n * Process the array contents.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} array - The array to process.\r\n * @param {function} compare - The comparison function.\r\n *\r\n * @return {array} - The processed array.\r\n */\r\nfunction Process (array, compare)\r\n{\r\n // Short-circuit when there's nothing to sort.\r\n var len = array.length;\r\n\r\n if (len <= 1)\r\n {\r\n return array;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n\r\n for (var chk = 1; chk < len; chk *= 2)\r\n {\r\n RunPass(array, compare, chk, buffer);\r\n\r\n var tmp = array;\r\n\r\n array = buffer;\r\n\r\n buffer = tmp;\r\n }\r\n\r\n return array;\r\n}\r\n\r\n/**\r\n * Run a single pass with the given chunk size.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} arr - The array to run the pass on.\r\n * @param {function} comp - The comparison function.\r\n * @param {number} chk - The number of iterations.\r\n * @param {array} result - The array to store the result in.\r\n */\r\nfunction RunPass (arr, comp, chk, result)\r\n{\r\n var len = arr.length;\r\n var i = 0;\r\n\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl)\r\n {\r\n r = l + chk;\r\n e = r + chk;\r\n\r\n if (r > len)\r\n {\r\n r = len;\r\n }\r\n\r\n if (e > len)\r\n {\r\n e = len;\r\n }\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n\r\n while (true)\r\n {\r\n // Compare the chunks.\r\n if (li < r && ri < e)\r\n {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0)\r\n {\r\n result[i++] = arr[li++];\r\n }\r\n else\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n else if (li < r)\r\n {\r\n // Nothing to compare, just flush what's left.\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e)\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n else\r\n {\r\n // Both iterators are at the chunk ends.\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\r\n *\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The input array to be sorted.\r\n * @param {function} [compare] - The comparison function.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar StableSort = function (array, compare)\r\n{\r\n if (compare === undefined) { compare = Compare; }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n if (!array || array.length < 2)\r\n {\r\n return array;\r\n }\r\n\r\n if (Device.features.stableSort)\r\n {\r\n return array.sort(compare);\r\n }\r\n\r\n var result = Process(array, compare);\r\n\r\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\r\n if (result !== array)\r\n {\r\n RunPass(result, null, array.length, array);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = StableSort;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: require('./matrix'),\r\n\r\n Add: require('./Add'),\r\n AddAt: require('./AddAt'),\r\n BringToTop: require('./BringToTop'),\r\n CountAllMatching: require('./CountAllMatching'),\r\n Each: require('./Each'),\r\n EachInRange: require('./EachInRange'),\r\n FindClosestInSorted: require('./FindClosestInSorted'),\r\n Flatten: require('./Flatten'),\r\n GetAll: require('./GetAll'),\r\n GetFirst: require('./GetFirst'),\r\n GetRandom: require('./GetRandom'),\r\n MoveDown: require('./MoveDown'),\r\n MoveTo: require('./MoveTo'),\r\n MoveUp: require('./MoveUp'),\r\n MoveAbove: require('./MoveAbove'),\r\n MoveBelow: require('./MoveBelow'),\r\n NumberArray: require('./NumberArray'),\r\n NumberArrayStep: require('./NumberArrayStep'),\r\n QuickSelect: require('./QuickSelect'),\r\n Range: require('./Range'),\r\n Remove: require('./Remove'),\r\n RemoveAt: require('./RemoveAt'),\r\n RemoveBetween: require('./RemoveBetween'),\r\n RemoveRandomElement: require('./RemoveRandomElement'),\r\n Replace: require('./Replace'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateRight: require('./RotateRight'),\r\n SafeRange: require('./SafeRange'),\r\n SendToBack: require('./SendToBack'),\r\n SetAll: require('./SetAll'),\r\n Shuffle: require('./Shuffle'),\r\n SortByDigits: require('./SortByDigits'),\r\n SpliceOne: require('./SpliceOne'),\r\n StableSort: require('./StableSort'),\r\n Swap: require('./Swap')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = require('../../string/Pad');\r\nvar CheckMatrix = require('./CheckMatrix');\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = require('./CheckMatrix');\r\nvar TransposeMatrix = require('./TransposeMatrix');\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateLeft = require('../RotateLeft');\r\nvar RotateRight = require('../RotateRight');\r\n\r\n/**\r\n * Translates the given Array Matrix by shifting each column and row the\r\n * amount specified.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Translate\r\n * @since 3.50.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to translate.\r\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\r\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\r\n *\r\n * @return {T[][]} The translated matrix.\r\n */\r\nvar TranslateMatrix = function (matrix, x, y)\r\n{\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n // Vertical translation\r\n\r\n if (y !== 0)\r\n {\r\n if (y < 0)\r\n {\r\n // Shift Up\r\n RotateLeft(matrix, Math.abs(y));\r\n }\r\n else\r\n {\r\n // Shift Down\r\n RotateRight(matrix, y);\r\n }\r\n }\r\n\r\n // Horizontal translation\r\n\r\n if (x !== 0)\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n var row = matrix[i];\r\n\r\n if (x < 0)\r\n {\r\n RotateLeft(row, Math.abs(x));\r\n }\r\n else\r\n {\r\n RotateRight(row, x);\r\n }\r\n }\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = TranslateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n *\r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: require('./CheckMatrix'),\r\n MatrixToString: require('./MatrixToString'),\r\n ReverseColumns: require('./ReverseColumns'),\r\n ReverseRows: require('./ReverseRows'),\r\n Rotate180: require('./Rotate180'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateMatrix: require('./RotateMatrix'),\r\n RotateRight: require('./RotateRight'),\r\n Translate: require('./TranslateMatrix'),\r\n TransposeMatrix: require('./TransposeMatrix')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Deep Copy the given object or array.\r\n *\r\n * @function Phaser.Utils.Objects.DeepCopy\r\n * @since 3.50.0\r\n *\r\n * @param {object} obj - The object to deep copy.\r\n *\r\n * @return {object} A deep copy of the original object.\r\n */\r\nvar DeepCopy = function (inObject)\r\n{\r\n var outObject;\r\n var value;\r\n var key;\r\n\r\n if (typeof inObject !== 'object' || inObject === null)\r\n {\r\n // inObject is not an object\r\n return inObject;\r\n }\r\n\r\n // Create an array or object to hold the values\r\n outObject = Array.isArray(inObject) ? [] : {};\r\n\r\n for (key in inObject)\r\n {\r\n value = inObject[key];\r\n\r\n // Recursively (deep) copy for nested objects, including arrays\r\n outObject[key] = DeepCopy(value);\r\n }\r\n\r\n return outObject;\r\n};\r\n\r\nmodule.exports = DeepCopy;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n *\r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n *\r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\r\n *\r\n * The key is a string, which can be split based on the use of the period character.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * const source = {\r\n * lives: 3,\r\n * render: {\r\n * screen: {\r\n * width: 1024\r\n * }\r\n * }\r\n * }\r\n *\r\n * const lives = GetValue(source, 'lives', 1);\r\n * const width = GetValue(source, 'render.screen.width', 800);\r\n * const height = GetValue(source, 'render.screen.height', 600);\r\n * ```\r\n *\r\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\r\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\r\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue, altSource)\r\n{\r\n if ((!source && !altSource) || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source && source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (altSource && altSource.hasOwnProperty(key))\r\n {\r\n return altSource[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parentA = source;\r\n var parentB = altSource;\r\n var valueA = defaultValue;\r\n var valueB = defaultValue;\r\n var valueAFound = true;\r\n var valueBFound = true;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parentA && parentA.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentA has a key property, let's carry on down\r\n valueA = parentA[keys[i]];\r\n parentA = parentA[keys[i]];\r\n }\r\n else\r\n {\r\n valueAFound = false;\r\n }\r\n\r\n if (parentB && parentB.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentB has a key property, let's carry on down\r\n valueB = parentB[keys[i]];\r\n parentB = parentB[keys[i]];\r\n }\r\n else\r\n {\r\n valueBFound = false;\r\n }\r\n }\r\n\r\n if (valueAFound)\r\n {\r\n return valueA;\r\n }\r\n else if (valueBFound)\r\n {\r\n return valueB;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (!obj || typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and pads it out, to the length required, using the character\r\n * specified. For example if you need a string to be 6 characters long, you can call:\r\n *\r\n * `pad('bob', 6, '-', 2)`\r\n *\r\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\r\n *\r\n * You can also use it to pad numbers (they are always returned as strings):\r\n *\r\n * `pad(512, 6, '0', 1)`\r\n *\r\n * Would return: `000512` with the string padded to the left.\r\n *\r\n * If you don't specify a direction it'll pad to both sides:\r\n *\r\n * `pad('c64', 7, '*')`\r\n *\r\n * Would return: `**c64**`\r\n *\r\n * @function Phaser.Utils.String.Pad\r\n * @since 3.0.0\r\n *\r\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\r\n * @param {number} [len=0] - The number of characters to be added.\r\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\r\n * @param {number} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\r\n *\r\n * @return {string} The padded string.\r\n */\r\nvar Pad = function (str, len, pad, dir)\r\n{\r\n if (len === undefined) { len = 0; }\r\n if (pad === undefined) { pad = ' '; }\r\n if (dir === undefined) { dir = 3; }\r\n\r\n str = str.toString();\r\n\r\n var padlen = 0;\r\n\r\n if (len + 1 >= str.length)\r\n {\r\n switch (dir)\r\n {\r\n case 1:\r\n str = new Array(len + 1 - str.length).join(pad) + str;\r\n break;\r\n\r\n case 3:\r\n var right = Math.ceil((padlen = len - str.length) / 2);\r\n var left = padlen - right;\r\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\r\n break;\r\n\r\n default:\r\n str = str + new Array(len + 1 - str.length).join(pad);\r\n break;\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = Pad;\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./SpinePlugin.js\");\n",""],"names":[],"sourceRoot":""} +{"version":3,"file":"SpineWebGLPluginDebug.js","mappings":";;;;;;;;;;AAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0DAA0D,OAAO;AACjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,SAAS;AACnD;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA,gBAAgB,YAAY;AAC5B;;AAEA;AACA,4DAA4D;AAC5D,gEAAgE;AAChE,oEAAoE;AACpE,wEAAwE;AACxE;AACA,2DAA2D,SAAS;AACpE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,4DAA4D,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;;;AC/UA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,mBAAmB,mBAAO,CAAC,yFAAwC;AACnE,gBAAgB,mBAAO,CAAC,8FAA4C;AACpE,oBAAoB,mBAAO,CAAC,2FAAyC;AACrE,eAAe,mBAAO,CAAC,4FAA2C;AAClE,gBAAgB,mBAAO,CAAC,0EAAkC;AAC1D,eAAe,mBAAO,CAAC,4FAA2C;AAClE;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,kDAAkD;AAC7D,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,mBAAmB;AAC9B,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sFAAsF;AAC7H;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,wCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sGAAsG;AACrH,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC,eAAe,SAAS;AACxB,eAAe,uCAAuC;AACtD,eAAe,uCAAuC;AACtD,eAAe,QAAQ,yDAAyD;AAChF;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;;;;;;;;;;;AC9uCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,iFAA+B;AACzD;;AAEA,IAAI,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;;AAEA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,gBAAgB;AAC3B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC,8CAAe;AAClC,iBAAiB,mBAAO,CAAC,0DAAqB;AAC9C,WAAW,mBAAO,CAAC,8CAAe;;AAElC;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,8EAAoC;AAC/D,YAAY,mBAAO,CAAC,8DAA4B;AAChD,YAAY,mBAAO,CAAC,gEAA6B;AACjD,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,sBAAsB,mBAAO,CAAC,kGAA8C;AAC5E,qBAAqB,mBAAO,CAAC,gGAA6C;AAC1E,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oCAAoC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,mCAAmC;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;;AAEA,IAAI,KAAsB;AAC1B,EAEC;;AAED;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;AAC/B;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0DAA0D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtsBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;AACxC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ,qGAAqG;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,0BAA0B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,mBAAmB,+IAA+I;AACpN;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,GAAG,uBAAuB,OAAO;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,kBAAkB;AAChC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,0BAA0B;AACxC,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;AAC9C;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5qBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,wCAAwC;AACxC,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,2BAA2B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,oDAAoD;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAgE;AAC/E;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3OA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,6BAA6B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,4BAA4B;AAC9D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACpTA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC,0CAA0C;AAC1C,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B,+BAA+B;AAC/B,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,oCAAoC;AACpC,sCAAsC;AACtC,yCAAyC;AACzC,mCAAmC;AACnC,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,mCAAmC;AACnC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjKA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,sBAAsB,mBAAO,CAAC,mEAAwB;AACtD,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACrEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACpEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,2CAA2C;AAC3C,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,iCAAiC;AACjC,iCAAiC;AACjC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,mCAAmC;AACnC,qCAAqC;AACrC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,uCAAuC;AACvC,sCAAsC;AACtC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,oCAAoC;AACpC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,uCAAuC;AACvC,kCAAkC;AAClC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,2CAAU;AAC9B,gBAAgB,mBAAO,CAAC,mDAAc;AACtC,WAAW,mBAAO,CAAC,yCAAS;AAC5B,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,YAAY,mBAAO,CAAC,2CAAU;AAC9B,iBAAiB,mBAAO,CAAC,qDAAe;AACxC,kBAAkB,mBAAO,CAAC,uDAAgB;AAC1C,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,cAAc,mBAAO,CAAC,+CAAY;AAClC,cAAc,mBAAO,CAAC,+CAAY;AAClC,YAAY,mBAAO,CAAC,2CAAU;AAC9B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,cAAc,mBAAO,CAAC,+CAAY;AAClC,UAAU,mBAAO,CAAC,uCAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,+BAA+B;AAC1C,WAAW,2CAA2C;AACtD;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW,KAAK,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB,KAAK,gBAAgB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,KAAK,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAA0D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,oCAAoC;AACnD,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2DAA2D;AAC1E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACl5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mFAAmF;AACpG;AACA,eAAe,mFAAmF;AAClG;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,4FAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC;AAClD;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,cAAc,mBAAO,CAAC,2CAAW;AACjC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC,eAAe,QAAQ;AACvB;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA,4GAA4G,sCAAsC;AAClJ,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/lBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,8BAA8B;AAC7C,eAAe,SAAS;AACxB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA,eAAe,gCAAgC;AAC/C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChWA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAmE;AAClF;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,iBAAiB,gCAAgC;AACjD,oBAAoB,YAAY;AAChC;AACA,eAAe,gEAAgE;AAC/E,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,kCAAkC;AACjD,eAAe,uCAAuC;AACtD;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,6BAA6B;AAC9C,iBAAiB,0BAA0B;AAC3C,oBAAoB,OAAO;AAC3B;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wDAAwD;AACnF;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,wGAAwG;AACvH;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wGAAwG,UAAU;AACjI,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,SAAS,mBAAO,CAAC,mEAAkB;AACnC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uIAAuI;AACtJ,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,mGAAmG;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uDAAuD;AACtE;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAkC;AACjD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iDAAiD;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6FAA6F;AAC5G;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAoD;AAC5D;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,sBAAsB;AACtB,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3mBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,sDAAsD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,cAAc;AAC7B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,6DAAS;AAC5B,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,eAAe,mBAAO,CAAC,qEAAa;AACpC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,eAAe,mBAAO,CAAC,qEAAa;AACpC,qBAAqB,mBAAO,CAAC,iFAAmB;AAChD,aAAa,mBAAO,CAAC,iEAAW;AAChC;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,KAAK;AACzB;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC37CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;AACA;AACA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;AACA;AACA,IAAI,KAAsB;AAC1B,EAEC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;;AAEpD;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,sDAAY;AACnC,gBAAgB,mBAAO,CAAC,wDAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,aAAa,mBAAO,CAAC,kDAAU;AAC/B,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,mBAAmB;AAC9B;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,2DAAY;AACnC,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,WAAW,mBAAO,CAAC,oDAAc;AACjC,aAAa,mBAAO,CAAC,uDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjjBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,uCAAuC;AAClD;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3SA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,uCAAuC;AAClD;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,sCAAsC;AACtC,+BAA+B;AAC/B,8BAA8B;AAC9B,kCAAkC;AAClC,iCAAiC;AACjC,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,4BAA4B;AACvC,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,wDAAwD;AAClJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,oFAAoF,oDAAoD;AACxI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mBAAO,CAAC,4DAAa;AAC9B,cAAc,mBAAO,CAAC,sEAAkB;AACxC,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,uBAAuB,mBAAO,CAAC,wFAA2B;AAC1D,qBAAqB,mBAAO,CAAC,oFAAyB;AACtD,eAAe,mBAAO,CAAC,wEAAmB;AAC1C,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,kBAAkB,mBAAO,CAAC,8EAAsB;AAChD,cAAc,mBAAO,CAAC,sEAAkB;AACxC,WAAW,mBAAO,CAAC,gEAAe;AAClC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D,aAAa,mBAAO,CAAC,gDAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,wDAAwD;AACnE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,gDAAgD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wGAAwG;AACnH,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9VA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,mDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpRA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1vDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,gDAAgD;AAC3D;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AClxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/gCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACthBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,uCAAuC;AAClF;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,iCAAiC;AAC5E;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4CAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,yDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0CAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,0CAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;AACxC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;AAChC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iGAAoC;;;;;;;;;;;ACNpC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,oGAAqC;;;;;;;;;;;ACVrC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;AAClC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;AAC3B;AACA;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;AAC9E;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;AAC1B;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,oDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,8CAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;AACvD;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;AAC1C;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,kDAAkD;AAClD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wCAAwC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;AAC1B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,uCAAuC;AACnG;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,0CAA0C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,4CAA4C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1MA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,yCAAyC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8CAA8C;AACrF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,sDAAsD;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,uDAAuD;AACnI;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,YAAY,mBAAO,CAAC,iEAAgB;AACpC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,cAAc,mBAAO,CAAC,qEAAkB;AACxC,WAAW,mBAAO,CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;AAChC;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1NA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzPA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,oCAAoC;AACpC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,sDAAsD;AACtD,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE,qEAAqE;AACrE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,wBAAwB,mBAAO,CAAC,4EAA8B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,6BAA6B;AAC7B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA,6BAA6B,mBAAmB;AAChD;AACA,4BAA4B,SAAS;AACrC;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA,WAAW,KAAK;AAChB;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAc;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,0DAAU;AAC9B;AACA,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;AAC1B;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,iEAAa;AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;AAChD;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,8CAA8C,cAAc,oBAAoB;AAChF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UCrEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack:///../../../node_modules/eventemitter3/index.js","webpack:///./runtimes/spine-webgl.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///../../../src/const.js","webpack:///../../../src/data/DataManager.js","webpack:///../../../src/data/events/CHANGE_DATA_EVENT.js","webpack:///../../../src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///../../../src/data/events/DESTROY_EVENT.js","webpack:///../../../src/data/events/REMOVE_DATA_EVENT.js","webpack:///../../../src/data/events/SET_DATA_EVENT.js","webpack:///../../../src/data/events/index.js","webpack:///../../../src/device/Audio.js","webpack:///../../../src/device/Browser.js","webpack:///../../../src/device/CanvasFeatures.js","webpack:///../../../src/device/Features.js","webpack:///../../../src/device/Fullscreen.js","webpack:///../../../src/device/Input.js","webpack:///../../../src/device/OS.js","webpack:///../../../src/device/Video.js","webpack:///../../../src/device/index.js","webpack:///../../../src/display/ColorMatrix.js","webpack:///../../../src/display/canvas/CanvasPool.js","webpack:///../../../src/display/canvas/Smoothing.js","webpack:///../../../src/display/mask/BitmapMask.js","webpack:///../../../src/display/mask/GeometryMask.js","webpack:///../../../src/fx/Barrel.js","webpack:///../../../src/fx/Bloom.js","webpack:///../../../src/fx/Blur.js","webpack:///../../../src/fx/Bokeh.js","webpack:///../../../src/fx/Circle.js","webpack:///../../../src/fx/ColorMatrix.js","webpack:///../../../src/fx/Controller.js","webpack:///../../../src/fx/Displacement.js","webpack:///../../../src/fx/Glow.js","webpack:///../../../src/fx/Gradient.js","webpack:///../../../src/fx/Pixelate.js","webpack:///../../../src/fx/Shadow.js","webpack:///../../../src/fx/Shine.js","webpack:///../../../src/fx/Vignette.js","webpack:///../../../src/fx/Wipe.js","webpack:///../../../src/fx/const.js","webpack:///../../../src/fx/index.js","webpack:///../../../src/gameobjects/BuildGameObject.js","webpack:///../../../src/gameobjects/GameObject.js","webpack:///../../../src/gameobjects/GameObjectFactory.js","webpack:///../../../src/gameobjects/GetCalcMatrix.js","webpack:///../../../src/gameobjects/components/Alpha.js","webpack:///../../../src/gameobjects/components/AlphaSingle.js","webpack:///../../../src/gameobjects/components/BlendMode.js","webpack:///../../../src/gameobjects/components/ComputedSize.js","webpack:///../../../src/gameobjects/components/Crop.js","webpack:///../../../src/gameobjects/components/Depth.js","webpack:///../../../src/gameobjects/components/FX.js","webpack:///../../../src/gameobjects/components/Flip.js","webpack:///../../../src/gameobjects/components/GetBounds.js","webpack:///../../../src/gameobjects/components/Mask.js","webpack:///../../../src/gameobjects/components/Origin.js","webpack:///../../../src/gameobjects/components/PathFollower.js","webpack:///../../../src/gameobjects/components/Pipeline.js","webpack:///../../../src/gameobjects/components/PostPipeline.js","webpack:///../../../src/gameobjects/components/ScrollFactor.js","webpack:///../../../src/gameobjects/components/Size.js","webpack:///../../../src/gameobjects/components/Texture.js","webpack:///../../../src/gameobjects/components/TextureCrop.js","webpack:///../../../src/gameobjects/components/Tint.js","webpack:///../../../src/gameobjects/components/ToJSON.js","webpack:///../../../src/gameobjects/components/Transform.js","webpack:///../../../src/gameobjects/components/TransformMatrix.js","webpack:///../../../src/gameobjects/components/Visible.js","webpack:///../../../src/gameobjects/components/index.js","webpack:///../../../src/gameobjects/container/Container.js","webpack:///../../../src/gameobjects/container/ContainerRender.js","webpack:///../../../src/gameobjects/container/ContainerWebGLRenderer.js","webpack:///../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/DESTROY_EVENT.js","webpack:///../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/index.js","webpack:///../../../src/geom/const.js","webpack:///../../../src/geom/line/GetPoint.js","webpack:///../../../src/geom/line/GetPoints.js","webpack:///../../../src/geom/line/Length.js","webpack:///../../../src/geom/line/Line.js","webpack:///../../../src/geom/line/Random.js","webpack:///../../../src/geom/point/Point.js","webpack:///../../../src/geom/rectangle/Contains.js","webpack:///../../../src/geom/rectangle/GetPoint.js","webpack:///../../../src/geom/rectangle/GetPoints.js","webpack:///../../../src/geom/rectangle/Perimeter.js","webpack:///../../../src/geom/rectangle/Random.js","webpack:///../../../src/geom/rectangle/Rectangle.js","webpack:///../../../src/geom/rectangle/Union.js","webpack:///../../../src/loader/File.js","webpack:///../../../src/loader/FileTypesManager.js","webpack:///../../../src/loader/GetURL.js","webpack:///../../../src/loader/MergeXHRSettings.js","webpack:///../../../src/loader/MultiFile.js","webpack:///../../../src/loader/XHRLoader.js","webpack:///../../../src/loader/XHRSettings.js","webpack:///../../../src/loader/const.js","webpack:///../../../src/loader/events/ADD_EVENT.js","webpack:///../../../src/loader/events/COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_EVENT.js","webpack:///../../../src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///../../../src/loader/events/POST_PROCESS_EVENT.js","webpack:///../../../src/loader/events/PROGRESS_EVENT.js","webpack:///../../../src/loader/events/START_EVENT.js","webpack:///../../../src/loader/events/index.js","webpack:///../../../src/loader/filetypes/ImageFile.js","webpack:///../../../src/loader/filetypes/JSONFile.js","webpack:///../../../src/loader/filetypes/TextFile.js","webpack:///../../../src/math/Average.js","webpack:///../../../src/math/Bernstein.js","webpack:///../../../src/math/Between.js","webpack:///../../../src/math/CatmullRom.js","webpack:///../../../src/math/CeilTo.js","webpack:///../../../src/math/Clamp.js","webpack:///../../../src/math/DegToRad.js","webpack:///../../../src/math/Difference.js","webpack:///../../../src/math/Euler.js","webpack:///../../../src/math/Factorial.js","webpack:///../../../src/math/FloatBetween.js","webpack:///../../../src/math/FloorTo.js","webpack:///../../../src/math/FromPercent.js","webpack:///../../../src/math/GetSpeed.js","webpack:///../../../src/math/IsEven.js","webpack:///../../../src/math/IsEvenStrict.js","webpack:///../../../src/math/Linear.js","webpack:///../../../src/math/LinearXY.js","webpack:///../../../src/math/Matrix3.js","webpack:///../../../src/math/Matrix4.js","webpack:///../../../src/math/MaxAdd.js","webpack:///../../../src/math/Median.js","webpack:///../../../src/math/MinSub.js","webpack:///../../../src/math/Percent.js","webpack:///../../../src/math/Quaternion.js","webpack:///../../../src/math/RadToDeg.js","webpack:///../../../src/math/RandomXY.js","webpack:///../../../src/math/RandomXYZ.js","webpack:///../../../src/math/RandomXYZW.js","webpack:///../../../src/math/Rotate.js","webpack:///../../../src/math/RotateAround.js","webpack:///../../../src/math/RotateAroundDistance.js","webpack:///../../../src/math/RotateTo.js","webpack:///../../../src/math/RotateVec3.js","webpack:///../../../src/math/RoundAwayFromZero.js","webpack:///../../../src/math/RoundTo.js","webpack:///../../../src/math/SinCosTableGenerator.js","webpack:///../../../src/math/SmoothStep.js","webpack:///../../../src/math/SmootherStep.js","webpack:///../../../src/math/ToXY.js","webpack:///../../../src/math/TransformXY.js","webpack:///../../../src/math/Vector2.js","webpack:///../../../src/math/Vector3.js","webpack:///../../../src/math/Vector4.js","webpack:///../../../src/math/Within.js","webpack:///../../../src/math/Wrap.js","webpack:///../../../src/math/angle/Between.js","webpack:///../../../src/math/angle/BetweenPoints.js","webpack:///../../../src/math/angle/BetweenPointsY.js","webpack:///../../../src/math/angle/BetweenY.js","webpack:///../../../src/math/angle/CounterClockwise.js","webpack:///../../../src/math/angle/Normalize.js","webpack:///../../../src/math/angle/Random.js","webpack:///../../../src/math/angle/RandomDegrees.js","webpack:///../../../src/math/angle/Reverse.js","webpack:///../../../src/math/angle/RotateTo.js","webpack:///../../../src/math/angle/ShortestBetween.js","webpack:///../../../src/math/angle/Wrap.js","webpack:///../../../src/math/angle/WrapDegrees.js","webpack:///../../../src/math/angle/index.js","webpack:///../../../src/math/const.js","webpack:///../../../src/math/distance/DistanceBetween.js","webpack:///../../../src/math/distance/DistanceBetweenPoints.js","webpack:///../../../src/math/distance/DistanceBetweenPointsSquared.js","webpack:///../../../src/math/distance/DistanceChebyshev.js","webpack:///../../../src/math/distance/DistancePower.js","webpack:///../../../src/math/distance/DistanceSnake.js","webpack:///../../../src/math/distance/DistanceSquared.js","webpack:///../../../src/math/distance/index.js","webpack:///../../../src/math/easing/back/In.js","webpack:///../../../src/math/easing/back/InOut.js","webpack:///../../../src/math/easing/back/Out.js","webpack:///../../../src/math/easing/back/index.js","webpack:///../../../src/math/easing/bounce/In.js","webpack:///../../../src/math/easing/bounce/InOut.js","webpack:///../../../src/math/easing/bounce/Out.js","webpack:///../../../src/math/easing/bounce/index.js","webpack:///../../../src/math/easing/circular/In.js","webpack:///../../../src/math/easing/circular/InOut.js","webpack:///../../../src/math/easing/circular/Out.js","webpack:///../../../src/math/easing/circular/index.js","webpack:///../../../src/math/easing/cubic/In.js","webpack:///../../../src/math/easing/cubic/InOut.js","webpack:///../../../src/math/easing/cubic/Out.js","webpack:///../../../src/math/easing/cubic/index.js","webpack:///../../../src/math/easing/elastic/In.js","webpack:///../../../src/math/easing/elastic/InOut.js","webpack:///../../../src/math/easing/elastic/Out.js","webpack:///../../../src/math/easing/elastic/index.js","webpack:///../../../src/math/easing/expo/In.js","webpack:///../../../src/math/easing/expo/InOut.js","webpack:///../../../src/math/easing/expo/Out.js","webpack:///../../../src/math/easing/expo/index.js","webpack:///../../../src/math/easing/index.js","webpack:///../../../src/math/easing/linear/Linear.js","webpack:///../../../src/math/easing/linear/index.js","webpack:///../../../src/math/easing/quadratic/In.js","webpack:///../../../src/math/easing/quadratic/InOut.js","webpack:///../../../src/math/easing/quadratic/Out.js","webpack:///../../../src/math/easing/quadratic/index.js","webpack:///../../../src/math/easing/quartic/In.js","webpack:///../../../src/math/easing/quartic/InOut.js","webpack:///../../../src/math/easing/quartic/Out.js","webpack:///../../../src/math/easing/quartic/index.js","webpack:///../../../src/math/easing/quintic/In.js","webpack:///../../../src/math/easing/quintic/InOut.js","webpack:///../../../src/math/easing/quintic/Out.js","webpack:///../../../src/math/easing/quintic/index.js","webpack:///../../../src/math/easing/sine/In.js","webpack:///../../../src/math/easing/sine/InOut.js","webpack:///../../../src/math/easing/sine/Out.js","webpack:///../../../src/math/easing/sine/index.js","webpack:///../../../src/math/easing/stepped/Stepped.js","webpack:///../../../src/math/easing/stepped/index.js","webpack:///../../../src/math/fuzzy/Ceil.js","webpack:///../../../src/math/fuzzy/Equal.js","webpack:///../../../src/math/fuzzy/Floor.js","webpack:///../../../src/math/fuzzy/GreaterThan.js","webpack:///../../../src/math/fuzzy/LessThan.js","webpack:///../../../src/math/fuzzy/index.js","webpack:///../../../src/math/index.js","webpack:///../../../src/math/interpolation/BezierInterpolation.js","webpack:///../../../src/math/interpolation/CatmullRomInterpolation.js","webpack:///../../../src/math/interpolation/CubicBezierInterpolation.js","webpack:///../../../src/math/interpolation/LinearInterpolation.js","webpack:///../../../src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///../../../src/math/interpolation/SmoothStepInterpolation.js","webpack:///../../../src/math/interpolation/SmootherStepInterpolation.js","webpack:///../../../src/math/interpolation/index.js","webpack:///../../../src/math/pow2/GetPowerOfTwo.js","webpack:///../../../src/math/pow2/IsSizePowerOfTwo.js","webpack:///../../../src/math/pow2/IsValuePowerOfTwo.js","webpack:///../../../src/math/pow2/index.js","webpack:///../../../src/math/random-data-generator/RandomDataGenerator.js","webpack:///../../../src/math/snap/SnapCeil.js","webpack:///../../../src/math/snap/SnapFloor.js","webpack:///../../../src/math/snap/SnapTo.js","webpack:///../../../src/math/snap/index.js","webpack:///../../../src/plugins/BasePlugin.js","webpack:///../../../src/plugins/PluginCache.js","webpack:///../../../src/plugins/ScenePlugin.js","webpack:///../../../src/renderer/BlendModes.js","webpack:///../../../src/renderer/ScaleModes.js","webpack:///../../../src/scale/events/RESIZE_EVENT.js","webpack:///../../../src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/scene/events/BOOT_EVENT.js","webpack:///../../../src/scene/events/CREATE_EVENT.js","webpack:///../../../src/scene/events/DESTROY_EVENT.js","webpack:///../../../src/scene/events/PAUSE_EVENT.js","webpack:///../../../src/scene/events/POST_UPDATE_EVENT.js","webpack:///../../../src/scene/events/PRE_RENDER_EVENT.js","webpack:///../../../src/scene/events/PRE_UPDATE_EVENT.js","webpack:///../../../src/scene/events/READY_EVENT.js","webpack:///../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/scene/events/RENDER_EVENT.js","webpack:///../../../src/scene/events/RESUME_EVENT.js","webpack:///../../../src/scene/events/SHUTDOWN_EVENT.js","webpack:///../../../src/scene/events/SLEEP_EVENT.js","webpack:///../../../src/scene/events/START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///../../../src/scene/events/UPDATE_EVENT.js","webpack:///../../../src/scene/events/WAKE_EVENT.js","webpack:///../../../src/scene/events/index.js","webpack:///../../../src/textures/Frame.js","webpack:///../../../src/tweens/builders/GetBoolean.js","webpack:///../../../src/tweens/tween/const.js","webpack:///../../../src/utils/Class.js","webpack:///../../../src/utils/NOOP.js","webpack:///../../../src/utils/array/Add.js","webpack:///../../../src/utils/array/AddAt.js","webpack:///../../../src/utils/array/BringToTop.js","webpack:///../../../src/utils/array/CountAllMatching.js","webpack:///../../../src/utils/array/Each.js","webpack:///../../../src/utils/array/EachInRange.js","webpack:///../../../src/utils/array/FindClosestInSorted.js","webpack:///../../../src/utils/array/Flatten.js","webpack:///../../../src/utils/array/GetAll.js","webpack:///../../../src/utils/array/GetFirst.js","webpack:///../../../src/utils/array/GetRandom.js","webpack:///../../../src/utils/array/MoveAbove.js","webpack:///../../../src/utils/array/MoveBelow.js","webpack:///../../../src/utils/array/MoveDown.js","webpack:///../../../src/utils/array/MoveTo.js","webpack:///../../../src/utils/array/MoveUp.js","webpack:///../../../src/utils/array/NumberArray.js","webpack:///../../../src/utils/array/NumberArrayStep.js","webpack:///../../../src/utils/array/QuickSelect.js","webpack:///../../../src/utils/array/Range.js","webpack:///../../../src/utils/array/Remove.js","webpack:///../../../src/utils/array/RemoveAt.js","webpack:///../../../src/utils/array/RemoveBetween.js","webpack:///../../../src/utils/array/RemoveRandomElement.js","webpack:///../../../src/utils/array/Replace.js","webpack:///../../../src/utils/array/RotateLeft.js","webpack:///../../../src/utils/array/RotateRight.js","webpack:///../../../src/utils/array/SafeRange.js","webpack:///../../../src/utils/array/SendToBack.js","webpack:///../../../src/utils/array/SetAll.js","webpack:///../../../src/utils/array/Shuffle.js","webpack:///../../../src/utils/array/SortByDigits.js","webpack:///../../../src/utils/array/SpliceOne.js","webpack:///../../../src/utils/array/StableSort.js","webpack:///../../../src/utils/array/Swap.js","webpack:///../../../src/utils/array/index.js","webpack:///../../../src/utils/array/matrix/CheckMatrix.js","webpack:///../../../src/utils/array/matrix/MatrixToString.js","webpack:///../../../src/utils/array/matrix/ReverseColumns.js","webpack:///../../../src/utils/array/matrix/ReverseRows.js","webpack:///../../../src/utils/array/matrix/Rotate180.js","webpack:///../../../src/utils/array/matrix/RotateLeft.js","webpack:///../../../src/utils/array/matrix/RotateMatrix.js","webpack:///../../../src/utils/array/matrix/RotateRight.js","webpack:///../../../src/utils/array/matrix/TranslateMatrix.js","webpack:///../../../src/utils/array/matrix/TransposeMatrix.js","webpack:///../../../src/utils/array/matrix/index.js","webpack:///../../../src/utils/object/DeepCopy.js","webpack:///../../../src/utils/object/Extend.js","webpack:///../../../src/utils/object/GetAdvancedValue.js","webpack:///../../../src/utils/object/GetFastValue.js","webpack:///../../../src/utils/object/GetValue.js","webpack:///../../../src/utils/object/IsPlainObject.js","webpack:///../../../src/utils/string/Pad.js","webpack:///webpack/bootstrap","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["'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","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Animation = (function () {\r\n function Animation(name, timelines, duration) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (timelines == null)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n Animation.prototype.hasTimeline = function (id) {\r\n return this.timelineIds[id] == true;\r\n };\r\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n var timelines = this.timelines;\r\n for (var i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n };\r\n Animation.binarySearch = function (values, target, step) {\r\n if (step === void 0) { step = 1; }\r\n var low = 0;\r\n var high = values.length / step - 2;\r\n if (high == 0)\r\n return step;\r\n var current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high)\r\n return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n };\r\n Animation.linearSearch = function (values, target, step) {\r\n for (var i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target)\r\n return i;\r\n return -1;\r\n };\r\n return Animation;\r\n }());\r\n spine.Animation = Animation;\r\n var MixBlend;\r\n (function (MixBlend) {\r\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\r\n var MixDirection;\r\n (function (MixDirection) {\r\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n var TimelineType;\r\n (function (TimelineType) {\r\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n var CurveTimeline = (function () {\r\n function CurveTimeline(frameCount) {\r\n if (frameCount <= 0)\r\n throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n CurveTimeline.prototype.getFrameCount = function () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n };\r\n CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n };\r\n CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n };\r\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length)\r\n return CurveTimeline.LINEAR;\r\n var type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR)\r\n return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED)\r\n return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n };\r\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n var x = dfx, y = dfy;\r\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n };\r\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n percent = spine.MathUtils.clamp(percent, 0, 1);\r\n var curves = this.curves;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var type = curves[i];\r\n if (type == CurveTimeline.LINEAR)\r\n return percent;\r\n if (type == CurveTimeline.STEPPED)\r\n return 0;\r\n i++;\r\n var x = 0;\r\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n var prevX = void 0, prevY = void 0;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n }\r\n else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n var y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x);\r\n };\r\n CurveTimeline.LINEAR = 0;\r\n CurveTimeline.STEPPED = 1;\r\n CurveTimeline.BEZIER = 2;\r\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n return CurveTimeline;\r\n }());\r\n spine.CurveTimeline = CurveTimeline;\r\n var RotateTimeline = (function (_super) {\r\n __extends(RotateTimeline, _super);\r\n function RotateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n return _this;\r\n }\r\n RotateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n };\r\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n };\r\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n var r_1 = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r_2 * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r_2 += bone.data.rotation - bone.rotation;\r\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n case MixBlend.add:\r\n bone.rotation += r_2 * alpha;\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n };\r\n RotateTimeline.ENTRIES = 2;\r\n RotateTimeline.PREV_TIME = -2;\r\n RotateTimeline.PREV_ROTATION = -1;\r\n RotateTimeline.ROTATION = 1;\r\n return RotateTimeline;\r\n }(CurveTimeline));\r\n spine.RotateTimeline = RotateTimeline;\r\n var TranslateTimeline = (function (_super) {\r\n __extends(TranslateTimeline, _super);\r\n function TranslateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TranslateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n };\r\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n };\r\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n };\r\n TranslateTimeline.ENTRIES = 3;\r\n TranslateTimeline.PREV_TIME = -3;\r\n TranslateTimeline.PREV_X = -2;\r\n TranslateTimeline.PREV_Y = -1;\r\n TranslateTimeline.X = 1;\r\n TranslateTimeline.Y = 2;\r\n return TranslateTimeline;\r\n }(CurveTimeline));\r\n spine.TranslateTimeline = TranslateTimeline;\r\n var ScaleTimeline = (function (_super) {\r\n __extends(ScaleTimeline, _super);\r\n function ScaleTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ScaleTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n };\r\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n }\r\n else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n }\r\n else {\r\n var bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = spine.MathUtils.signum(x);\r\n by = spine.MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n };\r\n return ScaleTimeline;\r\n }(TranslateTimeline));\r\n spine.ScaleTimeline = ScaleTimeline;\r\n var ShearTimeline = (function (_super) {\r\n __extends(ShearTimeline, _super);\r\n function ShearTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ShearTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n };\r\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n };\r\n return ShearTimeline;\r\n }(TranslateTimeline));\r\n spine.ShearTimeline = ShearTimeline;\r\n var ColorTimeline = (function (_super) {\r\n __extends(ColorTimeline, _super);\r\n function ColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n ColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n };\r\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n };\r\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n var color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n var color = slot.color;\r\n if (blend == MixBlend.setup)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n };\r\n ColorTimeline.ENTRIES = 5;\r\n ColorTimeline.PREV_TIME = -5;\r\n ColorTimeline.PREV_R = -4;\r\n ColorTimeline.PREV_G = -3;\r\n ColorTimeline.PREV_B = -2;\r\n ColorTimeline.PREV_A = -1;\r\n ColorTimeline.R = 1;\r\n ColorTimeline.G = 2;\r\n ColorTimeline.B = 3;\r\n ColorTimeline.A = 4;\r\n return ColorTimeline;\r\n }(CurveTimeline));\r\n spine.ColorTimeline = ColorTimeline;\r\n var TwoColorTimeline = (function (_super) {\r\n __extends(TwoColorTimeline, _super);\r\n function TwoColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TwoColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n };\r\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n };\r\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n }\r\n else {\r\n var light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n };\r\n TwoColorTimeline.ENTRIES = 8;\r\n TwoColorTimeline.PREV_TIME = -8;\r\n TwoColorTimeline.PREV_R = -7;\r\n TwoColorTimeline.PREV_G = -6;\r\n TwoColorTimeline.PREV_B = -5;\r\n TwoColorTimeline.PREV_A = -4;\r\n TwoColorTimeline.PREV_R2 = -3;\r\n TwoColorTimeline.PREV_G2 = -2;\r\n TwoColorTimeline.PREV_B2 = -1;\r\n TwoColorTimeline.R = 1;\r\n TwoColorTimeline.G = 2;\r\n TwoColorTimeline.B = 3;\r\n TwoColorTimeline.A = 4;\r\n TwoColorTimeline.R2 = 5;\r\n TwoColorTimeline.G2 = 6;\r\n TwoColorTimeline.B2 = 7;\r\n return TwoColorTimeline;\r\n }(CurveTimeline));\r\n spine.TwoColorTimeline = TwoColorTimeline;\r\n var AttachmentTimeline = (function () {\r\n function AttachmentTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n AttachmentTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n };\r\n AttachmentTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n };\r\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frameIndex = 0;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n var attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n return AttachmentTimeline;\r\n }());\r\n spine.AttachmentTimeline = AttachmentTimeline;\r\n var zeros = null;\r\n var DeformTimeline = (function (_super) {\r\n __extends(DeformTimeline, _super);\r\n function DeformTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount);\r\n _this.frameVertices = new Array(frameCount);\r\n if (zeros == null)\r\n zeros = spine.Utils.newFloatArray(64);\r\n return _this;\r\n }\r\n DeformTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n };\r\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n };\r\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var slotAttachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\r\n return;\r\n var deformArray = slot.deform;\r\n if (deformArray.length == 0)\r\n blend = MixBlend.setup;\r\n var frameVertices = this.frameVertices;\r\n var vertexCount = frameVertices[0].length;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n var vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n }\r\n else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) {\r\n var lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n }\r\n }\r\n else {\r\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n deform[i_2] += lastVertices[i_2];\r\n }\r\n }\r\n else {\r\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_1 = slotAttachment;\r\n if (vertexAttachment_1.bones == null) {\r\n var setupVertices = vertexAttachment_1.vertices;\r\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n var setup = setupVertices[i_3];\r\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n deform[i_4] = lastVertices[i_4] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n deform[i_7] += lastVertices[i_7] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time);\r\n var prevVertices = frameVertices[frame - 1];\r\n var nextVertices = frameVertices[frame];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n var prev = prevVertices[i_8];\r\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n }\r\n }\r\n else {\r\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n var prev = prevVertices[i_9];\r\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n var prev = prevVertices[i_10];\r\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_2 = slotAttachment;\r\n if (vertexAttachment_2.bones == null) {\r\n var setupVertices = vertexAttachment_2.vertices;\r\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n var prev = prevVertices[i_12];\r\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n var prev = prevVertices[i_13];\r\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n var prev = prevVertices[i_14];\r\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n var prev = prevVertices[i_15];\r\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n return DeformTimeline;\r\n }(CurveTimeline));\r\n spine.DeformTimeline = DeformTimeline;\r\n var EventTimeline = (function () {\r\n function EventTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n EventTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.event << 24;\r\n };\r\n EventTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n };\r\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (firedEvents == null)\r\n return;\r\n var frames = this.frames;\r\n var frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n }\r\n else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n var frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n var frameTime = frames[frame];\r\n while (frame > 0) {\r\n if (frames[frame - 1] != frameTime)\r\n break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n };\r\n return EventTimeline;\r\n }());\r\n spine.EventTimeline = EventTimeline;\r\n var DrawOrderTimeline = (function () {\r\n function DrawOrderTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n DrawOrderTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.drawOrder << 24;\r\n };\r\n DrawOrderTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n };\r\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var drawOrder = skeleton.drawOrder;\r\n var slots = skeleton.slots;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frame = 0;\r\n if (time >= frames[frames.length - 1])\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n var drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n };\r\n return DrawOrderTimeline;\r\n }());\r\n spine.DrawOrderTimeline = DrawOrderTimeline;\r\n var IkConstraintTimeline = (function (_super) {\r\n __extends(IkConstraintTimeline, _super);\r\n function IkConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n IkConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n };\r\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n };\r\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n };\r\n IkConstraintTimeline.ENTRIES = 6;\r\n IkConstraintTimeline.PREV_TIME = -6;\r\n IkConstraintTimeline.PREV_MIX = -5;\r\n IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n IkConstraintTimeline.PREV_COMPRESS = -2;\r\n IkConstraintTimeline.PREV_STRETCH = -1;\r\n IkConstraintTimeline.MIX = 1;\r\n IkConstraintTimeline.SOFTNESS = 2;\r\n IkConstraintTimeline.BEND_DIRECTION = 3;\r\n IkConstraintTimeline.COMPRESS = 4;\r\n IkConstraintTimeline.STRETCH = 5;\r\n return IkConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.IkConstraintTimeline = IkConstraintTimeline;\r\n var TransformConstraintTimeline = (function (_super) {\r\n __extends(TransformConstraintTimeline, _super);\r\n function TransformConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n };\r\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n };\r\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n var data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n };\r\n TransformConstraintTimeline.ENTRIES = 5;\r\n TransformConstraintTimeline.PREV_TIME = -5;\r\n TransformConstraintTimeline.PREV_ROTATE = -4;\r\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n TransformConstraintTimeline.PREV_SCALE = -2;\r\n TransformConstraintTimeline.PREV_SHEAR = -1;\r\n TransformConstraintTimeline.ROTATE = 1;\r\n TransformConstraintTimeline.TRANSLATE = 2;\r\n TransformConstraintTimeline.SCALE = 3;\r\n TransformConstraintTimeline.SHEAR = 4;\r\n return TransformConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n var PathConstraintPositionTimeline = (function (_super) {\r\n __extends(PathConstraintPositionTimeline, _super);\r\n function PathConstraintPositionTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n };\r\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n var position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n };\r\n PathConstraintPositionTimeline.ENTRIES = 2;\r\n PathConstraintPositionTimeline.PREV_TIME = -2;\r\n PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n PathConstraintPositionTimeline.VALUE = 1;\r\n return PathConstraintPositionTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n var PathConstraintSpacingTimeline = (function (_super) {\r\n __extends(PathConstraintSpacingTimeline, _super);\r\n function PathConstraintSpacingTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n var spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n };\r\n return PathConstraintSpacingTimeline;\r\n }(PathConstraintPositionTimeline));\r\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n var PathConstraintMixTimeline = (function (_super) {\r\n __extends(PathConstraintMixTimeline, _super);\r\n function PathConstraintMixTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n };\r\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n };\r\n PathConstraintMixTimeline.ENTRIES = 3;\r\n PathConstraintMixTimeline.PREV_TIME = -3;\r\n PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n PathConstraintMixTimeline.ROTATE = 1;\r\n PathConstraintMixTimeline.TRANSLATE = 2;\r\n return PathConstraintMixTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationState = (function () {\r\n function AnimationState(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new spine.IntSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n this.data = data;\r\n }\r\n AnimationState.prototype.update = function (delta) {\r\n delta *= this.timeScale;\r\n var tracks = this.tracks;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n var currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n var next = current.next;\r\n if (next != null) {\r\n var nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n }\r\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n var from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null)\r\n from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n var from = to.mixingFrom;\r\n if (from == null)\r\n return true;\r\n var finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n };\r\n AnimationState.prototype.apply = function (skeleton) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n var events = this.events;\r\n var tracks = this.tracks;\r\n var applied = false;\r\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\r\n var current = tracks[i_16];\r\n if (current == null || current.delay > 0)\r\n continue;\r\n applied = true;\r\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\r\n var mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n var timelineCount = current.animation.timelines.length;\r\n var timelines = current.animation.timelines;\r\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n else {\r\n var timelineMode = current.timelineMode;\r\n var firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = current.timelinesRotation;\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n var timeline_1 = timelines[ii];\r\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\r\n if (timeline_1 instanceof spine.RotateTimeline) {\r\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n }\r\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\r\n }\r\n else {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n };\r\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n var from = to.mixingFrom;\r\n if (from.mixingFrom != null)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n var mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == spine.MixBlend.first)\r\n blend = spine.MixBlend.setup;\r\n }\r\n else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != spine.MixBlend.first)\r\n blend = from.mixBlend;\r\n }\r\n var events = mix < from.eventThreshold ? this.events : null;\r\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n var timelineCount = from.animation.timelines.length;\r\n var timelines = from.animation.timelines;\r\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == spine.MixBlend.add) {\r\n for (var i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\r\n }\r\n else {\r\n var timelineMode = from.timelineMode;\r\n var timelineHoldMix = from.timelineHoldMix;\r\n var firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = from.timelinesRotation;\r\n from.totalAlpha = 0;\r\n for (var i = 0; i < timelineCount; i++) {\r\n var timeline = timelines[i];\r\n var direction = spine.MixDirection.mixOut;\r\n var timelineBlend = void 0;\r\n var alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = spine.MixBlend.setup;\r\n var holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof spine.RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n spine.Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\r\n direction = spine.MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n };\r\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = timeline.frames;\r\n if (time < frames[0]) {\r\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n };\r\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n };\r\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\r\n return;\r\n }\r\n var rotateTimeline = timeline;\r\n var frames = rotateTimeline.frames;\r\n var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n var r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case spine.MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case spine.MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n }\r\n else {\r\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n else {\r\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n var total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n }\r\n else {\r\n var lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n }\r\n else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n var current = diff > 0, dir = lastTotal >= 0;\r\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * spine.MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n };\r\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n var duration = animationEnd - animationStart;\r\n var trackLastWrapped = entry.trackLast % duration;\r\n var events = this.events;\r\n var i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n var event_1 = events[i];\r\n if (event_1.time < trackLastWrapped)\r\n break;\r\n if (event_1.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event_1);\r\n }\r\n var complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n var event_2 = events[i];\r\n if (event_2.time < animationStart)\r\n continue;\r\n this.queue.event(entry, events[i]);\r\n }\r\n };\r\n AnimationState.prototype.clearTracks = function () {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.clearTrack = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n var current = this.tracks[trackIndex];\r\n if (current == null)\r\n return;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n var entry = current;\r\n while (true) {\r\n var from = entry.mixingFrom;\r\n if (from == null)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n var from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n if (from != null) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n };\r\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n };\r\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var interrupt = true;\r\n var current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n }\r\n else\r\n this.disposeNext(current);\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n };\r\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n };\r\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n }\r\n else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n var duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n }\r\n else\r\n delay = last.trackTime;\r\n }\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n if (delay <= 0)\r\n delay -= mixDuration;\r\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var current = this.tracks[i];\r\n if (current != null)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.expandToIndex = function (index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n };\r\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n var entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = spine.MixBlend.replace;\r\n return entry;\r\n };\r\n AnimationState.prototype.disposeNext = function (entry) {\r\n var next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n };\r\n AnimationState.prototype._animationsChanged = function () {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var entry = this.tracks[i];\r\n if (entry == null)\r\n continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null);\r\n }\r\n };\r\n AnimationState.prototype.computeHold = function (entry) {\r\n var to = entry.mixingTo;\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n var propertyIDs = this.propertyIDs;\r\n if (to != null && to.holdPrevious) {\r\n for (var i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n outer: for (var i = 0; i < timelinesCount; i++) {\r\n var timeline = timelines[i];\r\n var id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\r\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n }\r\n else {\r\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.getCurrent = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n };\r\n AnimationState.prototype.addListener = function (listener) {\r\n if (listener == null)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n };\r\n AnimationState.prototype.removeListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n };\r\n AnimationState.prototype.clearListeners = function () {\r\n this.listeners.length = 0;\r\n };\r\n AnimationState.prototype.clearListenerNotifications = function () {\r\n this.queue.clear();\r\n };\r\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n AnimationState.SUBSEQUENT = 0;\r\n AnimationState.FIRST = 1;\r\n AnimationState.HOLD_SUBSEQUENT = 2;\r\n AnimationState.HOLD_FIRST = 3;\r\n AnimationState.HOLD_MIX = 4;\r\n AnimationState.SETUP = 1;\r\n AnimationState.CURRENT = 2;\r\n return AnimationState;\r\n }());\r\n spine.AnimationState = AnimationState;\r\n var TrackEntry = (function () {\r\n function TrackEntry() {\r\n this.mixBlend = spine.MixBlend.replace;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n TrackEntry.prototype.reset = function () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n };\r\n TrackEntry.prototype.getAnimationTime = function () {\r\n if (this.loop) {\r\n var duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n };\r\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n };\r\n TrackEntry.prototype.isComplete = function () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n };\r\n TrackEntry.prototype.resetRotationDirections = function () {\r\n this.timelinesRotation.length = 0;\r\n };\r\n return TrackEntry;\r\n }());\r\n spine.TrackEntry = TrackEntry;\r\n var EventQueue = (function () {\r\n function EventQueue(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n EventQueue.prototype.start = function (entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.interrupt = function (entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.end = function (entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.dispose = function (entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.complete = function (entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.event = function (entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n };\r\n EventQueue.prototype.drain = function () {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n var objects = this.objects;\r\n var listeners = this.animState.listeners;\r\n for (var i = 0; i < objects.length; i += 2) {\r\n var type = objects[i];\r\n var entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start)\r\n listeners[ii].start(entry);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt)\r\n listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end)\r\n listeners[ii].end(entry);\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose)\r\n listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete)\r\n listeners[ii].complete(entry);\r\n break;\r\n case EventType.event:\r\n var event_3 = objects[i++ + 2];\r\n if (entry.listener != null && entry.listener.event)\r\n entry.listener.event(entry, event_3);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event)\r\n listeners[ii].event(entry, event_3);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n };\r\n EventQueue.prototype.clear = function () {\r\n this.objects.length = 0;\r\n };\r\n return EventQueue;\r\n }());\r\n spine.EventQueue = EventQueue;\r\n var EventType;\r\n (function (EventType) {\r\n EventType[EventType[\"start\"] = 0] = \"start\";\r\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType[EventType[\"end\"] = 2] = \"end\";\r\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n EventType[EventType[\"event\"] = 5] = \"event\";\r\n })(EventType = spine.EventType || (spine.EventType = {}));\r\n var AnimationStateAdapter = (function () {\r\n function AnimationStateAdapter() {\r\n }\r\n AnimationStateAdapter.prototype.start = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.end = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.dispose = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.complete = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.event = function (entry, event) {\r\n };\r\n return AnimationStateAdapter;\r\n }());\r\n spine.AnimationStateAdapter = AnimationStateAdapter;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationStateData = (function () {\r\n function AnimationStateData(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (skeletonData == null)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n var from = this.skeletonData.findAnimation(fromName);\r\n if (from == null)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n var to = this.skeletonData.findAnimation(toName);\r\n if (to == null)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n };\r\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n if (from == null)\r\n throw new Error(\"from cannot be null.\");\r\n if (to == null)\r\n throw new Error(\"to cannot be null.\");\r\n var key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n };\r\n AnimationStateData.prototype.getMix = function (from, to) {\r\n var key = from.name + \".\" + to.name;\r\n var value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n };\r\n return AnimationStateData;\r\n }());\r\n spine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AssetManager = (function () {\r\n function AssetManager(textureLoader, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.rawDataUris = {};\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n }\r\n AssetManager.prototype.downloadText = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(request.responseText);\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.downloadBinary = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(new Uint8Array(request.response));\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.setRawDataURI = function (path, data) {\r\n this.rawDataUris[this.pathPrefix + path] = data;\r\n };\r\n AssetManager.prototype.loadBinary = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadBinary(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load binary \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadText = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load text \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadTexture = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n var storagePath = path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[storagePath] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \".concat(path));\r\n };\r\n if (this.rawDataUris[path])\r\n path = this.rawDataUris[path];\r\n img.src = path;\r\n };\r\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (atlasData) {\r\n var pagesLoaded = { count: 0 };\r\n var atlasPages = new Array();\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\r\n var image = document.createElement(\"img\");\r\n image.width = 16;\r\n image.height = 16;\r\n return new spine.FakeTexture(image);\r\n });\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n return;\r\n }\r\n var _loop_1 = function (atlasPage) {\r\n var pageLoadError = false;\r\n _this.loadTexture(atlasPage, function (imagePath, image) {\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n if (!pageLoadError) {\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\r\n });\r\n _this.assets[path] = atlas;\r\n if (success)\r\n success(path, atlas);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": \").concat(ex.message));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(path));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n }, function (imagePath, errorMessage) {\r\n pageLoadError = true;\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n _this.errors[path] = \"Couldn't load texture atlas page \".concat(imagePath, \"} of atlas \").concat(path);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \".concat(imagePath, \" of atlas \").concat(path));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n });\r\n };\r\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n var atlasPage = atlasPages_1[_i];\r\n _loop_1(atlasPage);\r\n }\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(responseText);\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \".concat(path, \": status \").concat(status, \", \").concat(responseText));\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.get = function (path) {\r\n path = this.pathPrefix + path;\r\n return this.assets[path];\r\n };\r\n AssetManager.prototype.remove = function (path) {\r\n path = this.pathPrefix + path;\r\n var asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n this.assets[path] = null;\r\n };\r\n AssetManager.prototype.removeAll = function () {\r\n for (var key in this.assets) {\r\n var asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n };\r\n AssetManager.prototype.isLoadingComplete = function () {\r\n return this.toLoad == 0;\r\n };\r\n AssetManager.prototype.getToLoad = function () {\r\n return this.toLoad;\r\n };\r\n AssetManager.prototype.getLoaded = function () {\r\n return this.loaded;\r\n };\r\n AssetManager.prototype.dispose = function () {\r\n this.removeAll();\r\n };\r\n AssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n AssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return AssetManager;\r\n }());\r\n spine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AtlasAttachmentLoader = (function () {\r\n function AtlasAttachmentLoader(atlas) {\r\n this.atlas = atlas;\r\n }\r\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.RegionAttachment(name);\r\n attachment.setRegion(region);\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n return new spine.BoundingBoxAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n return new spine.PathAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n return new spine.PointAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n return new spine.ClippingAttachment(name);\r\n };\r\n return AtlasAttachmentLoader;\r\n }());\r\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BlendMode;\r\n (function (BlendMode) {\r\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Bone = (function () {\r\n function Bone(data, skeleton, parent) {\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.appliedValid = false;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n Bone.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n Bone.prototype.update = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransform = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n var skeleton = this.skeleton;\r\n var rotationY = rotation + 90 + shearY;\r\n var sx = skeleton.scaleX;\r\n var sy = skeleton.scaleY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case spine.TransformMode.Normal: {\r\n var rotationY = rotation + 90 + shearY;\r\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case spine.TransformMode.OnlyTranslation: {\r\n var rotationY = rotation + 90 + shearY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case spine.TransformMode.NoRotationOrReflection: {\r\n var s = pa * pa + pc * pc;\r\n var prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n }\r\n var rx = rotation + shearX - prx;\r\n var ry = rotation + shearY - prx + 90;\r\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection: {\r\n var cos = spine.MathUtils.cosDeg(rotation);\r\n var sin = spine.MathUtils.sinDeg(rotation);\r\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n var s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == spine.TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n var r = Math.PI / 2 + Math.atan2(zc, za);\r\n var zb = Math.cos(r) * s;\r\n var zd = Math.sin(r) * s;\r\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n };\r\n Bone.prototype.setToSetupPose = function () {\r\n var data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n };\r\n Bone.prototype.getWorldRotationX = function () {\r\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldRotationY = function () {\r\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldScaleX = function () {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n };\r\n Bone.prototype.getWorldScaleY = function () {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n };\r\n Bone.prototype.updateAppliedTransform = function () {\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n this.ax = this.worldX;\r\n this.ay = this.worldY;\r\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n var pid = 1 / (pa * pd - pb * pc);\r\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = (dx * pd * pid - dy * pb * pid);\r\n this.ay = (dy * pa * pid - dx * pc * pid);\r\n var ia = pid * pd;\r\n var id = pid * pa;\r\n var ib = pid * pb;\r\n var ic = pid * pc;\r\n var ra = ia * this.a - ib * this.c;\r\n var rb = ia * this.b - ib * this.d;\r\n var rc = id * this.c - ic * this.a;\r\n var rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n var det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n }\r\n };\r\n Bone.prototype.worldToLocal = function (world) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var invDet = 1 / (a * d - b * c);\r\n var x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n };\r\n Bone.prototype.localToWorld = function (local) {\r\n var x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n };\r\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\r\n };\r\n Bone.prototype.localToWorldRotation = function (localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.rotateWorld = function (degrees) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n };\r\n return Bone;\r\n }());\r\n spine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoneData = (function () {\r\n function BoneData(index, name, parent) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new spine.Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n return BoneData;\r\n }());\r\n spine.BoneData = BoneData;\r\n var TransformMode;\r\n (function (TransformMode) {\r\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ConstraintData = (function () {\r\n function ConstraintData(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n return ConstraintData;\r\n }());\r\n spine.ConstraintData = ConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Event = (function () {\r\n function Event(time, data) {\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n return Event;\r\n }());\r\n spine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var EventData = (function () {\r\n function EventData(name) {\r\n this.name = name;\r\n }\r\n return EventData;\r\n }());\r\n spine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraint = (function () {\r\n function IkConstraint(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n IkConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n IkConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n IkConstraint.prototype.update = function () {\r\n var target = this.target;\r\n var bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n };\r\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var p = bone.parent;\r\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case spine.TransformMode.NoRotationOrReflection:\r\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n var sa = pa / bone.skeleton.scaleX;\r\n var sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\r\n default:\r\n var x = targetX - p.worldX, y = targetY - p.worldY;\r\n var d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n var sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n var s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n };\r\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid)\r\n parent.updateAppliedTransform();\r\n if (!child.appliedValid)\r\n child.updateAppliedTransform();\r\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n var os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n }\r\n else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n }\r\n else\r\n os2 = 0;\r\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n var u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n }\r\n else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n var pp = parent.parent;\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n var dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n var p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer: if (u) {\r\n l2 *= psx;\r\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch)\r\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n }\r\n else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n var c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n var q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) / 2;\r\n var r0 = q / c2, r1 = c / q;\r\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n }\r\n else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n var os = Math.atan2(cy, cx) * s2;\r\n var rotation = parent.arotation;\r\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n };\r\n return IkConstraint;\r\n }());\r\n spine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraintData = (function (_super) {\r\n __extends(IkConstraintData, _super);\r\n function IkConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.bendDirection = 1;\r\n _this.compress = false;\r\n _this.stretch = false;\r\n _this.uniform = false;\r\n _this.mix = 1;\r\n _this.softness = 0;\r\n return _this;\r\n }\r\n return IkConstraintData;\r\n }(spine.ConstraintData));\r\n spine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraint = (function () {\r\n function PathConstraint(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n PathConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n PathConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n PathConstraint.prototype.update = function () {\r\n var attachment = this.target.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n var translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate)\r\n return;\r\n var data = this.data;\r\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\r\n var rotateMode = data.rotateMode;\r\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n var bones = this.bones;\r\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n var spacing = this.spacing;\r\n if (scale || !percentSpacing) {\r\n if (scale)\r\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\r\n for (var i = 0, n = spacesCount - 1; i < n;) {\r\n var bone = bones[i];\r\n var setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = 0;\r\n }\r\n else if (percentSpacing) {\r\n if (scale) {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_1 = Math.sqrt(x * x + y * y);\r\n lengths[i] = length_1;\r\n }\r\n spaces[++i] = spacing;\r\n }\r\n else {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_2 = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length_2;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\r\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n var tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == spine.RotateMode.Chain;\r\n else {\r\n tip = false;\r\n var p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n }\r\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n var bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * translateMix;\r\n bone.worldY += (boneY - bone.worldY) * translateMix;\r\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n var length_3 = lengths[i];\r\n if (length_3 != 0) {\r\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n var length_4 = bone.data.length;\r\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\r\n }\r\n else {\r\n r += offsetRotation;\r\n }\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n };\r\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n var target = this.target;\r\n var position = this.position;\r\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n var closed = path.closed;\r\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n var lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n var pathLength_1 = lengths[curveCount];\r\n if (percentPosition)\r\n position *= pathLength_1;\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength_1;\r\n }\r\n world = spine.Utils.setArraySize(this.world, 8);\r\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength_1;\r\n if (p < 0)\r\n p += pathLength_1;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength_1) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_5 = lengths[curve];\r\n if (p > length_5)\r\n continue;\r\n if (curve == 0)\r\n p /= length_5;\r\n else {\r\n var prev = lengths[curve - 1];\r\n p = (p - prev) / (length_5 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n }\r\n else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n if (closed) {\r\n verticesLength += 2;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n }\r\n else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n var pathLength = 0;\r\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition)\r\n position *= pathLength;\r\n else\r\n position *= pathLength / path.lengths[curveCount - 1];\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n var segments = this.segments;\r\n var curveLength = 0;\r\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_6 = curves[curve];\r\n if (p > length_6)\r\n continue;\r\n if (curve == 0)\r\n p /= length_6;\r\n else {\r\n var prev = curves[curve - 1];\r\n p = (p - prev) / (length_6 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n var ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (;; segment++) {\r\n var length_7 = segments[segment];\r\n if (p > length_7)\r\n continue;\r\n if (segment == 0)\r\n p /= length_7;\r\n else {\r\n var prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length_7 - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n };\r\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 0.001)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n };\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 0.00001;\r\n return PathConstraint;\r\n }());\r\n spine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraintData = (function (_super) {\r\n __extends(PathConstraintData, _super);\r\n function PathConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n return _this;\r\n }\r\n return PathConstraintData;\r\n }(spine.ConstraintData));\r\n spine.PathConstraintData = PathConstraintData;\r\n var PositionMode;\r\n (function (PositionMode) {\r\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n var SpacingMode;\r\n (function (SpacingMode) {\r\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n var RotateMode;\r\n (function (RotateMode) {\r\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Assets = (function () {\r\n function Assets(clientId) {\r\n this.toLoad = new Array();\r\n this.assets = {};\r\n this.clientId = clientId;\r\n }\r\n Assets.prototype.loaded = function () {\r\n var i = 0;\r\n for (var v in this.assets)\r\n i++;\r\n return i;\r\n };\r\n return Assets;\r\n }());\r\n var SharedAssetManager = (function () {\r\n function SharedAssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.clientAssets = {};\r\n this.queuedAssets = {};\r\n this.rawAssets = {};\r\n this.errors = {};\r\n this.pathPrefix = pathPrefix;\r\n }\r\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined) {\r\n clientAssets = new Assets(clientId);\r\n this.clientAssets[clientId] = clientAssets;\r\n }\r\n if (textureLoader !== null)\r\n clientAssets.textureLoader = textureLoader;\r\n clientAssets.toLoad.push(path);\r\n if (this.queuedAssets[path] === path) {\r\n return false;\r\n }\r\n else {\r\n this.queuedAssets[path] = path;\r\n return true;\r\n }\r\n };\r\n SharedAssetManager.prototype.loadText = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = request.responseText;\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(request.status, \", \").concat(request.responseText);\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = JSON.parse(request.responseText);\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \".concat(path, \": status \").concat(request.status, \", \").concat(request.responseText);\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, textureLoader, path))\r\n return;\r\n var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n if (isWebWorker) {\r\n var options = { mode: \"cors\" };\r\n fetch(path, options).then(function (response) {\r\n if (!response.ok) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n }\r\n return response.blob();\r\n }).then(function (blob) {\r\n return createImageBitmap(blob, {\r\n premultiplyAlpha: 'none',\r\n colorSpaceConversion: 'none'\r\n });\r\n }).then(function (bitmap) {\r\n _this.rawAssets[path] = bitmap;\r\n });\r\n }\r\n else {\r\n var img_1 = new Image();\r\n img_1.crossOrigin = \"anonymous\";\r\n img_1.onload = function (ev) {\r\n _this.rawAssets[path] = img_1;\r\n };\r\n img_1.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \".concat(path);\r\n };\r\n img_1.src = path;\r\n }\r\n };\r\n SharedAssetManager.prototype.get = function (clientId, path) {\r\n path = this.pathPrefix + path;\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n return clientAssets.assets[path];\r\n };\r\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n var isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document);\r\n var isWebWorker = !isBrowser && typeof importScripts !== 'undefined';\r\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n var path = clientAssets.toLoad[i];\r\n var asset = clientAssets.assets[path];\r\n if (asset === null || asset === undefined) {\r\n var rawAsset = this.rawAssets[path];\r\n if (rawAsset === null || rawAsset === undefined)\r\n continue;\r\n if (isWebWorker) {\r\n if (rawAsset instanceof ImageBitmap) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n else {\r\n if (rawAsset instanceof HTMLImageElement) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n this.updateClientAssets(clientAssets);\r\n return clientAssets.toLoad.length == clientAssets.loaded();\r\n };\r\n SharedAssetManager.prototype.dispose = function () {\r\n };\r\n SharedAssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n SharedAssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return SharedAssetManager;\r\n }());\r\n spine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Skeleton = (function () {\r\n function Skeleton(data) {\r\n this._updateCache = new Array();\r\n this.updateCacheReset = new Array();\r\n this.time = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++) {\r\n var boneData = data.bones[i];\r\n var bone = void 0;\r\n if (boneData.parent == null)\r\n bone = new spine.Bone(boneData, this, null);\r\n else {\r\n var parent_1 = this.bones[boneData.parent.index];\r\n bone = new spine.Bone(boneData, this, parent_1);\r\n parent_1.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (var i = 0; i < data.slots.length; i++) {\r\n var slotData = data.slots[i];\r\n var bone = this.bones[slotData.boneData.index];\r\n var slot = new spine.Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (var i = 0; i < data.ikConstraints.length; i++) {\r\n var ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (var i = 0; i < data.transformConstraints.length; i++) {\r\n var transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (var i = 0; i < data.pathConstraints.length; i++) {\r\n var pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n Skeleton.prototype.updateCache = function () {\r\n var updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin != null) {\r\n var skinBones = this.skin.bones;\r\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n var bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n var ikConstraints = this.ikConstraints;\r\n var transformConstraints = this.transformConstraints;\r\n var pathConstraints = this.pathConstraints;\r\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n var constraintCount = ikCount + transformCount + pathCount;\r\n outer: for (var i = 0; i < constraintCount; i++) {\r\n for (var ii = 0; ii < ikCount; ii++) {\r\n var constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < transformCount; ii++) {\r\n var constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < pathCount; ii++) {\r\n var constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n };\r\n Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var target = constraint.target;\r\n this.sortBone(target);\r\n var constrained = constraint.bones;\r\n var parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length > 1) {\r\n var child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var slot = constraint.target;\r\n var slotIndex = slot.data.index;\r\n var slotBone = slot.bone;\r\n if (this.skin != null)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (var i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n };\r\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (var i = 0; i < boneCount; i++) {\r\n var child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n var attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (var key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var pathBones = attachment.bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n var bones = this.bones;\r\n var i = 0;\r\n while (i < pathBones.length) {\r\n var boneCount = pathBones[i++];\r\n for (var n = i + boneCount; i < n; i++) {\r\n var boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n };\r\n Skeleton.prototype.sortBone = function (bone) {\r\n if (bone.sorted)\r\n return;\r\n var parent = bone.parent;\r\n if (parent != null)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n };\r\n Skeleton.prototype.sortReset = function (bones) {\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n };\r\n Skeleton.prototype.updateWorldTransform = function () {\r\n var updateCacheReset = this.updateCacheReset;\r\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n var bone = updateCacheReset[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n var updateCache = this._updateCache;\r\n for (var i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n };\r\n Skeleton.prototype.setToSetupPose = function () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n };\r\n Skeleton.prototype.setBonesToSetupPose = function () {\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n var data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n };\r\n Skeleton.prototype.setSlotsToSetupPose = function () {\r\n var slots = this.slots;\r\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n };\r\n Skeleton.prototype.getRootBone = function () {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n };\r\n Skeleton.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.setSkinByName = function (skinName) {\r\n var skin = this.data.findSkin(skinName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n };\r\n Skeleton.prototype.setSkin = function (newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var name_1 = slot.data.attachmentName;\r\n if (name_1 != null) {\r\n var attachment = newSkin.getAttachment(i, name_1);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n };\r\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n };\r\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n if (attachmentName == null)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin != null)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n };\r\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n var attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n };\r\n Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n if (temp === void 0) { temp = new Array(2); }\r\n if (offset == null)\r\n throw new Error(\"offset cannot be null.\");\r\n if (size == null)\r\n throw new Error(\"size cannot be null.\");\r\n var drawOrder = this.drawOrder;\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var verticesLength = 0;\r\n var vertices = null;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n };\r\n Skeleton.prototype.update = function (delta) {\r\n this.time += delta;\r\n };\r\n return Skeleton;\r\n }());\r\n spine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBinary = (function () {\r\n function SkeletonBinary(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n skeletonData.name = \"\";\r\n var input = new BinaryInput(binary);\r\n skeletonData.hash = input.readString();\r\n skeletonData.version = input.readString();\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n var nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n var n = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n input.strings.push(input.readString());\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var name_2 = input.readString();\r\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n var data = new spine.BoneData(i, name_2, parent_2);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var slotName = input.readString();\r\n var boneData = skeletonData.bones[input.readInt(true)];\r\n var data = new spine.SlotData(i, slotName, boneData);\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n var darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.IkConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.TransformConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n data.scaleMix = input.readFloat();\r\n data.shearMix = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.PathConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin != null) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n var i = skeletonData.skins.length;\r\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++)\r\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n }\r\n n = this.linkedMeshes.length;\r\n for (var i = 0; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_3 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_3);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var data = new spine.EventData(input.readStringRef());\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath != null) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n return skeletonData;\r\n };\r\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n var skin = null;\r\n var slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new spine.Skin(\"default\");\r\n }\r\n else {\r\n skin = new spine.Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (var i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (var i = 0; i < slotCount; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var name_3 = input.readStringRef();\r\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\r\n if (attachment != null)\r\n skin.setAttachment(slotIndex, name_3, attachment);\r\n }\r\n }\r\n return skin;\r\n };\r\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n var scale = this.scale;\r\n var name = input.readStringRef();\r\n if (name == null)\r\n name = attachmentName;\r\n var typeIndex = input.readByte();\r\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n switch (type) {\r\n case spine.AttachmentType.Region: {\r\n var path = input.readStringRef();\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var scaleX = input.readFloat();\r\n var scaleY = input.readFloat();\r\n var width = input.readFloat();\r\n var height = input.readFloat();\r\n var color = input.readInt32();\r\n if (path == null)\r\n path = name;\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n spine.Color.rgba8888ToColor(region.color, color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case spine.AttachmentType.BoundingBox: {\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case spine.AttachmentType.Mesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var vertexCount = input.readInt(true);\r\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n var triangles = this.readShortArray(input);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var hullLength = input.readInt(true);\r\n var edges = null;\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.hullLength = hullLength << 1;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case spine.AttachmentType.LinkedMesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var skinName = input.readStringRef();\r\n var parent_4 = input.readStringRef();\r\n var inheritDeform = input.readBoolean();\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\r\n return mesh;\r\n }\r\n case spine.AttachmentType.Path: {\r\n var closed_1 = input.readBoolean();\r\n var constantSpeed = input.readBoolean();\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n var color = nonessential ? input.readInt32() : 0;\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = closed_1;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case spine.AttachmentType.Point: {\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var color = nonessential ? input.readInt32() : 0;\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case spine.AttachmentType.Clipping: {\r\n var endSlotIndex = input.readInt(true);\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n var verticesLength = vertexCount << 1;\r\n var vertices = new Vertices();\r\n var scale = this.scale;\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n var weights = new Array();\r\n var bonesArray = new Array();\r\n for (var i = 0; i < vertexCount; i++) {\r\n var boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (var ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = spine.Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n };\r\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n var array = new Array(n);\r\n if (scale == 1) {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n }\r\n else {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readShortArray = function (input) {\r\n var n = input.readInt(true);\r\n var array = new Array(n);\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n var timelines = new Array();\r\n var scale = this.scale;\r\n var duration = 0;\r\n var tempColor1 = new spine.Color();\r\n var tempColor2 = new spine.Color();\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.SLOT_ATTACHMENT: {\r\n var timeline = new spine.AttachmentTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_COLOR: {\r\n var timeline = new spine.ColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_TWO_COLOR: {\r\n var timeline = new spine.TwoColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var boneIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.BONE_ROTATE: {\r\n var timeline = new spine.RotateTimeline(frameCount);\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.BONE_TRANSLATE:\r\n case SkeletonBinary.BONE_SCALE:\r\n case SkeletonBinary.BONE_SHEAR: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.BONE_SCALE)\r\n timeline = new spine.ScaleTimeline(frameCount);\r\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n timeline = new spine.ShearTimeline(frameCount);\r\n else {\r\n timeline = new spine.TranslateTimeline(frameCount);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.IkConstraintTimeline(frameCount);\r\n timeline.ikConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.TransformConstraintTimeline(frameCount);\r\n timeline.transformConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.PATH_POSITION:\r\n case SkeletonBinary.PATH_SPACING: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.PATH_MIX: {\r\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var skin = skeletonData.skins[input.readInt(true)];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var slotIndex = input.readInt(true);\r\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.DeformTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n var deform = void 0;\r\n var end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n }\r\n else {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (var v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, time, deform);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n }\r\n }\r\n }\r\n var drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\r\n var slotCount = skeletonData.slots.length;\r\n for (var i = 0; i < drawOrderCount; i++) {\r\n var time = input.readFloat();\r\n var offsetCount = input.readInt(true);\r\n var drawOrder = spine.Utils.newArray(slotCount, 0);\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var ii = 0; ii < offsetCount; ii++) {\r\n var slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n }\r\n var eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n var timeline = new spine.EventTimeline(eventCount);\r\n for (var i = 0; i < eventCount; i++) {\r\n var time = input.readFloat();\r\n var eventData = skeletonData.events[input.readInt(true)];\r\n var event_4 = new spine.Event(time, eventData);\r\n event_4.intValue = input.readInt(false);\r\n event_4.floatValue = input.readFloat();\r\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event_4.data.audioPath != null) {\r\n event_4.volume = input.readFloat();\r\n event_4.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event_4);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n }\r\n return new spine.Animation(name, timelines, duration);\r\n };\r\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n switch (input.readByte()) {\r\n case SkeletonBinary.CURVE_STEPPED:\r\n timeline.setStepped(frameIndex);\r\n break;\r\n case SkeletonBinary.CURVE_BEZIER:\r\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n break;\r\n }\r\n };\r\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n };\r\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\r\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\r\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\r\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\r\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\r\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\r\n SkeletonBinary.BONE_ROTATE = 0;\r\n SkeletonBinary.BONE_TRANSLATE = 1;\r\n SkeletonBinary.BONE_SCALE = 2;\r\n SkeletonBinary.BONE_SHEAR = 3;\r\n SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n SkeletonBinary.SLOT_COLOR = 1;\r\n SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n SkeletonBinary.PATH_POSITION = 0;\r\n SkeletonBinary.PATH_SPACING = 1;\r\n SkeletonBinary.PATH_MIX = 2;\r\n SkeletonBinary.CURVE_LINEAR = 0;\r\n SkeletonBinary.CURVE_STEPPED = 1;\r\n SkeletonBinary.CURVE_BEZIER = 2;\r\n return SkeletonBinary;\r\n }());\r\n spine.SkeletonBinary = SkeletonBinary;\r\n var BinaryInput = (function () {\r\n function BinaryInput(data, strings, index, buffer) {\r\n if (strings === void 0) { strings = new Array(); }\r\n if (index === void 0) { index = 0; }\r\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n BinaryInput.prototype.readByte = function () {\r\n return this.buffer.getInt8(this.index++);\r\n };\r\n BinaryInput.prototype.readShort = function () {\r\n var value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt32 = function () {\r\n var value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt = function (optimizePositive) {\r\n var b = this.readByte();\r\n var result = b & 0x7F;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 7;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 14;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 21;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n };\r\n BinaryInput.prototype.readStringRef = function () {\r\n var index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n };\r\n BinaryInput.prototype.readString = function () {\r\n var byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n var chars = \"\";\r\n var charCount = 0;\r\n for (var i = 0; i < byteCount;) {\r\n var b = this.readByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n };\r\n BinaryInput.prototype.readFloat = function () {\r\n var value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readBoolean = function () {\r\n return this.readByte() != 0;\r\n };\r\n return BinaryInput;\r\n }());\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n var Vertices = (function () {\r\n function Vertices(bones, vertices) {\r\n if (bones === void 0) { bones = null; }\r\n if (vertices === void 0) { vertices = null; }\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n return Vertices;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBounds = (function () {\r\n function SkeletonBounds() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return spine.Utils.newFloatArray(16);\r\n });\r\n }\r\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n var boundingBoxes = this.boundingBoxes;\r\n var polygons = this.polygons;\r\n var polygonPool = this.polygonPool;\r\n var slots = skeleton.slots;\r\n var slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (var i = 0; i < slotCount; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.BoundingBoxAttachment) {\r\n var boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n var polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n }\r\n else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n };\r\n SkeletonBounds.prototype.aabbCompute = function () {\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n var vertices = polygon;\r\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n var x = vertices[ii];\r\n var y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n };\r\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n var minX = this.minX;\r\n var minY = this.minY;\r\n var maxX = this.maxX;\r\n var maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n var m = (y2 - y1) / (x2 - x1);\r\n var y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n var x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n };\r\n SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var prevIndex = nn - 2;\r\n var inside = false;\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var vertexY = vertices[ii + 1];\r\n var prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n var vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n };\r\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var width12 = x1 - x2, height12 = y1 - y2;\r\n var det1 = x1 * y2 - y1 * x2;\r\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n var det2 = x3 * y4 - y3 * x4;\r\n var width34 = x3 - x4, height34 = y3 - y4;\r\n var det3 = width12 * height34 - height12 * width34;\r\n var x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n var y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n };\r\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n if (boundingBox == null)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n var index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n };\r\n SkeletonBounds.prototype.getWidth = function () {\r\n return this.maxX - this.minX;\r\n };\r\n SkeletonBounds.prototype.getHeight = function () {\r\n return this.maxY - this.minY;\r\n };\r\n return SkeletonBounds;\r\n }());\r\n spine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonClipping = (function () {\r\n function SkeletonClipping() {\r\n this.triangulator = new spine.Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n }\r\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n if (this.clipAttachment != null)\r\n return 0;\r\n this.clipAttachment = clip;\r\n var n = clip.worldVerticesLength;\r\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n var clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\r\n var polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n };\r\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n };\r\n SkeletonClipping.prototype.clipEnd = function () {\r\n if (this.clipAttachment == null)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n };\r\n SkeletonClipping.prototype.isClipping = function () {\r\n return this.clipAttachment != null;\r\n };\r\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n var clippedTriangles = this.clippedTriangles;\r\n var polygons = this.clippingPolygons;\r\n var polygonsCount = this.clippingPolygons.length;\r\n var vertexSize = twoColor ? 12 : 8;\r\n var index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer: for (var i = 0; i < trianglesLength; i += 3) {\r\n var vertexOffset = triangles[i] << 1;\r\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (var p = 0; p < polygonsCount; p++) {\r\n var s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n var clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n var clipOutputCount = clipOutputLength >> 1;\r\n var clipOutputItems = this.clipOutput;\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n var c0 = x - x3, c1 = y - y3;\r\n var a = (d0 * c0 + d1 * c1) * d;\r\n var b = (d4 * c0 + d2 * c1) * d;\r\n var c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (var ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + ii);\r\n clippedTrianglesItems[s + 2] = (index + ii + 1);\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n }\r\n else {\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n }\r\n else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + 1);\r\n clippedTrianglesItems[s + 2] = (index + 2);\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n };\r\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n var originalOutput = output;\r\n var clipped = false;\r\n var input = null;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n }\r\n else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n var clippingVertices = clippingArea;\r\n var clippingVerticesLast = clippingArea.length - 4;\r\n for (var i = 0;; i += 2) {\r\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n var inputVertices = input;\r\n var inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n }\r\n else if (side2) {\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n var temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (var i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n }\r\n else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n };\r\n SkeletonClipping.makeClockwise = function (polygon) {\r\n var vertices = polygon;\r\n var verticeslength = polygon.length;\r\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n var x = vertices[i], y = vertices[i + 1];\r\n var other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n };\r\n return SkeletonClipping;\r\n }());\r\n spine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonData = (function () {\r\n function SkeletonData() {\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.fps = 0;\r\n }\r\n SkeletonData.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSkin = function (skinName) {\r\n if (skinName == null)\r\n throw new Error(\"skinName cannot be null.\");\r\n var skins = this.skins;\r\n for (var i = 0, n = skins.length; i < n; i++) {\r\n var skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findEvent = function (eventDataName) {\r\n if (eventDataName == null)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n var events = this.events;\r\n for (var i = 0, n = events.length; i < n; i++) {\r\n var event_5 = events[i];\r\n if (event_5.name == eventDataName)\r\n return event_5;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findAnimation = function (animationName) {\r\n if (animationName == null)\r\n throw new Error(\"animationName cannot be null.\");\r\n var animations = this.animations;\r\n for (var i = 0, n = animations.length; i < n; i++) {\r\n var animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n if (pathConstraintName == null)\r\n throw new Error(\"pathConstraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName)\r\n return i;\r\n return -1;\r\n };\r\n return SkeletonData;\r\n }());\r\n spine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonJson = (function () {\r\n function SkeletonJson(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonJson.prototype.readSkeletonData = function (json) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n var skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (var i = 0; i < root.bones.length; i++) {\r\n var boneMap = root.bones[i];\r\n var parent_5 = null;\r\n var parentName = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent_5 = skeletonData.findBone(parentName);\r\n if (parent_5 == null)\r\n throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (var i = 0; i < root.slots.length; i++) {\r\n var slotMap = root.slots[i];\r\n var slotName = slotMap.name;\r\n var boneName = slotMap.bone;\r\n var boneData = skeletonData.findBone(boneName);\r\n if (boneData == null)\r\n throw new Error(\"Slot bone not found: \" + boneName);\r\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n var color = this.getValue(slotMap, \"color\", null);\r\n if (color != null)\r\n data.color.setFromString(color);\r\n var dark = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new spine.Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (var i = 0; i < root.ik.length; i++) {\r\n var constraintMap = root.ik[i];\r\n var data = new spine.IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"IK target bone not found: \" + targetName);\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (var i = 0; i < root.transform.length; i++) {\r\n var constraintMap = root.transform[i];\r\n var data = new spine.TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (var i = 0; i < root.path.length; i++) {\r\n var constraintMap = root.path[i];\r\n var data = new spine.PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Path target slot not found: \" + targetName);\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (var i = 0; i < root.skins.length; i++) {\r\n var skinMap = root.skins[i];\r\n var skin = new spine.Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null)\r\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (var slotName in skinMap.attachments) {\r\n var slot = skeletonData.findSlot(slotName);\r\n if (slot == null)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n var slotMap = skinMap.attachments[slotName];\r\n for (var entryName in slotMap) {\r\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_6 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_6);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (var eventName in root.events) {\r\n var eventMap = root.events[eventName];\r\n var data = new spine.EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (var animationName in root.animations) {\r\n var animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n };\r\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n var scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n var type = this.getValue(map, \"type\", \"region\");\r\n switch (type) {\r\n case \"region\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n region.color.setFromString(color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n mesh.color.setFromString(color);\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n var parent_7 = this.getValue(map, \"parent\", null);\r\n if (parent_7 != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n var uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n var end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n var slot = skeletonData.findSlot(end);\r\n if (slot == null)\r\n throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n var scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n var vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n var scaledVertices = spine.Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (var i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n var weights = new Array();\r\n var bones = new Array();\r\n for (var i = 0, n = vertices.length; i < n;) {\r\n var boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = spine.Utils.toFloatArray(weights);\r\n };\r\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n var scale = this.scale;\r\n var timelines = new Array();\r\n var duration = 0;\r\n if (map.slots) {\r\n for (var slotName in map.slots) {\r\n var slotMap = map.slots[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n else if (timelineName == \"color\") {\r\n var timeline = new spine.ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var color = new spine.Color();\r\n color.setFromString(valueMap.color);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n }\r\n else if (timelineName == \"twoColor\") {\r\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var light = new spine.Color();\r\n var dark = new spine.Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (var boneName in map.bones) {\r\n var boneMap = map.bones[boneName];\r\n var boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n for (var timelineName in boneMap) {\r\n var timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n var timeline = new spine.RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n var timeline = null;\r\n var timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new spine.ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n }\r\n else if (timelineName === \"shear\")\r\n timeline = new spine.ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new spine.TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (var constraintName in map.ik) {\r\n var constraintMap = map.ik[constraintName];\r\n var constraint = skeletonData.findIkConstraint(constraintName);\r\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.transform) {\r\n for (var constraintName in map.transform) {\r\n var constraintMap = map.transform[constraintName];\r\n var constraint = skeletonData.findTransformConstraint(constraintName);\r\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.path) {\r\n for (var constraintName in map.path) {\r\n var constraintMap = map.path[constraintName];\r\n var index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var timelineName in constraintMap) {\r\n var timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n var timeline = null;\r\n var timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"mix\") {\r\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n if (map.deform) {\r\n for (var deformName in map.deform) {\r\n var deformMap = map.deform[deformName];\r\n var skin = skeletonData.findSkin(deformName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + deformName);\r\n for (var slotName in deformMap) {\r\n var slotMap = deformMap[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n var attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null)\r\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var timeline = new spine.DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n var frameIndex = 0;\r\n for (var j = 0; j < timelineMap.length; j++) {\r\n var valueMap = timelineMap[j];\r\n var deform = void 0;\r\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = this.getValue(valueMap, \"offset\", 0);\r\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (var i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n var drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null)\r\n drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n var slotCount = skeletonData.slots.length;\r\n var frameIndex = 0;\r\n for (var j = 0; j < drawOrderNode.length; j++) {\r\n var drawOrderMap = drawOrderNode[j];\r\n var drawOrder = null;\r\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = spine.Utils.newArray(slotCount, -1);\r\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var i = 0; i < offsets.length; i++) {\r\n var offsetMap = offsets[i];\r\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1)\r\n drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (map.events) {\r\n var timeline = new spine.EventTimeline(map.events.length);\r\n var frameIndex = 0;\r\n for (var i = 0; i < map.events.length; i++) {\r\n var eventMap = map.events[i];\r\n var eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event_6.data.audioPath != null) {\r\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\r\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event_6);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n };\r\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n if (!map.hasOwnProperty(\"curve\"))\r\n return;\r\n if (map.curve == \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n var curve = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n };\r\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n };\r\n SkeletonJson.blendModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.BlendMode.Normal;\r\n if (str == \"additive\")\r\n return spine.BlendMode.Additive;\r\n if (str == \"multiply\")\r\n return spine.BlendMode.Multiply;\r\n if (str == \"screen\")\r\n return spine.BlendMode.Screen;\r\n throw new Error(\"Unknown blend mode: \".concat(str));\r\n };\r\n SkeletonJson.positionModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\")\r\n return spine.PositionMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.PositionMode.Percent;\r\n throw new Error(\"Unknown position mode: \".concat(str));\r\n };\r\n SkeletonJson.spacingModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"length\")\r\n return spine.SpacingMode.Length;\r\n if (str == \"fixed\")\r\n return spine.SpacingMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.SpacingMode.Percent;\r\n throw new Error(\"Unknown position mode: \".concat(str));\r\n };\r\n SkeletonJson.rotateModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\")\r\n return spine.RotateMode.Tangent;\r\n if (str == \"chain\")\r\n return spine.RotateMode.Chain;\r\n if (str == \"chainscale\")\r\n return spine.RotateMode.ChainScale;\r\n throw new Error(\"Unknown rotate mode: \".concat(str));\r\n };\r\n SkeletonJson.transformModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.TransformMode.Normal;\r\n if (str == \"onlytranslation\")\r\n return spine.TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\")\r\n return spine.TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\")\r\n return spine.TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\")\r\n return spine.TransformMode.NoScaleOrReflection;\r\n throw new Error(\"Unknown transform mode: \".concat(str));\r\n };\r\n return SkeletonJson;\r\n }());\r\n spine.SkeletonJson = SkeletonJson;\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkinEntry = (function () {\r\n function SkinEntry(slotIndex, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n return SkinEntry;\r\n }());\r\n spine.SkinEntry = SkinEntry;\r\n var Skin = (function () {\r\n function Skin(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n if (attachment == null)\r\n throw new Error(\"attachment cannot be null.\");\r\n var attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n };\r\n Skin.prototype.addSkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n };\r\n Skin.prototype.copySkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null)\r\n continue;\r\n if (attachment.attachment instanceof spine.MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n };\r\n Skin.prototype.getAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n };\r\n Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n dictionary[name] = null;\r\n };\r\n Skin.prototype.getAttachments = function () {\r\n var entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n var slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (var name_4 in slotAttachments) {\r\n var attachment = slotAttachments[name_4];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name_4, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n };\r\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n var slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (var name_5 in slotAttachments) {\r\n var attachment = slotAttachments[name_5];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\r\n }\r\n }\r\n };\r\n Skin.prototype.clear = function () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n };\r\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n var slotIndex = 0;\r\n for (var i = 0; i < skeleton.slots.length; i++) {\r\n var slot = skeleton.slots[i];\r\n var slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n var dictionary = oldSkin.attachments[slotIndex];\r\n for (var key in dictionary) {\r\n var skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n var attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n };\r\n return Skin;\r\n }());\r\n spine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Slot = (function () {\r\n function Slot(data, bone) {\r\n this.deform = new Array();\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (bone == null)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new spine.Color();\r\n this.darkColor = data.darkColor == null ? null : new spine.Color();\r\n this.setToSetupPose();\r\n }\r\n Slot.prototype.getSkeleton = function () {\r\n return this.bone.skeleton;\r\n };\r\n Slot.prototype.getAttachment = function () {\r\n return this.attachment;\r\n };\r\n Slot.prototype.setAttachment = function (attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n };\r\n Slot.prototype.setAttachmentTime = function (time) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n };\r\n Slot.prototype.getAttachmentTime = function () {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n };\r\n Slot.prototype.setToSetupPose = function () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n };\r\n return Slot;\r\n }());\r\n spine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SlotData = (function () {\r\n function SlotData(index, name, boneData) {\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (boneData == null)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n return SlotData;\r\n }());\r\n spine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Texture = (function () {\r\n function Texture(image) {\r\n this._image = image;\r\n }\r\n Texture.prototype.getImage = function () {\r\n return this._image;\r\n };\r\n Texture.filterFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(\"Unknown texture filter \".concat(text));\r\n }\r\n };\r\n Texture.wrapFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(\"Unknown texture wrap \".concat(text));\r\n }\r\n };\r\n return Texture;\r\n }());\r\n spine.Texture = Texture;\r\n var TextureFilter;\r\n (function (TextureFilter) {\r\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n var TextureWrap;\r\n (function (TextureWrap) {\r\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n var TextureRegion = (function () {\r\n function TextureRegion() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.rotate = false;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n return TextureRegion;\r\n }());\r\n spine.TextureRegion = TextureRegion;\r\n var FakeTexture = (function (_super) {\r\n __extends(FakeTexture, _super);\r\n function FakeTexture() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n FakeTexture.prototype.dispose = function () { };\r\n return FakeTexture;\r\n }(Texture));\r\n spine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TextureAtlas = (function () {\r\n function TextureAtlas(atlasText, textureLoader) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n this.load(atlasText, textureLoader);\r\n }\r\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n var reader = new TextureAtlasReader(atlasText);\r\n var tuple = new Array(4);\r\n var page = null;\r\n while (true) {\r\n var line = reader.readLine();\r\n if (line == null)\r\n break;\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n if (reader.readTuple(tuple) == 2) {\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n reader.readTuple(tuple);\r\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n var direction = reader.readValue();\r\n page.uWrap = spine.TextureWrap.ClampToEdge;\r\n page.vWrap = spine.TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n page.texture = textureLoader(line);\r\n page.texture.setFilters(page.minFilter, page.magFilter);\r\n page.texture.setWraps(page.uWrap, page.vWrap);\r\n page.width = page.texture.getImage().width;\r\n page.height = page.texture.getImage().height;\r\n this.pages.push(page);\r\n }\r\n else {\r\n var region = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n var rotateValue = reader.readValue();\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n region.degrees = 90;\r\n }\r\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n region.degrees = 0;\r\n }\r\n else {\r\n region.degrees = parseFloat(rotateValue);\r\n }\r\n region.rotate = region.degrees == 90;\r\n reader.readTuple(tuple);\r\n var x = parseInt(tuple[0]);\r\n var y = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n var width = parseInt(tuple[0]);\r\n var height = parseInt(tuple[1]);\r\n region.u = x / page.width;\r\n region.v = y / page.height;\r\n if (region.rotate) {\r\n region.u2 = (x + height) / page.width;\r\n region.v2 = (y + width) / page.height;\r\n }\r\n else {\r\n region.u2 = (x + width) / page.width;\r\n region.v2 = (y + height) / page.height;\r\n }\r\n region.x = x;\r\n region.y = y;\r\n region.width = Math.abs(width);\r\n region.height = Math.abs(height);\r\n if (reader.readTuple(tuple) == 4) {\r\n if (reader.readTuple(tuple) == 4) {\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n region.originalWidth = parseInt(tuple[0]);\r\n region.originalHeight = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n region.offsetX = parseInt(tuple[0]);\r\n region.offsetY = parseInt(tuple[1]);\r\n region.index = parseInt(reader.readValue());\r\n region.texture = page.texture;\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n TextureAtlas.prototype.findRegion = function (name) {\r\n for (var i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n };\r\n TextureAtlas.prototype.dispose = function () {\r\n for (var i = 0; i < this.pages.length; i++) {\r\n this.pages[i].texture.dispose();\r\n }\r\n };\r\n return TextureAtlas;\r\n }());\r\n spine.TextureAtlas = TextureAtlas;\r\n var TextureAtlasReader = (function () {\r\n function TextureAtlasReader(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n TextureAtlasReader.prototype.readLine = function () {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n };\r\n TextureAtlasReader.prototype.readValue = function () {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n };\r\n TextureAtlasReader.prototype.readTuple = function (tuple) {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n var i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n var comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1)\r\n break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n };\r\n return TextureAtlasReader;\r\n }());\r\n var TextureAtlasPage = (function () {\r\n function TextureAtlasPage() {\r\n }\r\n return TextureAtlasPage;\r\n }());\r\n spine.TextureAtlasPage = TextureAtlasPage;\r\n var TextureAtlasRegion = (function (_super) {\r\n __extends(TextureAtlasRegion, _super);\r\n function TextureAtlasRegion() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return TextureAtlasRegion;\r\n }(spine.TextureRegion));\r\n spine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraint = (function () {\r\n function TransformConstraint(data, skeleton) {\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.scaleMix = 0;\r\n this.shearMix = 0;\r\n this.temp = new spine.Vector2();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n TransformConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n TransformConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n TransformConstraint.prototype.update = function () {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n }\r\n else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * translateMix;\r\n bone.worldY += (temp.y - bone.worldY) * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n var ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var b = bone.b, d = bone.d;\r\n var by = Math.atan2(d, b);\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * translateMix;\r\n bone.worldY += temp.y * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n var b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n var r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0) {\r\n var r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0)\r\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001)\r\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0)\r\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n return TransformConstraint;\r\n }());\r\n spine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraintData = (function (_super) {\r\n __extends(TransformConstraintData, _super);\r\n function TransformConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.rotateMix = 0;\r\n _this.translateMix = 0;\r\n _this.scaleMix = 0;\r\n _this.shearMix = 0;\r\n _this.offsetRotation = 0;\r\n _this.offsetX = 0;\r\n _this.offsetY = 0;\r\n _this.offsetScaleX = 0;\r\n _this.offsetScaleY = 0;\r\n _this.offsetShearY = 0;\r\n _this.relative = false;\r\n _this.local = false;\r\n return _this;\r\n }\r\n return TransformConstraintData;\r\n }(spine.ConstraintData));\r\n spine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Triangulator = (function () {\r\n function Triangulator() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n }\r\n Triangulator.prototype.triangulate = function (verticesArray) {\r\n var vertices = verticesArray;\r\n var vertexCount = verticesArray.length >> 1;\r\n var indices = this.indicesArray;\r\n indices.length = 0;\r\n for (var i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n var isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (var i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n var triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n var previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer: if (!isConcave[i]) {\r\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n var v = indices[ii] << 1;\r\n var vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n var previousIndex = (vertexCount + i - 1) % vertexCount;\r\n var nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n };\r\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\r\n var vertices = verticesArray;\r\n var convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n var convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n var polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n var polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n var fanBaseIndex = -1, lastWinding = 0;\r\n for (var i = 0, n = triangles.length; i < n; i += 3) {\r\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n var merged = false;\r\n if (fanBaseIndex == t1) {\r\n var o = polygon.length - 4;\r\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n var firstIndex = polygonIndices[0];\r\n var lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n var o = polygon.length - 4;\r\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n var firstX = polygon[0], firstY = polygon[1];\r\n var secondX = polygon[2], secondY = polygon[3];\r\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (var ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n var otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n var otherFirstIndex = otherIndices[0];\r\n var otherSecondIndex = otherIndices[1];\r\n var otherLastIndex = otherIndices[2];\r\n var otherPoly = convexPolygons[ii];\r\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n };\r\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n var current = indices[index] << 1;\r\n var next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n };\r\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n };\r\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n var px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n };\r\n return Triangulator;\r\n }());\r\n spine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IntSet = (function () {\r\n function IntSet() {\r\n this.array = new Array();\r\n }\r\n IntSet.prototype.add = function (value) {\r\n var contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n };\r\n IntSet.prototype.contains = function (value) {\r\n return this.array[value | 0] != undefined;\r\n };\r\n IntSet.prototype.remove = function (value) {\r\n this.array[value | 0] = undefined;\r\n };\r\n IntSet.prototype.clear = function () {\r\n this.array.length = 0;\r\n };\r\n return IntSet;\r\n }());\r\n spine.IntSet = IntSet;\r\n var Color = (function () {\r\n function Color(r, g, b, a) {\r\n if (r === void 0) { r = 0; }\r\n if (g === void 0) { g = 0; }\r\n if (b === void 0) { b = 0; }\r\n if (a === void 0) { a = 0; }\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n Color.prototype.set = function (r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.setFromColor = function (c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n };\r\n Color.prototype.setFromString = function (hex) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n };\r\n Color.prototype.add = function (r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.clamp = function () {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n };\r\n Color.rgba8888ToColor = function (color, value) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.rgb888ToColor = function (color, value) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.WHITE = new Color(1, 1, 1, 1);\r\n Color.RED = new Color(1, 0, 0, 1);\r\n Color.GREEN = new Color(0, 1, 0, 1);\r\n Color.BLUE = new Color(0, 0, 1, 1);\r\n Color.MAGENTA = new Color(1, 0, 1, 1);\r\n return Color;\r\n }());\r\n spine.Color = Color;\r\n var MathUtils = (function () {\r\n function MathUtils() {\r\n }\r\n MathUtils.clamp = function (value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n MathUtils.cosDeg = function (degrees) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.sinDeg = function (degrees) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.signum = function (value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n };\r\n MathUtils.toInt = function (x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n };\r\n MathUtils.cbrt = function (x) {\r\n var y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n };\r\n MathUtils.randomTriangular = function (min, max) {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n };\r\n MathUtils.randomTriangularWith = function (min, max, mode) {\r\n var u = Math.random();\r\n var d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n };\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n MathUtils.degRad = MathUtils.degreesToRadians;\r\n return MathUtils;\r\n }());\r\n spine.MathUtils = MathUtils;\r\n var Interpolation = (function () {\r\n function Interpolation() {\r\n }\r\n Interpolation.prototype.apply = function (start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n };\r\n return Interpolation;\r\n }());\r\n spine.Interpolation = Interpolation;\r\n var Pow = (function (_super) {\r\n __extends(Pow, _super);\r\n function Pow(power) {\r\n var _this = _super.call(this) || this;\r\n _this.power = 2;\r\n _this.power = power;\r\n return _this;\r\n }\r\n Pow.prototype.applyInternal = function (a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n };\r\n return Pow;\r\n }(Interpolation));\r\n spine.Pow = Pow;\r\n var PowOut = (function (_super) {\r\n __extends(PowOut, _super);\r\n function PowOut(power) {\r\n return _super.call(this, power) || this;\r\n }\r\n PowOut.prototype.applyInternal = function (a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n };\r\n return PowOut;\r\n }(Pow));\r\n spine.PowOut = PowOut;\r\n var Utils = (function () {\r\n function Utils() {\r\n }\r\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n };\r\n Utils.setArraySize = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n var oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (var i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n };\r\n Utils.ensureArrayCapacity = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n if (array.length >= size)\r\n return array;\r\n return Utils.setArraySize(array, size, value);\r\n };\r\n Utils.newArray = function (size, defaultValue) {\r\n var array = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n };\r\n Utils.newFloatArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.newShortArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.toFloatArray = function (array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n };\r\n Utils.toSinglePrecision = function (value) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n };\r\n Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n };\r\n Utils.contains = function (array, element, identity) {\r\n if (identity === void 0) { identity = true; }\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] == element)\r\n return true;\r\n }\r\n return false;\r\n };\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n return Utils;\r\n }());\r\n spine.Utils = Utils;\r\n var DebugUtils = (function () {\r\n function DebugUtils() {\r\n }\r\n DebugUtils.logBones = function (skeleton) {\r\n for (var i = 0; i < skeleton.bones.length; i++) {\r\n var bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n };\r\n return DebugUtils;\r\n }());\r\n spine.DebugUtils = DebugUtils;\r\n var Pool = (function () {\r\n function Pool(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n Pool.prototype.obtain = function () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n };\r\n Pool.prototype.free = function (item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n };\r\n Pool.prototype.freeAll = function (items) {\r\n for (var i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n };\r\n Pool.prototype.clear = function () {\r\n this.items.length = 0;\r\n };\r\n return Pool;\r\n }());\r\n spine.Pool = Pool;\r\n var Vector2 = (function () {\r\n function Vector2(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n }\r\n Vector2.prototype.set = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2.prototype.length = function () {\r\n var x = this.x;\r\n var y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n };\r\n Vector2.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n };\r\n return Vector2;\r\n }());\r\n spine.Vector2 = Vector2;\r\n var TimeKeeper = (function () {\r\n function TimeKeeper() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1000;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n TimeKeeper.prototype.update = function () {\r\n var now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n };\r\n return TimeKeeper;\r\n }());\r\n spine.TimeKeeper = TimeKeeper;\r\n var WindowedMean = (function () {\r\n function WindowedMean(windowSize) {\r\n if (windowSize === void 0) { windowSize = 32; }\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n WindowedMean.prototype.hasEnoughData = function () {\r\n return this.addedValues >= this.values.length;\r\n };\r\n WindowedMean.prototype.addValue = function (value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n };\r\n WindowedMean.prototype.getMean = function () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n var mean = 0;\r\n for (var i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n return WindowedMean;\r\n }());\r\n spine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n if (!Math.fround) {\r\n Math.fround = (function (array) {\r\n return function (x) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Attachment = (function () {\r\n function Attachment(name) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n return Attachment;\r\n }());\r\n spine.Attachment = Attachment;\r\n var VertexAttachment = (function (_super) {\r\n __extends(VertexAttachment, _super);\r\n function VertexAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n _this.worldVerticesLength = 0;\r\n _this.deformAttachment = _this;\r\n return _this;\r\n }\r\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n var skeleton = slot.bone.skeleton;\r\n var deformArray = slot.deform;\r\n var vertices = this.vertices;\r\n var bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n var bone = slot.bone;\r\n var x = bone.worldX;\r\n var y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n var v = 0, skip = 0;\r\n for (var i = 0; i < start; i += 2) {\r\n var n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n var skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n else {\r\n var deform = deformArray;\r\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n };\r\n VertexAttachment.prototype.copyTo = function (attachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n }\r\n else\r\n attachment.bones = null;\r\n if (this.vertices != null) {\r\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\r\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n else\r\n attachment.vertices = null;\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n };\r\n VertexAttachment.nextID = 0;\r\n return VertexAttachment;\r\n }(Attachment));\r\n spine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AttachmentType;\r\n (function (AttachmentType) {\r\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoundingBoxAttachment = (function (_super) {\r\n __extends(BoundingBoxAttachment, _super);\r\n function BoundingBoxAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n BoundingBoxAttachment.prototype.copy = function () {\r\n var copy = new BoundingBoxAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return BoundingBoxAttachment;\r\n }(spine.VertexAttachment));\r\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ClippingAttachment = (function (_super) {\r\n __extends(ClippingAttachment, _super);\r\n function ClippingAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n return _this;\r\n }\r\n ClippingAttachment.prototype.copy = function () {\r\n var copy = new ClippingAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return ClippingAttachment;\r\n }(spine.VertexAttachment));\r\n spine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var MeshAttachment = (function (_super) {\r\n __extends(MeshAttachment, _super);\r\n function MeshAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.tempColor = new spine.Color(0, 0, 0, 0);\r\n return _this;\r\n }\r\n MeshAttachment.prototype.updateUVs = function () {\r\n var regionUVs = this.regionUVs;\r\n if (this.uvs == null || this.uvs.length != regionUVs.length)\r\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n var uvs = this.uvs;\r\n var n = this.uvs.length;\r\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof spine.TextureAtlasRegion) {\r\n var region = this.region;\r\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n }\r\n else if (this.region == null) {\r\n u = v = 0;\r\n width = height = 1;\r\n }\r\n else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n };\r\n MeshAttachment.prototype.getParentMesh = function () {\r\n return this.parentMesh;\r\n };\r\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n };\r\n MeshAttachment.prototype.copy = function () {\r\n if (this.parentMesh != null)\r\n return this.newLinkedMesh();\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n };\r\n MeshAttachment.prototype.newLinkedMesh = function () {\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n copy.updateUVs();\r\n return copy;\r\n };\r\n return MeshAttachment;\r\n }(spine.VertexAttachment));\r\n spine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathAttachment = (function (_super) {\r\n __extends(PathAttachment, _super);\r\n function PathAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.closed = false;\r\n _this.constantSpeed = false;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n PathAttachment.prototype.copy = function () {\r\n var copy = new PathAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PathAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PointAttachment = (function (_super) {\r\n __extends(PointAttachment, _super);\r\n function PointAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n return _this;\r\n }\r\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n };\r\n PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n var x = cos * bone.a + sin * bone.b;\r\n var y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n };\r\n PointAttachment.prototype.copy = function () {\r\n var copy = new PointAttachment(this.name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PointAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var RegionAttachment = (function (_super) {\r\n __extends(RegionAttachment, _super);\r\n function RegionAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.scaleX = 1;\r\n _this.scaleY = 1;\r\n _this.rotation = 0;\r\n _this.width = 0;\r\n _this.height = 0;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.offset = spine.Utils.newFloatArray(8);\r\n _this.uvs = spine.Utils.newFloatArray(8);\r\n _this.tempColor = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n RegionAttachment.prototype.updateOffset = function () {\r\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n var localX2 = localX + this.region.width * regionScaleX;\r\n var localY2 = localY + this.region.height * regionScaleY;\r\n var radians = this.rotation * Math.PI / 180;\r\n var cos = Math.cos(radians);\r\n var sin = Math.sin(radians);\r\n var localXCos = localX * cos + this.x;\r\n var localXSin = localX * sin;\r\n var localYCos = localY * cos + this.y;\r\n var localYSin = localY * sin;\r\n var localX2Cos = localX2 * cos + this.x;\r\n var localX2Sin = localX2 * sin;\r\n var localY2Cos = localY2 * cos + this.y;\r\n var localY2Sin = localY2 * sin;\r\n var offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n };\r\n RegionAttachment.prototype.setRegion = function (region) {\r\n this.region = region;\r\n var uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n }\r\n else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n };\r\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n var vertexOffset = this.offset;\r\n var x = bone.worldX, y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n };\r\n RegionAttachment.prototype.copy = function () {\r\n var copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n RegionAttachment.OX1 = 0;\r\n RegionAttachment.OY1 = 1;\r\n RegionAttachment.OX2 = 2;\r\n RegionAttachment.OY2 = 3;\r\n RegionAttachment.OX3 = 4;\r\n RegionAttachment.OY3 = 5;\r\n RegionAttachment.OX4 = 6;\r\n RegionAttachment.OY4 = 7;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n return RegionAttachment;\r\n }(spine.Attachment));\r\n spine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var JitterEffect = (function () {\r\n function JitterEffect(jitterX, jitterY) {\r\n this.jitterX = 0;\r\n this.jitterY = 0;\r\n this.jitterX = jitterX;\r\n this.jitterY = jitterY;\r\n }\r\n JitterEffect.prototype.begin = function (skeleton) {\r\n };\r\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n };\r\n JitterEffect.prototype.end = function () {\r\n };\r\n return JitterEffect;\r\n }());\r\n spine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SwirlEffect = (function () {\r\n function SwirlEffect(radius) {\r\n this.centerX = 0;\r\n this.centerY = 0;\r\n this.radius = 0;\r\n this.angle = 0;\r\n this.worldX = 0;\r\n this.worldY = 0;\r\n this.radius = radius;\r\n }\r\n SwirlEffect.prototype.begin = function (skeleton) {\r\n this.worldX = skeleton.x + this.centerX;\r\n this.worldY = skeleton.y + this.centerY;\r\n };\r\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n var x = position.x - this.worldX;\r\n var y = position.y - this.worldY;\r\n var dist = Math.sqrt(x * x + y * y);\r\n if (dist < this.radius) {\r\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n var cos = Math.cos(theta);\r\n var sin = Math.sin(theta);\r\n position.x = cos * x - sin * y + this.worldX;\r\n position.y = sin * x + cos * y + this.worldY;\r\n }\r\n };\r\n SwirlEffect.prototype.end = function () {\r\n };\r\n SwirlEffect.interpolation = new spine.PowOut(2);\r\n return SwirlEffect;\r\n }());\r\n spine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(context, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) {\r\n return new spine.webgl.GLTexture(context, image);\r\n }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n webgl.AssetManager = AssetManager;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var OrthoCamera = (function () {\r\n function OrthoCamera(viewportWidth, viewportHeight) {\r\n this.position = new webgl.Vector3(0, 0, 0);\r\n this.direction = new webgl.Vector3(0, 0, -1);\r\n this.up = new webgl.Vector3(0, 1, 0);\r\n this.near = 0;\r\n this.far = 100;\r\n this.zoom = 1;\r\n this.viewportWidth = 0;\r\n this.viewportHeight = 0;\r\n this.projectionView = new webgl.Matrix4();\r\n this.inverseProjectionView = new webgl.Matrix4();\r\n this.projection = new webgl.Matrix4();\r\n this.view = new webgl.Matrix4();\r\n this.tmp = new webgl.Vector3();\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n this.update();\r\n }\r\n OrthoCamera.prototype.update = function () {\r\n var projection = this.projection;\r\n var view = this.view;\r\n var projectionView = this.projectionView;\r\n var inverseProjectionView = this.inverseProjectionView;\r\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\r\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\r\n view.lookAt(this.position, this.direction, this.up);\r\n projectionView.set(projection.values);\r\n projectionView.multiply(view);\r\n inverseProjectionView.set(projectionView.values).invert();\r\n };\r\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\r\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\r\n var tmp = this.tmp;\r\n tmp.x = (2 * x) / screenWidth - 1;\r\n tmp.y = (2 * y) / screenHeight - 1;\r\n tmp.z = (2 * screenCoords.z) - 1;\r\n tmp.project(this.inverseProjectionView);\r\n screenCoords.set(tmp.x, tmp.y, tmp.z);\r\n return screenCoords;\r\n };\r\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n };\r\n return OrthoCamera;\r\n }());\r\n webgl.OrthoCamera = OrthoCamera;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var GLTexture = (function (_super) {\r\n __extends(GLTexture, _super);\r\n function GLTexture(context, image, useMipMaps) {\r\n if (useMipMaps === void 0) { useMipMaps = false; }\r\n var _this = _super.call(this, image) || this;\r\n _this.texture = null;\r\n _this.boundUnit = 0;\r\n _this.useMipMaps = false;\r\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n _this.useMipMaps = useMipMaps;\r\n _this.restore();\r\n _this.context.addRestorable(_this);\r\n return _this;\r\n }\r\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\r\n };\r\n GLTexture.validateMagFilter = function (magFilter) {\r\n switch (magFilter) {\r\n case spine.TextureFilter.MipMap:\r\n case spine.TextureFilter.MipMapLinearLinear:\r\n case spine.TextureFilter.MipMapLinearNearest:\r\n case spine.TextureFilter.MipMapNearestLinear:\r\n case spine.TextureFilter.MipMapNearestNearest:\r\n return spine.TextureFilter.Linear;\r\n default:\r\n return magFilter;\r\n }\r\n };\r\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\r\n };\r\n GLTexture.prototype.update = function (useMipMaps) {\r\n var gl = this.context.gl;\r\n if (!this.texture) {\r\n this.texture = this.context.gl.createTexture();\r\n }\r\n this.bind();\r\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n };\r\n GLTexture.prototype.restore = function () {\r\n this.texture = null;\r\n this.update(this.useMipMaps);\r\n };\r\n GLTexture.prototype.bind = function (unit) {\r\n if (unit === void 0) { unit = 0; }\r\n var gl = this.context.gl;\r\n this.boundUnit = unit;\r\n gl.activeTexture(gl.TEXTURE0 + unit);\r\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\r\n };\r\n GLTexture.prototype.unbind = function () {\r\n var gl = this.context.gl;\r\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\r\n gl.bindTexture(gl.TEXTURE_2D, null);\r\n };\r\n GLTexture.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteTexture(this.texture);\r\n };\r\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\r\n return GLTexture;\r\n }(spine.Texture));\r\n webgl.GLTexture = GLTexture;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n webgl.M00 = 0;\r\n webgl.M01 = 4;\r\n webgl.M02 = 8;\r\n webgl.M03 = 12;\r\n webgl.M10 = 1;\r\n webgl.M11 = 5;\r\n webgl.M12 = 9;\r\n webgl.M13 = 13;\r\n webgl.M20 = 2;\r\n webgl.M21 = 6;\r\n webgl.M22 = 10;\r\n webgl.M23 = 14;\r\n webgl.M30 = 3;\r\n webgl.M31 = 7;\r\n webgl.M32 = 11;\r\n webgl.M33 = 15;\r\n var Matrix4 = (function () {\r\n function Matrix4() {\r\n this.temp = new Float32Array(16);\r\n this.values = new Float32Array(16);\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M11] = 1;\r\n v[webgl.M22] = 1;\r\n v[webgl.M33] = 1;\r\n }\r\n Matrix4.prototype.set = function (values) {\r\n this.values.set(values);\r\n return this;\r\n };\r\n Matrix4.prototype.transpose = function () {\r\n var t = this.temp;\r\n var v = this.values;\r\n t[webgl.M00] = v[webgl.M00];\r\n t[webgl.M01] = v[webgl.M10];\r\n t[webgl.M02] = v[webgl.M20];\r\n t[webgl.M03] = v[webgl.M30];\r\n t[webgl.M10] = v[webgl.M01];\r\n t[webgl.M11] = v[webgl.M11];\r\n t[webgl.M12] = v[webgl.M21];\r\n t[webgl.M13] = v[webgl.M31];\r\n t[webgl.M20] = v[webgl.M02];\r\n t[webgl.M21] = v[webgl.M12];\r\n t[webgl.M22] = v[webgl.M22];\r\n t[webgl.M23] = v[webgl.M32];\r\n t[webgl.M30] = v[webgl.M03];\r\n t[webgl.M31] = v[webgl.M13];\r\n t[webgl.M32] = v[webgl.M23];\r\n t[webgl.M33] = v[webgl.M33];\r\n return this.set(t);\r\n };\r\n Matrix4.prototype.identity = function () {\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M01] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M03] = 0;\r\n v[webgl.M10] = 0;\r\n v[webgl.M11] = 1;\r\n v[webgl.M12] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M21] = 0;\r\n v[webgl.M22] = 1;\r\n v[webgl.M23] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M32] = 0;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.invert = function () {\r\n var v = this.values;\r\n var t = this.temp;\r\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n if (l_det == 0)\r\n throw new Error(\"non-invertible matrix\");\r\n var inv_det = 1.0 / l_det;\r\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\r\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\r\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\r\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\r\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\r\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\r\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\r\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\r\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\r\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\r\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\r\n v[webgl.M00] = t[webgl.M00] * inv_det;\r\n v[webgl.M01] = t[webgl.M01] * inv_det;\r\n v[webgl.M02] = t[webgl.M02] * inv_det;\r\n v[webgl.M03] = t[webgl.M03] * inv_det;\r\n v[webgl.M10] = t[webgl.M10] * inv_det;\r\n v[webgl.M11] = t[webgl.M11] * inv_det;\r\n v[webgl.M12] = t[webgl.M12] * inv_det;\r\n v[webgl.M13] = t[webgl.M13] * inv_det;\r\n v[webgl.M20] = t[webgl.M20] * inv_det;\r\n v[webgl.M21] = t[webgl.M21] * inv_det;\r\n v[webgl.M22] = t[webgl.M22] * inv_det;\r\n v[webgl.M23] = t[webgl.M23] * inv_det;\r\n v[webgl.M30] = t[webgl.M30] * inv_det;\r\n v[webgl.M31] = t[webgl.M31] * inv_det;\r\n v[webgl.M32] = t[webgl.M32] * inv_det;\r\n v[webgl.M33] = t[webgl.M33] * inv_det;\r\n return this;\r\n };\r\n Matrix4.prototype.determinant = function () {\r\n var v = this.values;\r\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n };\r\n Matrix4.prototype.translate = function (x, y, z) {\r\n var v = this.values;\r\n v[webgl.M03] += x;\r\n v[webgl.M13] += y;\r\n v[webgl.M23] += z;\r\n return this;\r\n };\r\n Matrix4.prototype.copy = function () {\r\n return new Matrix4().set(this.values);\r\n };\r\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\r\n this.identity();\r\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\r\n var l_a1 = (far + near) / (near - far);\r\n var l_a2 = (2 * far * near) / (near - far);\r\n var v = this.values;\r\n v[webgl.M00] = l_fd / aspectRatio;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = l_fd;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = l_a1;\r\n v[webgl.M32] = -1;\r\n v[webgl.M03] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M23] = l_a2;\r\n v[webgl.M33] = 0;\r\n return this;\r\n };\r\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\r\n return this.ortho(x, x + width, y, y + height, 0, 1);\r\n };\r\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\r\n this.identity();\r\n var x_orth = 2 / (right - left);\r\n var y_orth = 2 / (top - bottom);\r\n var z_orth = -2 / (far - near);\r\n var tx = -(right + left) / (right - left);\r\n var ty = -(top + bottom) / (top - bottom);\r\n var tz = -(far + near) / (far - near);\r\n var v = this.values;\r\n v[webgl.M00] = x_orth;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = y_orth;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = z_orth;\r\n v[webgl.M32] = 0;\r\n v[webgl.M03] = tx;\r\n v[webgl.M13] = ty;\r\n v[webgl.M23] = tz;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.multiply = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\r\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\r\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\r\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\r\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\r\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\r\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\r\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\r\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\r\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\r\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\r\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\r\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\r\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\r\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\r\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.multiplyLeft = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\r\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\r\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\r\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\r\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\r\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\r\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\r\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\r\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\r\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\r\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\r\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\r\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\r\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\r\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\r\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.lookAt = function (position, direction, up) {\r\n Matrix4.initTemps();\r\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\r\n zAxis.setFrom(direction).normalize();\r\n xAxis.setFrom(direction).normalize();\r\n xAxis.cross(up).normalize();\r\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\r\n this.identity();\r\n var val = this.values;\r\n val[webgl.M00] = xAxis.x;\r\n val[webgl.M01] = xAxis.y;\r\n val[webgl.M02] = xAxis.z;\r\n val[webgl.M10] = yAxis.x;\r\n val[webgl.M11] = yAxis.y;\r\n val[webgl.M12] = yAxis.z;\r\n val[webgl.M20] = -zAxis.x;\r\n val[webgl.M21] = -zAxis.y;\r\n val[webgl.M22] = -zAxis.z;\r\n Matrix4.tmpMatrix.identity();\r\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\r\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\r\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\r\n this.multiply(Matrix4.tmpMatrix);\r\n return this;\r\n };\r\n Matrix4.initTemps = function () {\r\n if (Matrix4.xAxis === null)\r\n Matrix4.xAxis = new webgl.Vector3();\r\n if (Matrix4.yAxis === null)\r\n Matrix4.yAxis = new webgl.Vector3();\r\n if (Matrix4.zAxis === null)\r\n Matrix4.zAxis = new webgl.Vector3();\r\n };\r\n Matrix4.xAxis = null;\r\n Matrix4.yAxis = null;\r\n Matrix4.zAxis = null;\r\n Matrix4.tmpMatrix = new Matrix4();\r\n return Matrix4;\r\n }());\r\n webgl.Matrix4 = Matrix4;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Mesh = (function () {\r\n function Mesh(context, attributes, maxVertices, maxIndices) {\r\n this.attributes = attributes;\r\n this.verticesLength = 0;\r\n this.dirtyVertices = false;\r\n this.indicesLength = 0;\r\n this.dirtyIndices = false;\r\n this.elementsPerVertex = 0;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.elementsPerVertex = 0;\r\n for (var i = 0; i < attributes.length; i++) {\r\n this.elementsPerVertex += attributes[i].numElements;\r\n }\r\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\r\n this.indices = new Uint16Array(maxIndices);\r\n this.context.addRestorable(this);\r\n }\r\n Mesh.prototype.getAttributes = function () { return this.attributes; };\r\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\r\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\r\n Mesh.prototype.setVerticesLength = function (length) {\r\n this.dirtyVertices = true;\r\n this.verticesLength = length;\r\n };\r\n Mesh.prototype.getVertices = function () { return this.vertices; };\r\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\r\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\r\n Mesh.prototype.setIndicesLength = function (length) {\r\n this.dirtyIndices = true;\r\n this.indicesLength = length;\r\n };\r\n Mesh.prototype.getIndices = function () { return this.indices; };\r\n ;\r\n Mesh.prototype.getVertexSizeInFloats = function () {\r\n var size = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attribute = this.attributes[i];\r\n size += attribute.numElements;\r\n }\r\n return size;\r\n };\r\n Mesh.prototype.setVertices = function (vertices) {\r\n this.dirtyVertices = true;\r\n if (vertices.length > this.vertices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\r\n this.vertices.set(vertices, 0);\r\n this.verticesLength = vertices.length;\r\n };\r\n Mesh.prototype.setIndices = function (indices) {\r\n this.dirtyIndices = true;\r\n if (indices.length > this.indices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\r\n this.indices.set(indices, 0);\r\n this.indicesLength = indices.length;\r\n };\r\n Mesh.prototype.draw = function (shader, primitiveType) {\r\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\r\n };\r\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices || this.dirtyIndices)\r\n this.update();\r\n this.bind(shader);\r\n if (this.indicesLength > 0) {\r\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\r\n }\r\n else {\r\n gl.drawArrays(primitiveType, offset, count);\r\n }\r\n this.unbind(shader);\r\n };\r\n Mesh.prototype.bind = function (shader) {\r\n var gl = this.context.gl;\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n var offset = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_1 = shader.getAttributeLocation(attrib.name);\r\n gl.enableVertexAttribArray(location_1);\r\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\r\n offset += attrib.numElements;\r\n }\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n };\r\n Mesh.prototype.unbind = function (shader) {\r\n var gl = this.context.gl;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_2 = shader.getAttributeLocation(attrib.name);\r\n gl.disableVertexAttribArray(location_2);\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\r\n };\r\n Mesh.prototype.update = function () {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices) {\r\n if (!this.verticesBuffer) {\r\n this.verticesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyVertices = false;\r\n }\r\n if (this.dirtyIndices) {\r\n if (!this.indicesBuffer) {\r\n this.indicesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyIndices = false;\r\n }\r\n };\r\n Mesh.prototype.restore = function () {\r\n this.verticesBuffer = null;\r\n this.indicesBuffer = null;\r\n this.update();\r\n };\r\n Mesh.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteBuffer(this.verticesBuffer);\r\n gl.deleteBuffer(this.indicesBuffer);\r\n };\r\n return Mesh;\r\n }());\r\n webgl.Mesh = Mesh;\r\n var VertexAttribute = (function () {\r\n function VertexAttribute(name, type, numElements) {\r\n this.name = name;\r\n this.type = type;\r\n this.numElements = numElements;\r\n }\r\n return VertexAttribute;\r\n }());\r\n webgl.VertexAttribute = VertexAttribute;\r\n var Position2Attribute = (function (_super) {\r\n __extends(Position2Attribute, _super);\r\n function Position2Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\r\n }\r\n return Position2Attribute;\r\n }(VertexAttribute));\r\n webgl.Position2Attribute = Position2Attribute;\r\n var Position3Attribute = (function (_super) {\r\n __extends(Position3Attribute, _super);\r\n function Position3Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\r\n }\r\n return Position3Attribute;\r\n }(VertexAttribute));\r\n webgl.Position3Attribute = Position3Attribute;\r\n var TexCoordAttribute = (function (_super) {\r\n __extends(TexCoordAttribute, _super);\r\n function TexCoordAttribute(unit) {\r\n if (unit === void 0) { unit = 0; }\r\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\r\n }\r\n return TexCoordAttribute;\r\n }(VertexAttribute));\r\n webgl.TexCoordAttribute = TexCoordAttribute;\r\n var ColorAttribute = (function (_super) {\r\n __extends(ColorAttribute, _super);\r\n function ColorAttribute() {\r\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\r\n }\r\n return ColorAttribute;\r\n }(VertexAttribute));\r\n webgl.ColorAttribute = ColorAttribute;\r\n var Color2Attribute = (function (_super) {\r\n __extends(Color2Attribute, _super);\r\n function Color2Attribute() {\r\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\r\n }\r\n return Color2Attribute;\r\n }(VertexAttribute));\r\n webgl.Color2Attribute = Color2Attribute;\r\n var VertexAttributeType;\r\n (function (VertexAttributeType) {\r\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\r\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var PolygonBatcher = (function () {\r\n function PolygonBatcher(context, twoColorTint, maxVertices) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n var attributes = twoColorTint ?\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\r\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n PolygonBatcher.prototype.begin = function (shader) {\r\n var gl = this.context.gl;\r\n if (this.isDrawing)\r\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\r\n this.drawCalls = 0;\r\n this.shader = shader;\r\n this.lastTexture = null;\r\n this.isDrawing = true;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\r\n if (texture != this.lastTexture) {\r\n this.flush();\r\n this.lastTexture = texture;\r\n }\r\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\r\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\r\n this.flush();\r\n }\r\n var indexStart = this.mesh.numVertices();\r\n this.mesh.getVertices().set(vertices, this.verticesLength);\r\n this.verticesLength += vertices.length;\r\n this.mesh.setVerticesLength(this.verticesLength);\r\n var indicesArray = this.mesh.getIndices();\r\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\r\n indicesArray[i] = indices[j] + indexStart;\r\n this.indicesLength += indices.length;\r\n this.mesh.setIndicesLength(this.indicesLength);\r\n };\r\n PolygonBatcher.prototype.flush = function () {\r\n var gl = this.context.gl;\r\n if (this.verticesLength == 0)\r\n return;\r\n this.lastTexture.bind();\r\n this.mesh.draw(this.shader, gl.TRIANGLES);\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.mesh.setVerticesLength(0);\r\n this.mesh.setIndicesLength(0);\r\n this.drawCalls++;\r\n };\r\n PolygonBatcher.prototype.end = function () {\r\n var gl = this.context.gl;\r\n if (!this.isDrawing)\r\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\r\n if (this.verticesLength > 0 || this.indicesLength > 0)\r\n this.flush();\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.isDrawing = false;\r\n gl.disable(gl.BLEND);\r\n };\r\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\r\n PolygonBatcher.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return PolygonBatcher;\r\n }());\r\n webgl.PolygonBatcher = PolygonBatcher;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SceneRenderer = (function () {\r\n function SceneRenderer(canvas, context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.twoColorTint = false;\r\n this.activeRenderer = null;\r\n this.QUAD = [\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n ];\r\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n this.WHITE = new spine.Color(1, 1, 1, 1);\r\n this.canvas = canvas;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.twoColorTint = twoColorTint;\r\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\r\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\r\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\r\n this.shapesShader = webgl.Shader.newColored(this.context);\r\n this.shapes = new webgl.ShapeRenderer(this.context);\r\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\r\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\r\n }\r\n SceneRenderer.prototype.begin = function () {\r\n this.camera.update();\r\n this.enableRenderer(this.batcher);\r\n };\r\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n this.enableRenderer(this.batcher);\r\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\r\n };\r\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n this.enableRenderer(this.shapes);\r\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\r\n };\r\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var worldOriginX = x + pivotX;\r\n var worldOriginY = y + pivotY;\r\n var fx = -pivotX;\r\n var fy = -pivotY;\r\n var fx2 = width - pivotX;\r\n var fy2 = height - pivotY;\r\n var p1x = fx;\r\n var p1y = fy;\r\n var p2x = fx;\r\n var p2y = fy2;\r\n var p3x = fx2;\r\n var p3y = fy2;\r\n var p4x = fx2;\r\n var p4y = fy;\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 0;\r\n var y2 = 0;\r\n var x3 = 0;\r\n var y3 = 0;\r\n var x4 = 0;\r\n var y4 = 0;\r\n if (angle != 0) {\r\n var cos = spine.MathUtils.cosDeg(angle);\r\n var sin = spine.MathUtils.sinDeg(angle);\r\n x1 = cos * p1x - sin * p1y;\r\n y1 = sin * p1x + cos * p1y;\r\n x4 = cos * p2x - sin * p2y;\r\n y4 = sin * p2x + cos * p2y;\r\n x3 = cos * p3x - sin * p3y;\r\n y3 = sin * p3x + cos * p3y;\r\n x2 = x3 + (x1 - x4);\r\n y2 = y3 + (y1 - y4);\r\n }\r\n else {\r\n x1 = p1x;\r\n y1 = p1y;\r\n x4 = p2x;\r\n y4 = p2y;\r\n x3 = p3x;\r\n y3 = p3y;\r\n x2 = p4x;\r\n y2 = p4y;\r\n }\r\n x1 += worldOriginX;\r\n y1 += worldOriginY;\r\n x2 += worldOriginX;\r\n y2 += worldOriginY;\r\n x3 += worldOriginX;\r\n y3 += worldOriginY;\r\n x4 += worldOriginX;\r\n y4 += worldOriginY;\r\n var i = 0;\r\n quad[i++] = x1;\r\n quad[i++] = y1;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x2;\r\n quad[i++] = y2;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x3;\r\n quad[i++] = y3;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x4;\r\n quad[i++] = y4;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.line(x, y, x2, y2, color);\r\n };\r\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\r\n };\r\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\r\n };\r\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rect(filled, x, y, width, height, color);\r\n };\r\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\r\n };\r\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.polygon(polygonVertices, offset, count, color);\r\n };\r\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.circle(filled, x, y, radius, color, segments);\r\n };\r\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\r\n };\r\n SceneRenderer.prototype.end = function () {\r\n if (this.activeRenderer === this.batcher)\r\n this.batcher.end();\r\n else if (this.activeRenderer === this.shapes)\r\n this.shapes.end();\r\n this.activeRenderer = null;\r\n };\r\n SceneRenderer.prototype.resize = function (resizeMode) {\r\n var canvas = this.canvas;\r\n var w = canvas.clientWidth;\r\n var h = canvas.clientHeight;\r\n if (canvas.width != w || canvas.height != h) {\r\n canvas.width = w;\r\n canvas.height = h;\r\n }\r\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\r\n if (resizeMode === ResizeMode.Stretch) {\r\n }\r\n else if (resizeMode === ResizeMode.Expand) {\r\n this.camera.setViewport(w, h);\r\n }\r\n else if (resizeMode === ResizeMode.Fit) {\r\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\r\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\r\n var targetRatio = targetHeight / targetWidth;\r\n var sourceRatio = sourceHeight / sourceWidth;\r\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\r\n this.camera.viewportWidth = sourceWidth * scale;\r\n this.camera.viewportHeight = sourceHeight * scale;\r\n }\r\n this.camera.update();\r\n };\r\n SceneRenderer.prototype.enableRenderer = function (renderer) {\r\n if (this.activeRenderer === renderer)\r\n return;\r\n this.end();\r\n if (renderer instanceof webgl.PolygonBatcher) {\r\n this.batcherShader.bind();\r\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.batcherShader.setUniformi(\"u_texture\", 0);\r\n this.batcher.begin(this.batcherShader);\r\n this.activeRenderer = this.batcher;\r\n }\r\n else if (renderer instanceof webgl.ShapeRenderer) {\r\n this.shapesShader.bind();\r\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.shapes.begin(this.shapesShader);\r\n this.activeRenderer = this.shapes;\r\n }\r\n else {\r\n this.activeRenderer = this.skeletonDebugRenderer;\r\n }\r\n };\r\n SceneRenderer.prototype.dispose = function () {\r\n this.batcher.dispose();\r\n this.batcherShader.dispose();\r\n this.shapes.dispose();\r\n this.shapesShader.dispose();\r\n this.skeletonDebugRenderer.dispose();\r\n };\r\n return SceneRenderer;\r\n }());\r\n webgl.SceneRenderer = SceneRenderer;\r\n var ResizeMode;\r\n (function (ResizeMode) {\r\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\r\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\r\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\r\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Shader = (function () {\r\n function Shader(context, vertexShader, fragmentShader) {\r\n this.vertexShader = vertexShader;\r\n this.fragmentShader = fragmentShader;\r\n this.vs = null;\r\n this.fs = null;\r\n this.program = null;\r\n this.tmp2x2 = new Float32Array(2 * 2);\r\n this.tmp3x3 = new Float32Array(3 * 3);\r\n this.tmp4x4 = new Float32Array(4 * 4);\r\n this.vsSource = vertexShader;\r\n this.fsSource = fragmentShader;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.context.addRestorable(this);\r\n this.compile();\r\n }\r\n Shader.prototype.getProgram = function () { return this.program; };\r\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\r\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\r\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\r\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\r\n Shader.prototype.compile = function () {\r\n var gl = this.context.gl;\r\n try {\r\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\r\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\r\n this.program = this.compileProgram(this.vs, this.fs);\r\n }\r\n catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n };\r\n Shader.prototype.compileShader = function (type, source) {\r\n var gl = this.context.gl;\r\n var shader = gl.createShader(type);\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\r\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\r\n gl.deleteShader(shader);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return shader;\r\n };\r\n Shader.prototype.compileProgram = function (vs, fs) {\r\n var gl = this.context.gl;\r\n var program = gl.createProgram();\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\r\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\r\n gl.deleteProgram(program);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return program;\r\n };\r\n Shader.prototype.restore = function () {\r\n this.compile();\r\n };\r\n Shader.prototype.bind = function () {\r\n this.context.gl.useProgram(this.program);\r\n };\r\n Shader.prototype.unbind = function () {\r\n this.context.gl.useProgram(null);\r\n };\r\n Shader.prototype.setUniformi = function (uniform, value) {\r\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniformf = function (uniform, value) {\r\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\r\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\r\n };\r\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\r\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\r\n };\r\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\r\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\r\n };\r\n Shader.prototype.setUniform2x2f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp2x2.set(value);\r\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\r\n };\r\n Shader.prototype.setUniform3x3f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp3x3.set(value);\r\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\r\n };\r\n Shader.prototype.setUniform4x4f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp4x4.set(value);\r\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\r\n };\r\n Shader.prototype.getUniformLocation = function (uniform) {\r\n var gl = this.context.gl;\r\n var location = gl.getUniformLocation(this.program, uniform);\r\n if (!location && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for uniform \".concat(uniform));\r\n return location;\r\n };\r\n Shader.prototype.getAttributeLocation = function (attribute) {\r\n var gl = this.context.gl;\r\n var location = gl.getAttribLocation(this.program, attribute);\r\n if (location == -1 && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for attribute \".concat(attribute));\r\n return location;\r\n };\r\n Shader.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n if (this.vs) {\r\n gl.deleteShader(this.vs);\r\n this.vs = null;\r\n }\r\n if (this.fs) {\r\n gl.deleteShader(this.fs);\r\n this.fs = null;\r\n }\r\n if (this.program) {\r\n gl.deleteProgram(this.program);\r\n this.program = null;\r\n }\r\n };\r\n Shader.newColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(Shader.MVP_MATRIX, \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(Shader.POSITION, \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\");\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newTwoColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\tattribute vec2 \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(Shader.MVP_MATRIX, \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tv_dark = \").concat(Shader.COLOR2, \";\\n\\t\\t\\t\\t\\tv_texCoords = \").concat(Shader.TEXCOORDS, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(Shader.POSITION, \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\");\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newColored = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \".concat(Shader.POSITION, \";\\n\\t\\t\\t\\tattribute vec4 \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\tuniform mat4 \").concat(Shader.MVP_MATRIX, \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \").concat(Shader.COLOR, \";\\n\\t\\t\\t\\t\\tgl_Position = \").concat(Shader.MVP_MATRIX, \" * \").concat(Shader.POSITION, \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\");\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.MVP_MATRIX = \"u_projTrans\";\r\n Shader.POSITION = \"a_position\";\r\n Shader.COLOR = \"a_color\";\r\n Shader.COLOR2 = \"a_color2\";\r\n Shader.TEXCOORDS = \"a_texCoords\";\r\n Shader.SAMPLER = \"u_texture\";\r\n return Shader;\r\n }());\r\n webgl.Shader = Shader;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ShapeRenderer = (function () {\r\n function ShapeRenderer(context, maxVertices) {\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shapeType = ShapeType.Filled;\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.vertexIndex = 0;\r\n this.tmp = new spine.Vector2();\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n ShapeRenderer.prototype.begin = function (shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has already been called\");\r\n this.shader = shader;\r\n this.vertexIndex = 0;\r\n this.isDrawing = true;\r\n var gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n ShapeRenderer.prototype.setColor = function (color) {\r\n this.color.setFromColor(color);\r\n };\r\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\r\n this.color.set(r, g, b, a);\r\n };\r\n ShapeRenderer.prototype.point = function (x, y, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Point, 1);\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n };\r\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, 2);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color);\r\n this.vertex(x3, y3, color2);\r\n this.vertex(x3, y3, color);\r\n this.vertex(x, y, color2);\r\n }\r\n };\r\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (color4 === null)\r\n color4 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\r\n };\r\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\r\n if (color === null)\r\n color = this.color;\r\n var t = this.tmp.set(y2 - y1, x1 - x2);\r\n t.normalize();\r\n width *= 0.5;\r\n var tx = t.x * width;\r\n var ty = t.y * width;\r\n if (!filled) {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n else {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.x = function (x, y, size) {\r\n this.line(x - size, y - size, x + size, y + size);\r\n this.line(x - size, y + size, x + size, y - size);\r\n };\r\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n if (count < 3)\r\n throw new Error(\"Polygon must contain at least 3 vertices\");\r\n this.check(ShapeType.Line, count * 2);\r\n if (color === null)\r\n color = this.color;\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n offset <<= 1;\r\n count <<= 1;\r\n var firstX = polygonVertices[offset];\r\n var firstY = polygonVertices[offset + 1];\r\n var last = offset + count;\r\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\r\n var x1 = polygonVertices[i];\r\n var y1 = polygonVertices[i + 1];\r\n var x2 = 0;\r\n var y2 = 0;\r\n if (i + 2 >= last) {\r\n x2 = firstX;\r\n y2 = firstY;\r\n }\r\n else {\r\n x2 = polygonVertices[i + 2];\r\n y2 = polygonVertices[i + 3];\r\n }\r\n this.vertex(x1, y1, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n if (segments === 0)\r\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\r\n if (segments <= 0)\r\n throw new Error(\"segments must be > 0.\");\r\n if (color === null)\r\n color = this.color;\r\n var angle = 2 * spine.MathUtils.PI / segments;\r\n var cos = Math.cos(angle);\r\n var sin = Math.sin(angle);\r\n var cx = radius, cy = 0;\r\n if (!filled) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_1 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_1 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n else {\r\n this.check(ShapeType.Filled, segments * 3 + 3);\r\n segments--;\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n var temp = cx;\r\n cx = radius;\r\n cy = 0;\r\n this.vertex(x + cx, y + cy, color);\r\n };\r\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n if (color === null)\r\n color = this.color;\r\n var subdiv_step = 1 / segments;\r\n var subdiv_step2 = subdiv_step * subdiv_step;\r\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\r\n var pre1 = 3 * subdiv_step;\r\n var pre2 = 3 * subdiv_step2;\r\n var pre4 = 6 * subdiv_step2;\r\n var pre5 = 6 * subdiv_step3;\r\n var tmp1x = x1 - cx1 * 2 + cx2;\r\n var tmp1y = y1 - cy1 * 2 + cy2;\r\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\r\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\r\n var fx = x1;\r\n var fy = y1;\r\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\r\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\r\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\r\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\r\n var dddfx = tmp2x * pre5;\r\n var dddfy = tmp2y * pre5;\r\n while (segments-- > 0) {\r\n this.vertex(fx, fy, color);\r\n fx += dfx;\r\n fy += dfy;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n this.vertex(fx, fy, color);\r\n }\r\n this.vertex(fx, fy, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.vertex = function (x, y, color) {\r\n var idx = this.vertexIndex;\r\n var vertices = this.mesh.getVertices();\r\n vertices[idx++] = x;\r\n vertices[idx++] = y;\r\n vertices[idx++] = color.r;\r\n vertices[idx++] = color.g;\r\n vertices[idx++] = color.b;\r\n vertices[idx++] = color.a;\r\n this.vertexIndex = idx;\r\n };\r\n ShapeRenderer.prototype.end = function () {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n this.flush();\r\n this.context.gl.disable(this.context.gl.BLEND);\r\n this.isDrawing = false;\r\n };\r\n ShapeRenderer.prototype.flush = function () {\r\n if (this.vertexIndex == 0)\r\n return;\r\n this.mesh.setVerticesLength(this.vertexIndex);\r\n this.mesh.draw(this.shader, this.shapeType);\r\n this.vertexIndex = 0;\r\n };\r\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n if (this.shapeType == shapeType) {\r\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\r\n this.flush();\r\n else\r\n return;\r\n }\r\n else {\r\n this.flush();\r\n this.shapeType = shapeType;\r\n }\r\n };\r\n ShapeRenderer.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return ShapeRenderer;\r\n }());\r\n webgl.ShapeRenderer = ShapeRenderer;\r\n var ShapeType;\r\n (function (ShapeType) {\r\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\r\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\r\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\r\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SkeletonDebugRenderer = (function () {\r\n function SkeletonDebugRenderer(context) {\r\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\r\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\r\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\r\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\r\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\r\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\r\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\r\n this.drawBones = true;\r\n this.drawRegionAttachments = true;\r\n this.drawBoundingBoxes = true;\r\n this.drawMeshHull = true;\r\n this.drawMeshTriangles = true;\r\n this.drawPaths = true;\r\n this.drawSkeletonXY = false;\r\n this.drawClipping = true;\r\n this.premultipliedAlpha = false;\r\n this.scale = 1;\r\n this.boneWidth = 2;\r\n this.bounds = new spine.SkeletonBounds();\r\n this.temp = new Array();\r\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n }\r\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n var skeletonX = skeleton.x;\r\n var skeletonY = skeleton.y;\r\n var gl = this.context.gl;\r\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\r\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\r\n var bones = skeleton.bones;\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneLineColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n if (bone.parent == null)\r\n continue;\r\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\r\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\r\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\r\n }\r\n if (this.drawSkeletonXY)\r\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\r\n }\r\n if (this.drawRegionAttachments) {\r\n shapes.setColor(this.attachmentLineColor);\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n var vertices = this.vertices;\r\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\r\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\r\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\r\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\r\n }\r\n }\r\n }\r\n if (this.drawMeshHull || this.drawMeshTriangles) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.MeshAttachment))\r\n continue;\r\n var mesh = attachment;\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\r\n var triangles = mesh.triangles;\r\n var hullLength = mesh.hullLength;\r\n if (this.drawMeshTriangles) {\r\n shapes.setColor(this.triangleLineColor);\r\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\r\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\r\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\r\n }\r\n }\r\n if (this.drawMeshHull && hullLength > 0) {\r\n shapes.setColor(this.attachmentLineColor);\r\n hullLength = (hullLength >> 1) * 2;\r\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\r\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n shapes.line(x, y, lastX, lastY);\r\n lastX = x;\r\n lastY = y;\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawBoundingBoxes) {\r\n var bounds = this.bounds;\r\n bounds.update(skeleton, true);\r\n shapes.setColor(this.aabbColor);\r\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\r\n var polygons = bounds.polygons;\r\n var boxes = bounds.boundingBoxes;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n shapes.setColor(boxes[i].color);\r\n shapes.polygon(polygon, 0, polygon.length);\r\n }\r\n }\r\n if (this.drawPaths) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n continue;\r\n var path = attachment;\r\n var nn = path.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n var color = this.pathColor;\r\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\r\n if (path.closed) {\r\n shapes.setColor(color);\r\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\r\n x2 = world[nn - 4];\r\n y2 = world[nn - 3];\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n }\r\n nn -= 4;\r\n for (var ii = 4; ii < nn; ii += 6) {\r\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\r\n x2 = world[ii + 4];\r\n y2 = world[ii + 5];\r\n shapes.setColor(color);\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n }\r\n }\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneOriginColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\r\n }\r\n }\r\n if (this.drawClipping) {\r\n var slots = skeleton.slots;\r\n shapes.setColor(this.clipColor);\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.ClippingAttachment))\r\n continue;\r\n var clip = attachment;\r\n var nn = clip.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\r\n var x = world[i_17];\r\n var y = world[i_17 + 1];\r\n var x2 = world[(i_17 + 2) % world.length];\r\n var y2 = world[(i_17 + 3) % world.length];\r\n shapes.line(x, y, x2, y2);\r\n }\r\n }\r\n }\r\n };\r\n SkeletonDebugRenderer.prototype.dispose = function () {\r\n };\r\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\r\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\r\n return SkeletonDebugRenderer;\r\n }());\r\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Renderable = (function () {\r\n function Renderable(vertices, numVertices, numFloats) {\r\n this.vertices = vertices;\r\n this.numVertices = numVertices;\r\n this.numFloats = numFloats;\r\n }\r\n return Renderable;\r\n }());\r\n ;\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.premultipliedAlpha = false;\r\n this.vertexEffect = null;\r\n this.tempColor = new spine.Color();\r\n this.tempColor2 = new spine.Color();\r\n this.vertexSize = 2 + 2 + 4;\r\n this.twoColorTint = false;\r\n this.renderable = new Renderable(null, 0, 0);\r\n this.clipper = new spine.SkeletonClipping();\r\n this.temp = new spine.Vector2();\r\n this.temp2 = new spine.Vector2();\r\n this.temp3 = new spine.Color();\r\n this.temp4 = new spine.Color();\r\n this.twoColorTint = twoColorTint;\r\n if (twoColorTint)\r\n this.vertexSize += 4;\r\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\r\n }\r\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n var clipper = this.clipper;\r\n var premultipliedAlpha = this.premultipliedAlpha;\r\n var twoColorTint = this.twoColorTint;\r\n var blendMode = null;\r\n var tempPos = this.temp;\r\n var tempUv = this.temp2;\r\n var tempLight = this.temp3;\r\n var tempDark = this.temp4;\r\n var renderable = this.renderable;\r\n var uvs = null;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n var attachmentColor = null;\r\n var skeletonColor = skeleton.color;\r\n var vertexSize = twoColorTint ? 12 : 8;\r\n var inRange = false;\r\n if (slotRangeStart == -1)\r\n inRange = true;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\r\n inRange = true;\r\n }\r\n if (!inRange) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\r\n inRange = false;\r\n }\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var region = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = 4;\r\n renderable.numFloats = clippedVertexSize << 2;\r\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n uvs = region.uvs;\r\n texture = region.region.renderObject.texture;\r\n attachmentColor = region.color;\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\r\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\r\n if (renderable.numFloats > renderable.vertices.length) {\r\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\r\n }\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture;\r\n uvs = mesh.uvs;\r\n attachmentColor = mesh.color;\r\n }\r\n else if (attachment instanceof spine.ClippingAttachment) {\r\n var clip = (attachment);\r\n clipper.clipStart(slot, clip);\r\n continue;\r\n }\r\n else {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (texture != null) {\r\n var slotColor = slot.color;\r\n var finalColor = this.tempColor;\r\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\r\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\r\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\r\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n if (premultipliedAlpha) {\r\n finalColor.r *= finalColor.a;\r\n finalColor.g *= finalColor.a;\r\n finalColor.b *= finalColor.a;\r\n }\r\n var darkColor = this.tempColor2;\r\n if (slot.darkColor == null)\r\n darkColor.set(0, 0, 0, 1.0);\r\n else {\r\n if (premultipliedAlpha) {\r\n darkColor.r = slot.darkColor.r * finalColor.a;\r\n darkColor.g = slot.darkColor.g * finalColor.a;\r\n darkColor.b = slot.darkColor.b * finalColor.a;\r\n }\r\n else {\r\n darkColor.setFromColor(slot.darkColor);\r\n }\r\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\r\n }\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\r\n }\r\n if (clipper.isClipping()) {\r\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\r\n var clippedVertices = new Float32Array(clipper.clippedVertices);\r\n var clippedTriangles = clipper.clippedTriangles;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n var verts = clippedVertices;\r\n if (!twoColorTint) {\r\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n batcher.draw(texture, clippedVertices, clippedTriangles);\r\n }\r\n else {\r\n var verts = renderable.vertices;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n if (!twoColorTint) {\r\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.setFromColor(darkColor);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n else {\r\n if (!twoColorTint) {\r\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n }\r\n }\r\n else {\r\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n verts[v + 6] = darkColor.r;\r\n verts[v + 7] = darkColor.g;\r\n verts[v + 8] = darkColor.b;\r\n verts[v + 9] = darkColor.a;\r\n }\r\n }\r\n }\r\n var view = renderable.vertices.subarray(0, renderable.numFloats);\r\n batcher.draw(texture, view, triangles);\r\n }\r\n }\r\n clipper.clipEndWithSlot(slot);\r\n }\r\n clipper.clipEnd();\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n return SkeletonRenderer;\r\n }());\r\n webgl.SkeletonRenderer = SkeletonRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Vector3 = (function () {\r\n function Vector3(x, y, z) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n if (z === void 0) { z = 0; }\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n Vector3.prototype.setFrom = function (v) {\r\n this.x = v.x;\r\n this.y = v.y;\r\n this.z = v.z;\r\n return this;\r\n };\r\n Vector3.prototype.set = function (x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n };\r\n Vector3.prototype.add = function (v) {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n return this;\r\n };\r\n Vector3.prototype.sub = function (v) {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n return this;\r\n };\r\n Vector3.prototype.scale = function (s) {\r\n this.x *= s;\r\n this.y *= s;\r\n this.z *= s;\r\n return this;\r\n };\r\n Vector3.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len == 0)\r\n return this;\r\n len = 1 / len;\r\n this.x *= len;\r\n this.y *= len;\r\n this.z *= len;\r\n return this;\r\n };\r\n Vector3.prototype.cross = function (v) {\r\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\r\n };\r\n Vector3.prototype.multiply = function (matrix) {\r\n var l_mat = matrix.values;\r\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\r\n };\r\n Vector3.prototype.project = function (matrix) {\r\n var l_mat = matrix.values;\r\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\r\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\r\n };\r\n Vector3.prototype.dot = function (v) {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n };\r\n Vector3.prototype.length = function () {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n };\r\n Vector3.prototype.distance = function (v) {\r\n var a = v.x - this.x;\r\n var b = v.y - this.y;\r\n var c = v.z - this.z;\r\n return Math.sqrt(a * a + b * b + c * c);\r\n };\r\n return Vector3;\r\n }());\r\n webgl.Vector3 = Vector3;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ManagedWebGLRenderingContext = (function () {\r\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\r\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\r\n this.restorables = new Array();\r\n if (!((canvasOrContext instanceof WebGLRenderingContext) || (canvasOrContext instanceof WebGL2RenderingContext))) {\r\n this.setupCanvas(canvasOrContext, contextConfig);\r\n }\r\n else {\r\n this.gl = canvasOrContext;\r\n this.canvas = this.gl.canvas;\r\n }\r\n }\r\n ManagedWebGLRenderingContext.prototype.setupCanvas = function (canvas, contextConfig) {\r\n var _this = this;\r\n this.gl = (canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig));\r\n this.canvas = canvas;\r\n canvas.addEventListener(\"webglcontextlost\", function (e) {\r\n var event = e;\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n });\r\n canvas.addEventListener(\"webglcontextrestored\", function (e) {\r\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\r\n _this.restorables[i].restore();\r\n }\r\n });\r\n };\r\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\r\n this.restorables.push(restorable);\r\n };\r\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\r\n var index = this.restorables.indexOf(restorable);\r\n if (index > -1)\r\n this.restorables.splice(index, 1);\r\n };\r\n return ManagedWebGLRenderingContext;\r\n }());\r\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\r\n var WebGLBlendModeConverter = (function () {\r\n function WebGLBlendModeConverter() {\r\n }\r\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.ZERO = 0;\r\n WebGLBlendModeConverter.ONE = 1;\r\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\r\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\r\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\r\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\r\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\r\n return WebGLBlendModeConverter;\r\n }());\r\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-webgl.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\r\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\r\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\r\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\r\nvar MultiFile = require('../../../src/loader/MultiFile.js');\r\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\r\n\r\n/**\r\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\r\n *\r\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Spine File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\r\n *\r\n * @class SpineFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar SpineFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\r\n {\r\n var i;\r\n var json;\r\n var atlas;\r\n var files = [];\r\n var cache = loader.cacheManager.custom.spine;\r\n\r\n // atlas can be an array of atlas files, not just a single one\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n json = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'jsonURL'),\r\n extension: GetFastValue(config, 'jsonExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\r\n });\r\n\r\n atlasURL = GetFastValue(config, 'atlasURL');\r\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, {\r\n key: key + '!' + i,\r\n url: atlasURL[i],\r\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n else\r\n {\r\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, key + '!' + i, atlasURL[i], atlasXhrSettings);\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n\r\n files.unshift(json);\r\n\r\n MultiFile.call(this, loader, 'spine', key, files);\r\n\r\n this.config.preMultipliedAlpha = preMultipliedAlpha;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'text')\r\n {\r\n // Inspect the data for the files to now load\r\n var content = file.data.split('\\n');\r\n\r\n // Extract the textures\r\n var textures = [];\r\n\r\n for (var t = 0; t < content.length; t++)\r\n {\r\n var line = content[t];\r\n\r\n if (line.trim() === '' && t < content.length - 1)\r\n {\r\n line = content[t + 1];\r\n\r\n textures.push(line);\r\n }\r\n }\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\r\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\r\n var prefix = GetFastValue(config, 'prefix', this.prefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n var textureURL = textures[i];\r\n\r\n var key = this.key + ':' + textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n if (!loader.keyExists(image))\r\n {\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\r\n * @since 3.19.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var atlasCache;\r\n var atlasKey = '';\r\n var combinedAtlasData = '';\r\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\r\n var textureManager = this.loader.textureManager;\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'text')\r\n {\r\n atlasKey = file.key.replace(/![\\d]$/, '');\r\n\r\n atlasCache = file.cache;\r\n\r\n combinedAtlasData = combinedAtlasData.concat(file.data);\r\n }\r\n else\r\n {\r\n var src = file.key.trim();\r\n var pos = src.indexOf('!');\r\n var key = src.substr(pos + 1);\r\n\r\n if (!textureManager.exists(key))\r\n {\r\n textureManager.addImage(key, file.data);\r\n }\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetValue = require('../../../src/utils/object/GetValue');\r\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\r\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\r\nvar Spine = require('Spine');\r\nvar SpineFile = require('./SpineFile');\r\nvar SpineGameObject = require('./gameobject/SpineGameObject');\r\nvar SpineContainer = require('./container/SpineContainer');\r\nvar NOOP = require('../../../src/utils/NOOP');\r\n\r\n/**\r\n * @classdesc\r\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\r\n *\r\n * Find more details about Spine itself at http://esotericsoftware.com/.\r\n *\r\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\r\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\r\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\r\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\r\n *\r\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\r\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\r\n *\r\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\r\n *\r\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\r\n *\r\n * ```javascript\r\n * import * as SpinePlugin from './SpinePlugin.js';\r\n * ```\r\n *\r\n * and then adding it to your Phaser Game configuration:\r\n *\r\n * ```javascript\r\n * plugins: {\r\n * scene: [\r\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\r\n * ]\r\n * }\r\n * ```\r\n *\r\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\r\n * Game Configuration object, like this:\r\n *\r\n * ```javascript\r\n * scene: {\r\n * preload: preload,\r\n * create: create,\r\n * pack: {\r\n * files: [\r\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\r\n * ]\r\n * }\r\n * }\r\n * ```\r\n *\r\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\r\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\r\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\r\n * subsequent Scenes.\r\n *\r\n * ## A note about inlined data:\r\n *\r\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\r\n * at all. Instead, call the functions directly as required:\r\n *\r\n * scene.cache.json.add\r\n * scene.cache.custom.spine.add\r\n * scene.textures.addBase64\r\n *\r\n * ## Using the plugin\r\n *\r\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\r\n *\r\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\r\n * Spine files directly, i.e.:\r\n *\r\n * ```javascript\r\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\r\n * ```\r\n *\r\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\r\n * and Spine Containers:\r\n *\r\n * ```javascript\r\n * const man = this.add.spine(512, 650, 'stretchyman');\r\n *\r\n * const container = this.add.spineContainer();\r\n *\r\n * container.add(man);\r\n * ```\r\n *\r\n * The first argument is the key which you used when importing the Spine data. There are lots of\r\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\r\n * see the respective documentation and examples for further details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\r\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\r\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\r\n * load arguments, or you may see black outlines around skeleton textures.\r\n *\r\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\r\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\r\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\r\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\r\n * game, regardless if the Scene loaded the Spine data or not.\r\n *\r\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\r\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\r\n *\r\n * ```javascript\r\n * this.plugins.removeScenePlugin('SpinePlugin');\r\n * ```\r\n *\r\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\r\n *\r\n * @class SpinePlugin\r\n * @extends Phaser.Plugins.ScenePlugin\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar SpinePlugin = new Class({\r\n\r\n Extends: ScenePlugin,\r\n\r\n initialize:\r\n\r\n function SpinePlugin (scene, pluginManager, pluginKey)\r\n {\r\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\r\n\r\n var game = pluginManager.game;\r\n\r\n /**\r\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\r\n *\r\n * @name SpinePlugin#isWebGL\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isWebGL = (game.config.renderType === 2);\r\n\r\n /**\r\n * A custom cache that stores the Spine atlas data.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.cache = game.cache.addCustom('spine');\r\n\r\n /**\r\n * A custom cache that stores the Spine Textures.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#spineTextures\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.spineTextures = game.cache.addCustom('spineTextures');\r\n\r\n /**\r\n * A reference to the global JSON Cache.\r\n *\r\n * @name SpinePlugin#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.json = game.cache.json;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name SpinePlugin#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.19.0\r\n */\r\n this.textures = game.textures;\r\n\r\n /**\r\n * A flag that sets if the Skeleton Renderers will render debug information over the top\r\n * of the skeleton or not.\r\n *\r\n * @name SpinePlugin#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The underlying WebGL context of the Phaser renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.19.0\r\n */\r\n this.gl;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name SpinePlugin#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.renderer;\r\n\r\n /**\r\n * An instance of the Spine WebGL Scene Renderer.\r\n *\r\n * There is only one instance of the Scene Renderer shared across the whole plugin.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#sceneRenderer\r\n * @type {spine.webgl.SceneRenderer}\r\n * @since 3.19.0\r\n */\r\n this.sceneRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Renderer.\r\n *\r\n * @name SpinePlugin#skeletonRenderer\r\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.skeletonRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Debug Renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#skeletonDebugRenderer\r\n * @type {spine.webgl.skeletonDebugRenderer}\r\n * @since 3.19.0\r\n */\r\n this.skeletonDebugRenderer;\r\n\r\n /**\r\n * A reference to the Spine runtime.\r\n * This is the runtime created by Esoteric Software.\r\n *\r\n * @name SpinePlugin#plugin\r\n * @type {spine}\r\n * @since 3.19.0\r\n */\r\n this.plugin = Spine;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp1\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp1;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp2\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp2;\r\n\r\n if (this.isWebGL)\r\n {\r\n this.runtime = Spine.webgl;\r\n\r\n this.renderer = game.renderer;\r\n this.gl = game.renderer.gl;\r\n\r\n this.getAtlas = this.getAtlasWebGL;\r\n }\r\n else\r\n {\r\n this.runtime = Spine.canvas;\r\n\r\n this.renderer = game.renderer;\r\n\r\n this.getAtlas = this.getAtlasCanvas;\r\n }\r\n\r\n // Headless mode?\r\n if (!this.renderer)\r\n {\r\n this.renderer = {\r\n width: game.scale.width,\r\n height: game.scale.height,\r\n preRender: NOOP,\r\n postRender: NOOP,\r\n render: NOOP,\r\n destroy: NOOP\r\n };\r\n }\r\n\r\n var isWebGL = this.isWebGL;\r\n\r\n var add = function (x, y, key, animationName, loop)\r\n {\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.clear();\r\n }\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, x, y, key, animationName, loop);\r\n\r\n this.displayList.add(spineGO);\r\n this.updateList.add(spineGO);\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.rebind();\r\n }\r\n\r\n return spineGO;\r\n };\r\n\r\n var make = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.clear();\r\n }\r\n\r\n var key = GetValue(config, 'key', null);\r\n var animationName = GetValue(config, 'animationName', null);\r\n var loop = GetValue(config, 'loop', false);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 0, 0, key, animationName, loop);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, spineGO, config);\r\n\r\n // Spine specific\r\n var skinName = GetValue(config, 'skinName', false);\r\n\r\n if (skinName)\r\n {\r\n spineGO.setSkinByName(skinName);\r\n }\r\n\r\n var slotName = GetValue(config, 'slotName', false);\r\n var attachmentName = GetValue(config, 'attachmentName', null);\r\n\r\n if (slotName)\r\n {\r\n spineGO.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n if (isWebGL)\r\n {\r\n this.scene.sys.renderer.pipelines.rebind();\r\n }\r\n\r\n return spineGO.refresh();\r\n };\r\n\r\n var addContainer = function (x, y, children)\r\n {\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n this.displayList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var makeContainer = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetValue(config, 'x', 0);\r\n var y = GetValue(config, 'y', 0);\r\n var children = GetValue(config, 'children', null);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var container = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n\r\n return container;\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\r\n },\r\n\r\n /**\r\n * Internal boot handler.\r\n *\r\n * @method SpinePlugin#boot\r\n * @private\r\n * @since 3.19.0\r\n */\r\n boot: function ()\r\n {\r\n if (this.isWebGL)\r\n {\r\n this.bootWebGL();\r\n this.onResize();\r\n this.game.scale.on(ResizeEvent, this.onResize, this);\r\n }\r\n else\r\n {\r\n this.bootCanvas();\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n eventEmitter.once('destroy', this.destroy, this);\r\n\r\n this.game.events.once('destroy', this.gameDestroy, this);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the Canvas Renderer.\r\n *\r\n * @method SpinePlugin#bootCanvas\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootCanvas: function ()\r\n {\r\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the WebGL Renderer.\r\n *\r\n * @method SpinePlugin#bootWebGL\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootWebGL: function ()\r\n {\r\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\r\n\r\n var setBlendMode = function (srcBlend, dstBlend)\r\n {\r\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\r\n {\r\n var gl = this.context.gl;\r\n\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n\r\n if (this.isDrawing)\r\n {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n }\r\n };\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (!sceneRenderer)\r\n {\r\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n sceneRenderer.batcher.setBlendMode = setBlendMode;\r\n sceneRenderer.shapes.setBlendMode = setBlendMode;\r\n\r\n this.renderer.spineSceneRenderer = sceneRenderer;\r\n }\r\n\r\n // All scene share the same instance\r\n this.sceneRenderer = sceneRenderer;\r\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer;\r\n\r\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\r\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasCanvas\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasCanvas: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage());\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasWebGL\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasWebGL: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n var gl = this.sceneRenderer.context.gl;\r\n\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + key + ':' + path).getSourceImage(), false);\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\r\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\r\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\r\n * outlines around skeleton textures.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\r\n * Loading a file using a key that is already taken will result in a warning.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.spine({\r\n * key: 'mainmenu',\r\n * jsonURL: 'boy.json',\r\n * atlasURL: 'boy.atlas',\r\n * preMultipliedAlpha: true\r\n * });\r\n * ```\r\n *\r\n * If you need to load multiple Spine atlas files, provide them as an array:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\r\n * }\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the data from the Spine plugin.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spine\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.19.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {object} [settings] - An external Settings configuration object { prefix: '' }\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\r\n {\r\n var multifile;\r\n settings = settings || {};\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new SpineFile(this, key[i]);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#worldToLocal\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The screen space x coordinate to convert.\r\n * @param {number} y - The screen space y coordinate to convert.\r\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\r\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\r\n *\r\n * @return {spine.Vector2} A Vector2 containing the translated point.\r\n */\r\n worldToLocal: function (x, y, skeleton, bone)\r\n {\r\n var temp1 = this.temp1;\r\n var temp2 = this.temp2;\r\n var camera = this.sceneRenderer.camera;\r\n\r\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\r\n\r\n var width = camera.viewportWidth;\r\n var height = camera.viewportHeight;\r\n\r\n camera.screenToWorld(temp1, width, height);\r\n\r\n if (bone && bone.parent !== null)\r\n {\r\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\r\n\r\n return new Spine.Vector2(temp2.x, temp2.y);\r\n }\r\n else if (bone)\r\n {\r\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\r\n }\r\n else\r\n {\r\n return new Spine.Vector2(temp1.x, temp1.y);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x and y values.\r\n *\r\n * @method SpinePlugin#getVector2\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector2: function (x, y)\r\n {\r\n return new Spine.Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x, y and z values.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#getVector3\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n * @param {number} z - The Vector z value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector3: function (x, y, z)\r\n {\r\n return new Spine.webgl.Vector3(x, y, z);\r\n },\r\n\r\n /**\r\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBones\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBones: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBones = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugRegionAttachments\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugRegionAttachments: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawRegionAttachments = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBoundingBoxes\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBoundingBoxes: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshHull\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshHull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshHull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshTriangles\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshTriangles: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshTriangles = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugPaths\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugPaths: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawPaths = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugSkeletonXY\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugSkeletonXY: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawSkeletonXY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugClipping\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugClipping: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawClipping = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the given vertex effect on the Spine Skeleton Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setEffect\r\n * @since 3.19.0\r\n *\r\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setEffect: function (effect)\r\n {\r\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\r\n *\r\n * The Skeleton data should have already been loaded before calling this method.\r\n *\r\n * @method SpinePlugin#createSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\r\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\r\n *\r\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\r\n */\r\n createSkeleton: function (key, skeletonJSON)\r\n {\r\n var atlasKey = key;\r\n var jsonKey = key;\r\n var split = (key.indexOf('.') !== -1);\r\n\r\n if (split)\r\n {\r\n var parts = key.split('.');\r\n\r\n atlasKey = parts.shift();\r\n jsonKey = parts.join('.');\r\n }\r\n\r\n var atlasData = this.cache.get(atlasKey);\r\n var atlas = this.getAtlas(atlasKey);\r\n\r\n if (!atlas)\r\n {\r\n return null;\r\n }\r\n\r\n if (!this.spineTextures.has(atlasKey))\r\n {\r\n this.spineTextures.add(atlasKey, atlas);\r\n }\r\n\r\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\r\n\r\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\r\n\r\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\r\n\r\n var data;\r\n\r\n if (skeletonJSON)\r\n {\r\n data = skeletonJSON;\r\n }\r\n else\r\n {\r\n var json = this.json.get(atlasKey);\r\n\r\n data = (split) ? GetValue(json, jsonKey) : json;\r\n }\r\n\r\n if (data)\r\n {\r\n var skeletonData = skeletonJson.readSkeletonData(data);\r\n\r\n var skeleton = new Spine.Skeleton(skeletonData);\r\n\r\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Animation State and Animation State Data for the given skeleton.\r\n *\r\n * The returned object contains two properties: `state` and `stateData` respectively.\r\n *\r\n * @method SpinePlugin#createAnimationState\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\r\n *\r\n * @return {any} An object containing the Animation State and Animation State Data instances.\r\n */\r\n createAnimationState: function (skeleton)\r\n {\r\n var stateData = new Spine.AnimationStateData(skeleton.data);\r\n\r\n var state = new Spine.AnimationState(stateData);\r\n\r\n return { stateData: stateData, state: state };\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpinePlugin#getBounds\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function (skeleton)\r\n {\r\n var offset = new Spine.Vector2();\r\n var size = new Spine.Vector2();\r\n\r\n skeleton.getBounds(offset, size, []);\r\n\r\n return { offset: offset, size: size };\r\n },\r\n\r\n /**\r\n * Internal handler for when the renderer resizes.\r\n *\r\n * Only called if running in WebGL.\r\n *\r\n * @method SpinePlugin#onResize\r\n * @since 3.19.0\r\n */\r\n onResize: function ()\r\n {\r\n var renderer = this.renderer;\r\n var sceneRenderer = this.sceneRenderer;\r\n\r\n var viewportWidth = renderer.width;\r\n var viewportHeight = renderer.height;\r\n\r\n sceneRenderer.camera.position.x = viewportWidth / 2;\r\n sceneRenderer.camera.position.y = viewportHeight / 2;\r\n\r\n sceneRenderer.camera.setViewport(viewportWidth, viewportHeight);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n *\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method SpinePlugin#shutdown\r\n * @private\r\n * @since 3.19.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n if (this.isWebGL)\r\n {\r\n this.game.scale.off(ResizeEvent, this.onResize, this);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n *\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method SpinePlugin#destroy\r\n * @private\r\n * @since 3.19.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.cache = null;\r\n this.spineTextures = null;\r\n this.json = null;\r\n this.textures = null;\r\n this.skeletonRenderer = null;\r\n this.gl = null;\r\n },\r\n\r\n /**\r\n * The Game that owns this plugin is being destroyed.\r\n *\r\n * Dispose of the Scene Renderer and remove the Game Objects.\r\n *\r\n * @method SpinePlugin#gameDestroy\r\n * @private\r\n * @since 3.50.0\r\n */\r\n gameDestroy: function ()\r\n {\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n this.pluginManager.removeGameObject('spineContainer', true, true);\r\n\r\n this.pluginManager = null;\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (sceneRenderer)\r\n {\r\n sceneRenderer.dispose();\r\n }\r\n\r\n this.renderer.spineSceneRenderer = null;\r\n this.sceneRenderer = null;\r\n }\r\n\r\n});\r\n\r\nSpinePlugin.SpineGameObject = SpineGameObject;\r\nSpinePlugin.SpineContainer = SpineContainer;\r\n\r\n/**\r\n * Creates a new Spine Game Object and adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\r\n *\r\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\r\n *\r\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\r\n * name, then use `SpinePlugin.make` instead.\r\n *\r\n * @method SpinePlugin#add\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\n/**\r\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 500, y: 500, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-idle', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * @method SpinePlugin#make\r\n * @since 3.19.0\r\n *\r\n * @param {any} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\nmodule.exports = SpinePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../../src/utils/Class');\r\nvar Container = require('../../../../src/gameobjects/container/Container');\r\nvar SpineContainerRender = require('./SpineContainerRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\r\n *\r\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\r\n * for Spine Game Objects. You must only add ever Spine Game Objects, or other Spine Containers, to this type of Container.\r\n * Although Phaser will not prevent you from adding other types, they will not render and are likely to throw runtime errors.\r\n *\r\n * To create one in a Scene, use the factory methods:\r\n *\r\n * ```javascript\r\n * this.add.spineContainer();\r\n * ```\r\n *\r\n * or\r\n *\r\n * ```javascript\r\n * this.make.spineContainer();\r\n * ```\r\n *\r\n * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\r\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\r\n * Spine Containers. In short, if you need masking, don't mix and match the types.\r\n *\r\n * See the Container documentation for further details about what Containers can do.\r\n *\r\n * @class SpineContainer\r\n * @extends Phaser.GameObjects.Container\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\r\n */\r\nvar SpineContainer = new Class({\r\n\r\n Extends: Container,\r\n\r\n Mixins: [\r\n SpineContainerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineContainer (scene, plugin, x, y, children)\r\n {\r\n Container.call(this, scene, x, y, children);\r\n\r\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\r\n this.type = 'Spine';\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineContainer#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.50.0\r\n */\r\n this.plugin = plugin;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineContainer#preDestroy\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineContainer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineContainerWebGLRenderer#renderWebGL\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineContainer} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n var plugin = container.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n }\r\n\r\n return;\r\n }\r\n\r\n camera.addToRenderList(container);\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var rendererNextType = renderer.nextTypeMatch;\r\n\r\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\r\n renderer.nextTypeMatch = true;\r\n renderer.newType = false;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (child.willRender(camera, container))\r\n {\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.preRenderWebGL(renderer, child, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.postRenderWebGL(renderer, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n }\r\n }\r\n\r\n renderer.nextTypeMatch = rendererNextType;\r\n\r\n if (!rendererNextType || container.mask)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineContainerWebGLRenderer;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AngleBetween = require('../../../../src/math/angle/Between');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar Class = require('../../../../src/utils/Class');\r\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\r\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\r\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\r\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\r\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\r\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar DegToRad = require('../../../../src/math/DegToRad');\r\nvar GameObject = require('../../../../src/gameobjects/GameObject');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar SpineEvents = require('../events/');\r\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\r\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\r\n * easily change the skin, slot attachment, bone positions and more.\r\n *\r\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\r\n * You can only create them if the Spine plugin has been loaded into Phaser.\r\n *\r\n * The quickest way is the Game Object Factory:\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\r\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\r\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\r\n * animation to loop. Look at the documentation for further details on each of these options.\r\n *\r\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\r\n * Configuration object:\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 512, y: 550, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-think', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\r\n * overall scale.\r\n *\r\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\r\n * update and render, it must be added to the display and update lists of your Scene:\r\n *\r\n * ```javascript\r\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\r\n * this.sys.displayList.add(jelly);\r\n * this.sys.updateList.add(jelly);\r\n * ```\r\n *\r\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\r\n * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup\r\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\r\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\r\n * input shape being created. If it's not suitable, provide your own shape to the `setInteractive` method.\r\n *\r\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\r\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\r\n * Object position with it. See the examples for further details.\r\n *\r\n * If your Spine Game Object has black outlines around the different parts of the texture when it\r\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\r\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\r\n *\r\n * @class SpineGameObject\r\n * @extends Phaser.GameObjects.GameObject\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n */\r\nvar SpineGameObject = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsComputedSize,\r\n ComponentsDepth,\r\n ComponentsFlip,\r\n ComponentsScrollFactor,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n SpineGameObjectRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\r\n {\r\n GameObject.call(this, scene, 'Spine');\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineGameObject#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.19.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The Spine Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeleton\r\n * @type {spine.Skeleton}\r\n * @since 3.19.0\r\n */\r\n this.skeleton = null;\r\n\r\n /**\r\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeletonData\r\n * @type {spine.SkeletonData}\r\n * @since 3.19.0\r\n */\r\n this.skeletonData = null;\r\n\r\n /**\r\n * The Spine Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#state\r\n * @type {spine.AnimationState}\r\n * @since 3.19.0\r\n */\r\n this.state = null;\r\n\r\n /**\r\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#stateData\r\n * @type {spine.AnimationStateData}\r\n * @since 3.19.0\r\n */\r\n this.stateData = null;\r\n\r\n /**\r\n * A reference to the root bone of the Skeleton.\r\n *\r\n * @name SpineGameObject#root\r\n * @type {spine.Bone}\r\n * @since 3.19.0\r\n */\r\n this.root = null;\r\n\r\n /**\r\n * This object holds the calculated bounds of the current\r\n * pose, as set when a new Skeleton is applied.\r\n *\r\n * @name SpineGameObject#bounds\r\n * @type {any}\r\n * @since 3.19.0\r\n */\r\n this.bounds = null;\r\n\r\n /**\r\n * A Game Object level flag that allows you to enable debug drawing\r\n * to the Skeleton Debug Renderer by toggling it.\r\n *\r\n * @name SpineGameObject#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The factor to scale the Animation update time by.\r\n *\r\n * @name SpineGameObject#timeScale\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginX\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginY\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * A flag that stores if the texture associated with the current\r\n * Skin being used by this Game Object, has its alpha pre-multiplied\r\n * into it, or not.\r\n *\r\n * @name SpineGameObject#preMultipliedAlpha\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.preMultipliedAlpha = false;\r\n\r\n /**\r\n * A default Blend Mode. You cannot change the blend mode of a\r\n * Spine Game Object.\r\n *\r\n * @name SpineGameObject#blendMode\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.blendMode = -1;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key)\r\n {\r\n this.setSkeleton(key, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Returns `true` if this Spine Game Object both has a skeleton and\r\n * also passes the render tests for the given Camera.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n *\r\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function (camera, container)\r\n {\r\n var GameObjectRenderMask = 15;\r\n\r\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\r\n\r\n if (!container && !result && this.parentContainer)\r\n {\r\n var plugin = this.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\r\n {\r\n sceneRenderer.end();\r\n\r\n plugin.renderer.pipelines.rebind();\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Set the Alpha level for the whole Skeleton of this Game Object.\r\n *\r\n * The alpha controls the opacity of the Game Object as it renders.\r\n *\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method SpineGameObject#setAlpha\r\n * @since 3.19.0\r\n *\r\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value, slotName)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n slot.color.a = Clamp(value, 0, 1);\r\n }\r\n }\r\n else\r\n {\r\n this.alpha = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#alpha\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.a = v;\r\n }\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~2;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 2;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of red used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#red\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.r = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of green used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#green\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.g = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of blue used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#blue\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.b = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\r\n *\r\n * @method SpineGameObject#setColor\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\r\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setColor: function (color, slotName)\r\n {\r\n if (color === undefined) { color = 0xffffff; }\r\n\r\n var red = (color >> 16 & 0xFF) / 255;\r\n var green = (color >> 8 & 0xFF) / 255;\r\n var blue = (color & 0xFF) / 255;\r\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\r\n\r\n var target = this.skeleton;\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n target = slot;\r\n }\r\n }\r\n\r\n target.color.r = red;\r\n target.color.g = green;\r\n target.color.b = blue;\r\n\r\n if (alpha !== null)\r\n {\r\n target.color.a = alpha;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\r\n * that contains the Skeleton data.\r\n *\r\n * @method SpineGameObject#setSkeletonFromJSON\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\r\n {\r\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on its cache key.\r\n *\r\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\r\n * or slot attachment, or any other property to adjust it.\r\n *\r\n * @method SpineGameObject#setSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\r\n\r\n this.skeletonData = data.skeletonData;\r\n\r\n this.preMultipliedAlpha = data.preMultipliedAlpha;\r\n\r\n var skeleton = data.skeleton;\r\n\r\n skeleton.setSkin();\r\n skeleton.setToSetupPose();\r\n\r\n this.skeleton = skeleton;\r\n\r\n // AnimationState\r\n data = this.plugin.createAnimationState(skeleton);\r\n\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.state = data.state;\r\n this.stateData = data.stateData;\r\n\r\n this.state.addListener({\r\n event: this.onEvent.bind(this),\r\n complete: this.onComplete.bind(this),\r\n start: this.onStart.bind(this),\r\n end: this.onEnd.bind(this),\r\n dispose: this.onDispose.bind(this),\r\n interrupted: this.onInterrupted.bind(this)\r\n });\r\n\r\n if (animationName)\r\n {\r\n this.setAnimation(0, animationName, loop);\r\n }\r\n\r\n this.root = this.getRootBone();\r\n\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.state.apply(skeleton);\r\n\r\n skeleton.updateCache();\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onComplete event via this Game Object.\r\n *\r\n * @method SpineGameObject#onComplete\r\n * @fires SpinePluginEvents#COMPLETE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onComplete: function (entry)\r\n {\r\n this.emit(SpineEvents.COMPLETE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onDispose event via this Game Object.\r\n *\r\n * @method SpineGameObject#onDispose\r\n * @fires SpinePluginEvents#DISPOSE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onDispose: function (entry)\r\n {\r\n this.emit(SpineEvents.DISPOSE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onEnd event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEnd\r\n * @fires SpinePluginEvents#END\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onEnd: function (entry)\r\n {\r\n this.emit(SpineEvents.END, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine Event event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEvent\r\n * @fires SpinePluginEvents#EVENT\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n * @param {spine.Event} event - The Spine event.\r\n */\r\n onEvent: function (entry, event)\r\n {\r\n this.emit(SpineEvents.EVENT, entry, event);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\r\n *\r\n * @method SpineGameObject#onInterrupted\r\n * @fires SpinePluginEvents#INTERRUPTED\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onInterrupted: function (entry)\r\n {\r\n this.emit(SpineEvents.INTERRUPTED, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onStart event via this Game Object.\r\n *\r\n * @method SpineGameObject#onStart\r\n * @fires SpinePluginEvents#START\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onStart: function (entry)\r\n {\r\n this.emit(SpineEvents.START, entry);\r\n },\r\n\r\n /**\r\n * Refreshes the data about the current Skeleton.\r\n *\r\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\r\n *\r\n * Call this method if you need to access the Skeleton data directly, and it may have changed\r\n * recently.\r\n *\r\n * @method SpineGameObject#refresh\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n refresh: function ()\r\n {\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.updateSize();\r\n\r\n this.skeleton.updateCache();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n *\r\n * If no arguments are given it uses the current skeleton data dimensions.\r\n *\r\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\r\n * when the skeleton data doesn't match what is required in-game.\r\n *\r\n * @method SpineGameObject#setSize\r\n * @since 3.19.0\r\n *\r\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\r\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSize: function (width, height, offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (width === undefined) { width = skeleton.data.width; }\r\n if (height === undefined) { height = skeleton.data.height; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of this Game Object from the Skeleton position.\r\n *\r\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\r\n *\r\n * @method SpineGameObject#setOffset\r\n * @since 3.19.0\r\n *\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setOffset: function (offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\r\n * It then syncs the skeleton bounds back to this Game Object.\r\n *\r\n * This method is called automatically as needed internally, however, it's also exposed should\r\n * you require overriding the size settings.\r\n *\r\n * @method SpineGameObject#updateSize\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n updateSize: function ()\r\n {\r\n var skeleton = this.skeleton;\r\n var renderer = this.plugin.renderer;\r\n\r\n var height = renderer.height;\r\n\r\n var oldScaleX = this.scaleX;\r\n var oldScaleY = this.scaleY;\r\n\r\n skeleton.x = this.x;\r\n skeleton.y = height - this.y;\r\n skeleton.scaleX = 1;\r\n skeleton.scaleY = 1;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n var bounds = this.getBounds();\r\n\r\n this.width = bounds.size.x;\r\n this.height = bounds.size.y;\r\n\r\n this.displayOriginX = this.x - bounds.offset.x;\r\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\r\n\r\n skeleton.scaleX = oldScaleX;\r\n skeleton.scaleY = oldScaleY;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the bones in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getBoneList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\r\n */\r\n getBoneList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.bones.length; i++)\r\n {\r\n output.push(skeletonData.bones[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the skins in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getSkinList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\r\n */\r\n getSkinList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.skins.length; i++)\r\n {\r\n output.push(skeletonData.skins[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the slots in the Skeleton.\r\n *\r\n * @method SpineGameObject#getSlotList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\r\n */\r\n getSlotList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeleton = this.skeleton;\r\n\r\n for (var i = 0; i < skeleton.slots.length; i++)\r\n {\r\n output.push(skeleton.slots[i].data.name);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the animations in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getAnimationList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\r\n */\r\n getAnimationList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.animations.length; i++)\r\n {\r\n output.push(skeletonData.animations[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the current animation being played on the given track, if any.\r\n *\r\n * @method SpineGameObject#getCurrentAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\r\n *\r\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\r\n */\r\n getCurrentAnimation: function (trackIndex)\r\n {\r\n if (trackIndex === undefined) { trackIndex = 0; }\r\n\r\n var current = this.state.getCurrent(trackIndex);\r\n\r\n if (current)\r\n {\r\n return current.animation;\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#play\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\r\n */\r\n play: function (animationName, loop, ignoreIfPlaying)\r\n {\r\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#setAnimation\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to play the animation on.\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n\r\n if (ignoreIfPlaying && this.state)\r\n {\r\n var currentTrack = this.state.getCurrent(trackIndex);\r\n\r\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (this.findAnimation(animationName))\r\n {\r\n return this.state.setAnimation(trackIndex, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an animation to be played after the current or last queued animation for a track.\r\n * If the track is empty, it is equivalent to calling setAnimation.\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\r\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\r\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\r\n * If the previous entry is looping, its next loop completion is used instead of its duration.\r\n *\r\n * @method SpineGameObject#addAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {string} animationName - The string-based key of the animation to add.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n addAnimation: function (trackIndex, animationName, loop, delay)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (delay === undefined) { delay = 0; }\r\n\r\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\r\n },\r\n\r\n /**\r\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\r\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n *\r\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\r\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\r\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\r\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\r\n * A mix duration of 0 still mixes out over one frame.\r\n *\r\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\r\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\r\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\r\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\r\n * property to the value keyed in the new animation.\r\n *\r\n * @method SpineGameObject#setEmptyAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {spine.TrackEntry} The returned Track Entry.\r\n */\r\n setEmptyAnimation: function (trackIndex, mixDuration)\r\n {\r\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\r\n },\r\n\r\n /**\r\n * Removes all animations from the track, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTrack\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTrack: function (trackIndex)\r\n {\r\n this.state.clearTrack(trackIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all animations from all tracks, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTracks\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTracks: function ()\r\n {\r\n this.state.clearTracks();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkinByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to set.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkinByName: function (skinName)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkinByName(skinName);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkin\r\n * @since 3.19.0\r\n *\r\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkin: function (newSkin)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkin(newSkin);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mix duration when changing from the specified animation to the other.\r\n *\r\n * @method SpineGameObject#setMix\r\n * @since 3.19.0\r\n *\r\n * @param {string} fromName - The animation to mix from.\r\n * @param {string} toName - The animation to mix to.\r\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMix: function (fromName, toName, duration)\r\n {\r\n this.stateData.setMix(fromName, toName, duration);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot\r\n * index and attachment name. First the skin is checked and if the attachment was not found,\r\n * the default skin is checked.\r\n *\r\n * @method SpineGameObject#getAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {integer} slotIndex - The slot index to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachment: function (slotIndex, attachmentName)\r\n {\r\n return this.skeleton.getAttachment(slotIndex, attachmentName);\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\r\n *\r\n * @method SpineGameObject#getAttachmentByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachmentByName: function (slotName, attachmentName)\r\n {\r\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n },\r\n\r\n /**\r\n * A convenience method to set an attachment by finding the slot with findSlot,\r\n * finding the attachment with getAttachment, then setting the slot's attachment.\r\n *\r\n * @method SpineGameObject#setAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to add the attachment to.\r\n * @param {string} attachmentName - The attachment name to add.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAttachment: function (slotName, attachmentName)\r\n {\r\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\r\n {\r\n for (var i = 0; i < slotName.length; i++)\r\n {\r\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\r\n }\r\n }\r\n else\r\n {\r\n this.skeleton.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setToSetupPose: function ()\r\n {\r\n this.skeleton.setToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the slots and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setSlotsToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSlotsToSetupPose: function ()\r\n {\r\n this.skeleton.setSlotsToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones and constraints to their setup pose values.\r\n *\r\n * @method SpineGameObject#setBonesToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBonesToSetupPose: function ()\r\n {\r\n this.skeleton.setBonesToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the root bone, or null.\r\n *\r\n * @method SpineGameObject#getRootBone\r\n * @since 3.19.0\r\n *\r\n * @return {spine.Bone} The root bone, or null.\r\n */\r\n getRootBone: function ()\r\n {\r\n return this.skeleton.getRootBone();\r\n },\r\n\r\n /**\r\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\r\n * towards the given position. You can set an optional angle offset, should the bone be\r\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\r\n *\r\n * @method SpineGameObject#angleBoneToXY\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\r\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\r\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\r\n * @param {number} [offset=0] - An offset to add to the rotation angle.\r\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\r\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n if (minAngle === undefined) { minAngle = 0; }\r\n if (maxAngle === undefined) { maxAngle = 360; }\r\n\r\n var renderer = this.plugin.renderer;\r\n var height = renderer.height;\r\n\r\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\r\n\r\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBone\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {spine.Bone} The bone, or null.\r\n */\r\n findBone: function (boneName)\r\n {\r\n return this.skeleton.findBone(boneName);\r\n },\r\n\r\n /**\r\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBoneIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {integer} The bone index. Or -1 if the bone was not found.\r\n */\r\n findBoneIndex: function (boneName)\r\n {\r\n return this.skeleton.findBoneIndex(boneName);\r\n },\r\n\r\n /**\r\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlot\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {spine.Slot} The Slot. May be null.\r\n */\r\n findSlot: function (slotName)\r\n {\r\n return this.skeleton.findSlot(slotName);\r\n },\r\n\r\n /**\r\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlotIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {integer} The slot index. Or -1 if the Slot was not found.\r\n */\r\n findSlotIndex: function (slotName)\r\n {\r\n return this.skeleton.findSlotIndex(slotName);\r\n },\r\n\r\n /**\r\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\r\n * this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSkin\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to find.\r\n *\r\n * @return {spine.Skin} The Skin. May be null.\r\n */\r\n findSkin: function (skinName)\r\n {\r\n return this.skeletonData.findSkin(skinName);\r\n },\r\n\r\n /**\r\n * Finds an event by comparing each events's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findEvent\r\n * @since 3.19.0\r\n *\r\n * @param {string} eventDataName - The name of the event to find.\r\n *\r\n * @return {spine.EventData} The Event Data. May be null.\r\n */\r\n findEvent: function (eventDataName)\r\n {\r\n return this.skeletonData.findEvent(eventDataName);\r\n },\r\n\r\n /**\r\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The name of the animation to find.\r\n *\r\n * @return {spine.Animation} The Animation. May be null.\r\n */\r\n findAnimation: function (animationName)\r\n {\r\n return this.skeletonData.findAnimation(animationName);\r\n },\r\n\r\n /**\r\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findIkConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.IkConstraintData} The IK constraint. May be null.\r\n */\r\n findIkConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findIkConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds an transform constraint by comparing each transform constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findTransformConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\r\n */\r\n findTransformConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findTransformConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.PathConstraintData} The path constraint. May be null.\r\n */\r\n findPathConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds the index of a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraintIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\r\n */\r\n findPathConstraintIndex: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraintIndex(constraintName);\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpineGameObject#getBounds\r\n * @since 3.19.0\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function ()\r\n {\r\n return this.plugin.getBounds(this.skeleton);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method SpineGameObject#preUpdate\r\n * @protected\r\n * @since 3.19.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n this.state.update((delta / 1000) * this.timeScale);\r\n\r\n this.state.apply(skeleton);\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineGameObject#preDestroy\r\n * @protected\r\n * @since 3.19.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.plugin = null;\r\n\r\n this.skeleton = null;\r\n this.skeletonData = null;\r\n\r\n this.state = null;\r\n this.stateData = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineGameObject;\r\n","/**\n * @author Richard Davey \n * @copyright 2022 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\nvar renderDirect = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n renderDirect = require('./SpineGameObjectWebGLDirect');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas,\n renderDirect: renderDirect\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Directly renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderDirect\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n }\r\n\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLDirect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderWebGL\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n\r\n // The Spine debug draw has reset the batcher, so we need to do this regardless:\r\n sceneRenderer.end();\r\n renderer.pipelines.rebind();\r\n }\r\n else if (!renderer.nextTypeMatch)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Global constants.\r\n *\r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Phaser Release Version\r\n *\r\n * @name Phaser.VERSION\r\n * @const\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n VERSION: '3.60.0-beta.20',\r\n\r\n BlendModes: require('./renderer/BlendModes'),\r\n\r\n ScaleModes: require('./renderer/ScaleModes'),\r\n\r\n /**\r\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\r\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\r\n *\r\n * @name Phaser.AUTO\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n AUTO: 0,\r\n\r\n /**\r\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\r\n * WebGL or not.\r\n *\r\n * @name Phaser.CANVAS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n CANVAS: 1,\r\n\r\n /**\r\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\r\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\r\n * message to the user.\r\n *\r\n * @name Phaser.WEBGL\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n WEBGL: 2,\r\n\r\n /**\r\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\r\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\r\n * not for running Phaser on the server, which is something you really shouldn't do.\r\n *\r\n * @name Phaser.HEADLESS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n HEADLESS: 3,\r\n\r\n /**\r\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\r\n * to help you remember what the value is doing in your code.\r\n *\r\n * @name Phaser.FOREVER\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FOREVER: -1,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.NONE\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n NONE: 4,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.UP\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n UP: 5,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.DOWN\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DOWN: 6,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.LEFT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LEFT: 7,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.RIGHT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 8\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n *\r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once(Events.DESTROY, this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n *\r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {number} [data=1] - The amount to increase the given key by. Pass a negative value to decrease the key.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n\r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n *\r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n *\r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n *\r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.on('changedata', listener)`.\r\n *\r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Data Manager Destroy Event.\r\n *\r\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\r\n *\r\n * @event Phaser.Data.Events#DESTROY\r\n * @type {string}\r\n * @since 3.50.0\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.audio` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Audio\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} audioData - Can this device play HTML Audio tags?\r\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\r\n * @property {boolean} m4a - Can this device can play m4a files.\r\n * @property {boolean} aac - Can this device can play aac files.\r\n * @property {boolean} flac - Can this device can play flac files.\r\n * @property {boolean} mp3 - Can this device play mp3 files?\r\n * @property {boolean} ogg - Can this device play ogg files?\r\n * @property {boolean} opus - Can this device play opus files?\r\n * @property {boolean} wav - Can this device play wav files?\r\n * @property {boolean} webAudio - Does this device have the Web Audio API?\r\n * @property {boolean} webm - Can this device play webm files?\r\n */\r\nvar Audio = {\r\n\r\n flac: false,\r\n aac: false,\r\n audioData: false,\r\n dolby: false,\r\n m4a: false,\r\n mp3: false,\r\n ogg: false,\r\n opus: false,\r\n wav: false,\r\n webAudio: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Audio;\r\n }\r\n\r\n Audio.audioData = !!(window['Audio']);\r\n\r\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\r\n\r\n var audioElement = document.createElement('audio');\r\n var result = !!audioElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n var CanPlay = function (type1, type2)\r\n {\r\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\r\n\r\n if (type2)\r\n {\r\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\r\n }\r\n else\r\n {\r\n return Boolean(canPlayType1);\r\n }\r\n };\r\n\r\n // wav Mimetypes accepted:\r\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\r\n\r\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\r\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\r\n Audio.mp3 = CanPlay('mpeg');\r\n Audio.wav = CanPlay('wav');\r\n Audio.m4a = CanPlay('x-m4a');\r\n Audio.aac = CanPlay('aac');\r\n Audio.flac = CanPlay('flac', 'x-flac');\r\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\r\n\r\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\r\n {\r\n if (Browser.edge)\r\n {\r\n Audio.dolby = true;\r\n }\r\n else if (Browser.safari && Browser.safariVersion >= 9)\r\n {\r\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\r\n {\r\n var major = parseInt(RegExp.$1, 10);\r\n var minor = parseInt(RegExp.$2, 10);\r\n\r\n if ((major === 10 && minor >= 11) || major > 10)\r\n {\r\n Audio.dolby = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do here\r\n }\r\n\r\n return Audio;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\n\r\n/**\r\n * Determines the browser type and version running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.browser` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Browser\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} chrome - Set to true if running in Chrome.\r\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\r\n * @property {boolean} firefox - Set to true if running in Firefox.\r\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\r\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\r\n * @property {boolean} opera - Set to true if running in Opera.\r\n * @property {boolean} safari - Set to true if running in Safari.\r\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\r\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\r\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\r\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\r\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\r\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\r\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\r\n */\r\nvar Browser = {\r\n\r\n chrome: false,\r\n chromeVersion: 0,\r\n edge: false,\r\n firefox: false,\r\n firefoxVersion: 0,\r\n ie: false,\r\n ieVersion: 0,\r\n mobileSafari: false,\r\n opera: false,\r\n safari: false,\r\n safariVersion: 0,\r\n silk: false,\r\n trident: false,\r\n tridentVersion: 0,\r\n es2019: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Edg\\/\\d+/).test(ua))\r\n {\r\n Browser.edge = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/OPR/).test(ua))\r\n {\r\n Browser.opera = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.chrome = true;\r\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.chromeVersion > 69);\r\n }\r\n else if ((/Firefox\\D+(\\d+)/).test(ua))\r\n {\r\n Browser.firefox = true;\r\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.firefoxVersion > 10);\r\n }\r\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\r\n {\r\n Browser.mobileSafari = true;\r\n }\r\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.ieVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.safari = true;\r\n Browser.safariVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.safariVersion > 10);\r\n }\r\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.trident = true;\r\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\r\n Browser.ieVersion = parseInt(RegExp.$3, 10);\r\n }\r\n\r\n // Silk gets its own if clause because its ua also contains 'Safari'\r\n if ((/Silk/).test(ua))\r\n {\r\n Browser.silk = true;\r\n }\r\n\r\n return Browser;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the canvas features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.CanvasFeatures\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\r\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\r\n */\r\nvar CanvasFeatures = {\r\n\r\n supportInverseAlpha: false,\r\n supportNewBlendModes: false\r\n\r\n};\r\n\r\nfunction checkBlendMode ()\r\n{\r\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\r\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\r\n\r\n var magenta = new Image();\r\n\r\n magenta.onload = function ()\r\n {\r\n var yellow = new Image();\r\n\r\n yellow.onload = function ()\r\n {\r\n var canvas = CanvasPool.create2D(yellow, 6);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.globalCompositeOperation = 'multiply';\r\n\r\n context.drawImage(magenta, 0, 0);\r\n context.drawImage(yellow, 2, 0);\r\n\r\n if (!context.getImageData(2, 0, 1, 1))\r\n {\r\n return false;\r\n }\r\n\r\n var data = context.getImageData(2, 0, 1, 1).data;\r\n\r\n CanvasPool.remove(yellow);\r\n\r\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\r\n };\r\n\r\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\r\n };\r\n\r\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\r\n\r\n return false;\r\n}\r\n\r\nfunction checkInverseAlpha ()\r\n{\r\n var canvas = CanvasPool.create2D(this, 2);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\r\n\r\n // Draw a single pixel\r\n context.fillRect(0, 0, 1, 1);\r\n\r\n // Get the color values\r\n var s1 = context.getImageData(0, 0, 1, 1);\r\n\r\n if (s1 === null)\r\n {\r\n return false;\r\n }\r\n\r\n // Plot them to x2\r\n context.putImageData(s1, 1, 0);\r\n\r\n // Get those values\r\n var s2 = context.getImageData(1, 0, 1, 1);\r\n\r\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\r\n\r\n CanvasPool.remove(this);\r\n\r\n // Compare and return\r\n return result;\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts !== 'function' && document !== undefined)\r\n {\r\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\r\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\r\n }\r\n\r\n return CanvasFeatures;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\nvar Browser = require('./Browser');\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.features` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Features\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} canvas - Is canvas available?\r\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\r\n * @property {boolean} file - Is file available?\r\n * @property {boolean} fileSystem - Is fileSystem available?\r\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\r\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\r\n * @property {boolean} localStorage - Is localStorage available?\r\n * @property {boolean} pointerLock - Is Pointer Lock available?\r\n * @property {boolean} stableSort - Is Array.sort stable?\r\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\r\n * @property {boolean} vibration - Does the device support the Vibration API?\r\n * @property {boolean} webGL - Is webGL available?\r\n * @property {boolean} worker - Is worker available?\r\n */\r\nvar Features = {\r\n\r\n canvas: false,\r\n canvasBitBltShift: null,\r\n file: false,\r\n fileSystem: false,\r\n getUserMedia: true,\r\n littleEndian: false,\r\n localStorage: false,\r\n pointerLock: false,\r\n stableSort: false,\r\n support32bit: false,\r\n vibration: false,\r\n webGL: false,\r\n worker: false\r\n\r\n};\r\n\r\n// Check Little or Big Endian system.\r\n// @author Matt DesLauriers (@mattdesl)\r\nfunction checkIsLittleEndian ()\r\n{\r\n var a = new ArrayBuffer(4);\r\n var b = new Uint8Array(a);\r\n var c = new Uint32Array(a);\r\n\r\n b[0] = 0xa1;\r\n b[1] = 0xb2;\r\n b[2] = 0xc3;\r\n b[3] = 0xd4;\r\n\r\n if (c[0] === 0xd4c3b2a1)\r\n {\r\n return true;\r\n }\r\n\r\n if (c[0] === 0xa1b2c3d4)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n // Could not determine endianness\r\n return null;\r\n }\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Features;\r\n }\r\n\r\n Features.canvas = !!window['CanvasRenderingContext2D'];\r\n\r\n try\r\n {\r\n Features.localStorage = !!localStorage.getItem;\r\n }\r\n catch (error)\r\n {\r\n Features.localStorage = false;\r\n }\r\n\r\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\r\n Features.fileSystem = !!window['requestFileSystem'];\r\n\r\n var isUint8 = false;\r\n\r\n var testWebGL = function ()\r\n {\r\n if (window['WebGLRenderingContext'])\r\n {\r\n try\r\n {\r\n var canvas = CanvasPool.createWebGL(this);\r\n\r\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\r\n\r\n var canvas2D = CanvasPool.create2D(this);\r\n\r\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\r\n\r\n // Can't be done on a webgl context\r\n var image = ctx2D.createImageData(1, 1);\r\n\r\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\r\n // @author Matt DesLauriers (@mattdesl)\r\n isUint8 = image.data instanceof Uint8ClampedArray;\r\n\r\n CanvasPool.remove(canvas);\r\n CanvasPool.remove(canvas2D);\r\n\r\n return !!ctx;\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n Features.webGL = testWebGL();\r\n\r\n Features.worker = !!window['Worker'];\r\n\r\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\r\n\r\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\r\n\r\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\r\n\r\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\r\n\r\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\r\n if (Browser.firefox && Browser.firefoxVersion < 21)\r\n {\r\n Features.getUserMedia = false;\r\n }\r\n\r\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\r\n // is safer to not try and use the fast copy-over method.\r\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\r\n {\r\n Features.canvasBitBltShift = true;\r\n }\r\n\r\n // Known not to work\r\n if (Browser.safari || Browser.mobileSafari)\r\n {\r\n Features.canvasBitBltShift = false;\r\n }\r\n\r\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\r\n\r\n if (navigator.vibrate)\r\n {\r\n Features.vibration = true;\r\n }\r\n\r\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\r\n {\r\n Features.littleEndian = checkIsLittleEndian();\r\n }\r\n\r\n Features.support32bit = (\r\n typeof ArrayBuffer !== 'undefined' &&\r\n typeof Uint8ClampedArray !== 'undefined' &&\r\n typeof Int32Array !== 'undefined' &&\r\n Features.littleEndian !== null &&\r\n isUint8\r\n );\r\n\r\n return Features;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the full screen support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.fullscreen` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Fullscreen\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} available - Does the browser support the Full Screen API?\r\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\r\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\r\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\r\n */\r\nvar Fullscreen = {\r\n\r\n available: false,\r\n cancel: '',\r\n keyboard: false,\r\n request: ''\r\n\r\n};\r\n\r\n/**\r\n* Checks for support of the Full Screen API.\r\n*\r\n* @ignore\r\n*/\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Fullscreen;\r\n }\r\n\r\n var i;\r\n\r\n var suffix1 = 'Fullscreen';\r\n var suffix2 = 'FullScreen';\r\n\r\n var fs = [\r\n 'request' + suffix1,\r\n 'request' + suffix2,\r\n 'webkitRequest' + suffix1,\r\n 'webkitRequest' + suffix2,\r\n 'msRequest' + suffix1,\r\n 'msRequest' + suffix2,\r\n 'mozRequest' + suffix2,\r\n 'mozRequest' + suffix1\r\n ];\r\n\r\n for (i = 0; i < fs.length; i++)\r\n {\r\n if (document.documentElement[fs[i]])\r\n {\r\n Fullscreen.available = true;\r\n Fullscreen.request = fs[i];\r\n break;\r\n }\r\n }\r\n\r\n var cfs = [\r\n 'cancel' + suffix2,\r\n 'exit' + suffix1,\r\n 'webkitCancel' + suffix2,\r\n 'webkitExit' + suffix1,\r\n 'msCancel' + suffix2,\r\n 'msExit' + suffix1,\r\n 'mozCancel' + suffix2,\r\n 'mozExit' + suffix1\r\n ];\r\n\r\n if (Fullscreen.available)\r\n {\r\n for (i = 0; i < cfs.length; i++)\r\n {\r\n if (document[cfs[i]])\r\n {\r\n Fullscreen.cancel = cfs[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Keyboard Input?\r\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\r\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\r\n {\r\n Fullscreen.keyboard = true;\r\n }\r\n\r\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\r\n\r\n return Fullscreen;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the input support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.input` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Input\r\n * @since 3.0.0\r\n *\r\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\r\n * @property {boolean} gamepads - Is navigator.getGamepads available?\r\n * @property {boolean} mspointer - Is mspointer available?\r\n * @property {boolean} touch - Is touch available?\r\n */\r\nvar Input = {\r\n\r\n gamepads: false,\r\n mspointer: false,\r\n touch: false,\r\n wheelEvent: null\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Input;\r\n }\r\n\r\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\r\n {\r\n Input.touch = true;\r\n }\r\n\r\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\r\n {\r\n Input.mspointer = true;\r\n }\r\n\r\n if (navigator.getGamepads)\r\n {\r\n Input.gamepads = true;\r\n }\r\n\r\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\r\n {\r\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\r\n Input.wheelEvent = 'wheel';\r\n }\r\n else if ('onmousewheel' in window)\r\n {\r\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\r\n Input.wheelEvent = 'mousewheel';\r\n }\r\n else if (Browser.firefox && 'MouseScrollEvent' in window)\r\n {\r\n // FF prior to 17. This should probably be scrubbed.\r\n Input.wheelEvent = 'DOMMouseScroll';\r\n }\r\n\r\n return Input;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the operating system of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.os` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.OS\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} android - Is running on android?\r\n * @property {boolean} chromeOS - Is running on chromeOS?\r\n * @property {boolean} cordova - Is the game running under Apache Cordova?\r\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\r\n * @property {boolean} desktop - Is running on a desktop?\r\n * @property {boolean} ejecta - Is the game running under Ejecta?\r\n * @property {boolean} electron - Is the game running under GitHub Electron?\r\n * @property {boolean} iOS - Is running on iOS?\r\n * @property {boolean} iPad - Is running on iPad?\r\n * @property {boolean} iPhone - Is running on iPhone?\r\n * @property {boolean} kindle - Is running on an Amazon Kindle?\r\n * @property {boolean} linux - Is running on linux?\r\n * @property {boolean} macOS - Is running on macOS?\r\n * @property {boolean} node - Is the game running under Node.js?\r\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\r\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\r\n * @property {boolean} windows - Is running on windows?\r\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\r\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\r\n * @property {number} pixelRatio - PixelRatio of the host device?\r\n */\r\nvar OS = {\r\n\r\n android: false,\r\n chromeOS: false,\r\n cordova: false,\r\n crosswalk: false,\r\n desktop: false,\r\n ejecta: false,\r\n electron: false,\r\n iOS: false,\r\n iOSVersion: 0,\r\n iPad: false,\r\n iPhone: false,\r\n kindle: false,\r\n linux: false,\r\n macOS: false,\r\n node: false,\r\n nodeWebkit: false,\r\n pixelRatio: 1,\r\n webApp: false,\r\n windows: false,\r\n windowsPhone: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return OS;\r\n }\r\n\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Windows/).test(ua))\r\n {\r\n OS.windows = true;\r\n }\r\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\r\n {\r\n // Because iOS 13 identifies as Mac OS:\r\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\r\n {\r\n OS.iOS = true;\r\n OS.iPad = true;\r\n\r\n (navigator.appVersion).match(/Version\\/(\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else\r\n {\r\n OS.macOS = true;\r\n }\r\n }\r\n else if ((/Android/).test(ua))\r\n {\r\n OS.android = true;\r\n }\r\n else if ((/Linux/).test(ua))\r\n {\r\n OS.linux = true;\r\n }\r\n else if ((/iP[ao]d|iPhone/i).test(ua))\r\n {\r\n OS.iOS = true;\r\n\r\n (navigator.appVersion).match(/OS (\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n\r\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\r\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\r\n }\r\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\r\n {\r\n OS.kindle = true;\r\n\r\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\r\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\r\n }\r\n else if ((/CrOS/).test(ua))\r\n {\r\n OS.chromeOS = true;\r\n }\r\n\r\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\r\n {\r\n OS.android = false;\r\n OS.iOS = false;\r\n OS.macOS = false;\r\n OS.windows = true;\r\n OS.windowsPhone = true;\r\n }\r\n\r\n var silk = (/Silk/).test(ua);\r\n\r\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\r\n {\r\n OS.desktop = true;\r\n }\r\n\r\n // Windows Phone / Table reset\r\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\r\n {\r\n OS.desktop = false;\r\n }\r\n\r\n // WebApp mode in iOS\r\n if (navigator.standalone)\r\n {\r\n OS.webApp = true;\r\n }\r\n\r\n if (typeof importScripts !== 'function')\r\n {\r\n if (window.cordova !== undefined)\r\n {\r\n OS.cordova = true;\r\n }\r\n\r\n if (window.ejecta !== undefined)\r\n {\r\n OS.ejecta = true;\r\n }\r\n }\r\n\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\r\n {\r\n OS.node = true;\r\n }\r\n\r\n if (OS.node && typeof process.versions === 'object')\r\n {\r\n OS.nodeWebkit = !!process.versions['node-webkit'];\r\n\r\n OS.electron = !!process.versions.electron;\r\n }\r\n\r\n if ((/Crosswalk/).test(ua))\r\n {\r\n OS.crosswalk = true;\r\n }\r\n\r\n OS.pixelRatio = window['devicePixelRatio'] || 1;\r\n\r\n return OS;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the video support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.video` from within any Scene.\r\n *\r\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\r\n *\r\n * @typedef {object} Phaser.Device.Video\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\r\n * @property {boolean} hls - Can this device play hls video files?\r\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\r\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\r\n * @property {boolean} ogg - Can this device play ogg video files?\r\n * @property {boolean} vp9 - Can this device play vp9 video files?\r\n * @property {boolean} webm - Can this device play webm video files?\r\n */\r\nvar Video = {\r\n\r\n h264: false,\r\n hls: false,\r\n mp4: false,\r\n m4v: false,\r\n ogg: false,\r\n vp9: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Video;\r\n }\r\n\r\n var videoElement = document.createElement('video');\r\n var result = !!videoElement.canPlayType;\r\n var no = /^no$/;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\r\n {\r\n Video.ogg = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\r\n Video.h264 = true;\r\n Video.mp4 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\r\n {\r\n Video.m4v = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\r\n {\r\n Video.webm = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\r\n {\r\n Video.vp9 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n Video.hls = true;\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do\r\n }\r\n\r\n return Video;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// This singleton is instantiated as soon as Phaser loads,\r\n// before a Phaser.Game instance has even been created.\r\n// Which means all instances of Phaser Games can share it,\r\n// without having to re-poll the device all over again\r\n\r\n/**\r\n * @namespace Phaser.Device\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.DeviceConf\r\n *\r\n * @property {Phaser.Device.OS} os - The OS Device functions.\r\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\r\n * @property {Phaser.Device.Features} features - The Features Device functions.\r\n * @property {Phaser.Device.Input} input - The Input Device functions.\r\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\r\n * @property {Phaser.Device.Video} video - The Video Device functions.\r\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\r\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\r\n */\r\n\r\nmodule.exports = {\r\n\r\n os: require('./OS'),\r\n browser: require('./Browser'),\r\n features: require('./Features'),\r\n input: require('./Input'),\r\n audio: require('./Audio'),\r\n video: require('./Video'),\r\n fullscreen: require('./Fullscreen'),\r\n canvasFeatures: require('./CanvasFeatures')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar tempMatrix = new Float32Array(20);\r\n\r\n/**\r\n * @classdesc\r\n * The ColorMatrix class creates a 5x4 matrix that can be used in shaders and graphics\r\n * operations. It provides methods required to modify the color values, such as adjusting\r\n * the brightness, setting a sepia tone, hue rotation and more.\r\n *\r\n * Use the method `getData` to return a Float32Array containing the current color values.\r\n *\r\n * @class ColorMatrix\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.50.0\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function ColorMatrix ()\r\n {\r\n /**\r\n * Internal ColorMatrix array.\r\n *\r\n * @name Phaser.Display.ColorMatrix#_matrix\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._matrix = new Float32Array(20);\r\n\r\n /**\r\n * The value that determines how much of the original color is used\r\n * when mixing the colors. A value between 0 (all original) and 1 (all final)\r\n *\r\n * @name Phaser.Display.ColorMatrix#alpha\r\n * @type {number}\r\n * @since 3.50.0\r\n */\r\n this.alpha = 1;\r\n\r\n /**\r\n * Is the ColorMatrix array dirty?\r\n *\r\n * @name Phaser.Display.ColorMatrix#_dirty\r\n * @type {boolean}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._dirty = true;\r\n\r\n /**\r\n * The matrix data as a Float32Array.\r\n *\r\n * Returned by the `getData` method.\r\n *\r\n * @name Phaser.Display.ColorMatrix#data\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._data = new Float32Array(20);\r\n\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix from the given array of color values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#set\r\n * @since 3.50.0\r\n *\r\n * @param {(number[]|Float32Array)} value - The ColorMatrix values to set. Must have 20 elements.\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n set: function (value)\r\n {\r\n this._matrix.set(value);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the ColorMatrix to default values and also resets\r\n * the `alpha` property back to 1.\r\n *\r\n * @method Phaser.Display.ColorMatrix#reset\r\n * @since 3.50.0\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n reset: function ()\r\n {\r\n var m = this._matrix;\r\n\r\n m.fill(0);\r\n\r\n m[0] = 1;\r\n m[6] = 1;\r\n m[12] = 1;\r\n m[18] = 1;\r\n\r\n this.alpha = 1;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the ColorMatrix as a Float32Array.\r\n *\r\n * Can be used directly as a 1fv shader uniform value.\r\n *\r\n * @method Phaser.Display.ColorMatrix#getData\r\n * @since 3.50.0\r\n *\r\n * @return {Float32Array} The ColorMatrix as a Float32Array.\r\n */\r\n getData: function ()\r\n {\r\n var data = this._data;\r\n\r\n if (this._dirty)\r\n {\r\n data.set(this._matrix);\r\n\r\n data[4] /= 255;\r\n data[9] /= 255;\r\n data[14] /= 255;\r\n data[19] /= 255;\r\n\r\n this._dirty = false;\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Changes the brightness of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brightness\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of brightness to apply to this ColorMatrix. Between 0 (black) and 1.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brightness: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var b = value;\r\n\r\n return this.multiply([\r\n b, 0, 0, 0, 0,\r\n 0, b, 0, 0, 0,\r\n 0, 0, b, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Changes the saturation of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturate\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of saturation to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n saturate: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var x = (value * 2 / 3) + 1;\r\n var y = ((x - 1) * -0.5);\r\n\r\n return this.multiply([\r\n x, y, y, 0, 0,\r\n y, x, y, 0, 0,\r\n y, y, x, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Desaturates this ColorMatrix (removes color from it).\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturation\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturate: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-1, multiply);\r\n },\r\n\r\n /**\r\n * Rotates the hues of this ColorMatrix by the value given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#hue\r\n * @since 3.50.0\r\n *\r\n * @param {number} [rotation=0] - The amount of hue rotation to apply to this ColorMatrix, in degrees.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n hue: function (rotation, multiply)\r\n {\r\n if (rotation === undefined) { rotation = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n rotation = rotation / 180 * Math.PI;\r\n\r\n var cos = Math.cos(rotation);\r\n var sin = Math.sin(rotation);\r\n var lumR = 0.213;\r\n var lumG = 0.715;\r\n var lumB = 0.072;\r\n\r\n return this.multiply([\r\n lumR + cos * (1 - lumR) + sin * (-lumR),lumG + cos * (-lumG) + sin * (-lumG),lumB + cos * (-lumB) + sin * (1 - lumB), 0, 0,\r\n lumR + cos * (-lumR) + sin * (0.143),lumG + cos * (1 - lumG) + sin * (0.140),lumB + cos * (-lumB) + sin * (-0.283), 0, 0,\r\n lumR + cos * (-lumR) + sin * (-(1 - lumR)),lumG + cos * (-lumG) + sin * (lumG),lumB + cos * (1 - lumB) + sin * (lumB), 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be grayscale.\r\n *\r\n * @method Phaser.Display.ColorMatrix#grayscale\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=1] - The grayscale scale (0 is black).\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n grayscale: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-value, multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be black and white.\r\n *\r\n * @method Phaser.Display.ColorMatrix#blackWhite\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n blackWhite: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BLACK_WHITE, multiply);\r\n },\r\n\r\n /**\r\n * Change the contrast of this ColorMatrix by the amount given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#contrast\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of contrast to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n contrast: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var v = value + 1;\r\n var o = -0.5 * (v - 1);\r\n\r\n return this.multiply([\r\n v, 0, 0, 0, o,\r\n 0, v, 0, 0, o,\r\n 0, 0, v, 0, o,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Converts this ColorMatrix to have negative values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#negative\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n negative: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.NEGATIVE, multiply);\r\n },\r\n\r\n /**\r\n * Apply a desaturated luminance to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#desaturateLuminance\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturateLuminance: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.DESATURATE_LUMINANCE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a sepia tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#sepia\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n sepia: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SEPIA, multiply);\r\n },\r\n\r\n /**\r\n * Applies a night vision tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#night\r\n * @since 3.50.0\r\n *\r\n * @param {number} [intensity=0.1] - The intensity of this effect.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n night: function (intensity, multiply)\r\n {\r\n if (intensity === undefined) { intensity = 0.1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply([\r\n intensity * (-2.0), -intensity, 0, 0, 0,\r\n -intensity, 0, intensity, 0, 0,\r\n 0, intensity, intensity * 2.0, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Applies a trippy color tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#lsd\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n lsd: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.LSD, multiply);\r\n },\r\n\r\n /**\r\n * Applies a brown tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brown\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brown: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BROWN, multiply);\r\n },\r\n\r\n /**\r\n * Applies a vintage pinhole color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#vintagePinhole\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n vintagePinhole: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.VINTAGE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a kodachrome color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#kodachrome\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n kodachrome: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.KODACHROME, multiply);\r\n },\r\n\r\n /**\r\n * Applies a technicolor color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#technicolor\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n technicolor: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.TECHNICOLOR, multiply);\r\n },\r\n\r\n /**\r\n * Applies a polaroid color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#polaroid\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n polaroid: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.POLAROID, multiply);\r\n },\r\n\r\n /**\r\n * Shifts the values of this ColorMatrix into BGR order.\r\n *\r\n * @method Phaser.Display.ColorMatrix#shiftToBGR\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n shiftToBGR: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SHIFT_BGR, multiply);\r\n },\r\n\r\n /**\r\n * Multiplies the two given matrices.\r\n *\r\n * @method Phaser.Display.ColorMatrix#multiply\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} a - The 5x4 array to multiply with ColorMatrix._matrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n multiply: function (a, multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n // Duplicate _matrix into c\r\n\r\n if (!multiply)\r\n {\r\n this.reset();\r\n }\r\n\r\n var m = this._matrix;\r\n var c = tempMatrix;\r\n\r\n // copy _matrix to tempMatrox\r\n c.set(m);\r\n\r\n m.set([\r\n // R\r\n (c[0] * a[0]) + (c[1] * a[5]) + (c[2] * a[10]) + (c[3] * a[15]),\r\n (c[0] * a[1]) + (c[1] * a[6]) + (c[2] * a[11]) + (c[3] * a[16]),\r\n (c[0] * a[2]) + (c[1] * a[7]) + (c[2] * a[12]) + (c[3] * a[17]),\r\n (c[0] * a[3]) + (c[1] * a[8]) + (c[2] * a[13]) + (c[3] * a[18]),\r\n (c[0] * a[4]) + (c[1] * a[9]) + (c[2] * a[14]) + (c[3] * a[19]) + c[4],\r\n\r\n // G\r\n (c[5] * a[0]) + (c[6] * a[5]) + (c[7] * a[10]) + (c[8] * a[15]),\r\n (c[5] * a[1]) + (c[6] * a[6]) + (c[7] * a[11]) + (c[8] * a[16]),\r\n (c[5] * a[2]) + (c[6] * a[7]) + (c[7] * a[12]) + (c[8] * a[17]),\r\n (c[5] * a[3]) + (c[6] * a[8]) + (c[7] * a[13]) + (c[8] * a[18]),\r\n (c[5] * a[4]) + (c[6] * a[9]) + (c[7] * a[14]) + (c[8] * a[19]) + c[9],\r\n\r\n // B\r\n (c[10] * a[0]) + (c[11] * a[5]) + (c[12] * a[10]) + (c[13] * a[15]),\r\n (c[10] * a[1]) + (c[11] * a[6]) + (c[12] * a[11]) + (c[13] * a[16]),\r\n (c[10] * a[2]) + (c[11] * a[7]) + (c[12] * a[12]) + (c[13] * a[17]),\r\n (c[10] * a[3]) + (c[11] * a[8]) + (c[12] * a[13]) + (c[13] * a[18]),\r\n (c[10] * a[4]) + (c[11] * a[9]) + (c[12] * a[14]) + (c[13] * a[19]) + c[14],\r\n\r\n // A\r\n (c[15] * a[0]) + (c[16] * a[5]) + (c[17] * a[10]) + (c[18] * a[15]),\r\n (c[15] * a[1]) + (c[16] * a[6]) + (c[17] * a[11]) + (c[18] * a[16]),\r\n (c[15] * a[2]) + (c[16] * a[7]) + (c[17] * a[12]) + (c[18] * a[17]),\r\n (c[15] * a[3]) + (c[16] * a[8]) + (c[17] * a[13]) + (c[18] * a[18]),\r\n (c[15] * a[4]) + (c[16] * a[9]) + (c[17] * a[14]) + (c[18] * a[19]) + c[19]\r\n\r\n ]);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for black_white operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BLACK_WHITE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BLACK_WHITE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for negative operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.NEGATIVE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.NEGATIVE = [ -1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for desatured luminance operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.DESATURATE_LUMINANCE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.DESATURATE_LUMINANCE = [ 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for sepia operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SEPIA\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SEPIA = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for lsd operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.LSD\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.LSD = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for brown operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BROWN\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BROWN = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for vintage pinhole operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.VINTAGE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.VINTAGE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for kodachrome operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.KODACHROME\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.KODACHROME = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for technicolor operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.TECHNICOLOR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.TECHNICOLOR = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for polaroid shift operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.POLAROID\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.POLAROID = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for shift BGR operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SHIFT_BGR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SHIFT_BGR = [ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0 ];\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../../const');\r\nvar Smoothing = require('./Smoothing');\r\n\r\n// The pool into which the canvas elements are placed.\r\nvar pool = [];\r\n\r\n// Automatically apply smoothing(false) to created Canvas elements\r\nvar _disableContextSmoothing = false;\r\n\r\n/**\r\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\r\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\r\n * which is useless for some of the Phaser pipelines / renderer.\r\n *\r\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\r\n * Which means all instances of Phaser Games on the same page can share the one single pool.\r\n *\r\n * @namespace Phaser.Display.Canvas.CanvasPool\r\n * @since 3.0.0\r\n */\r\nvar CanvasPool = function ()\r\n{\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\r\n *\r\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\r\n */\r\n var create = function (parent, width, height, canvasType, selfParent)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = 1; }\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n if (selfParent === undefined) { selfParent = false; }\r\n\r\n var canvas;\r\n var container = first(canvasType);\r\n\r\n if (container === null)\r\n {\r\n container = {\r\n parent: parent,\r\n canvas: document.createElement('canvas'),\r\n type: canvasType\r\n };\r\n\r\n if (canvasType === CONST.CANVAS)\r\n {\r\n pool.push(container);\r\n }\r\n\r\n canvas = container.canvas;\r\n }\r\n else\r\n {\r\n container.parent = parent;\r\n\r\n canvas = container.canvas;\r\n }\r\n\r\n if (selfParent)\r\n {\r\n container.parent = canvas;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\r\n {\r\n Smoothing.disable(canvas.getContext('2d', { willReadFrequently: false }));\r\n }\r\n\r\n return canvas;\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create2D\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created canvas.\r\n */\r\n var create2D = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.CANVAS);\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created WebGL canvas.\r\n */\r\n var createWebGL = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.WEBGL);\r\n };\r\n\r\n /**\r\n * Gets the first free canvas index from the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.first\r\n * @since 3.0.0\r\n *\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n *\r\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\r\n */\r\n var first = function (canvasType)\r\n {\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n\r\n if (canvasType === CONST.WEBGL)\r\n {\r\n return null;\r\n }\r\n\r\n for (var i = 0; i < pool.length; i++)\r\n {\r\n var container = pool[i];\r\n\r\n if (!container.parent && container.type === canvasType)\r\n {\r\n return container;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\r\n * The canvas has its width and height set to 1, and its parent attribute nulled.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.remove\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The canvas or the parent of the canvas to free.\r\n */\r\n var remove = function (parent)\r\n {\r\n // Check to see if the parent is a canvas object\r\n var isCanvas = parent instanceof HTMLCanvasElement;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\r\n {\r\n container.parent = null;\r\n container.canvas.width = 1;\r\n container.canvas.height = 1;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the total number of used canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.total\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of used canvases.\r\n */\r\n var total = function ()\r\n {\r\n var c = 0;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if (container.parent)\r\n {\r\n c++;\r\n }\r\n });\r\n\r\n return c;\r\n };\r\n\r\n /**\r\n * Gets the total number of free canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.free\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of free canvases.\r\n */\r\n var free = function ()\r\n {\r\n return pool.length - total();\r\n };\r\n\r\n /**\r\n * Disable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\r\n * @since 3.0.0\r\n */\r\n var disableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = true;\r\n };\r\n\r\n /**\r\n * Enable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\r\n * @since 3.0.0\r\n */\r\n var enableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = false;\r\n };\r\n\r\n return {\r\n create2D: create2D,\r\n create: create,\r\n createWebGL: createWebGL,\r\n disableSmoothing: disableSmoothing,\r\n enableSmoothing: enableSmoothing,\r\n first: first,\r\n free: free,\r\n pool: pool,\r\n remove: remove,\r\n total: total\r\n };\r\n};\r\n\r\n// If we export the called function here, it'll only be invoked once (not every time it's required).\r\nmodule.exports = CanvasPool();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Browser specific prefix, so not going to change between contexts, only between browsers\r\nvar prefix = '';\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.Smoothing\r\n * @since 3.0.0\r\n */\r\nvar Smoothing = function ()\r\n{\r\n /**\r\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\r\n *\r\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\r\n */\r\n var getPrefix = function (context)\r\n {\r\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\r\n\r\n for (var i = 0; i < vendors.length; i++)\r\n {\r\n var s = vendors[i] + 'mageSmoothingEnabled';\r\n\r\n if (s in context)\r\n {\r\n return s;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.enable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var enable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = true;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.disable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var disable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = false;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\r\n * Returns null if no smoothing prefix is available.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\r\n *\r\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\r\n */\r\n var isEnabled = function (context)\r\n {\r\n return (prefix !== null) ? context[prefix] : null;\r\n };\r\n\r\n return {\r\n disable: disable,\r\n enable: enable,\r\n getPrefix: getPrefix,\r\n isEnabled: isEnabled\r\n };\r\n\r\n};\r\n\r\nmodule.exports = Smoothing();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object or Dynamic Texture to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this mask is being added.\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, maskObject, x, y, texture, frame)\r\n {\r\n if (!maskObject)\r\n {\r\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\r\n }\r\n\r\n /**\r\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = maskObject;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel.\r\n *\r\n * Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask? This is false by default and should not be changed.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n },\r\n\r\n /**\r\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\r\n *\r\n * If a Game Object it must have a texture, such as a Sprite.\r\n *\r\n * You can update the source of the mask as often as you like.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\r\n */\r\n setBitmap: function (maskObject)\r\n {\r\n this.bitmapMask = maskObject;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\r\n */\r\n postRenderWebGL: function (renderer, camera, renderTarget)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object, or Dynamic Texture, to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\r\n * @since 3.60.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\r\n */\r\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\r\n{\r\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level. This can change dynamically at runtime\r\n * and is set in the applyStencil method.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n *\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n var mask = 0xff;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n\r\n // Do this _after_ we set the stencilFunc\r\n level++;\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n this.level = level;\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, mask);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var current = renderer.currentMask;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n current.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n current.mask = prev.mask;\r\n current.camera = prev.camera;\r\n }\r\n else\r\n {\r\n current.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Barrel FX Controller.\r\n *\r\n * This FX controller manages the barrel distortion effect for a Game Object.\r\n *\r\n * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to\r\n * a Game Object. The amount of the effect can be modified in real-time.\r\n *\r\n * A Barrel effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBarrel();\r\n * sprite.postFX.addBarrel();\r\n * ```\r\n *\r\n * @class Barrel\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n */\r\nvar Barrel = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Barrel (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.BARREL, gameObject);\r\n\r\n /**\r\n * The amount of distortion applied to the barrel effect.\r\n *\r\n * Typically keep this within the range 1 (no distortion) to +- 1.\r\n *\r\n * @name Phaser.FX.Barrel#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Barrel;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Bloom\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n */\r\nvar Bloom = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bloom (gameObject, color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n if (offsetX === undefined) { offsetX = 1; }\r\n if (offsetY === undefined) { offsetY = 1; }\r\n if (blurStrength === undefined) { blurStrength = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLOOM, gameObject);\r\n\r\n /**\r\n * The number of steps to run the Bloom effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the Bloom,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Bloom#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The horizontal offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetX = offsetX;\r\n\r\n /**\r\n * The vertical offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetY = offsetY;\r\n\r\n /**\r\n * The strength of the blur process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#blurStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurStrength = blurStrength;\r\n\r\n /**\r\n * The strength of the blend process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Bloom#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the bloom as a number value.\r\n *\r\n * @name Phaser.FX.Bloom#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bloom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Blur\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n */\r\nvar Blur = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Blur (gameObject, quality, x, y, strength, color, steps)\r\n {\r\n if (quality === undefined) { quality = 0; }\r\n if (x === undefined) { x = 2; }\r\n if (y === undefined) { y = 2; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLUR, gameObject);\r\n\r\n /**\r\n * The quality of the blur effect.\r\n *\r\n * This can be:\r\n *\r\n * 0 for Low Quality\r\n * 1 for Medium Quality\r\n * 2 for High Quality\r\n *\r\n * The higher the quality, the more complex shader is used\r\n * and the more processing time is spent on the GPU calculating\r\n * the final blur. This value is used in conjunction with the\r\n * `steps` value, as one has a direct impact on the other.\r\n *\r\n * Keep this value as low as you can, while still achieving the\r\n * desired effect you need for your game.\r\n *\r\n * @name Phaser.FX.Blur#quality\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.quality = 0;\r\n\r\n /**\r\n * The horizontal offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The number of steps to run the Blur effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the blur,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Blur#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The strength of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Blur#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the blur as a number value.\r\n *\r\n * @name Phaser.FX.Blur#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Blur;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Bokeh\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {boolean} [isTiltShift=false] - Is this a bokeh or Tile Shift effect?\r\n * @param {number} [blurX=1] - If Tilt Shift, the amount of horizontal blur.\r\n * @param {number} [blurY=1] - If Tilt Shift, the amount of vertical blur.\r\n * @param {number} [strength=1] - If Tilt Shift, the strength of the blur.\r\n */\r\nvar Bokeh = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bokeh (gameObject, radius, amount, contrast, isTiltShift, blurX, blurY, strength)\r\n {\r\n if (radius === undefined) { radius = 0.5; }\r\n if (amount === undefined) { amount = 1; }\r\n if (contrast === undefined) { contrast = 0.2; }\r\n if (isTiltShift === undefined) { isTiltShift = false; }\r\n if (blurX === undefined) { blurX = 1; }\r\n if (blurY === undefined) { blurY = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n\r\n Controller.call(this, FX_CONST.BOKEH, gameObject);\r\n\r\n this.radius = radius;\r\n this.amount = amount;\r\n this.contrast = contrast;\r\n\r\n this.isTiltShift = isTiltShift;\r\n this.strength = strength;\r\n this.blurX = blurX;\r\n this.blurY = blurY;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bokeh;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Circle\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=16724914] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n */\r\nvar Circle = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Circle (gameObject, thickness, color, backgroundColor, scale, feather)\r\n {\r\n if (thickness === undefined) { thickness = 8; }\r\n if (scale === undefined) { scale = 1; }\r\n if (feather === undefined) { feather = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.CIRCLE, gameObject);\r\n\r\n /**\r\n * The scale of the circle. The default scale is 1, which is a circle\r\n * the full size of the underlying texture. Reduce this value to create\r\n * a smaller circle, or increase it to create a circle that extends off\r\n * the edges of the texture.\r\n *\r\n * @name Phaser.FX.Circle#scale\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.scale = scale;\r\n\r\n /**\r\n * The amount of feathering to apply to the circle from the ring,\r\n * extending into the middle of the circle. The default is 0.005,\r\n * which is a very low amount of feathering just making sure the ring\r\n * has a smooth edge. Increase this amount to a value such as 0.5\r\n * or 0.025 for larger amounts of feathering.\r\n *\r\n * @name Phaser.FX.Circle#feather\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.feather = feather;\r\n\r\n /**\r\n * The width of the circle around the texture, in pixels. This value\r\n * doesn't factor in the feather, which can extend the thickness\r\n * internally depending on its value.\r\n *\r\n * @name Phaser.FX.Circle#thickness\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.thickness = thickness;\r\n\r\n /**\r\n * The internal gl color array for the ring color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 0.2, 0.7 ];\r\n\r\n /**\r\n * The internal gl color array for the background color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 1, 0, 0, 0.4 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n\r\n if (backgroundColor !== undefined && backgroundColor !== null)\r\n {\r\n this.backgroundColor = backgroundColor;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the circular ring, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of the background, behind the texture, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#backgroundColor\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n backgroundColor: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Circle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar BaseColorMatrix = require('../display/ColorMatrix');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class ColorMatrix\r\n * @extends Phaser.Display.ColorMatrix\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n Extends: BaseColorMatrix,\r\n\r\n initialize:\r\n\r\n function ColorMatrix (gameObject)\r\n {\r\n BaseColorMatrix.call(this);\r\n\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = FX_CONST.COLOR_MATRIX;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * @name Phaser.FX.ColorMatrix#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this._matrix = null;\r\n this._data = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {number} type - The FX Type constant.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar Controller = new Class({\r\n\r\n initialize:\r\n\r\n function Controller (type, gameObject)\r\n {\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.Controller#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.Controller#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * @name Phaser.FX.Controller#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n /**\r\n * Destroys this FX Controller.\r\n *\r\n * @method Phaser.FX.Controller#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this.active = false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Controller;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Displacement\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {string} [key='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply.\r\n */\r\nvar Displacement = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Displacement (gameObject, displacementTexture, x, y)\r\n {\r\n if (displacementTexture === undefined) { displacementTexture = '__WHITE'; }\r\n if (x === undefined) { x = 0.005; }\r\n if (y === undefined) { y = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.DISPLACEMENT, gameObject);\r\n\r\n /**\r\n * The amount of horizontal displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The amount of vertical displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The underlying WebGLTexture used for displacement.\r\n *\r\n * @name Phaser.FX.Displacement#glTexture\r\n * @type {WebGLTexture}\r\n * @since 3.60.0\r\n */\r\n this.glTexture;\r\n\r\n this.setTexture(displacementTexture);\r\n },\r\n\r\n setTexture: function (texture)\r\n {\r\n var phaserTexture = this.gameObject.scene.sys.textures.getFrame(texture);\r\n\r\n if (phaserTexture)\r\n {\r\n this.glTexture = phaserTexture.glTexture;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Displacement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Glow FX Controller.\r\n *\r\n * This FX controller manages the glow effect for a Game Object.\r\n *\r\n * A glow effect allows you to apply a soft, blurred 'glow' around either the outside,\r\n * inside, or both of a Game Object. The color and strength of the glow can be modified.\r\n *\r\n * You can modify most of its properties in real-time to adjust the visual effect.\r\n *\r\n * A Glow effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addGlow();\r\n * sprite.postFX.addGlow();\r\n * ```\r\n *\r\n * @class Glow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n */\r\nvar Glow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Glow (gameObject, color, outerStrength, innerStrength, knockout)\r\n {\r\n if (outerStrength === undefined) { outerStrength = 4; }\r\n if (innerStrength === undefined) { innerStrength = 0; }\r\n if (knockout === undefined) { knockout = false; }\r\n\r\n Controller.call(this, FX_CONST.GLOW, gameObject);\r\n\r\n /**\r\n * The strength of the glow outward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#outerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.outerStrength = outerStrength;\r\n\r\n /**\r\n * The strength of the glow inward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#innerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.innerStrength = innerStrength;\r\n\r\n /**\r\n * If `true` only the glow is drawn, not the texture itself.\r\n *\r\n * @name Phaser.FX.Glow#knockout\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.knockout = knockout;\r\n\r\n /**\r\n * A 4 element array of gl color values.\r\n *\r\n * @name Phaser.FX.Glow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1, 1 ];\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the glow as a number value.\r\n *\r\n * @name Phaser.FX.Glow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Glow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Gradient\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n */\r\nvar Gradient = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Gradient (gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n if (alpha === undefined) { alpha = 0.2; }\r\n if (fromX === undefined) { fromX = 0; }\r\n if (fromY === undefined) { fromY = 0; }\r\n if (toX === undefined) { toX = 0; }\r\n if (toY === undefined) { toY = 1; }\r\n if (size === undefined) { size = 0; }\r\n\r\n Controller.call(this, FX_CONST.GRADIENT, gameObject);\r\n\r\n /**\r\n * The alpha value of the gradient effect.\r\n *\r\n * @name Phaser.FX.Gradient#alpha\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.alpha = alpha;\r\n\r\n /**\r\n * Sets how many 'chunks' the gradient is divided in to, as spread over the\r\n * entire height of the texture. Leave this at zero for a smooth gradient,\r\n * or set to a higher number to split the gradient into that many sections, giving\r\n * a more banded 'retro' effect.\r\n *\r\n * @name Phaser.FX.Gradient#size\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.size = size;\r\n\r\n /**\r\n * The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromX = fromX;\r\n\r\n /**\r\n * The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromY = fromY;\r\n\r\n /**\r\n * The horizontal position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toX = toX;\r\n\r\n /**\r\n * The vertical position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toY = toY;\r\n\r\n /**\r\n * The internal gl color array for the starting color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor1\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor1 = [ 255, 0, 0 ];\r\n\r\n /**\r\n * The internal gl color array for the ending color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 0, 255, 0 ];\r\n\r\n if (color1 !== undefined && color1 !== null)\r\n {\r\n this.color1 = color1;\r\n }\r\n\r\n if (color2 !== undefined && color2 !== null)\r\n {\r\n this.color2 = color2;\r\n }\r\n },\r\n\r\n /**\r\n * The first gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color1\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color1: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor1;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor1;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The second gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color2\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color2: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Gradient;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Pixelate\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n */\r\nvar Pixelate = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Pixelate (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.PIXELATE, gameObject);\r\n\r\n /**\r\n * The amount of pixelation to apply.\r\n *\r\n * @name Phaser.FX.Pixelate#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pixelate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Shadow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n */\r\nvar Shadow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shadow (gameObject, x, y, decay, power, color, samples, intensity)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (decay === undefined) { decay = 0.1; }\r\n if (power === undefined) { power = 1; }\r\n if (samples === undefined) { samples = 6; }\r\n if (intensity === undefined) { intensity = 1; }\r\n\r\n Controller.call(this, FX_CONST.SHADOW, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The amount of decay for the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#decay\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.decay = decay;\r\n\r\n /**\r\n * The power of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#power\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.power = power;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Shadow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 0, 0, 0, 1 ];\r\n\r\n /**\r\n * The number of samples that the shadow effect will run for.\r\n *\r\n * This should be an integer with a minimum value of 1 and a maximum of 12.\r\n *\r\n * @name Phaser.FX.Shadow#samples\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.samples = samples;\r\n\r\n /**\r\n * The intensity of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#intensity\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.intensity = intensity;\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the shadow.\r\n *\r\n * @name Phaser.FX.Shadow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shadow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Shine\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n */\r\nvar Shine = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shine (gameObject, speed, lineWidth, gradient, reveal)\r\n {\r\n if (speed === undefined) { speed = 0.5; }\r\n if (lineWidth === undefined) { lineWidth = 0.5; }\r\n if (gradient === undefined) { gradient = 3; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.SHINE, gameObject);\r\n\r\n /**\r\n * The speed of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#speed\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.speed = speed;\r\n\r\n /**\r\n * The line width of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#lineWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.lineWidth = lineWidth;\r\n\r\n /**\r\n * The gradient of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#gradient\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.gradient = gradient;\r\n\r\n /**\r\n * Does this Shine effect reveal or get added to its target?\r\n *\r\n * @name Phaser.FX.Shine#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shine;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Vignette\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n */\r\nvar Vignette = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Vignette (gameObject, x, y, radius, strength)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = 0.5; }\r\n if (radius === undefined) { radius = 0.5; }\r\n if (strength === undefined) { strength = 0.5; }\r\n\r\n Controller.call(this, FX_CONST.VIGNETTE, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#radius\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The strength of the vignette effect.\r\n *\r\n * @name Phaser.FX.Vignette#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Vignette;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Wipe\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n * @param {boolean} [reveal=false] - Is this a reveal (true) or a fade (false) effect?\r\n */\r\nvar Wipe = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Wipe (gameObject, wipeWidth, direction, axis, reveal)\r\n {\r\n if (wipeWidth === undefined) { wipeWidth = 0.1; }\r\n if (direction === undefined) { direction = 0; }\r\n if (axis === undefined) { axis = 0; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.WIPE, gameObject);\r\n\r\n // left to right: direction 0, axis 0\r\n // right to left: direction 1, axis 0\r\n // top to bottom: direction 1, axis 1\r\n // bottom to top: direction 1, axis 0\r\n // wipe: reveal 0\r\n // reveal: reveal 1\r\n // progress: 0 - 1\r\n\r\n /**\r\n * The progress of the Wipe effect. This value is normalized to the range 0 to 1.\r\n *\r\n * Adjust this value to make the wipe transition (i.e. via a Tween)\r\n *\r\n * @name Phaser.FX.Wipe#progress\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Wipe#wipeWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.wipeWidth = wipeWidth;\r\n\r\n /**\r\n * The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n *\r\n * @name Phaser.FX.Wipe#direction\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.direction = direction;\r\n\r\n /**\r\n * The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @name Phaser.FX.Wipe#axis\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.axis = axis;\r\n\r\n /**\r\n * Is this a reveal (true) or a fade (false) effect?\r\n *\r\n * @name Phaser.FX.Wipe#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Wipe;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FX_CONST = {\r\n\r\n /**\r\n * The Glow FX.\r\n *\r\n * @name Phaser.FX.GLOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GLOW: 4,\r\n\r\n /**\r\n * The Shadow FX.\r\n *\r\n * @name Phaser.FX.SHADOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHADOW: 5,\r\n\r\n /**\r\n * The Pixelate FX.\r\n *\r\n * @name Phaser.FX.PIXELATE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n PIXELATE: 6,\r\n\r\n /**\r\n * The Vignette FX.\r\n *\r\n * @name Phaser.FX.VIGNETTE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n VIGNETTE: 7,\r\n\r\n /**\r\n * The Shine FX.\r\n *\r\n * @name Phaser.FX.SHINE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHINE: 8,\r\n\r\n /**\r\n * The Blur FX.\r\n *\r\n * @name Phaser.FX.BLUR\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLUR: 9, // uses 3 shaders, slots 9, 10 and 11\r\n\r\n /**\r\n * The Gradient FX.\r\n *\r\n * @name Phaser.FX.GRADIENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GRADIENT: 12,\r\n\r\n /**\r\n * The Bloom FX.\r\n *\r\n * @name Phaser.FX.BLOOM\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLOOM: 13,\r\n\r\n /**\r\n * The Color Matrix FX.\r\n *\r\n * @name Phaser.FX.COLOR_MATRIX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n COLOR_MATRIX: 14,\r\n\r\n /**\r\n * The Circle FX.\r\n *\r\n * @name Phaser.FX.CIRCLE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n CIRCLE: 15,\r\n\r\n /**\r\n * The Barrel FX.\r\n *\r\n * @name Phaser.FX.BARREL\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BARREL: 16,\r\n\r\n /**\r\n * The Displacement FX.\r\n *\r\n * @name Phaser.FX.DISPLACEMENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DISPLACEMENT: 17,\r\n\r\n /**\r\n * The Wipe FX.\r\n *\r\n * @name Phaser.FX.WIPE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n WIPE: 18,\r\n\r\n /**\r\n * The Bokeh and Tilt Shift FX.\r\n *\r\n * @name Phaser.FX.BOKEH\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BOKEH: 19\r\n\r\n};\r\n\r\nmodule.exports = FX_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @namespace Phaser.FX\r\n */\r\n\r\nvar FX = {\r\n\r\n Barrel: require('./Barrel'),\r\n Controller: require('./Controller'),\r\n Bloom: require('./Bloom'),\r\n Blur: require('./Blur'),\r\n Bokeh: require('./Bokeh'),\r\n Circle: require('./Circle'),\r\n ColorMatrix: require('./ColorMatrix'),\r\n Displacement: require('./Displacement'),\r\n Glow: require('./Glow'),\r\n Gradient: require('./Gradient'),\r\n Pixelate: require('./Pixelate'),\r\n Shadow: require('./Shadow'),\r\n Shine: require('./Shine'),\r\n Vignette: require('./Vignette'),\r\n Wipe: require('./Wipe')\r\n\r\n};\r\n\r\nFX = Extend(false, FX, FX_CONST);\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar ComponentsToJSON = require('./components/ToJSON');\r\nvar DataManager = require('../data/DataManager');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The base class that all Game Objects extend.\r\n * You don't create GameObjects directly and they cannot be added to the display list.\r\n * Instead, use them as the base for your own custom classes.\r\n *\r\n * @class GameObject\r\n * @memberof Phaser.GameObjects\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\r\n */\r\nvar GameObject = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GameObject (scene, type)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene to which this Game Object belongs.\r\n *\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * You should consider this property as being read-only. You cannot move a\r\n * Game Object to another Scene by simply changing it.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Holds a reference to the Display List that contains this Game Object.\r\n *\r\n * This is set automatically when this Game Object is added to a Scene or Layer.\r\n *\r\n * You should treat this property as being read-only.\r\n *\r\n * @name Phaser.GameObjects.GameObject#displayList\r\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\r\n * @default null\r\n * @since 3.50.0\r\n */\r\n this.displayList = null;\r\n\r\n /**\r\n * A textual representation of this Game Object, i.e. `sprite`.\r\n * Used internally by Phaser but is available for your own custom classes to populate.\r\n *\r\n * @name Phaser.GameObjects.GameObject#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The current state of this Game Object.\r\n *\r\n * Phaser itself will never modify this value, although plugins may do so.\r\n *\r\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\r\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\r\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @name Phaser.GameObjects.GameObject#state\r\n * @type {(number|string)}\r\n * @since 3.16.0\r\n */\r\n this.state = 0;\r\n\r\n /**\r\n * The parent Container of this Game Object, if it has one.\r\n *\r\n * @name Phaser.GameObjects.GameObject#parentContainer\r\n * @type {Phaser.GameObjects.Container}\r\n * @since 3.4.0\r\n */\r\n this.parentContainer = null;\r\n\r\n /**\r\n * The name of this Game Object.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.GameObject#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The active state of this Game Object.\r\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\r\n * An active object is one which is having its logic and internal systems updated.\r\n *\r\n * @name Phaser.GameObjects.GameObject#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The Tab Index of the Game Object.\r\n * Reserved for future use by plugins and the Input Manager.\r\n *\r\n * @name Phaser.GameObjects.GameObject#tabIndex\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.tabIndex = -1;\r\n\r\n /**\r\n * A Data Manager.\r\n * It allows you to store, query and get key/value paired information specific to this Game Object.\r\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#data\r\n * @type {Phaser.Data.DataManager}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.data = null;\r\n\r\n /**\r\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\r\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\r\n * If those components are not used by your custom class then you can use this bitmask as you wish.\r\n *\r\n * @name Phaser.GameObjects.GameObject#renderFlags\r\n * @type {number}\r\n * @default 15\r\n * @since 3.0.0\r\n */\r\n this.renderFlags = 15;\r\n\r\n /**\r\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\r\n * Not usually set directly, instead call `Camera.ignore`, however you can\r\n * set this property directly using the Camera.id property:\r\n *\r\n * @example\r\n * this.cameraFilter |= camera.id\r\n *\r\n * @name Phaser.GameObjects.GameObject#cameraFilter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cameraFilter = 0;\r\n\r\n /**\r\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\r\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#input\r\n * @type {?Phaser.Types.Input.InteractiveObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.input = null;\r\n\r\n /**\r\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\r\n * This includes calls that may come from a Group, Container or the Scene itself.\r\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\r\n * responsible for managing references to and from this Game Object.\r\n *\r\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.ignoreDestroy = false;\r\n\r\n this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\r\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\r\n\r\n // Tell the Scene to re-sort the children\r\n scene.sys.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\r\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\r\n * The `name` property is not populated by Phaser and is presented for your own use.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The name to be given to this Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setName: function (value)\r\n {\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current state of this Game Object.\r\n *\r\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\r\n *\r\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\r\n * The state value should typically be an integer (ideally mapped to a constant\r\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setState\r\n * @since 3.16.0\r\n *\r\n * @param {(number|string)} value - The state of the Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setState: function (value)\r\n {\r\n this.state = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a Data Manager component to this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setDataEnabled\r\n * @since 3.0.0\r\n * @see Phaser.Data.DataManager\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setDataEnabled: function ()\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Allows you to store a key value pair within this Game Objects Data Manager.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * sprite.setData('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `getData`:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setData\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.set(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#incData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n incData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.inc(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toggleData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n toggleData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.toggle(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * sprite.getData([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n getData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this.data.get(key);\r\n },\r\n\r\n /**\r\n * Pass this Game Object to the Input Manager to enable it for Input.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @example\r\n * sprite.setInteractive();\r\n *\r\n * @example\r\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\r\n *\r\n * @example\r\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\r\n *\r\n * @method Phaser.GameObjects.GameObject#setInteractive\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\r\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will disable it.\r\n *\r\n * An object that is disabled for input stops processing or being considered for\r\n * input events, but can be turned back on again at any time by simply calling\r\n * `setInteractive()` with no arguments provided.\r\n *\r\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#disableInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n disableInteractive: function ()\r\n {\r\n this.scene.sys.input.disable(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will queue it\r\n * for removal, causing it to no longer be interactive. The removal happens on\r\n * the next game step, it is not immediate.\r\n *\r\n * The Interactive Object that was assigned to this Game Object will be destroyed,\r\n * removed from the Input Manager and cleared from this Game Object.\r\n *\r\n * If you wish to re-enable this Game Object at a later date you will need to\r\n * re-create its InteractiveObject by calling `setInteractive` again.\r\n *\r\n * If you wish to only temporarily stop an object from receiving input then use\r\n * `disableInteractive` instead, as that toggles the interactive state, where-as\r\n * this erases it completely.\r\n *\r\n * If you wish to resize a hit area, don't remove and then set it as being\r\n * interactive. Instead, access the hitarea object directly and resize the shape\r\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\r\n * shape is a Rectangle, which it is by default.)\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n removeInteractive: function ()\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is added to a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to add themselves into the Update List.\r\n *\r\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addedToScene\r\n * @since 3.50.0\r\n */\r\n addedToScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is removed from a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to removed themselves from the Update List.\r\n *\r\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removedFromScene\r\n * @since 3.50.0\r\n */\r\n removedFromScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\r\n *\r\n * @method Phaser.GameObjects.GameObject#update\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - args\r\n */\r\n update: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Returns a JSON representation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n return ComponentsToJSON(this);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.GameObject#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\r\n\r\n return !(!listWillRender || GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n },\r\n\r\n /**\r\n * Returns an array containing the display list index of either this Game Object, or if it has one,\r\n * its parent Container. It then iterates up through all of the parent containers until it hits the\r\n * root of the display list (which is index 0 in the returned array).\r\n *\r\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\r\n * this Game Object and all of its ancestors.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getIndexList\r\n * @since 3.4.0\r\n *\r\n * @return {number[]} An array of display list position indexes.\r\n */\r\n getIndexList: function ()\r\n {\r\n // eslint-disable-next-line consistent-this\r\n var child = this;\r\n var parent = this.parentContainer;\r\n\r\n var indexes = [];\r\n\r\n while (parent)\r\n {\r\n indexes.unshift(parent.getIndex(child));\r\n\r\n child = parent;\r\n\r\n if (!parent.parentContainer)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n parent = parent.parentContainer;\r\n }\r\n }\r\n\r\n if (this.displayList)\r\n {\r\n indexes.unshift(this.displayList.getIndex(child));\r\n }\r\n else\r\n {\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n }\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the given Display List.\r\n *\r\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\r\n * this Game Object belongs.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\r\n *\r\n * If this Game Object is already on another Display List when this method is called, it will first\r\n * be removed from it, before being added to the new list.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToDisplayList\r\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToDisplayList: function (displayList)\r\n {\r\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\r\n\r\n if (this.displayList && this.displayList !== displayList)\r\n {\r\n this.removeFromDisplayList();\r\n }\r\n\r\n // Don't repeat if it's already on this list\r\n if (!displayList.exists(this))\r\n {\r\n this.displayList = displayList;\r\n\r\n displayList.add(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the Update List belonging to the Scene.\r\n *\r\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\r\n * every game frame. This method is passed two parameters: `delta` and `time`.\r\n *\r\n * If you wish to run your own logic within `preUpdate` then you should always call\r\n * `super.preUpdate(delta, time)` within it, or it may fail to process required operations,\r\n * such as Sprite animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Display List it is currently on.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\r\n * and added back at a later stage.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\r\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromDisplayList: function ()\r\n {\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n if (displayList && displayList.exists(this))\r\n {\r\n displayList.remove(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.displayList = null;\r\n\r\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Scene's Update List.\r\n *\r\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\r\n * every game frame. Calling this method will remove it from the list, preventing this.\r\n *\r\n * Removing a Game Object from the Update List will stop most internal functions working.\r\n * For example, removing a Sprite from the Update List will prevent it from being able to\r\n * run animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.remove(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Game Object removing it from the Display List and Update List and\r\n * severing all ties to parent resources.\r\n *\r\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\r\n *\r\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\r\n * As long as no reference to it exists within your own code it should become free for\r\n * garbage collection by the browser.\r\n *\r\n * If you just want to temporarily disable an object then look at using the\r\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\r\n *\r\n * @method Phaser.GameObjects.GameObject#destroy\r\n * @fires Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [fromScene=false] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\n destroy: function (fromScene)\r\n {\r\n // This Game Object has already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n if (fromScene === undefined) { fromScene = false; }\r\n\r\n if (this.preDestroy)\r\n {\r\n this.preDestroy.call(this);\r\n }\r\n\r\n this.emit(Events.DESTROY, this, fromScene);\r\n\r\n this.removeAllListeners();\r\n\r\n if (this.postPipelines)\r\n {\r\n this.resetPostPipeline(true);\r\n }\r\n\r\n this.removeFromDisplayList();\r\n this.removeFromUpdateList();\r\n\r\n if (this.input)\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n }\r\n\r\n if (this.data)\r\n {\r\n this.data.destroy();\r\n\r\n this.data = undefined;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.body.destroy();\r\n\r\n this.body = undefined;\r\n }\r\n\r\n if (this.preFX)\r\n {\r\n this.preFX.destroy();\r\n\r\n this.preFX = undefined;\r\n }\r\n\r\n if (this.postFX)\r\n {\r\n this.postFX.destroy();\r\n\r\n this.postFX = undefined;\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n this.parentContainer = undefined;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\r\n *\r\n * @constant {number} RENDER_MASK\r\n * @memberof Phaser.GameObjects.GameObject\r\n * @default\r\n */\r\nGameObject.RENDER_MASK = 15;\r\n\r\nmodule.exports = GameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar PluginCache = require('../plugins/PluginCache');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and have them automatically registered with the Scene.\r\n *\r\n * Game Objects directly register themselves with the Factory and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectFactory\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectFactory = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectFactory (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Factory belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n this.events = scene.sys.events;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n this.events.once(SceneEvents.BOOT, this.boot, this);\r\n this.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Game Object to this Scene.\r\n *\r\n * If the Game Object renders, it will be added to the Display List.\r\n * If it has a `preUpdate` method, it will be added to the Update List.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#existing\r\n * @since 3.0.0\r\n *\r\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\r\n */\r\n existing: function (child)\r\n {\r\n if (child.renderCanvas || child.renderWebGL)\r\n {\r\n this.displayList.add(child);\r\n }\r\n\r\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\r\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\r\n if (child.preUpdate)\r\n {\r\n this.updateList.add(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.events = null;\r\n\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\r\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\r\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.register\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\r\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\r\n */\r\nGameObjectFactory.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectFactory.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\r\n * providing a its `factoryType`.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.remove\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\r\n */\r\nGameObjectFactory.remove = function (factoryType)\r\n{\r\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectFactory.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\r\n\r\nmodule.exports = GameObjectFactory;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TransformMatrix = require('./components/TransformMatrix');\r\n\r\nvar tempMatrix1 = new TransformMatrix();\r\nvar tempMatrix2 = new TransformMatrix();\r\nvar tempMatrix3 = new TransformMatrix();\r\n\r\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\r\n\r\n/**\r\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\r\n * the parent matrix if provided.\r\n *\r\n * Note that the object this results contains _references_ to the Transform Matrices,\r\n * not new instances of them. Therefore, you should use their values immediately, or\r\n * copy them to your own matrix, as they will be replaced as soon as another Game\r\n * Object is rendered.\r\n *\r\n * @function Phaser.GameObjects.GetCalcMatrix\r\n * @memberof Phaser.GameObjects\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\r\n *\r\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\r\n */\r\nvar GetCalcMatrix = function (src, camera, parentMatrix)\r\n{\r\n var camMatrix = tempMatrix1;\r\n var spriteMatrix = tempMatrix2;\r\n var calcMatrix = tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = GetCalcMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha property of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.AlphaSingle\r\n * @since 3.22.0\r\n */\r\n\r\nvar AlphaSingle = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = AlphaSingle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../../renderer/BlendModes');\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string|number)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.displayList)\r\n {\r\n this.displayList.queueDepthSort();\r\n }\r\n\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Effects = require('../../fx/');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class FX\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.60.0\r\n * @webglOnly\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that owns this FX Component.\r\n * @param {boolean} isPost - Is this a Pre or Post FX Component?\r\n+- *\r\n */\r\nvar FX = new Class({\r\n\r\n initialize:\r\n\r\n function FX (gameObject, isPost)\r\n {\r\n /**\r\n * A reference to the Game Object that owns this FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Is this a Post FX Controller? or a Pre FX Controller?\r\n *\r\n * @name Phaser.GameObjects.Components.FX#isPost\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.isPost = isPost;\r\n\r\n /**\r\n * Has this FX Component been enabled?\r\n *\r\n * You should treat this property as read-only.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#enabled\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * An array containing all of the FX Controllers that\r\n * have been added to this FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#list\r\n * @type {Phaser.FX.Controller[]}\r\n * @since 3.60.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * The amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX or SpriteFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#padding\r\n * @type {number}\r\n * @default 0\r\n * @since 3.60.0\r\n */\r\n this.padding = 0;\r\n },\r\n\r\n /**\r\n * Sets the amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setPadding\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPadding: function (padding)\r\n {\r\n if (padding === undefined) { padding = 0; }\r\n\r\n this.padding = padding;\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is copied by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `copySprite` method.\r\n *\r\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFXCopy\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFXCopy: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is rendered by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `drawSprite` method.\r\n *\r\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFX\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFX: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Enables this FX Component and applies the FXPipeline to the parent Game Object.\r\n *\r\n * This is called automatically whenever you call a method such as `addBloom`, etc.\r\n *\r\n * You can check the `enabled` property to see if the Game Object is already enabled, or not.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#enable\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n */\r\n enable: function (padding)\r\n {\r\n var renderer = this.gameObject.scene.sys.renderer;\r\n\r\n if (renderer && renderer.pipelines)\r\n {\r\n this.gameObject.pipeline = renderer.pipelines.FX_PIPELINE;\r\n\r\n if (padding !== undefined)\r\n {\r\n this.padding = padding;\r\n }\r\n\r\n this.enabled = true;\r\n }\r\n else\r\n {\r\n this.enabled = false;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys and removes all FX Controllers that are part of this FX Component,\r\n * then disables it.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#clear\r\n * @since 3.60.0\r\n */\r\n clear: function ()\r\n {\r\n var list = this.list;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].destroy();\r\n }\r\n\r\n this.list = [];\r\n\r\n this.enabled = false;\r\n },\r\n\r\n /**\r\n * Searches for the given FX Controler within this FX Component.\r\n *\r\n * If found, the controller is removed from this compoent and then destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#remove\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX Component.\r\n */\r\n remove: function (fx)\r\n {\r\n var list = this.list;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n if (list[i] === fx)\r\n {\r\n SpliceOne(list, i);\r\n\r\n fx.destroy();\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Disables this FX Component.\r\n *\r\n * This will reset the pipeline on the Game Object that owns this component back to its\r\n * default and flag this component as disabled.\r\n *\r\n * You can re-enable it again by calling `enable`.\r\n *\r\n * Optionally, set `clear` to destroy all current FX Controllers.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#disable\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [clear=false] - Destroy and remove all FX Controllers that are part of this FX Component.\r\n */\r\n disable: function (clear)\r\n {\r\n if (clear === undefined) { clear = false; }\r\n\r\n this.gameObject.resetPipeline();\r\n\r\n this.enabled = false;\r\n\r\n if (clear)\r\n {\r\n this.clear();\r\n }\r\n },\r\n\r\n /**\r\n * Adds the given FX Controler to this FX Component.\r\n *\r\n * Note that adding an FX Controller does not remove any existing FX. They all stack-up\r\n * on-top of each other. If you don't want this, make sure to call either `remove` or\r\n * `clear` first.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#add\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX Component.\r\n * @param {object} [config] - Optional configuration object that is passed to the pipeline during instantiation.\r\n *\r\n * @return {Phaser.FX.Controller} The FX Controller.\r\n */\r\n add: function (fx, config)\r\n {\r\n if (this.isPost)\r\n {\r\n var type = String(fx.type);\r\n\r\n this.gameObject.setPostPipeline(type, config);\r\n\r\n var pipeline = this.gameObject.getPostPipeline(type);\r\n\r\n if (pipeline)\r\n {\r\n if (Array.isArray(pipeline))\r\n {\r\n pipeline = pipeline.pop();\r\n }\r\n\r\n pipeline.controller = fx;\r\n\r\n return fx;\r\n }\r\n }\r\n else\r\n {\r\n if (!this.enabled)\r\n {\r\n this.enable();\r\n }\r\n\r\n this.list.push(fx);\r\n\r\n return fx;\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Glow effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGlow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n * @param {number} [quality=0.1] - Only available for PostFX. Sets the quality of this Glow effect. Default is 0.1. Cannot be changed post-creation.\r\n * @param {number} [distance=10] - Only available for PostFX. Sets the distance of this Glow effect. Default is 10. Cannot be changed post-creation.\r\n *\r\n * @return {Phaser.FX.Glow} The Glow FX Controller.\r\n */\r\n addGlow: function (color, outerStrength, innerStrength, knockout, quality, distance)\r\n {\r\n return this.add(new Effects.Glow(this.gameObject, color, outerStrength, innerStrength, knockout), { quality: quality, distance: distance });\r\n },\r\n\r\n /**\r\n * Adds a Shadow effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShadow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n *\r\n * @return {Phaser.FX.Shadow} The Shadow FX Controller.\r\n */\r\n addShadow: function (x, y, decay, power, color, samples, intensity)\r\n {\r\n return this.add(new Effects.Shadow(this.gameObject, x, y, decay, power, color, samples, intensity));\r\n },\r\n\r\n /**\r\n * Adds a Pixelate effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addPixelate\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n *\r\n * @return {Phaser.FX.Pixelate} The Pixelate FX Controller.\r\n */\r\n addPixelate: function (amount)\r\n {\r\n return this.add(new Effects.Pixelate(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Vignette effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addVignette\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n *\r\n * @return {Phaser.FX.Vignette} The Vignette FX Controller.\r\n */\r\n addVignette: function (x, y, radius, strength)\r\n {\r\n return this.add(new Effects.Vignette(this.gameObject, x, y, radius, strength));\r\n },\r\n\r\n /**\r\n * Adds a Shine effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShine\r\n * @since 3.60.0\r\n *\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n *\r\n * @return {Phaser.FX.Shine} The Shine FX Controller.\r\n */\r\n addShine: function (speed, lineWidth, gradient, reveal)\r\n {\r\n return this.add(new Effects.Shine(this.gameObject, speed, lineWidth, gradient, reveal));\r\n },\r\n\r\n /**\r\n * Adds a Blur effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBlur\r\n * @since 3.60.0\r\n *\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Blur} The Blur FX Controller.\r\n */\r\n addBlur: function (quality, x, y, strength, color, steps)\r\n {\r\n return this.add(new Effects.Blur(this.gameObject, quality, x, y, strength, color, steps));\r\n },\r\n\r\n /**\r\n * Adds a Gradient effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGradient\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n *\r\n * @return {Phaser.FX.Gradient} The Gradient FX Controller.\r\n */\r\n addGradient: function (color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n return this.add(new Effects.Gradient(this.gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size));\r\n },\r\n\r\n /**\r\n * Adds a Bloom effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBloom\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Bloom} The Bloom FX Controller.\r\n */\r\n addBloom: function (color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n return this.add(new Effects.Bloom(this.gameObject, color, offsetX, offsetY, blurStrength, strength, steps));\r\n },\r\n\r\n /**\r\n * Adds a ColorMatrix effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addColorMatrix\r\n * @since 3.60.0\r\n *\r\n * @return {Phaser.FX.ColorMatrix} The ColorMatrix FX Controller.\r\n */\r\n addColorMatrix: function ()\r\n {\r\n return this.add(new Effects.ColorMatrix(this.gameObject));\r\n },\r\n\r\n /**\r\n * Adds a Circle effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addCircle\r\n * @since 3.60.0\r\n *\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=16724914] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n *\r\n * @return {Phaser.FX.Circle} The Circle FX Controller.\r\n */\r\n addCircle: function (thickness, color, backgroundColor, scale, feather)\r\n {\r\n return this.add(new Effects.Circle(this.gameObject, thickness, color, backgroundColor, scale, feather));\r\n },\r\n\r\n /**\r\n * Adds a Barrel effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBarrel\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n *\r\n * @return {Phaser.FX.Barrel} The Barrel FX Controller.\r\n */\r\n addBarrel: function (amount)\r\n {\r\n return this.add(new Effects.Barrel(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Displacement effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addDisplacement\r\n * @since 3.60.0\r\n *\r\n * @param {string} [key='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply.\r\n *\r\n * @return {Phaser.FX.Displacement} The Displacement FX Controller.\r\n */\r\n addDisplacement: function (displacementTexture, x, y)\r\n {\r\n return this.add(new Effects.Displacement(this.gameObject, displacementTexture, x, y));\r\n },\r\n\r\n /**\r\n * Adds a Wipe effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addWipe\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addWipe: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis));\r\n },\r\n\r\n /**\r\n * Adds a Reveal Wipe effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addReveal\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addReveal: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis, true));\r\n },\r\n\r\n /**\r\n * Adds a Bokeh effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBokeh\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh FX Controller.\r\n */\r\n addBokeh: function (radius, amount, contrast)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast));\r\n },\r\n\r\n /**\r\n * Adds a TiltShift effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addTiltShift\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {number} [blurX=1] - If Tilt Shift, the amount of horizontal blur.\r\n * @param {number} [blurY=1] - If Tilt Shift, the amount of vertical blur.\r\n * @param {number} [strength=1] - If Tilt Shift, the strength of the blur.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh TiltShift FX Controller.\r\n */\r\n addTiltShift: function (radius, amount, contrast, blurX, blurY, strength)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast, true, blurX, blurY, strength));\r\n },\r\n\r\n /**\r\n * Destroys this FX Component.\r\n *\r\n * Called automatically when Game Objects are destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.clear();\r\n\r\n this.gameObject = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar RotateAround = require('../../math/RotateAround');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getCenter: function (output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is\r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = require('../../display/mask/BitmapMask');\r\nvar GeometryMask = require('../../display/mask/GeometryMask');\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n *\r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n *\r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one, or a Dynamic Texture.\r\n *\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable texture-based Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G\r\n * @generic {Phaser.Textures.DynamicTexture} T\r\n * @genericUse {(G|T|null)} [maskObject]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (maskObject, x, y, texture, frame)\r\n {\r\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n maskObject = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n *\r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G\r\n * @generic {Phaser.GameObjects.Shape} S\r\n * @genericUse {(G|S)} [graphics]\r\n *\r\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && (this.type === 'Graphics' || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = require('../../math/DegToRad');\r\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar TWEEN_CONST = require('../../tweens/tween/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The distance the follower has traveled from the previous point to the current one, at the last update.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathDelta\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.23.0\r\n */\r\n pathDelta: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.setTargetValue();\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n if (!this.pathDelta)\r\n {\r\n this.pathDelta = new Vector2();\r\n }\r\n\r\n this.pathDelta.reset();\r\n\r\n config.persist = true;\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n var pathDelta = this.pathDelta;\r\n var pathVector = this.pathVector;\r\n\r\n pathDelta.copy(pathVector).negate();\r\n\r\n if (tweenData.state === TWEEN_CONST.COMPLETE)\r\n {\r\n this.path.getPoint(tweenData.end, pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n return;\r\n }\r\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n pipelineData: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n *\r\n * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipeline)\r\n {\r\n this.pipelineData = {};\r\n\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return false;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n if (pipeline === undefined)\r\n {\r\n pipeline = pipelines.default;\r\n }\r\n\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.defaultPipeline = instance;\r\n this.pipeline = instance;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the main WebGL Pipeline of this Game Object.\r\n *\r\n * Also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipeline, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.pipeline = instance;\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipelineData: function (key, value)\r\n {\r\n var data = this.pipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n *\r\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\r\n */\r\n resetPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n this.pipeline = this.defaultPipeline;\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\nvar FX = require('../components/FX');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering post pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n\r\nvar PostPipeline = {\r\n\r\n /**\r\n * Does this Game Object have any Post Pipelines set?\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#hasPostPipeline\r\n * @type {boolean}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n hasPostPipeline: false,\r\n\r\n /**\r\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\r\n *\r\n * The pipelines are processed in the order in which they appear in this array.\r\n *\r\n * If you modify this array directly, be sure to set the\r\n * `hasPostPipeline` property accordingly.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelines\r\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelines: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelineData: null,\r\n\r\n /**\r\n * The Pre FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.preFX.addBloom();\r\n * ```\r\n *\r\n * Only the following Game Objects support Pre FX:\r\n *\r\n * * Image\r\n * * Sprite\r\n * * TileSprite\r\n * * Text\r\n * * RenderTexture\r\n * * Video\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#preFX\r\n * @type {Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n preFX: null,\r\n\r\n /**\r\n * The Post FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.postFX.addBloom();\r\n * ```\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postFX\r\n * @type {Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postFX: null,\r\n\r\n /**\r\n * This should only be called during the instantiation of the Game Object.\r\n *\r\n * It is called by default by all core Game Objects and doesn't need\r\n * calling again.\r\n *\r\n * After that, use `setPostPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#initPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [preFX=false] - Does this Game Object support Pre FX?\r\n */\r\n initPostPipeline: function (preFX)\r\n {\r\n this.postPipelines = [];\r\n this.postPipelineData = {};\r\n\r\n this.postFX = new FX(this, true);\r\n\r\n if (preFX)\r\n {\r\n this.preFX = new FX(this, false);\r\n }\r\n },\r\n\r\n /**\r\n * Sets one, or more, Post Pipelines on this Game Object.\r\n *\r\n * Post Pipelines are invoked after this Game Object has rendered to its target and\r\n * are commonly used for post-fx.\r\n *\r\n * The post pipelines are appended to the `postPipelines` array belonging to this\r\n * Game Object. When the renderer processes this Game Object, it iterates through the post\r\n * pipelines in the order in which they appear in the array. If you are stacking together\r\n * multiple effects, be aware that the order is important.\r\n *\r\n * If you call this method multiple times, the new pipelines will be appended to any existing\r\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\r\n *\r\n * You can optionally also set the `postPipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `postPipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `postPipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipeline: function (pipelines, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelineManager = renderer.pipelines;\r\n\r\n if (pipelineManager)\r\n {\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelineManager.getPostPipeline(pipelines[i], this, pipelineData);\r\n\r\n if (instance)\r\n {\r\n this.postPipelines.push(instance);\r\n }\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.postPipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `postPipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipelineData\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipelineData: function (key, value)\r\n {\r\n var data = this.postPipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#getPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} An array of all the Post Pipelines matching the name. This array will be empty if there was no match. If there was only one single match, that pipeline is returned directly, not in an array.\r\n */\r\n getPostPipeline: function (pipeline)\r\n {\r\n var isString = (typeof pipeline === 'string');\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n var results = [];\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\r\n {\r\n results.push(instance);\r\n }\r\n }\r\n\r\n return (results.length === 1) ? results[0] : results;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\r\n * the `destroy` method on each post pipeline and then clearing the local array.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#resetPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `postPipelineData` object to being an empty object?\r\n */\r\n resetPostPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n pipelines[i].destroy();\r\n }\r\n\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n\r\n if (resetData)\r\n {\r\n this.postPipelineData = {};\r\n }\r\n },\r\n\r\n /**\r\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\r\n *\r\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#removePostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removePostPipeline: function (pipeline)\r\n {\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = pipelines.length - 1; i >= 0; i--)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if (\r\n (typeof pipeline === 'string' && instance.name === pipeline) ||\r\n (typeof pipeline !== 'string' && instance instanceof pipeline))\r\n {\r\n instance.destroy();\r\n\r\n SpliceOne(pipelines, i);\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PostPipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleX * this.frame.realWidth);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleY * this.frame.realHeight);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame|boolean} [frame] - The frame to base the size of this Game Object on.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (!frame) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n var input = this.input;\r\n\r\n if (input && !input.customHitArea)\r\n {\r\n input.hitArea.width = this.width;\r\n input.hitArea.height = this.height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the tint of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Tint\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Tint = {\r\n\r\n /**\r\n * The tint value being applied to the top-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the top-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopRight: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomRight: 0xffffff,\r\n\r\n /**\r\n * The tint fill mode.\r\n *\r\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\r\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n tintFill: false,\r\n\r\n /**\r\n * Clears all tint values associated with this Game Object.\r\n *\r\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\r\n * which results in no visible change to the texture.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#clearTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearTint: function ()\r\n {\r\n this.setTint(0xffffff);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an additive tint on this Game Object.\r\n *\r\n * The tint works by taking the pixel color values from the Game Objects texture, and then\r\n * multiplying it by the color value of the tint. You can provide either one color value,\r\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\r\n * per corner. The colors are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 0xffffff; }\r\n\r\n if (topRight === undefined)\r\n {\r\n topRight = topLeft;\r\n bottomLeft = topLeft;\r\n bottomRight = topLeft;\r\n }\r\n\r\n this.tintTopLeft = topLeft;\r\n this.tintTopRight = topRight;\r\n this.tintBottomLeft = bottomLeft;\r\n this.tintBottomRight = bottomRight;\r\n\r\n this.tintFill = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a fill-based tint on this Game Object.\r\n *\r\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\r\n * with those in the tint. You can use this for effects such as making a player flash 'white'\r\n * if hit by something. You can provide either one color value, in which case the whole\r\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\r\n * are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTintFill\r\n * @webglOnly\r\n * @since 3.11.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n\r\n this.tintFill = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The tint value being applied to the whole of the Game Object.\r\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tint\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tint: {\r\n\r\n set: function (value)\r\n {\r\n this.setTint(value, value, value, value);\r\n }\r\n },\r\n\r\n /**\r\n * Does this Game Object have a tint applied?\r\n *\r\n * It checks to see if the 4 tint properties are set to the value 0xffffff\r\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#isTinted\r\n * @type {boolean}\r\n * @webglOnly\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n isTinted: {\r\n\r\n get: function ()\r\n {\r\n var white = 0xffffff;\r\n\r\n return (\r\n this.tintFill ||\r\n this.tintTopLeft !== white ||\r\n this.tintTopRight !== white ||\r\n this.tintBottomLeft !== white ||\r\n this.tintBottomRight !== white\r\n );\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Tint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../../math/const');\r\nvar TransformMatrix = require('./TransformMatrix');\r\nvar TransformXY = require('../../math/TransformXY');\r\nvar WrapAngle = require('../../math/angle/Wrap');\r\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Transform\r\n * @since 3.0.0\r\n */\r\n\r\nvar Transform = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\r\n * @type {boolean}\r\n * @readonly\r\n * @default true\r\n * @since 3.60.0\r\n */\r\n hasTransformComponent: true,\r\n\r\n /**\r\n * Private internal value. Holds the horizontal scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleX\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleX: 1,\r\n\r\n /**\r\n * Private internal value. Holds the vertical scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleY\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleY: 1,\r\n\r\n /**\r\n * Private internal value. Holds the rotation value in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _rotation: 0,\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: 0,\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: 0,\r\n\r\n /**\r\n * The z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: 0,\r\n\r\n /**\r\n * The w position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: 0,\r\n\r\n /**\r\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\r\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\r\n *\r\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\r\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.18.0\r\n */\r\n scale: {\r\n\r\n get: function ()\r\n {\r\n return (this._scaleX + this._scaleY) / 2;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleY !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleX !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The angle of this Game Object as expressed in degrees.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in radians, see the `rotation` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * The angle of this Game Object in radians.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\r\n * and -PI/2 is up.\r\n *\r\n * If you prefer to work in degrees, see the `angle` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#rotation\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of this Game Object.\r\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\r\n * @param {number} [z=0] - The z position of this Game Object.\r\n * @param {number} [w=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPosition: function (x, y, z, w)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n if (z === undefined) { z = 0; }\r\n if (w === undefined) { w = 0; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies an object's coordinates to this Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#copyPosition\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n copyPosition: function (source)\r\n {\r\n if (source.x !== undefined) { this.x = source.x; }\r\n if (source.y !== undefined) { this.y = source.y; }\r\n if (source.z !== undefined) { this.z = source.z; }\r\n if (source.w !== undefined) { this.w = source.w; }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object to be a random position within the confines of\r\n * the given area.\r\n *\r\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\r\n *\r\n * The position does not factor in the size of this Game Object, meaning that only the origin is\r\n * guaranteed to be within the area.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\r\n * @since 3.8.0\r\n *\r\n * @param {number} [x=0] - The x position of the top-left of the random area.\r\n * @param {number} [y=0] - The y position of the top-left of the random area.\r\n * @param {number} [width] - The width of the random area.\r\n * @param {number} [height] - The height of the random area.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRandomPosition: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n\r\n this.x = x + (Math.random() * width);\r\n this.y = y + (Math.random() * height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this.rotation = radians;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=1] - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScale: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scaleX = x;\r\n this.scaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the x position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The x position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setX: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the y position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The y position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setY: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The z position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setZ: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.z = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the w position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setW\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setW: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.w = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the local transform matrix for this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getLocalTransformMatrix: function (tempMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n },\r\n\r\n /**\r\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n var parent = this.parentContainer;\r\n\r\n if (!parent)\r\n {\r\n return this.getLocalTransformMatrix(tempMatrix);\r\n }\r\n\r\n if (!parentMatrix)\r\n {\r\n parentMatrix = new TransformMatrix();\r\n }\r\n\r\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n\r\n while (parent)\r\n {\r\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\r\n\r\n parentMatrix.multiply(tempMatrix, tempMatrix);\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return tempMatrix;\r\n },\r\n\r\n /**\r\n * Takes the given `x` and `y` coordinates and converts them into local space for this\r\n * Game Object, taking into account parent and local transforms, and the Display Origin.\r\n *\r\n * The returned Vector2 contains the translated point in its properties.\r\n *\r\n * A Camera needs to be provided in order to handle modified scroll factors. If no\r\n * camera is specified, it will use the `main` camera from the Scene to which this\r\n * Game Object belongs.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\r\n *\r\n * @return {Phaser.Math.Vector2} The translated point.\r\n */\r\n getLocalPoint: function (x, y, point, camera)\r\n {\r\n if (!point) { point = new Vector2(); }\r\n if (!camera) { camera = this.scene.sys.cameras.main; }\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n var px = x + (csx * this.scrollFactorX) - csx;\r\n var py = y + (csy * this.scrollFactorY) - csy;\r\n\r\n if (this.parentContainer)\r\n {\r\n this.getWorldTransformMatrix().applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\r\n }\r\n\r\n // Normalize origin\r\n if (this._originComponent)\r\n {\r\n point.x += this._displayOriginX;\r\n point.y += this._displayOriginY;\r\n }\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Gets the sum total rotation of all of this Game Objects parent Containers.\r\n *\r\n * The returned value is in radians and will be zero if this Game Object has no parent container.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\r\n * @since 3.18.0\r\n *\r\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\r\n */\r\n getParentRotation: function ()\r\n {\r\n var rotation = 0;\r\n\r\n var parent = this.parentContainer;\r\n\r\n while (parent)\r\n {\r\n rotation += parent.rotation;\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return rotation;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n\r\n /**\r\n * The temporary quad value cache.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\r\n * @type {Float32Array}\r\n * @since 3.60.0\r\n */\r\n this.quad = new Float32Array(8);\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n\r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n\r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? matrix : out.matrix;\r\n\r\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix[5] = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n *\r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point in to the local space of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {Phaser.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n *\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n *\r\n * The result must be applied in the following order to reproduce the current matrix:\r\n *\r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.DecomposeMatrixResults} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n *\r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Performs the 8 calculations required to create the vertices of\r\n * a quad based on this matrix and the given x/y/xw/yh values.\r\n *\r\n * The result is stored in `TransformMatrix.quad`, which is returned\r\n * from this method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\r\n * @since 3.60.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} xw - The xw value.\r\n * @param {number} yh - The yh value.\r\n * @param {boolean} roundPixels - Pass the results via Math.round?\r\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\r\n *\r\n * @return {Float32Array} The quad Float32Array.\r\n */\r\n setQuad: function (x, y, xw, yh, roundPixels, quad)\r\n {\r\n if (quad === undefined) { quad = this.quad; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var e = matrix[4];\r\n var f = matrix[5];\r\n\r\n quad[0] = x * a + y * c + e;\r\n quad[1] = x * b + y * d + f;\r\n\r\n quad[2] = x * a + yh * c + e;\r\n quad[3] = x * b + yh * d + f;\r\n\r\n quad[4] = xw * a + yh * c + e;\r\n quad[5] = xw * b + yh * d + f;\r\n\r\n quad[6] = xw * a + y * c + e;\r\n quad[7] = xw * b + y * d + f;\r\n\r\n if (roundPixels)\r\n {\r\n quad.forEach(function (value, index)\r\n {\r\n quad[index] = Math.round(value);\r\n });\r\n }\r\n\r\n return quad;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.quad = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: require('./Alpha'),\r\n AlphaSingle: require('./AlphaSingle'),\r\n BlendMode: require('./BlendMode'),\r\n ComputedSize: require('./ComputedSize'),\r\n Crop: require('./Crop'),\r\n Depth: require('./Depth'),\r\n Flip: require('./Flip'),\r\n FX: require('./FX'),\r\n GetBounds: require('./GetBounds'),\r\n Mask: require('./Mask'),\r\n Origin: require('./Origin'),\r\n PathFollower: require('./PathFollower'),\r\n Pipeline: require('./Pipeline'),\r\n PostPipeline: require('./PostPipeline'),\r\n ScrollFactor: require('./ScrollFactor'),\r\n Size: require('./Size'),\r\n Texture: require('./Texture'),\r\n TextureCrop: require('./TextureCrop'),\r\n Tint: require('./Tint'),\r\n ToJSON: require('./ToJSON'),\r\n Transform: require('./Transform'),\r\n TransformMatrix: require('./TransformMatrix'),\r\n Visible: require('./Visible')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = require('../../utils/array');\r\nvar BlendModes = require('../../renderer/BlendModes');\r\nvar Class = require('../../utils/Class');\r\nvar Components = require('../components');\r\nvar Events = require('../events');\r\nvar GameObject = require('../GameObject');\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar Render = require('./ContainerRender');\r\nvar Union = require('../../geom/rectangle/Union');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * The transform point of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\r\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\r\n * the Container, and position children positively and negative around it as required.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\r\n * or the input area will become misaligned.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.AlphaSingle\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.PostPipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.AlphaSingle,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.PostPipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {number}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.initPostPipeline();\r\n\r\n this.setPosition(x, y);\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {this} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\r\n\r\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\r\n }\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n var hasSetFirst = false;\r\n\r\n output.setEmpty();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getTextBounds)\r\n {\r\n var textBounds = entry.getTextBounds().global;\r\n tempRect.setTo(textBounds.x, textBounds.y, textBounds.width, textBounds.height);\r\n }\r\n else if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n }\r\n else\r\n {\r\n continue;\r\n }\r\n\r\n if (!hasSetFirst)\r\n {\r\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\r\n hasSetFirst = true;\r\n }\r\n else\r\n {\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.parentContainer = this;\r\n\r\n gameObject.removeFromDisplayList();\r\n\r\n gameObject.addedToScene();\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n\r\n gameObject.removedFromScene();\r\n\r\n gameObject.addToDisplayList();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n this.parentContainer.pointToContainer(source, output);\r\n }\r\n else\r\n {\r\n output.x = source.x;\r\n output.y = source.y;\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n *\r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {number} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {number} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {number} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {number} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object above another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveAbove\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveAbove: function (child1, child2)\r\n {\r\n ArrayUtils.MoveAbove(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object below another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveBelow\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveBelow: function (child1, child2)\r\n {\r\n ArrayUtils.MoveBelow(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var list = this.list;\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n if (list[i] && list[i].scene)\r\n {\r\n list[i].off(Events.DESTROY, this.remove, this);\r\n\r\n list[i].destroy();\r\n }\r\n }\r\n\r\n this.list = [];\r\n }\r\n else\r\n {\r\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [oldChild,newChild]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Container#setScrollFactor\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar NOOP = require('../../utils/NOOP');\r\nvar renderWebGL = NOOP;\r\nvar renderCanvas = NOOP;\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./ContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./ContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderWebGL\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n var childCount = children.length;\r\n\r\n if (childCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n renderer.pipelines.preBatch(container);\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container.alpha;\r\n\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlphaTopLeft;\r\n var childAlphaTopRight;\r\n var childAlphaBottomLeft;\r\n var childAlphaBottomRight;\r\n\r\n if (child.alphaTopLeft !== undefined)\r\n {\r\n childAlphaTopLeft = child.alphaTopLeft;\r\n childAlphaTopRight = child.alphaTopRight;\r\n childAlphaBottomLeft = child.alphaBottomLeft;\r\n childAlphaBottomRight = child.alphaBottomRight;\r\n }\r\n else\r\n {\r\n var childAlpha = child.alpha;\r\n\r\n childAlphaTopLeft = childAlpha;\r\n childAlphaTopRight = childAlpha;\r\n childAlphaBottomLeft = childAlpha;\r\n childAlphaBottomRight = childAlpha;\r\n }\r\n\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n mask.preRenderWebGL(renderer, child, camera);\r\n }\r\n\r\n var type = child.type;\r\n\r\n if (type !== renderer.currentType)\r\n {\r\n renderer.newType = true;\r\n renderer.currentType = type;\r\n }\r\n\r\n renderer.nextTypeMatch = (i < childCount - 1) ? (children[i + 1].type === renderer.currentType) : false;\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n\r\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\r\n\r\n // Render\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n // Restore original values\r\n\r\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\r\n\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n\r\n if (mask)\r\n {\r\n mask.postRenderWebGL(renderer, camera);\r\n }\r\n\r\n renderer.newType = false;\r\n }\r\n\r\n renderer.pipelines.postBatch(container);\r\n};\r\n\r\nmodule.exports = ContainerWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n *\r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n *\r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n *\r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n *\r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n *\r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {number} width - The width of the video.\r\n * @param {number} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n *\r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n *\r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n *\r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n *\r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n *\r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n *\r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n *\r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Timeout Event.\r\n *\r\n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\r\n * source to start playback.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\r\n */\r\nmodule.exports = 'timeout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n *\r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n *\r\n * @name Phaser.Geom.CIRCLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n *\r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n *\r\n * @name Phaser.Geom.LINE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n *\r\n * @name Phaser.Geom.POINT\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n *\r\n * @name Phaser.Geom.POLYGON\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = require('./Length');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Random = require('./Random');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GEOM_CONST = require('../const');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {this} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = require('./Perimeter');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = require('./GetPoint');\r\nvar Perimeter = require('./Perimeter');\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\r\n * @param {number} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Contains = require('./Contains');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Line = require('../line/Line');\r\nvar Random = require('./Random');\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('./Rectangle');\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\nvar GetURL = require('./GetURL');\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\nvar XHRLoader = require('./XHRLoader');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * @classdesc\r\n * The base File class used by all File Types that the Loader can support.\r\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class File\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\r\n */\r\nvar File = new Class({\r\n\r\n initialize:\r\n\r\n function File (loader, fileConfig)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.File#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\r\n *\r\n * @name Phaser.Loader.File#cache\r\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\r\n * @since 3.7.0\r\n */\r\n this.cache = GetFastValue(fileConfig, 'cache', false);\r\n\r\n /**\r\n * The file type string (image, json, etc) for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.File#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(fileConfig, 'type', false);\r\n\r\n if (!this.type)\r\n {\r\n throw new Error('Invalid File type: ' + this.type);\r\n }\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.File#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = GetFastValue(fileConfig, 'key', false);\r\n\r\n var loadKey = this.key;\r\n\r\n if (loader.prefix && loader.prefix !== '')\r\n {\r\n this.key = loader.prefix + loadKey;\r\n }\r\n\r\n if (!this.key)\r\n {\r\n throw new Error('Invalid File key: ' + this.key);\r\n }\r\n\r\n var url = GetFastValue(fileConfig, 'url');\r\n\r\n if (url === undefined)\r\n {\r\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n url = loader.path + url;\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n *\r\n * Automatically has Loader.path prepended to it if a string.\r\n *\r\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {object|string}\r\n * @since 3.0.0\r\n */\r\n this.url = url;\r\n\r\n /**\r\n * The final URL this file will load from, including baseURL and path.\r\n * Set automatically when the Loader calls 'load' on this file.\r\n *\r\n * @name Phaser.Loader.File#src\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.src = '';\r\n\r\n /**\r\n * The merged XHRSettings for this file.\r\n *\r\n * @name Phaser.Loader.File#xhrSettings\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\r\n\r\n if (GetFastValue(fileConfig, 'xhrSettings', false))\r\n {\r\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\r\n }\r\n\r\n /**\r\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\r\n *\r\n * @name Phaser.Loader.File#xhrLoader\r\n * @type {?XMLHttpRequest}\r\n * @since 3.0.0\r\n */\r\n this.xhrLoader = null;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.File#state\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\r\n\r\n /**\r\n * The total size of this file.\r\n * Set by onProgress and only if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesTotal\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bytesTotal = 0;\r\n\r\n /**\r\n * Updated as the file loads.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesLoaded\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.bytesLoaded = -1;\r\n\r\n /**\r\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#percentComplete\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.percentComplete = -1;\r\n\r\n /**\r\n * For CORs based loading.\r\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\r\n *\r\n * @name Phaser.Loader.File#crossOrigin\r\n * @type {(string|undefined)}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = undefined;\r\n\r\n /**\r\n * The processed file data, stored here after the file has loaded.\r\n *\r\n * @name Phaser.Loader.File#data\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.data = undefined;\r\n\r\n /**\r\n * A config object that can be used by file types to store transitional data.\r\n *\r\n * @name Phaser.Loader.File#config\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.config = GetFastValue(fileConfig, 'config', {});\r\n\r\n /**\r\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\r\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\r\n *\r\n * @name Phaser.Loader.File#multiFile\r\n * @type {?Phaser.Loader.MultiFile}\r\n * @since 3.7.0\r\n */\r\n this.multiFile;\r\n\r\n /**\r\n * Does this file have an associated linked file? Such as an image and a normal map.\r\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\r\n * actually bound by data, where-as a linkFile is.\r\n *\r\n * @name Phaser.Loader.File#linkFile\r\n * @type {?Phaser.Loader.File}\r\n * @since 3.7.0\r\n */\r\n this.linkFile;\r\n },\r\n\r\n /**\r\n * Links this File with another, so they depend upon each other for loading and processing.\r\n *\r\n * @method Phaser.Loader.File#setLink\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\r\n */\r\n setLink: function (fileB)\r\n {\r\n this.linkFile = fileB;\r\n\r\n fileB.linkFile = this;\r\n },\r\n\r\n /**\r\n * Resets the XHRLoader instance this file is using.\r\n *\r\n * @method Phaser.Loader.File#resetXHR\r\n * @since 3.0.0\r\n */\r\n resetXHR: function ()\r\n {\r\n if (this.xhrLoader)\r\n {\r\n this.xhrLoader.onload = undefined;\r\n this.xhrLoader.onerror = undefined;\r\n this.xhrLoader.onprogress = undefined;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.File#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\r\n this.loader.nextFile(this, true);\r\n }\r\n else\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n // The creation of this XHRLoader starts the load process going.\r\n // It will automatically call the following, based on the load outcome:\r\n //\r\n // xhr.onload = this.onLoad\r\n // xhr.onerror = this.onError\r\n // xhr.onprogress = this.onProgress\r\n\r\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onLoad\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\r\n */\r\n onLoad: function (xhr, event)\r\n {\r\n var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\r\n {\r\n return xhr.responseURL.indexOf(scheme) === 0;\r\n });\r\n\r\n var localFileOk = (isLocalFile && event.target.status === 0);\r\n\r\n var success = !(event.target && event.target.status !== 200) || localFileOk;\r\n\r\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\r\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\r\n {\r\n success = false;\r\n }\r\n\r\n this.state = CONST.FILE_LOADED;\r\n\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, success);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onError\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\r\n */\r\n onError: function ()\r\n {\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n *\r\n * @param {ProgressEvent} event - The DOM ProgressEvent.\r\n */\r\n onProgress: function (event)\r\n {\r\n if (event.lengthComputable)\r\n {\r\n this.bytesLoaded = event.loaded;\r\n this.bytesTotal = event.total;\r\n\r\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\r\n *\r\n * @method Phaser.Loader.File#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessComplete\r\n * @since 3.7.0\r\n */\r\n onProcessComplete: function ()\r\n {\r\n this.state = CONST.FILE_COMPLETE;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileComplete(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing but it generated an error.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessError\r\n * @since 3.7.0\r\n */\r\n onProcessError: function ()\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\r\n\r\n this.state = CONST.FILE_ERRORED;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileFailed(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Checks if a key matching the one used by this file exists in the target Cache or not.\r\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\r\n * loaded or will conflict.\r\n *\r\n * @method Phaser.Loader.File#hasCacheConflict\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\r\n */\r\n hasCacheConflict: function ()\r\n {\r\n return (this.cache && this.cache.exists(this.key));\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n * This method is often overridden by specific file types.\r\n *\r\n * @method Phaser.Loader.File#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.cache && this.data)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\r\n },\r\n\r\n /**\r\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.File#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.7.0\r\n */\r\n pendingDestroy: function (data)\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n if (data === undefined) { data = this.data; }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this File and any references it holds.\r\n *\r\n * @method Phaser.Loader.File#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.cache = null;\r\n this.xhrSettings = null;\r\n this.multiFile = null;\r\n this.linkFile = null;\r\n this.data = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\r\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\r\n *\r\n * @method Phaser.Loader.File.createObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\r\n * @param {Blob} blob - A Blob object to create an object URL for.\r\n * @param {string} defaultType - Default mime type used if blob type is not available.\r\n */\r\nFile.createObjectURL = function (image, blob, defaultType)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n image.src = URL.createObjectURL(blob);\r\n }\r\n else\r\n {\r\n var reader = new FileReader();\r\n\r\n reader.onload = function ()\r\n {\r\n image.removeAttribute('crossOrigin');\r\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\r\n };\r\n\r\n reader.onerror = image.onerror;\r\n\r\n reader.readAsDataURL(blob);\r\n }\r\n};\r\n\r\n/**\r\n * Static method for releasing an existing object URL which was previously created\r\n * by calling {@link File#createObjectURL} method.\r\n *\r\n * @method Phaser.Loader.File.revokeObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\r\n */\r\nFile.revokeObjectURL = function (image)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n URL.revokeObjectURL(image.src);\r\n }\r\n};\r\n\r\nmodule.exports = File;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n *\r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n *\r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n *\r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n var finalFiles = [];\r\n\r\n // Clean out any potential 'null' or 'undefined' file entries\r\n files.forEach(function (file)\r\n {\r\n if (file)\r\n {\r\n finalFiles.push(file);\r\n }\r\n });\r\n\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {number}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = finalFiles;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.MultiFile#state\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.state = CONST.FILE_PENDING;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {number}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = finalFiles.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < finalFiles.length; i++)\r\n {\r\n finalFiles[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n\r\n // eslint-disable-next-line no-console\r\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\r\n }\r\n },\r\n\r\n /**\r\n * Called once all children of this multi file have been added to their caches and is now\r\n * ready for deletion from the Loader.\r\n *\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.MultiFile#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.60.0\r\n */\r\n pendingDestroy: function ()\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n for (var i = 0; i < this.files.length; i++)\r\n {\r\n this.files[i].pendingDestroy();\r\n }\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this Multi File and any references it holds.\r\n *\r\n * @method Phaser.Loader.MultiFile#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.files = null;\r\n this.config = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {number} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n *\r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n *\r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n *\r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n *\r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n *\r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n *\r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n *\r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing.\r\n *\r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load.\r\n *\r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n *\r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n *\r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n *\r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request.\r\n *\r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19,\r\n\r\n /**\r\n * File is pending being destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING_DESTROY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n FILE_PENDING_DESTROY: 20\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n *\r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n *\r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n *\r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {number} totalComplete - The total number of files that successfully loaded.\r\n * @param {number} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n *\r\n * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n *\r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n *\r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n *\r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n *\r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n *\r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n *\r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n *\r\n * This event is dispatched even if there aren't any files in the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\nvar GetURL = require('../GetURL');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n\r\n this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\r\n\r\n if (this.useImageElementLoad)\r\n {\r\n this.load = this.loadImage;\r\n this.onProcess = this.onProcessImage;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Handles image load processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n onProcessImage: function ()\r\n {\r\n var result = this.state;\r\n\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n if (result === CONST.FILE_LOADED)\r\n {\r\n this.onProcessComplete();\r\n }\r\n else\r\n {\r\n this.onProcessError();\r\n }\r\n },\r\n\r\n /**\r\n * Loads the image using either XHR or an Image tag.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n loadImage: function ()\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n _this.state = CONST.FILE_LOADED;\r\n\r\n _this.loader.nextFile(_this, true);\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n _this.loader.nextFile(_this, false);\r\n };\r\n\r\n this.data.src = this.src;\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n // Check if we have a linked normal map\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile)\r\n {\r\n // We do, but has it loaded?\r\n if (linkFile.state >= CONST.FILE_COMPLETE)\r\n {\r\n // Both files have loaded\r\n if (this.type === 'normalMap')\r\n {\r\n // linkFile.data = Image\r\n // this.data = Normal Map\r\n this.cache.addImage(this.key, linkFile.data, this.data);\r\n }\r\n else\r\n {\r\n // linkFile.data = Normal Map\r\n // this.data = Image\r\n this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n }\r\n\r\n // Nothing to do here, we'll use the linkFile `addToCache` call\r\n // to process this pair\r\n }\r\n else\r\n {\r\n this.cache.addImage(this.key, this.data);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\r\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\r\n * via the Image tag instead.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\r\n *\r\n * @class JSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar JSONFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function JSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n var extension = 'json';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataKey = GetFastValue(config, 'dataKey', dataKey);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'json',\r\n cache: loader.cacheManager.json,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: dataKey\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\r\n if (IsPlainObject(url))\r\n {\r\n if (dataKey)\r\n {\r\n this.data = GetValue(url, dataKey);\r\n }\r\n else\r\n {\r\n this.data = url;\r\n }\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n try\r\n {\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n catch (e)\r\n {\r\n this.onProcessError();\r\n\r\n throw e;\r\n }\r\n\r\n var key = this.config;\r\n\r\n if (typeof key === 'string')\r\n {\r\n this.data = GetValue(json, key, json);\r\n }\r\n else\r\n {\r\n this.data = json;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON file, or array of JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.json({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n *\r\n * ```json\r\n * {\r\n * \"level1\": {\r\n * \"baddies\": {\r\n * \"aliens\": {},\r\n * \"boss\": {}\r\n * }\r\n * },\r\n * \"level2\": {},\r\n * \"level3\": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#json\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new JSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = JSONFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var type = 'text';\r\n var extension = 'txt';\r\n var cache = loader.cacheManager.text;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n type = GetFastValue(config, 'type', type);\r\n cache = GetFastValue(config, 'cache', cache);\r\n }\r\n\r\n var fileConfig = {\r\n type: type,\r\n cache: cache,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {number} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\nvar Class = require('../utils/Class');\r\nvar Matrix4 = require('./Matrix4');\r\nvar NOOP = require('../utils/NOOP');\r\n\r\nvar tempMatrix = new Matrix4();\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Euler\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Euler = new Class({\r\n\r\n initialize:\r\n\r\n function Euler (x, y, z, order)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (z === undefined) { z = 0; }\r\n if (order === undefined) { order = Euler.DefaultOrder; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback = NOOP;\r\n },\r\n\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n order: {\r\n get: function ()\r\n {\r\n return this._order;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._order = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n set: function (x, y, z, order)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n copy: function (euler)\r\n {\r\n return this.set(euler.x, euler.y, euler.z, euler.order);\r\n },\r\n\r\n setFromQuaternion: function (quaternion, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n tempMatrix.fromQuat(quaternion);\r\n\r\n return this.setFromRotationMatrix(tempMatrix, order, update);\r\n },\r\n\r\n setFromRotationMatrix: function (matrix, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n var elements = matrix.val;\r\n\r\n // Upper 3x3 of matrix is un-scaled rotation matrix\r\n var m11 = elements[0];\r\n var m12 = elements[4];\r\n var m13 = elements[8];\r\n var m21 = elements[1];\r\n var m22 = elements[5];\r\n var m23 = elements[9];\r\n var m31 = elements[2];\r\n var m32 = elements[6];\r\n var m33 = elements[10];\r\n\r\n var x = 0;\r\n var y = 0;\r\n var z = 0;\r\n var epsilon = 0.99999;\r\n\r\n switch (order)\r\n {\r\n case 'XYZ':\r\n {\r\n y = Math.asin(Clamp(m13, -1, 1));\r\n\r\n if (Math.abs(m13) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m33);\r\n z = Math.atan2(-m12, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(m32, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n x = Math.asin(-Clamp(m23, -1, 1));\r\n\r\n if (Math.abs(m23) < epsilon)\r\n {\r\n y = Math.atan2(m13, m33);\r\n z = Math.atan2(m21, m22);\r\n }\r\n else\r\n {\r\n y = Math.atan2(-m31, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n x = Math.asin(Clamp(m32, -1, 1));\r\n\r\n if (Math.abs(m32) < epsilon)\r\n {\r\n y = Math.atan2(-m31, m33);\r\n z = Math.atan2(-m12, m22);\r\n }\r\n else\r\n {\r\n z = Math.atan2(m21, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n y = Math.asin(-Clamp(m31, -1, 1));\r\n\r\n if (Math.abs(m31) < epsilon)\r\n {\r\n x = Math.atan2(m32, m33);\r\n z = Math.atan2(m21, m11);\r\n }\r\n else\r\n {\r\n z = Math.atan2(-m12, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n z = Math.asin(Clamp(m21, -1, 1));\r\n\r\n if (Math.abs(m21) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m22);\r\n y = Math.atan2(-m31, m11);\r\n }\r\n else\r\n {\r\n y = Math.atan2(m13, m33);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n z = Math.asin(-Clamp(m12, -1, 1));\r\n\r\n if (Math.abs(m12) < epsilon)\r\n {\r\n x = Math.atan2(m32, m22);\r\n y = Math.atan2(m13, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(-m23, m33);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\r\n\r\nEuler.DefaultOrder = 'XYZ';\r\n\r\nmodule.exports = Euler;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent + min;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {number} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Greg McLean \r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Interpolates two given Vectors and returns a new Vector between them.\r\n *\r\n * Does not modify either of the passed Vectors.\r\n *\r\n * @function Phaser.Math.LinearXY\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\r\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\r\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\r\n */\r\nvar LinearXY = function (vector1, vector2, t)\r\n{\r\n if (t === undefined) { t = 0; }\r\n\r\n return vector1.clone().lerp(vector2, t);\r\n};\r\n\r\nmodule.exports = LinearXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Sets all values of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#setValues\r\n * @since 3.50.0\r\n *\r\n * @param {number} m00 - The m00 value.\r\n * @param {number} m01 - The m01 value.\r\n * @param {number} m02 - The m02 value.\r\n * @param {number} m03 - The m03 value.\r\n * @param {number} m10 - The m10 value.\r\n * @param {number} m11 - The m11 value.\r\n * @param {number} m12 - The m12 value.\r\n * @param {number} m13 - The m13 value.\r\n * @param {number} m20 - The m20 value.\r\n * @param {number} m21 - The m21 value.\r\n * @param {number} m22 - The m22 value.\r\n * @param {number} m23 - The m23 value.\r\n * @param {number} m30 - The m30 value.\r\n * @param {number} m31 - The m31 value.\r\n * @param {number} m32 - The m32 value.\r\n * @param {number} m33 - The m33 value.\r\n *\r\n * @return {this} This Matrix4 instance.\r\n */\r\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = m00;\r\n out[1] = m01;\r\n out[2] = m02;\r\n out[3] = m03;\r\n out[4] = m10;\r\n out[5] = m11;\r\n out[6] = m12;\r\n out[7] = m13;\r\n out[8] = m20;\r\n out[9] = m21;\r\n out[10] = m22;\r\n out[11] = m23;\r\n out[12] = m30;\r\n out[13] = m31;\r\n out[14] = m32;\r\n out[15] = m33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var a = src.val;\r\n\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} a - The array to copy the values from. Must have at least 16 elements.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Generates a transform matrix based on the given position, scale and rotation.\r\n *\r\n * @method Phaser.Math.Matrix4#transform\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {Phaser.Math.Vector3} scale - The scale vector.\r\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transform: function (position, scale, rotation)\r\n {\r\n var rotMatrix = _tempMat1.fromQuat(rotation);\r\n\r\n var rm = rotMatrix.val;\r\n\r\n var sx = scale.x;\r\n var sy = scale.y;\r\n var sz = scale.z;\r\n\r\n return this.setValues(\r\n rm[0] * sx,\r\n rm[1] * sx,\r\n rm[2] * sx,\r\n 0,\r\n\r\n rm[4] * sy,\r\n rm[5] * sy,\r\n rm[6] * sy,\r\n 0,\r\n\r\n rm[8] * sz,\r\n rm[9] * sz,\r\n rm[10] * sz,\r\n 0,\r\n\r\n position.x,\r\n position.y,\r\n position.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies the given Matrix4 into this Matrix and then inverses it.\r\n *\r\n * @method Phaser.Math.Matrix4#getInverse\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n getInverse: function (m)\r\n {\r\n this.copy(m);\r\n\r\n return this.invert();\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return this;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n return this.setValues(\r\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\r\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\r\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\r\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\r\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\r\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\r\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\r\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\r\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\r\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\r\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\r\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\r\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\r\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\r\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\r\n (a20 * b03 - a21 * b01 + a22 * b00) * det\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n return this.setValues(\r\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\r\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\r\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\r\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\r\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\r\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\r\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\r\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\r\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\r\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\r\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\r\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\r\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\r\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\r\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\r\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n return this.setValues(\r\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\r\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\r\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\r\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\r\n\r\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\r\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\r\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\r\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\r\n\r\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\r\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\r\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\r\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\r\n\r\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\r\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\r\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\r\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\r\n );\r\n },\r\n\r\n /**\r\n * Multiplies the given Matrix4 object with this Matrix.\r\n *\r\n * This is the same as calling `multiplyMatrices(m, this)`.\r\n *\r\n * @method Phaser.Math.Matrix4#premultiply\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n premultiply: function (m)\r\n {\r\n return this.multiplyMatrices(m, this);\r\n },\r\n\r\n /**\r\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyMatrices\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\r\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyMatrices: function (a, b)\r\n {\r\n var am = a.val;\r\n var bm = b.val;\r\n\r\n var a11 = am[0];\r\n var a12 = am[4];\r\n var a13 = am[8];\r\n var a14 = am[12];\r\n var a21 = am[1];\r\n var a22 = am[5];\r\n var a23 = am[9];\r\n var a24 = am[13];\r\n var a31 = am[2];\r\n var a32 = am[6];\r\n var a33 = am[10];\r\n var a34 = am[14];\r\n var a41 = am[3];\r\n var a42 = am[7];\r\n var a43 = am[11];\r\n var a44 = am[15];\r\n\r\n var b11 = bm[0];\r\n var b12 = bm[4];\r\n var b13 = bm[8];\r\n var b14 = bm[12];\r\n var b21 = bm[1];\r\n var b22 = bm[5];\r\n var b23 = bm[9];\r\n var b24 = bm[13];\r\n var b31 = bm[2];\r\n var b32 = bm[6];\r\n var b33 = bm[10];\r\n var b34 = bm[14];\r\n var b41 = bm[3];\r\n var b42 = bm[7];\r\n var b43 = bm[11];\r\n var b44 = bm[15];\r\n\r\n return this.setValues(\r\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\r\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\r\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\r\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\r\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\r\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\r\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\r\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\r\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\r\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\r\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\r\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\r\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\r\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\r\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\r\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\r\n );\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n return this.translateXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n return this.scaleXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n return this.setValues(\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n );\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return this;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n return this.setValues(\r\n a00 * b00 + a10 * b01 + a20 * b02,\r\n a01 * b00 + a11 * b01 + a21 * b02,\r\n a02 * b00 + a12 * b01 + a22 * b02,\r\n a03 * b00 + a13 * b01 + a23 * b02,\r\n a00 * b10 + a10 * b11 + a20 * b12,\r\n a01 * b10 + a11 * b11 + a21 * b12,\r\n a02 * b10 + a12 * b11 + a22 * b12,\r\n a03 * b10 + a13 * b11 + a23 * b12,\r\n a00 * b20 + a10 * b21 + a20 * b22,\r\n a01 * b20 + a11 * b21 + a21 * b22,\r\n a02 * b20 + a12 * b21 + a22 * b22,\r\n a03 * b20 + a13 * b21 + a23 * b22,\r\n a30, a31, a32, a33\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n v.x,\r\n v.y,\r\n v.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 0,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n (near * 2) * rl,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (near * 2) * tb,\r\n 0,\r\n 0,\r\n\r\n (right + left) * rl,\r\n (top + bottom) * tb,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (far * near * 2) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n f / aspect,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n f,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (2 * far * near) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n return this.setValues(\r\n (2 * near) / width,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (2 * near) / height,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n -far / (near - far),\r\n 1,\r\n\r\n 0,\r\n 0,\r\n (near * far) / (near - far),\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n return this.setValues(\r\n -2 * lr,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n -2 * bt,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 2 * nf,\r\n 0,\r\n\r\n (left + right) * lr,\r\n (top + bottom) * bt,\r\n (far + near) * nf,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAtRH\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\r\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAtRH: function (eye, target, up)\r\n {\r\n var m = this.val;\r\n\r\n _z.subVectors(eye, target);\r\n\r\n if (_z.getLengthSquared() === 0)\r\n {\r\n // eye and target are in the same position\r\n _z.z = 1;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n\r\n if (_x.getLengthSquared() === 0)\r\n {\r\n // up and z are parallel\r\n\r\n if (Math.abs(up.z) === 1)\r\n {\r\n _z.x += 0.0001;\r\n }\r\n else\r\n {\r\n _z.z += 0.0001;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n }\r\n\r\n _x.normalize();\r\n _y.crossVectors(_z, _x);\r\n\r\n m[0] = _x.x;\r\n m[1] = _x.y;\r\n m[2] = _x.z;\r\n m[4] = _y.x;\r\n m[5] = _y.y;\r\n m[6] = _y.z;\r\n m[8] = _z.x;\r\n m[9] = _z.y;\r\n m[10] = _z.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n return this.setValues(\r\n x0,\r\n y0,\r\n z0,\r\n 0,\r\n\r\n x1,\r\n y1,\r\n z1,\r\n 0,\r\n\r\n x2,\r\n y2,\r\n z2,\r\n 0,\r\n\r\n -(x0 * eyex + x1 * eyey + x2 * eyez),\r\n -(y0 * eyex + y1 * eyey + y2 * eyez),\r\n -(z0 * eyex + z1 * eyey + z2 * eyez),\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyToMat4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\r\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\r\n */\r\n multiplyToMat4: function (src, out)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b03 = b[3];\r\n var b10 = b[4];\r\n var b11 = b[5];\r\n var b12 = b[6];\r\n var b13 = b[7];\r\n var b20 = b[8];\r\n var b21 = b[9];\r\n var b22 = b[10];\r\n var b23 = b[11];\r\n var b30 = b[12];\r\n var b31 = b[13];\r\n var b32 = b[14];\r\n var b33 = b[15];\r\n\r\n return out.setValues(\r\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\r\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\r\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\r\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\r\n\r\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\r\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\r\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\r\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\r\n\r\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\r\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\r\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\r\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\r\n\r\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\r\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\r\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\r\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\r\n );\r\n },\r\n\r\n /**\r\n * Takes the rotation and position vectors and builds this Matrix4 from them.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationXYTranslation: function (rotation, position, translateFirst)\r\n {\r\n var x = position.x;\r\n var y = position.y;\r\n var z = position.z;\r\n\r\n var sx = Math.sin(rotation.x);\r\n var cx = Math.cos(rotation.x);\r\n\r\n var sy = Math.sin(rotation.y);\r\n var cy = Math.cos(rotation.y);\r\n\r\n var a30 = x;\r\n var a31 = y;\r\n var a32 = z;\r\n\r\n // Rotate X\r\n\r\n var b21 = -sx;\r\n\r\n // Rotate Y\r\n\r\n var c01 = 0 - b21 * sy;\r\n\r\n var c02 = 0 - cx * sy;\r\n\r\n var c21 = b21 * cy;\r\n\r\n var c22 = cx * cy;\r\n\r\n // Translate\r\n if (!translateFirst)\r\n {\r\n // a30 = cy * x + 0 * y + sy * z;\r\n a30 = cy * x + sy * z;\r\n a31 = c01 * x + cx * y + c21 * z;\r\n a32 = c02 * x + sx * y + c22 * z;\r\n }\r\n\r\n return this.setValues(\r\n cy,\r\n c01,\r\n c02,\r\n 0,\r\n 0,\r\n cx,\r\n sx,\r\n 0,\r\n sy,\r\n c21,\r\n c22,\r\n 0,\r\n a30,\r\n a31,\r\n a32,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Returns the maximum axis scale from this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\r\n * @since 3.50.0\r\n *\r\n * @return {number} The maximum axis scale.\r\n */\r\n getMaxScaleOnAxis: function ()\r\n {\r\n var m = this.val;\r\n\r\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\r\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\r\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\r\n\r\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat1 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat2 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _x = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _y = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _z = new Vector3();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Vladislav Forsh \r\n * @copyright 2021 RoboWhale\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\r\n * In case of an even number of values, the average of the two middle values is returned.\r\n *\r\n * @function Phaser.Math.Median\r\n * @since 3.54.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The median value.\r\n */\r\nvar Median = function (values)\r\n{\r\n var valuesNum = values.length;\r\n if (valuesNum === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n values.sort(function (a, b) { return a - b; });\r\n\r\n var halfIndex = Math.floor(valuesNum / 2);\r\n\r\n return valuesNum % 2 === 0\r\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\r\n : values[halfIndex];\r\n};\r\n\r\nmodule.exports = Median;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Matrix3 = require('./Matrix3');\r\nvar NOOP = require('../utils/NOOP');\r\nvar Vector3 = require('./Vector3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x component.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=1] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_x\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_y\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_z\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_w\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * This callback is invoked, if set, each time a value in this quaternion is changed.\r\n * The callback is passed one argument, a reference to this quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#onChangeCallback\r\n * @type {function}\r\n * @since 3.50.0\r\n */\r\n this.onChangeCallback = NOOP;\r\n\r\n this.set(x, y, z, w);\r\n },\r\n\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: {\r\n get: function ()\r\n {\r\n return this._w;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._w = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n return this.set(src);\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n * @param {boolean} [update=true] - Call the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w, update)\r\n {\r\n if (update === undefined) { update = true; }\r\n\r\n if (typeof x === 'object')\r\n {\r\n this._x = x.x || 0;\r\n this._y = x.y || 0;\r\n this._z = x.z || 0;\r\n this._w = x.w || 0;\r\n }\r\n else\r\n {\r\n this._x = x || 0;\r\n this._y = y || 0;\r\n this._z = z || 0;\r\n this._w = w || 0;\r\n }\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this._x += v.x;\r\n this._y += v.y;\r\n this._z += v.z;\r\n this._w += v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this._x -= v.x;\r\n this._y -= v.y;\r\n this._z -= v.z;\r\n this._w -= v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this._x *= scale;\r\n this._y *= scale;\r\n this._z *= scale;\r\n this._w *= scale;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this._x = x * len;\r\n this._y = y * len;\r\n this._z = z * len;\r\n this._w = w * len;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n return this.set(\r\n ax + t * (v.x - ax),\r\n ay + t * (v.y - ay),\r\n az + t * (v.z - az),\r\n aw + t * (v.w - aw)\r\n );\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n return this.set(0, 0, 0, 1);\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this._x = tmpvec.x;\r\n this._y = tmpvec.y;\r\n this._z = tmpvec.z;\r\n this._w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n return this.set(0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n return this.set(\r\n s * axis.x,\r\n s * axis.y,\r\n s * axis.z,\r\n Math.cos(rad)\r\n );\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n return this.set(\r\n ax * bw + aw * bx + ay * bz - az * by,\r\n ay * bw + aw * by + az * bx - ax * bz,\r\n az * bw + aw * bz + ax * by - ay * bx,\r\n aw * bw - ax * bx - ay * by - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n return this.set(\r\n scale0 * ax + scale1 * bx,\r\n scale0 * ay + scale1 * by,\r\n scale0 * az + scale1 * bz,\r\n scale0 * aw + scale1 * bw\r\n );\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n return this.set(\r\n -a0 * invDot,\r\n -a1 * invDot,\r\n -a2 * invDot,\r\n a3 * invDot\r\n );\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this._x = -this.x;\r\n this._y = -this.y;\r\n this._z = -this.z;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + aw * bx,\r\n ay * bw + az * bx,\r\n az * bw - ay * bx,\r\n aw * bw - ax * bx\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw - az * by,\r\n ay * bw + aw * by,\r\n az * bw + ax * by,\r\n aw * bw - ay * by\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + ay * bz,\r\n ay * bw - ax * bz,\r\n az * bw + aw * bz,\r\n aw * bw - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set this Quaternion from the given Euler, based on Euler order.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromEuler\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\r\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromEuler: function (euler, update)\r\n {\r\n var x = euler.x / 2;\r\n var y = euler.y / 2;\r\n var z = euler.z / 2;\r\n\r\n var c1 = Math.cos(x);\r\n var c2 = Math.cos(y);\r\n var c3 = Math.cos(z);\r\n\r\n var s1 = Math.sin(x);\r\n var s2 = Math.sin(y);\r\n var s3 = Math.sin(z);\r\n\r\n switch (euler.order)\r\n {\r\n case 'XYZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Quaternion from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromRotationMatrix: function (mat4)\r\n {\r\n var m = mat4.val;\r\n\r\n var m11 = m[0];\r\n var m12 = m[4];\r\n var m13 = m[8];\r\n var m21 = m[1];\r\n var m22 = m[5];\r\n var m23 = m[9];\r\n var m31 = m[2];\r\n var m32 = m[6];\r\n var m33 = m[10];\r\n\r\n var trace = m11 + m22 + m33;\r\n var s;\r\n\r\n if (trace > 0)\r\n {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n this.set(\r\n (m32 - m23) * s,\r\n (m13 - m31) * s,\r\n (m21 - m12) * s,\r\n 0.25 / s\r\n );\r\n }\r\n else if (m11 > m22 && m11 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n this.set(\r\n 0.25 * s,\r\n (m12 + m21) / s,\r\n (m13 + m31) / s,\r\n (m32 - m23) / s\r\n );\r\n }\r\n else if (m22 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n this.set(\r\n (m12 + m21) / s,\r\n 0.25 * s,\r\n (m23 + m32) / s,\r\n (m13 - m31) / s\r\n );\r\n }\r\n else\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n this.set(\r\n (m13 + m31) / s,\r\n (m23 + m32) / s,\r\n 0.25 * s,\r\n (m21 - m12) / s\r\n );\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this._x = (m[7] - m[5]) * fRoot;\r\n this._y = (m[2] - m[6]) * fRoot;\r\n this._z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this._x = tmp[0];\r\n this._y = tmp[1];\r\n this._z = tmp[2];\r\n this._w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {number} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n *\r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n *\r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n *\r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {number} index - The position within the grid to get the x/y value for.\r\n * @param {number} width - The width of the grid.\r\n * @param {number} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n }\r\n\r\n return out.set(x, y);\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y=x] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n },\r\n\r\n /**\r\n * Project this Vector onto another.\r\n *\r\n * @method Phaser.Math.Vector2#project\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n project: function (src)\r\n {\r\n var scalar = this.dot(src) / src.dot(src);\r\n\r\n return this.copy(src).scale(scalar);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.min` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#min\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n min: function (v)\r\n {\r\n this.x = Math.min(this.x, v.x);\r\n this.y = Math.min(this.y, v.y);\r\n this.z = Math.min(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#max\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n max: function (v)\r\n {\r\n this.x = Math.max(this.x, v.x);\r\n this.y = Math.max(this.y, v.y);\r\n this.z = Math.max(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Adds the two given Vector3s and sets the results into this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#addVectors\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addVectors: function (a, b)\r\n {\r\n this.x = a.x + b.x;\r\n this.y = a.y + b.y;\r\n this.z = a.z + b.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the position of the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixPosition\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixPosition: function (m)\r\n {\r\n return this.fromArray(m.val, 12);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the Matrix4 column specified.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixColumn\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\r\n * @param {number} index - The column index.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixColumn: function (mat4, index)\r\n {\r\n return this.fromArray(mat4.val, index * 4);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the given array, based on the offset.\r\n *\r\n * Vector3.x = array[offset]\r\n * Vector3.y = array[offset + 1]\r\n * Vector3.z = array[offset + 2]\r\n *\r\n * @method Phaser.Math.Vector3#fromArray\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} array - The array of values to get this Vector from.\r\n * @param {number} [offset=0] - The offset index into the array.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n fromArray: function (array, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.x = array[offset];\r\n this.y = array[offset + 1];\r\n this.z = array[offset + 2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add the given value to each component of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#addScalar\r\n * @since 3.50.0\r\n *\r\n * @param {number} s - The amount to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScalar: function (s)\r\n {\r\n this.x += s;\r\n this.y += s;\r\n this.z += s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add and scale a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#addScale\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n * @param {number} scale - The amount to scale `v` by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScale: function (v, scale)\r\n {\r\n this.x += v.x * scale;\r\n this.y += v.y * scale;\r\n this.z += v.z * scale || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix3 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix3\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix3: function (mat3)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat3.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6] * z;\r\n this.y = m[1] * x + m[4] * y + m[7] * z;\r\n this.z = m[2] * x + m[5] * y + m[8] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix4 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix4: function (mat4)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat4.val;\r\n\r\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\r\n\r\n this.x = (m[0] * x + m[4] * y + m[8] * z + m[12]) * w;\r\n this.y = (m[1] * x + m[5] * y + m[9] * z + m[13]) * w;\r\n this.z = (m[2] * x + m[6] * y + m[10] * z + m[14]) * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given view and projection matrices.\r\n *\r\n * @method Phaser.Math.Vector3#projectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n projectViewMatrix: function (viewMatrix, projectionMatrix)\r\n {\r\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\r\n *\r\n * @method Phaser.Math.Vector3#unprojectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\r\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\r\n {\r\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max`.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n if (value >= min && value <= max)\r\n {\r\n // Skip modulo if already in range\r\n return value;\r\n }\r\n\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n *\r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n *\r\n * Yes, we undertstand that this should actually be PI * 2, but\r\n * it has been like this for so long we can't change it now.\r\n * If you need PI * 2, use the PI2 constant instead.\r\n *\r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n *\r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n *\r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n *\r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n *\r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Euler: require('./Euler'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n LinearXY: require('./LinearXY'),\r\n MaxAdd: require('./MaxAdd'),\r\n Median: require('./Median'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {number} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n *\r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n *\r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n *\r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar corePlugins = {};\r\n\r\n// Contains the plugins that the dev has loaded into their game\r\n// These are the source objects, not instantiated.\r\nvar customPlugins = {};\r\n\r\nvar PluginCache = {};\r\n\r\n/**\r\n * @namespace Phaser.Plugins.PluginCache\r\n */\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @method Phaser.Plugins.PluginCache.register\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\r\n */\r\nPluginCache.register = function (key, plugin, mapping, custom)\r\n{\r\n if (custom === undefined) { custom = false; }\r\n\r\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\r\n};\r\n\r\n/**\r\n * Stores a custom plugin in the global plugin cache.\r\n * The key must be unique, within the scope of the cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.registerCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {?any} data - A value to be passed to the plugin's `init` method.\r\n */\r\nPluginCache.registerCustom = function (key, plugin, mapping, data)\r\n{\r\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the core plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\r\n */\r\nPluginCache.hasCore = function (key)\r\n{\r\n return corePlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the custom plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\r\n */\r\nPluginCache.hasCustom = function (key)\r\n{\r\n return customPlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Returns the core plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\r\n */\r\nPluginCache.getCore = function (key)\r\n{\r\n return corePlugins[key];\r\n};\r\n\r\n/**\r\n * Returns the custom plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\r\n */\r\nPluginCache.getCustom = function (key)\r\n{\r\n return customPlugins[key];\r\n};\r\n\r\n/**\r\n * Returns an object from the custom cache based on the given key that can be instantiated.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustomClass\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {function} The custom plugin object.\r\n */\r\nPluginCache.getCustomClass = function (key)\r\n{\r\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\r\n};\r\n\r\n/**\r\n * Removes a core plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.remove\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to remove.\r\n */\r\nPluginCache.remove = function (key)\r\n{\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes a custom plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.removeCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to remove.\r\n */\r\nPluginCache.removeCustom = function (key)\r\n{\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Core Plugins.\r\n *\r\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\r\n * So be sure you only call this if you do not wish to run Phaser again.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCorePlugins = function ()\r\n{\r\n for (var key in corePlugins)\r\n {\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Custom Plugins.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCustomPlugins = function ()\r\n{\r\n for (var key in customPlugins)\r\n {\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = PluginCache;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager, pluginKey)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The key under which this plugin was installed into the Scene Systems.\r\n *\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#pluginKey\r\n * @type {string}\r\n * @readonly\r\n * @since 3.54.0\r\n */\r\n this.pluginKey = pluginKey;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n *\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n *\r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n *\r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.ADD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n *\r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n *\r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n *\r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n *\r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n *\r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n *\r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n *\r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n *\r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n *\r\n * @name Phaser.BlendModes.HUE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n *\r\n * @name Phaser.BlendModes.ERASE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n *\r\n * @name Phaser.BlendModes.COPY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n *\r\n * @name Phaser.BlendModes.XOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Modes.\r\n *\r\n * @namespace Phaser.ScaleModes\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScaleModes = {\r\n\r\n /**\r\n * Default Scale Mode (Linear).\r\n *\r\n * @name Phaser.ScaleModes.DEFAULT\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n DEFAULT: 0,\r\n\r\n /**\r\n * Linear Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.LINEAR\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.NEAREST\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n\r\n};\r\n\r\nmodule.exports = ScaleModes;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n *\r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('boot', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#BOOT\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n *\r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n *\r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n *\r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('create', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#CREATE\r\n * @type {string}\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('destroy', listener)`.\r\n *\r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n *\r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n *\r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('pause', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('postupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author samme\r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre-Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_RENDER\r\n * @type {string}\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'prerender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('preupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('ready', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#READY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('render', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n *\r\n * @event Phaser.Scenes.Events#RENDER\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n *\r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('resume', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#RESUME\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('shutdown', listener)`.\r\n *\r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n *\r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n *\r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('sleep', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('start', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioncomplete', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioninit', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n *\r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionout', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n *\r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n *\r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionstart', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionwake', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists and the Scene is in a Running state, otherwise this is skipped.\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('update', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n *\r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('wake', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#WAKE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\r\n BOOT: require('./BOOT_EVENT'),\r\n CREATE: require('./CREATE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n PAUSE: require('./PAUSE_EVENT'),\r\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\r\n RENDER: require('./RENDER_EVENT'),\r\n RESUME: require('./RESUME_EVENT'),\r\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\r\n SLEEP: require('./SLEEP_EVENT'),\r\n START: require('./START_EVENT'),\r\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\r\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\r\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\r\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\r\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\r\n UPDATE: require('./UPDATE_EVENT'),\r\n WAKE: require('./WAKE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Clamp = require('../math/Clamp');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @classdesc\r\n * A Frame is a section of a Texture.\r\n *\r\n * @class Frame\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\r\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n */\r\nvar Frame = new Class({\r\n\r\n initialize:\r\n\r\n function Frame (texture, name, sourceIndex, x, y, width, height)\r\n {\r\n /**\r\n * The Texture this Frame is a part of.\r\n *\r\n * @name Phaser.Textures.Frame#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The name of this Frame.\r\n * The name is unique within the Texture.\r\n *\r\n * @name Phaser.Textures.Frame#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The TextureSource this Frame is part of.\r\n *\r\n * @name Phaser.Textures.Frame#source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @since 3.0.0\r\n */\r\n this.source = texture.source[sourceIndex];\r\n\r\n /**\r\n * The index of the TextureSource in the Texture sources array.\r\n *\r\n * @name Phaser.Textures.Frame#sourceIndex\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.sourceIndex = sourceIndex;\r\n\r\n /**\r\n * A reference to the Texture Source WebGL Texture that this Frame is using.\r\n *\r\n * @name Phaser.Textures.Frame#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this.glTexture = this.source.glTexture;\r\n\r\n /**\r\n * X position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutX;\r\n\r\n /**\r\n * Y position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutY;\r\n\r\n /**\r\n * The width of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutWidth;\r\n\r\n /**\r\n * The height of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutHeight;\r\n\r\n /**\r\n * The X rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The Y rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The rendering width of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width;\r\n\r\n /**\r\n * The rendering height of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height;\r\n\r\n /**\r\n * Half the width, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth;\r\n\r\n /**\r\n * Half the height, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight;\r\n\r\n /**\r\n * The x center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerX;\r\n\r\n /**\r\n * The y center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerY;\r\n\r\n /**\r\n * The horizontal pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotX = 0;\r\n\r\n /**\r\n * The vertical pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotY = 0;\r\n\r\n /**\r\n * Does this Frame have a custom pivot point?\r\n *\r\n * @name Phaser.Textures.Frame#customPivot\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customPivot = false;\r\n\r\n /**\r\n * **CURRENTLY UNSUPPORTED**\r\n *\r\n * Is this frame is rotated or not in the Texture?\r\n * Rotation allows you to use rotated frames in texture atlas packing.\r\n * It has nothing to do with Sprite rotation.\r\n *\r\n * @name Phaser.Textures.Frame#rotated\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rotated = false;\r\n\r\n /**\r\n * Over-rides the Renderer setting.\r\n * -1 = use Renderer Setting\r\n * 0 = No rounding\r\n * 1 = Round\r\n *\r\n * @name Phaser.Textures.Frame#autoRound\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.autoRound = -1;\r\n\r\n /**\r\n * Any Frame specific custom data can be stored here.\r\n *\r\n * @name Phaser.Textures.Frame#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * WebGL UV u0 value.\r\n *\r\n * @name Phaser.Textures.Frame#u0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u0 = 0;\r\n\r\n /**\r\n * WebGL UV v0 value.\r\n *\r\n * @name Phaser.Textures.Frame#v0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v0 = 0;\r\n\r\n /**\r\n * WebGL UV u1 value.\r\n *\r\n * @name Phaser.Textures.Frame#u1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u1 = 0;\r\n\r\n /**\r\n * WebGL UV v1 value.\r\n *\r\n * @name Phaser.Textures.Frame#v1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v1 = 0;\r\n\r\n /**\r\n * The un-modified source frame, trim and UV data.\r\n *\r\n * @name Phaser.Textures.Frame#data\r\n * @type {object}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n cut: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n trim: false,\r\n sourceSize: {\r\n w: 0,\r\n h: 0\r\n },\r\n spriteSourceSize: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n radius: 0,\r\n drawImage: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n }\r\n };\r\n\r\n this.setSize(width, height, x, y);\r\n },\r\n\r\n /**\r\n * Sets the width, height, x and y of this Frame.\r\n *\r\n * This is called automatically by the constructor\r\n * and should rarely be changed on-the-fly.\r\n *\r\n * @method Phaser.Textures.Frame#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {number} width - The width of the frame before being trimmed.\r\n * @param {number} height - The height of the frame before being trimmed.\r\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\r\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setSize: function (width, height, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.cutX = x;\r\n this.cutY = y;\r\n this.cutWidth = width;\r\n this.cutHeight = height;\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width * 0.5);\r\n this.halfHeight = Math.floor(height * 0.5);\r\n\r\n this.centerX = Math.floor(width / 2);\r\n this.centerY = Math.floor(height / 2);\r\n\r\n var data = this.data;\r\n var cut = data.cut;\r\n\r\n cut.x = x;\r\n cut.y = y;\r\n cut.w = width;\r\n cut.h = height;\r\n cut.r = x + width;\r\n cut.b = y + height;\r\n\r\n data.sourceSize.w = width;\r\n data.sourceSize.h = height;\r\n\r\n data.spriteSourceSize.w = width;\r\n data.spriteSourceSize.h = height;\r\n\r\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\r\n\r\n var drawImage = data.drawImage;\r\n\r\n drawImage.x = x;\r\n drawImage.y = y;\r\n drawImage.width = width;\r\n drawImage.height = height;\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\r\n *\r\n * @method Phaser.Textures.Frame#setTrim\r\n * @since 3.0.0\r\n *\r\n * @param {number} actualWidth - The width of the frame before being trimmed.\r\n * @param {number} actualHeight - The height of the frame before being trimmed.\r\n * @param {number} destX - The destination X position of the trimmed frame for display.\r\n * @param {number} destY - The destination Y position of the trimmed frame for display.\r\n * @param {number} destWidth - The destination width of the trimmed frame for display.\r\n * @param {number} destHeight - The destination height of the trimmed frame for display.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\r\n {\r\n var data = this.data;\r\n var ss = data.spriteSourceSize;\r\n\r\n // Store actual values\r\n\r\n data.trim = true;\r\n\r\n data.sourceSize.w = actualWidth;\r\n data.sourceSize.h = actualHeight;\r\n\r\n ss.x = destX;\r\n ss.y = destY;\r\n ss.w = destWidth;\r\n ss.h = destHeight;\r\n ss.r = destX + destWidth;\r\n ss.b = destY + destHeight;\r\n\r\n // Adjust properties\r\n this.x = destX;\r\n this.y = destY;\r\n\r\n this.width = destWidth;\r\n this.height = destHeight;\r\n\r\n this.halfWidth = destWidth * 0.5;\r\n this.halfHeight = destHeight * 0.5;\r\n\r\n this.centerX = Math.floor(destWidth / 2);\r\n this.centerY = Math.floor(destHeight / 2);\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * Takes a crop data object and, based on the rectangular region given, calculates the\r\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\r\n *\r\n * This is called directly by the Game Object Texture Components `setCrop` method.\r\n * Please use that method to crop a Game Object.\r\n *\r\n * @method Phaser.Textures.Frame#setCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\r\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\r\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\r\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\r\n {\r\n // Clamp the input values\r\n\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n var rw = this.realWidth;\r\n var rh = this.realHeight;\r\n\r\n x = Clamp(x, 0, rw);\r\n y = Clamp(y, 0, rh);\r\n\r\n width = Clamp(width, 0, rw - x);\r\n height = Clamp(height, 0, rh - y);\r\n\r\n var ox = cx + x;\r\n var oy = cy + y;\r\n var ow = width;\r\n var oh = height;\r\n\r\n var data = this.data;\r\n\r\n if (data.trim)\r\n {\r\n var ss = data.spriteSourceSize;\r\n\r\n // Need to check for intersection between the cut area and the crop area\r\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\r\n\r\n width = Clamp(width, 0, cw - x);\r\n height = Clamp(height, 0, ch - y);\r\n\r\n var cropRight = x + width;\r\n var cropBottom = y + height;\r\n\r\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\r\n\r\n if (intersects)\r\n {\r\n var ix = Math.max(ss.x, x);\r\n var iy = Math.max(ss.y, y);\r\n var iw = Math.min(ss.r, cropRight) - ix;\r\n var ih = Math.min(ss.b, cropBottom) - iy;\r\n\r\n ow = iw;\r\n oh = ih;\r\n\r\n if (flipX)\r\n {\r\n ox = cx + (cw - (ix - ss.x) - iw);\r\n }\r\n else\r\n {\r\n ox = cx + (ix - ss.x);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - (iy - ss.y) - ih);\r\n }\r\n else\r\n {\r\n oy = cy + (iy - ss.y);\r\n }\r\n\r\n x = ix;\r\n y = iy;\r\n\r\n width = iw;\r\n height = ih;\r\n }\r\n else\r\n {\r\n ox = 0;\r\n oy = 0;\r\n ow = 0;\r\n oh = 0;\r\n }\r\n }\r\n else\r\n {\r\n if (flipX)\r\n {\r\n ox = cx + (cw - x - width);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - y - height);\r\n }\r\n }\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n // Map the given coordinates into UV space, clamping to the 0-1 range.\r\n\r\n crop.u0 = Math.max(0, ox / tw);\r\n crop.v0 = Math.max(0, oy / th);\r\n crop.u1 = Math.min(1, (ox + ow) / tw);\r\n crop.v1 = Math.min(1, (oy + oh) / th);\r\n\r\n crop.x = x;\r\n crop.y = y;\r\n\r\n crop.cx = ox;\r\n crop.cy = oy;\r\n crop.cw = ow;\r\n crop.ch = oh;\r\n\r\n crop.width = width;\r\n crop.height = height;\r\n\r\n crop.flipX = flipX;\r\n crop.flipY = flipY;\r\n\r\n return crop;\r\n },\r\n\r\n /**\r\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\r\n * Called automatically by `setFrame`.\r\n *\r\n * @method Phaser.Textures.Frame#updateCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n updateCropUVs: function (crop, flipX, flipY)\r\n {\r\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\r\n },\r\n\r\n /**\r\n * Directly sets the canvas and WebGL UV data for this frame.\r\n *\r\n * Use this if you need to override the values that are generated automatically\r\n * when the Frame is created.\r\n *\r\n * @method Phaser.Textures.Frame#setUVs\r\n * @since 3.50.0\r\n *\r\n * @param {number} width - Width of this frame for the Canvas data.\r\n * @param {number} height - Height of this frame for the Canvas data.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setUVs: function (width, height, u0, v0, u1, v1)\r\n {\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = width;\r\n cd.height = height;\r\n\r\n // WebGL data\r\n\r\n this.u0 = u0;\r\n this.v0 = v0;\r\n\r\n this.u1 = u1;\r\n this.v1 = v1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache and the drawImage cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVs\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVs: function ()\r\n {\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = cw;\r\n cd.height = ch;\r\n\r\n // WebGL data\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = cx / tw;\r\n this.v0 = cy / th;\r\n\r\n this.u1 = (cx + cw) / tw;\r\n this.v1 = (cy + ch) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVsInverted\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVsInverted: function ()\r\n {\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = (this.cutX + this.cutHeight) / tw;\r\n this.v0 = this.cutY / th;\r\n\r\n this.u1 = this.cutX / tw;\r\n this.v1 = (this.cutY + this.cutWidth) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clones this Frame into a new Frame object.\r\n *\r\n * @method Phaser.Textures.Frame#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} A clone of this Frame.\r\n */\r\n clone: function ()\r\n {\r\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\r\n\r\n clone.cutX = this.cutX;\r\n clone.cutY = this.cutY;\r\n clone.cutWidth = this.cutWidth;\r\n clone.cutHeight = this.cutHeight;\r\n\r\n clone.x = this.x;\r\n clone.y = this.y;\r\n\r\n clone.width = this.width;\r\n clone.height = this.height;\r\n\r\n clone.halfWidth = this.halfWidth;\r\n clone.halfHeight = this.halfHeight;\r\n\r\n clone.centerX = this.centerX;\r\n clone.centerY = this.centerY;\r\n\r\n clone.rotated = this.rotated;\r\n\r\n clone.data = Extend(true, clone.data, this.data);\r\n\r\n clone.updateUVs();\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\r\n *\r\n * @method Phaser.Textures.Frame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.source = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n this.customData = null;\r\n this.data = null;\r\n },\r\n\r\n /**\r\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.w;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.h;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\r\n *\r\n * @name Phaser.Textures.Frame#radius\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.data.radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Frame trimmed or not?\r\n *\r\n * @name Phaser.Textures.Frame#trimmed\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n trimmed: {\r\n\r\n get: function ()\r\n {\r\n return this.data.trim;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Canvas drawImage data object.\r\n *\r\n * @name Phaser.Textures.Frame#canvasData\r\n * @type {object}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canvasData: {\r\n\r\n get: function ()\r\n {\r\n return this.data.drawImage;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Frame;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {boolean} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Tween States.\r\n *\r\n * @namespace Phaser.Tweens.States\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\n/**\r\n * Phaser Tween state constants.\r\n *\r\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.CREATED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n // 1 used to be INIT prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n // 3 used to be OFFSET_DELAY prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_RENDER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_FORWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.HOLD_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.REPEAT_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state. The Tween has been created but has not yet been added to the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING: 20,\r\n\r\n /**\r\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\r\n * or was playing and is currently paused, but in both cases it's still being processed by\r\n * the Tween Manager, so is considered 'active'.\r\n *\r\n * @name Phaser.Tweens.States.ACTIVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 21,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a loop countdown to elapse.\r\n *\r\n * @name Phaser.Tweens.States.LOOP_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a complete delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 23,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a starting delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.START_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n START_DELAY: 24,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_REMOVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state. The Tween has been removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.REMOVED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\r\n * so will not be automatically removed by the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.FINISHED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n FINISHED: 27,\r\n\r\n /**\r\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.DESTROYED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DESTROYED: 28,\r\n\r\n /**\r\n * A large integer value used for 'infinite' style countdowns.\r\n *\r\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\r\n * supported on IE.\r\n *\r\n * @name Phaser.Tweens.States.MAX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n MAX: 999999999999\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @ignore\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @ignore\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * Existing elements in the array are shifted up.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {number} [index=0] - The index in the array where the item will be inserted.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {number} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {number} startIndex - The start index to search from.\r\n * @param {number} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array and flattens it, returning a shallow-copy flattened array.\r\n *\r\n * @function Phaser.Utils.Array.Flatten\r\n * @since 3.60.0\r\n *\r\n * @param {array} array - The array to flatten.\r\n * @param {array} [output] - An array to hold the results in.\r\n *\r\n * @return {array} The flattened output array.\r\n */\r\nvar Flatten = function (array, output)\r\n{\r\n if (output === undefined) { output = []; }\r\n\r\n for (var i = 0; i < array.length; i++)\r\n {\r\n if (Array.isArray(array[i]))\r\n {\r\n Flatten(array[i], output);\r\n }\r\n else\r\n {\r\n output.push(array[i]);\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = Flatten;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element above another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveAbove\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move above base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveAbove = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex > baseIndex)\r\n {\r\n // item1 is already above item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === array.length - 1)\r\n {\r\n array.push(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveAbove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element below another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveBelow\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move below base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveBelow = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex < baseIndex)\r\n {\r\n // item1 is already below item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === 0)\r\n {\r\n array.unshift(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveBelow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {number} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\r\n\r\n/**\r\n * Create an array of numbers (positive and/or negative) progressing from `start`\r\n * up to but not including `end` by advancing by `step`.\r\n *\r\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\r\n *\r\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\r\n * for forward compatibility make sure to pass in actual numbers.\r\n *\r\n * @example\r\n * NumberArrayStep(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * NumberArrayStep(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * NumberArrayStep(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * NumberArrayStep(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * NumberArrayStep(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * NumberArrayStep(0);\r\n * // => []\r\n *\r\n * @function Phaser.Utils.Array.NumberArrayStep\r\n * @since 3.0.0\r\n *\r\n * @param {number} [start=0] - The start of the range.\r\n * @param {number} [end=null] - The end of the range.\r\n * @param {number} [step=1] - The value to increment or decrement by.\r\n *\r\n * @return {number[]} The array of number values.\r\n */\r\nvar NumberArrayStep = function (start, end, step)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (end === undefined) { end = null; }\r\n if (step === undefined) { step = 1; }\r\n\r\n if (end === null)\r\n {\r\n end = start;\r\n start = 0;\r\n }\r\n\r\n var result = [];\r\n\r\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n result.push(start);\r\n start += step;\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArrayStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {number} k - The k-th element index.\r\n * @param {number} [left=0] - The index of the left part of the range.\r\n * @param {number} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = require('../object/GetValue');\r\nvar Shuffle = require('./Shuffle');\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n *\r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n *\r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n *\r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n *\r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n *\r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n *\r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n var removed = [];\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n removed.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return removed;\r\n};\r\n\r\nmodule.exports = Remove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} startIndex - The start index to remove from.\r\n * @param {number} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {number} [start=0] - The array index to start the search from.\r\n * @param {number} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search within.\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The \"rotation\" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The \"rotation\" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n *\r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {number} startIndex - The start index.\r\n * @param {number} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {number} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n","/**\r\n * @author Richard Davey \r\n * @author Angry Bytes (and contributors)\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Device = require('../../device');\r\n\r\n/**\r\n * The comparator function.\r\n *\r\n * @ignore\r\n *\r\n * @param {*} a - The first item to test.\r\n * @param {*} b - The second itemt to test.\r\n *\r\n * @return {boolean} True if they localCompare, otherwise false.\r\n */\r\nfunction Compare (a, b)\r\n{\r\n return String(a).localeCompare(b);\r\n}\r\n\r\n/**\r\n * Process the array contents.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} array - The array to process.\r\n * @param {function} compare - The comparison function.\r\n *\r\n * @return {array} - The processed array.\r\n */\r\nfunction Process (array, compare)\r\n{\r\n // Short-circuit when there's nothing to sort.\r\n var len = array.length;\r\n\r\n if (len <= 1)\r\n {\r\n return array;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n\r\n for (var chk = 1; chk < len; chk *= 2)\r\n {\r\n RunPass(array, compare, chk, buffer);\r\n\r\n var tmp = array;\r\n\r\n array = buffer;\r\n\r\n buffer = tmp;\r\n }\r\n\r\n return array;\r\n}\r\n\r\n/**\r\n * Run a single pass with the given chunk size.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} arr - The array to run the pass on.\r\n * @param {function} comp - The comparison function.\r\n * @param {number} chk - The number of iterations.\r\n * @param {array} result - The array to store the result in.\r\n */\r\nfunction RunPass (arr, comp, chk, result)\r\n{\r\n var len = arr.length;\r\n var i = 0;\r\n\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl)\r\n {\r\n r = l + chk;\r\n e = r + chk;\r\n\r\n if (r > len)\r\n {\r\n r = len;\r\n }\r\n\r\n if (e > len)\r\n {\r\n e = len;\r\n }\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n\r\n while (true)\r\n {\r\n // Compare the chunks.\r\n if (li < r && ri < e)\r\n {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0)\r\n {\r\n result[i++] = arr[li++];\r\n }\r\n else\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n else if (li < r)\r\n {\r\n // Nothing to compare, just flush what's left.\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e)\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n else\r\n {\r\n // Both iterators are at the chunk ends.\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\r\n *\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The input array to be sorted.\r\n * @param {function} [compare] - The comparison function.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar StableSort = function (array, compare)\r\n{\r\n if (compare === undefined) { compare = Compare; }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n if (!array || array.length < 2)\r\n {\r\n return array;\r\n }\r\n\r\n if (Device.features.stableSort)\r\n {\r\n return array.sort(compare);\r\n }\r\n\r\n var result = Process(array, compare);\r\n\r\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\r\n if (result !== array)\r\n {\r\n RunPass(result, null, array.length, array);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = StableSort;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: require('./matrix'),\r\n\r\n Add: require('./Add'),\r\n AddAt: require('./AddAt'),\r\n BringToTop: require('./BringToTop'),\r\n CountAllMatching: require('./CountAllMatching'),\r\n Each: require('./Each'),\r\n EachInRange: require('./EachInRange'),\r\n FindClosestInSorted: require('./FindClosestInSorted'),\r\n Flatten: require('./Flatten'),\r\n GetAll: require('./GetAll'),\r\n GetFirst: require('./GetFirst'),\r\n GetRandom: require('./GetRandom'),\r\n MoveDown: require('./MoveDown'),\r\n MoveTo: require('./MoveTo'),\r\n MoveUp: require('./MoveUp'),\r\n MoveAbove: require('./MoveAbove'),\r\n MoveBelow: require('./MoveBelow'),\r\n NumberArray: require('./NumberArray'),\r\n NumberArrayStep: require('./NumberArrayStep'),\r\n QuickSelect: require('./QuickSelect'),\r\n Range: require('./Range'),\r\n Remove: require('./Remove'),\r\n RemoveAt: require('./RemoveAt'),\r\n RemoveBetween: require('./RemoveBetween'),\r\n RemoveRandomElement: require('./RemoveRandomElement'),\r\n Replace: require('./Replace'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateRight: require('./RotateRight'),\r\n SafeRange: require('./SafeRange'),\r\n SendToBack: require('./SendToBack'),\r\n SetAll: require('./SetAll'),\r\n Shuffle: require('./Shuffle'),\r\n SortByDigits: require('./SortByDigits'),\r\n SpliceOne: require('./SpliceOne'),\r\n StableSort: require('./StableSort'),\r\n Swap: require('./Swap')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = require('../../string/Pad');\r\nvar CheckMatrix = require('./CheckMatrix');\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = require('./CheckMatrix');\r\nvar TransposeMatrix = require('./TransposeMatrix');\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateLeft = require('../RotateLeft');\r\nvar RotateRight = require('../RotateRight');\r\n\r\n/**\r\n * Translates the given Array Matrix by shifting each column and row the\r\n * amount specified.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Translate\r\n * @since 3.50.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to translate.\r\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\r\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\r\n *\r\n * @return {T[][]} The translated matrix.\r\n */\r\nvar TranslateMatrix = function (matrix, x, y)\r\n{\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n // Vertical translation\r\n\r\n if (y !== 0)\r\n {\r\n if (y < 0)\r\n {\r\n // Shift Up\r\n RotateLeft(matrix, Math.abs(y));\r\n }\r\n else\r\n {\r\n // Shift Down\r\n RotateRight(matrix, y);\r\n }\r\n }\r\n\r\n // Horizontal translation\r\n\r\n if (x !== 0)\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n var row = matrix[i];\r\n\r\n if (x < 0)\r\n {\r\n RotateLeft(row, Math.abs(x));\r\n }\r\n else\r\n {\r\n RotateRight(row, x);\r\n }\r\n }\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = TranslateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n *\r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: require('./CheckMatrix'),\r\n MatrixToString: require('./MatrixToString'),\r\n ReverseColumns: require('./ReverseColumns'),\r\n ReverseRows: require('./ReverseRows'),\r\n Rotate180: require('./Rotate180'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateMatrix: require('./RotateMatrix'),\r\n RotateRight: require('./RotateRight'),\r\n Translate: require('./TranslateMatrix'),\r\n TransposeMatrix: require('./TransposeMatrix')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Deep Copy the given object or array.\r\n *\r\n * @function Phaser.Utils.Objects.DeepCopy\r\n * @since 3.50.0\r\n *\r\n * @param {object} obj - The object to deep copy.\r\n *\r\n * @return {object} A deep copy of the original object.\r\n */\r\nvar DeepCopy = function (inObject)\r\n{\r\n var outObject;\r\n var value;\r\n var key;\r\n\r\n if (typeof inObject !== 'object' || inObject === null)\r\n {\r\n // inObject is not an object\r\n return inObject;\r\n }\r\n\r\n // Create an array or object to hold the values\r\n outObject = Array.isArray(inObject) ? [] : {};\r\n\r\n for (key in inObject)\r\n {\r\n value = inObject[key];\r\n\r\n // Recursively (deep) copy for nested objects, including arrays\r\n outObject[key] = DeepCopy(value);\r\n }\r\n\r\n return outObject;\r\n};\r\n\r\nmodule.exports = DeepCopy;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n *\r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n *\r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\r\n *\r\n * The key is a string, which can be split based on the use of the period character.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * const source = {\r\n * lives: 3,\r\n * render: {\r\n * screen: {\r\n * width: 1024\r\n * }\r\n * }\r\n * }\r\n *\r\n * const lives = GetValue(source, 'lives', 1);\r\n * const width = GetValue(source, 'render.screen.width', 800);\r\n * const height = GetValue(source, 'render.screen.height', 600);\r\n * ```\r\n *\r\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\r\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\r\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue, altSource)\r\n{\r\n if ((!source && !altSource) || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source && source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (altSource && altSource.hasOwnProperty(key))\r\n {\r\n return altSource[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parentA = source;\r\n var parentB = altSource;\r\n var valueA = defaultValue;\r\n var valueB = defaultValue;\r\n var valueAFound = true;\r\n var valueBFound = true;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parentA && parentA.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentA has a key property, let's carry on down\r\n valueA = parentA[keys[i]];\r\n parentA = parentA[keys[i]];\r\n }\r\n else\r\n {\r\n valueAFound = false;\r\n }\r\n\r\n if (parentB && parentB.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentB has a key property, let's carry on down\r\n valueB = parentB[keys[i]];\r\n parentB = parentB[keys[i]];\r\n }\r\n else\r\n {\r\n valueBFound = false;\r\n }\r\n }\r\n\r\n if (valueAFound)\r\n {\r\n return valueA;\r\n }\r\n else if (valueBFound)\r\n {\r\n return valueB;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (!obj || typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and pads it out, to the length required, using the character\r\n * specified. For example if you need a string to be 6 characters long, you can call:\r\n *\r\n * `pad('bob', 6, '-', 2)`\r\n *\r\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\r\n *\r\n * You can also use it to pad numbers (they are always returned as strings):\r\n *\r\n * `pad(512, 6, '0', 1)`\r\n *\r\n * Would return: `000512` with the string padded to the left.\r\n *\r\n * If you don't specify a direction it'll pad to both sides:\r\n *\r\n * `pad('c64', 7, '*')`\r\n *\r\n * Would return: `**c64**`\r\n *\r\n * @function Phaser.Utils.String.Pad\r\n * @since 3.0.0\r\n *\r\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\r\n * @param {number} [len=0] - The number of characters to be added.\r\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\r\n * @param {number} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\r\n *\r\n * @return {string} The padded string.\r\n */\r\nvar Pad = function (str, len, pad, dir)\r\n{\r\n if (len === undefined) { len = 0; }\r\n if (pad === undefined) { pad = ' '; }\r\n if (dir === undefined) { dir = 3; }\r\n\r\n str = str.toString();\r\n\r\n var padlen = 0;\r\n\r\n if (len + 1 >= str.length)\r\n {\r\n switch (dir)\r\n {\r\n case 1:\r\n str = new Array(len + 1 - str.length).join(pad) + str;\r\n break;\r\n\r\n case 3:\r\n var right = Math.ceil((padlen = len - str.length) / 2);\r\n var left = padlen - right;\r\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\r\n break;\r\n\r\n default:\r\n str = str + new Array(len + 1 - str.length).join(pad);\r\n break;\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = Pad;\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./SpinePlugin.js\");\n",""],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/spine4.1/dist/SpineCanvasPlugin.js b/plugins/spine4.1/dist/SpineCanvasPlugin.js index 134946522..2d8c116f0 100644 --- a/plugins/spine4.1/dist/SpineCanvasPlugin.js +++ b/plugins/spine4.1/dist/SpineCanvasPlugin.js @@ -22218,7 +22218,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } @@ -51826,4 +51826,4 @@ module.exports = Pad; /******/ window.SpinePlugin = __webpack_exports__; /******/ /******/ })() -; +; \ No newline at end of file diff --git a/plugins/spine4.1/dist/SpinePluginDebug.js b/plugins/spine4.1/dist/SpinePluginDebug.js index 2747fa109..7ec3b0916 100644 --- a/plugins/spine4.1/dist/SpinePluginDebug.js +++ b/plugins/spine4.1/dist/SpinePluginDebug.js @@ -34952,7 +34952,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } @@ -65480,4 +65480,4 @@ module.exports = Pad; /******/ /******/ })() ; -//# sourceMappingURL=SpinePluginDebug.js.map +//# sourceMappingURL=SpinePluginDebug.js.map \ No newline at end of file diff --git a/plugins/spine4.1/dist/SpinePluginDebug.js.map b/plugins/spine4.1/dist/SpinePluginDebug.js.map index 6a60c8d33..015c975af 100644 --- a/plugins/spine4.1/dist/SpinePluginDebug.js.map +++ b/plugins/spine4.1/dist/SpinePluginDebug.js.map @@ -1 +1 @@ -{"version":3,"file":"SpinePluginDebug.js","mappings":";;;;;;;;;;AAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0DAA0D,OAAO;AACjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,SAAS;AACnD;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA,gBAAgB,YAAY;AAC5B;;AAEA;AACA,4DAA4D;AAC5D,gEAAgE;AAChE,oEAAoE;AACpE,wEAAwE;AACxE;AACA,2DAA2D,SAAS;AACpE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,4DAA4D,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;;;AC/UA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,mBAAmB,mBAAO,CAAC,yFAAwC;AACnE,gBAAgB,mBAAO,CAAC,8FAA4C;AACpE,oBAAoB,mBAAO,CAAC,2FAAyC;AACrE,eAAe,mBAAO,CAAC,4FAA2C;AAClE,gBAAgB,mBAAO,CAAC,0EAAkC;AAC1D,eAAe,mBAAO,CAAC,4FAA2C;AAClE;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,kDAAkD;AAC7D,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,mBAAmB;AAC9B,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sFAAsF;AAC7H;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,kBAAkB,mBAAO,CAAC,+CAAa;AACvC,iBAAiB,mBAAO,CAAC,6CAAY;AACrC;AACA;AACA;AACA;AACA,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sGAAsG;AACrH,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC,eAAe,SAAS;AACxB,eAAe,uCAAuC;AACtD,eAAe,uCAAuC;AACtD,eAAe,QAAQ,yDAAyD;AAChF;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;;;;;;;;;;;AChuCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD;AACA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,iFAA+B;AACzD;AACA;AACA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,gBAAgB;AAC3B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC,8CAAe;AAClC,iBAAiB,mBAAO,CAAC,0DAAqB;AAC9C,WAAW,mBAAO,CAAC,8CAAe;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,8EAAoC;AAC/D,YAAY,mBAAO,CAAC,8DAA4B;AAChD,YAAY,mBAAO,CAAC,gEAA6B;AACjD,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,sBAAsB,mBAAO,CAAC,kGAA8C;AAC5E,qBAAqB,mBAAO,CAAC,gGAA6C;AAC1E,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oCAAoC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,mCAAmC;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD;AACA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;AACA;AACA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;AAC/B;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0DAA0D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtsBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;AACxC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ,qGAAqG;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,0BAA0B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,mBAAmB,+IAA+I;AACpN;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,GAAG,uBAAuB,OAAO;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,kBAAkB;AAChC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,0BAA0B;AACxC,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;AAC9C;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5qBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,wCAAwC;AACxC,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,2BAA2B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,oDAAoD;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAgE;AAC/E;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3OA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,6BAA6B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,4BAA4B;AAC9D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACpTA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC,0CAA0C;AAC1C,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B,+BAA+B;AAC/B,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,oCAAoC;AACpC,sCAAsC;AACtC,yCAAyC;AACzC,mCAAmC;AACnC,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,mCAAmC;AACnC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACrLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,sBAAsB,mBAAO,CAAC,mEAAwB;AACtD,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AChHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,2CAA2C;AAC3C,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,iCAAiC;AACjC,iCAAiC;AACjC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7MA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,mCAAmC;AACnC,qCAAqC;AACrC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjKA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,uCAAuC;AACvC,sCAAsC;AACtC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AChGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,oCAAoC;AACpC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,uCAAuC;AACvC,kCAAkC;AAClC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,2CAAU;AAC9B,gBAAgB,mBAAO,CAAC,mDAAc;AACtC,WAAW,mBAAO,CAAC,yCAAS;AAC5B,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,YAAY,mBAAO,CAAC,2CAAU;AAC9B,iBAAiB,mBAAO,CAAC,qDAAe;AACxC,kBAAkB,mBAAO,CAAC,uDAAgB;AAC1C,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,cAAc,mBAAO,CAAC,+CAAY;AAClC,cAAc,mBAAO,CAAC,+CAAY;AAClC,YAAY,mBAAO,CAAC,2CAAU;AAC9B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,cAAc,mBAAO,CAAC,+CAAY;AAClC,UAAU,mBAAO,CAAC,uCAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,+BAA+B;AAC1C,WAAW,2CAA2C;AACtD;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW,KAAK,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB,KAAK,gBAAgB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,KAAK,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAA0D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,oCAAoC;AACnD,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2DAA2D;AAC1E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACl5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mFAAmF;AACpG;AACA,eAAe,mFAAmF;AAClG;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,4FAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC;AAClD;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,cAAc,mBAAO,CAAC,2CAAW;AACjC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC,oBAAoB,GAAG;AACvB;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC,oBAAoB,GAAG;AACvB;AACA,eAAe,sBAAsB;AACrC,eAAe,QAAQ;AACvB;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA,4GAA4G,sCAAsC;AAClJ,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACr0BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA,eAAe,gCAAgC;AAC/C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpXA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAmE;AAClF;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,iBAAiB,gCAAgC;AACjD,oBAAoB,YAAY;AAChC;AACA,eAAe,gEAAgE;AAC/E,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,kCAAkC;AACjD,eAAe,uCAAuC;AACtD;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,6BAA6B;AAC9C,iBAAiB,0BAA0B;AAC3C,oBAAoB,OAAO;AAC3B;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wDAAwD;AACnF;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,wGAAwG;AACvH;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wGAAwG,UAAU;AACjI,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,SAAS,mBAAO,CAAC,mEAAkB;AACnC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uIAAuI;AACtJ,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,mGAAmG;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uDAAuD;AACtE;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9WA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAkC;AACjD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iDAAiD;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6FAA6F;AAC5G;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAoD;AAC5D;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,sBAAsB;AACtB,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3mBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,sDAAsD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,cAAc;AAC7B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,6DAAS;AAC5B,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,eAAe,mBAAO,CAAC,qEAAa;AACpC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,eAAe,mBAAO,CAAC,qEAAa;AACpC,qBAAqB,mBAAO,CAAC,iFAAmB;AAChD,aAAa,mBAAO,CAAC,iEAAW;AAChC;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,KAAK;AACzB;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACl7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;AACA;AACA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;AACA;AACA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,qBAAqB;AAChC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,qBAAqB;AAChC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,uBAAuB,mBAAO,CAAC,6FAA2B;AAC1D;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,sDAAY;AACnC,gBAAgB,mBAAO,CAAC,wDAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,aAAa,mBAAO,CAAC,kDAAU;AAC/B,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,mBAAmB;AAC9B;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,2DAAY;AACnC,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,WAAW,mBAAO,CAAC,oDAAc;AACjC,aAAa,mBAAO,CAAC,uDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjjBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,uCAAuC;AAClD;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3SA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,uCAAuC;AAClD;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,sCAAsC;AACtC,+BAA+B;AAC/B,8BAA8B;AAC9B,kCAAkC;AAClC,iCAAiC;AACjC,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,4BAA4B;AACvC,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,wDAAwD;AAClJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,oFAAoF,oDAAoD;AACxI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mBAAO,CAAC,4DAAa;AAC9B,cAAc,mBAAO,CAAC,sEAAkB;AACxC,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,uBAAuB,mBAAO,CAAC,wFAA2B;AAC1D,qBAAqB,mBAAO,CAAC,oFAAyB;AACtD,eAAe,mBAAO,CAAC,wEAAmB;AAC1C,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,kBAAkB,mBAAO,CAAC,8EAAsB;AAChD,cAAc,mBAAO,CAAC,sEAAkB;AACxC,WAAW,mBAAO,CAAC,gEAAe;AAClC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D,aAAa,mBAAO,CAAC,gDAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,wDAAwD;AACnE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,gDAAgD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wGAAwG;AACnH,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9VA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,mDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpRA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1vDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,gDAAgD;AAC3D;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AClxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/gCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACthBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,uCAAuC;AAClF;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,iCAAiC;AAC5E;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4CAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,yDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0CAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,0CAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;AACxC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;AAChC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iGAAoC;;;;;;;;;;;ACNpC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,oGAAqC;;;;;;;;;;;ACVrC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;AAClC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;AAC3B;AACA;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;AAC9E;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;AAC1B;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,oDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,8CAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;AACvD;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;AAC1C;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,kDAAkD;AAClD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wCAAwC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;AAC1B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,uCAAuC;AACnG;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,0CAA0C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,4CAA4C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1MA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,yCAAyC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8CAA8C;AACrF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,sDAAsD;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,uDAAuD;AACnI;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,YAAY,mBAAO,CAAC,iEAAgB;AACpC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,cAAc,mBAAO,CAAC,qEAAkB;AACxC,WAAW,mBAAO,CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;AAChC;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1NA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzPA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,oCAAoC;AACpC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,sDAAsD;AACtD,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE,qEAAqE;AACrE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,wBAAwB,mBAAO,CAAC,4EAA8B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,6BAA6B;AAC7B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA,6BAA6B,mBAAmB;AAChD;AACA,4BAA4B,SAAS;AACrC;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA,WAAW,KAAK;AAChB;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAc;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,0DAAU;AAC9B;AACA,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;AAC1B;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,iEAAa;AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;AAChD;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,8CAA8C,cAAc,oBAAoB;AAChF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UCrEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack:///../../../node_modules/eventemitter3/index.js","webpack:///./runtimes/spine-canvas.js","webpack:///./runtimes/spine-webgl.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///../../../src/const.js","webpack:///../../../src/data/DataManager.js","webpack:///../../../src/data/events/CHANGE_DATA_EVENT.js","webpack:///../../../src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///../../../src/data/events/DESTROY_EVENT.js","webpack:///../../../src/data/events/REMOVE_DATA_EVENT.js","webpack:///../../../src/data/events/SET_DATA_EVENT.js","webpack:///../../../src/data/events/index.js","webpack:///../../../src/device/Audio.js","webpack:///../../../src/device/Browser.js","webpack:///../../../src/device/CanvasFeatures.js","webpack:///../../../src/device/Features.js","webpack:///../../../src/device/Fullscreen.js","webpack:///../../../src/device/Input.js","webpack:///../../../src/device/OS.js","webpack:///../../../src/device/Video.js","webpack:///../../../src/device/index.js","webpack:///../../../src/display/ColorMatrix.js","webpack:///../../../src/display/canvas/CanvasPool.js","webpack:///../../../src/display/canvas/Smoothing.js","webpack:///../../../src/display/mask/BitmapMask.js","webpack:///../../../src/display/mask/GeometryMask.js","webpack:///../../../src/fx/Barrel.js","webpack:///../../../src/fx/Bloom.js","webpack:///../../../src/fx/Blur.js","webpack:///../../../src/fx/Bokeh.js","webpack:///../../../src/fx/Circle.js","webpack:///../../../src/fx/ColorMatrix.js","webpack:///../../../src/fx/Controller.js","webpack:///../../../src/fx/Displacement.js","webpack:///../../../src/fx/Glow.js","webpack:///../../../src/fx/Gradient.js","webpack:///../../../src/fx/Pixelate.js","webpack:///../../../src/fx/Shadow.js","webpack:///../../../src/fx/Shine.js","webpack:///../../../src/fx/Vignette.js","webpack:///../../../src/fx/Wipe.js","webpack:///../../../src/fx/const.js","webpack:///../../../src/fx/index.js","webpack:///../../../src/gameobjects/BuildGameObject.js","webpack:///../../../src/gameobjects/GameObject.js","webpack:///../../../src/gameobjects/GameObjectFactory.js","webpack:///../../../src/gameobjects/GetCalcMatrix.js","webpack:///../../../src/gameobjects/components/Alpha.js","webpack:///../../../src/gameobjects/components/AlphaSingle.js","webpack:///../../../src/gameobjects/components/BlendMode.js","webpack:///../../../src/gameobjects/components/ComputedSize.js","webpack:///../../../src/gameobjects/components/Crop.js","webpack:///../../../src/gameobjects/components/Depth.js","webpack:///../../../src/gameobjects/components/FX.js","webpack:///../../../src/gameobjects/components/Flip.js","webpack:///../../../src/gameobjects/components/GetBounds.js","webpack:///../../../src/gameobjects/components/Mask.js","webpack:///../../../src/gameobjects/components/Origin.js","webpack:///../../../src/gameobjects/components/PathFollower.js","webpack:///../../../src/gameobjects/components/Pipeline.js","webpack:///../../../src/gameobjects/components/PostPipeline.js","webpack:///../../../src/gameobjects/components/ScrollFactor.js","webpack:///../../../src/gameobjects/components/Size.js","webpack:///../../../src/gameobjects/components/Texture.js","webpack:///../../../src/gameobjects/components/TextureCrop.js","webpack:///../../../src/gameobjects/components/Tint.js","webpack:///../../../src/gameobjects/components/ToJSON.js","webpack:///../../../src/gameobjects/components/Transform.js","webpack:///../../../src/gameobjects/components/TransformMatrix.js","webpack:///../../../src/gameobjects/components/Visible.js","webpack:///../../../src/gameobjects/components/index.js","webpack:///../../../src/gameobjects/container/Container.js","webpack:///../../../src/gameobjects/container/ContainerCanvasRenderer.js","webpack:///../../../src/gameobjects/container/ContainerRender.js","webpack:///../../../src/gameobjects/container/ContainerWebGLRenderer.js","webpack:///../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/DESTROY_EVENT.js","webpack:///../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAYING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STALLED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_TEXTURE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNSUPPORTED_EVENT.js","webpack:///../../../src/gameobjects/events/index.js","webpack:///../../../src/geom/const.js","webpack:///../../../src/geom/line/GetPoint.js","webpack:///../../../src/geom/line/GetPoints.js","webpack:///../../../src/geom/line/Length.js","webpack:///../../../src/geom/line/Line.js","webpack:///../../../src/geom/line/Random.js","webpack:///../../../src/geom/point/Point.js","webpack:///../../../src/geom/rectangle/Contains.js","webpack:///../../../src/geom/rectangle/GetPoint.js","webpack:///../../../src/geom/rectangle/GetPoints.js","webpack:///../../../src/geom/rectangle/Perimeter.js","webpack:///../../../src/geom/rectangle/Random.js","webpack:///../../../src/geom/rectangle/Rectangle.js","webpack:///../../../src/geom/rectangle/Union.js","webpack:///../../../src/loader/File.js","webpack:///../../../src/loader/FileTypesManager.js","webpack:///../../../src/loader/GetURL.js","webpack:///../../../src/loader/MergeXHRSettings.js","webpack:///../../../src/loader/MultiFile.js","webpack:///../../../src/loader/XHRLoader.js","webpack:///../../../src/loader/XHRSettings.js","webpack:///../../../src/loader/const.js","webpack:///../../../src/loader/events/ADD_EVENT.js","webpack:///../../../src/loader/events/COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_EVENT.js","webpack:///../../../src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///../../../src/loader/events/POST_PROCESS_EVENT.js","webpack:///../../../src/loader/events/PROGRESS_EVENT.js","webpack:///../../../src/loader/events/START_EVENT.js","webpack:///../../../src/loader/events/index.js","webpack:///../../../src/loader/filetypes/ImageFile.js","webpack:///../../../src/loader/filetypes/JSONFile.js","webpack:///../../../src/loader/filetypes/TextFile.js","webpack:///../../../src/math/Average.js","webpack:///../../../src/math/Bernstein.js","webpack:///../../../src/math/Between.js","webpack:///../../../src/math/CatmullRom.js","webpack:///../../../src/math/CeilTo.js","webpack:///../../../src/math/Clamp.js","webpack:///../../../src/math/DegToRad.js","webpack:///../../../src/math/Difference.js","webpack:///../../../src/math/Euler.js","webpack:///../../../src/math/Factorial.js","webpack:///../../../src/math/FloatBetween.js","webpack:///../../../src/math/FloorTo.js","webpack:///../../../src/math/FromPercent.js","webpack:///../../../src/math/GetSpeed.js","webpack:///../../../src/math/IsEven.js","webpack:///../../../src/math/IsEvenStrict.js","webpack:///../../../src/math/Linear.js","webpack:///../../../src/math/LinearXY.js","webpack:///../../../src/math/Matrix3.js","webpack:///../../../src/math/Matrix4.js","webpack:///../../../src/math/MaxAdd.js","webpack:///../../../src/math/Median.js","webpack:///../../../src/math/MinSub.js","webpack:///../../../src/math/Percent.js","webpack:///../../../src/math/Quaternion.js","webpack:///../../../src/math/RadToDeg.js","webpack:///../../../src/math/RandomXY.js","webpack:///../../../src/math/RandomXYZ.js","webpack:///../../../src/math/RandomXYZW.js","webpack:///../../../src/math/Rotate.js","webpack:///../../../src/math/RotateAround.js","webpack:///../../../src/math/RotateAroundDistance.js","webpack:///../../../src/math/RotateTo.js","webpack:///../../../src/math/RotateVec3.js","webpack:///../../../src/math/RoundAwayFromZero.js","webpack:///../../../src/math/RoundTo.js","webpack:///../../../src/math/SinCosTableGenerator.js","webpack:///../../../src/math/SmoothStep.js","webpack:///../../../src/math/SmootherStep.js","webpack:///../../../src/math/ToXY.js","webpack:///../../../src/math/TransformXY.js","webpack:///../../../src/math/Vector2.js","webpack:///../../../src/math/Vector3.js","webpack:///../../../src/math/Vector4.js","webpack:///../../../src/math/Within.js","webpack:///../../../src/math/Wrap.js","webpack:///../../../src/math/angle/Between.js","webpack:///../../../src/math/angle/BetweenPoints.js","webpack:///../../../src/math/angle/BetweenPointsY.js","webpack:///../../../src/math/angle/BetweenY.js","webpack:///../../../src/math/angle/CounterClockwise.js","webpack:///../../../src/math/angle/Normalize.js","webpack:///../../../src/math/angle/Random.js","webpack:///../../../src/math/angle/RandomDegrees.js","webpack:///../../../src/math/angle/Reverse.js","webpack:///../../../src/math/angle/RotateTo.js","webpack:///../../../src/math/angle/ShortestBetween.js","webpack:///../../../src/math/angle/Wrap.js","webpack:///../../../src/math/angle/WrapDegrees.js","webpack:///../../../src/math/angle/index.js","webpack:///../../../src/math/const.js","webpack:///../../../src/math/distance/DistanceBetween.js","webpack:///../../../src/math/distance/DistanceBetweenPoints.js","webpack:///../../../src/math/distance/DistanceBetweenPointsSquared.js","webpack:///../../../src/math/distance/DistanceChebyshev.js","webpack:///../../../src/math/distance/DistancePower.js","webpack:///../../../src/math/distance/DistanceSnake.js","webpack:///../../../src/math/distance/DistanceSquared.js","webpack:///../../../src/math/distance/index.js","webpack:///../../../src/math/easing/back/In.js","webpack:///../../../src/math/easing/back/InOut.js","webpack:///../../../src/math/easing/back/Out.js","webpack:///../../../src/math/easing/back/index.js","webpack:///../../../src/math/easing/bounce/In.js","webpack:///../../../src/math/easing/bounce/InOut.js","webpack:///../../../src/math/easing/bounce/Out.js","webpack:///../../../src/math/easing/bounce/index.js","webpack:///../../../src/math/easing/circular/In.js","webpack:///../../../src/math/easing/circular/InOut.js","webpack:///../../../src/math/easing/circular/Out.js","webpack:///../../../src/math/easing/circular/index.js","webpack:///../../../src/math/easing/cubic/In.js","webpack:///../../../src/math/easing/cubic/InOut.js","webpack:///../../../src/math/easing/cubic/Out.js","webpack:///../../../src/math/easing/cubic/index.js","webpack:///../../../src/math/easing/elastic/In.js","webpack:///../../../src/math/easing/elastic/InOut.js","webpack:///../../../src/math/easing/elastic/Out.js","webpack:///../../../src/math/easing/elastic/index.js","webpack:///../../../src/math/easing/expo/In.js","webpack:///../../../src/math/easing/expo/InOut.js","webpack:///../../../src/math/easing/expo/Out.js","webpack:///../../../src/math/easing/expo/index.js","webpack:///../../../src/math/easing/index.js","webpack:///../../../src/math/easing/linear/Linear.js","webpack:///../../../src/math/easing/linear/index.js","webpack:///../../../src/math/easing/quadratic/In.js","webpack:///../../../src/math/easing/quadratic/InOut.js","webpack:///../../../src/math/easing/quadratic/Out.js","webpack:///../../../src/math/easing/quadratic/index.js","webpack:///../../../src/math/easing/quartic/In.js","webpack:///../../../src/math/easing/quartic/InOut.js","webpack:///../../../src/math/easing/quartic/Out.js","webpack:///../../../src/math/easing/quartic/index.js","webpack:///../../../src/math/easing/quintic/In.js","webpack:///../../../src/math/easing/quintic/InOut.js","webpack:///../../../src/math/easing/quintic/Out.js","webpack:///../../../src/math/easing/quintic/index.js","webpack:///../../../src/math/easing/sine/In.js","webpack:///../../../src/math/easing/sine/InOut.js","webpack:///../../../src/math/easing/sine/Out.js","webpack:///../../../src/math/easing/sine/index.js","webpack:///../../../src/math/easing/stepped/Stepped.js","webpack:///../../../src/math/easing/stepped/index.js","webpack:///../../../src/math/fuzzy/Ceil.js","webpack:///../../../src/math/fuzzy/Equal.js","webpack:///../../../src/math/fuzzy/Floor.js","webpack:///../../../src/math/fuzzy/GreaterThan.js","webpack:///../../../src/math/fuzzy/LessThan.js","webpack:///../../../src/math/fuzzy/index.js","webpack:///../../../src/math/index.js","webpack:///../../../src/math/interpolation/BezierInterpolation.js","webpack:///../../../src/math/interpolation/CatmullRomInterpolation.js","webpack:///../../../src/math/interpolation/CubicBezierInterpolation.js","webpack:///../../../src/math/interpolation/LinearInterpolation.js","webpack:///../../../src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///../../../src/math/interpolation/SmoothStepInterpolation.js","webpack:///../../../src/math/interpolation/SmootherStepInterpolation.js","webpack:///../../../src/math/interpolation/index.js","webpack:///../../../src/math/pow2/GetPowerOfTwo.js","webpack:///../../../src/math/pow2/IsSizePowerOfTwo.js","webpack:///../../../src/math/pow2/IsValuePowerOfTwo.js","webpack:///../../../src/math/pow2/index.js","webpack:///../../../src/math/random-data-generator/RandomDataGenerator.js","webpack:///../../../src/math/snap/SnapCeil.js","webpack:///../../../src/math/snap/SnapFloor.js","webpack:///../../../src/math/snap/SnapTo.js","webpack:///../../../src/math/snap/index.js","webpack:///../../../src/plugins/BasePlugin.js","webpack:///../../../src/plugins/PluginCache.js","webpack:///../../../src/plugins/ScenePlugin.js","webpack:///../../../src/renderer/BlendModes.js","webpack:///../../../src/renderer/ScaleModes.js","webpack:///../../../src/scale/events/RESIZE_EVENT.js","webpack:///../../../src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/scene/events/BOOT_EVENT.js","webpack:///../../../src/scene/events/CREATE_EVENT.js","webpack:///../../../src/scene/events/DESTROY_EVENT.js","webpack:///../../../src/scene/events/PAUSE_EVENT.js","webpack:///../../../src/scene/events/POST_UPDATE_EVENT.js","webpack:///../../../src/scene/events/PRE_RENDER_EVENT.js","webpack:///../../../src/scene/events/PRE_UPDATE_EVENT.js","webpack:///../../../src/scene/events/READY_EVENT.js","webpack:///../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/scene/events/RENDER_EVENT.js","webpack:///../../../src/scene/events/RESUME_EVENT.js","webpack:///../../../src/scene/events/SHUTDOWN_EVENT.js","webpack:///../../../src/scene/events/SLEEP_EVENT.js","webpack:///../../../src/scene/events/START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///../../../src/scene/events/UPDATE_EVENT.js","webpack:///../../../src/scene/events/WAKE_EVENT.js","webpack:///../../../src/scene/events/index.js","webpack:///../../../src/textures/Frame.js","webpack:///../../../src/tweens/builders/GetBoolean.js","webpack:///../../../src/tweens/tween/const.js","webpack:///../../../src/utils/Class.js","webpack:///../../../src/utils/NOOP.js","webpack:///../../../src/utils/array/Add.js","webpack:///../../../src/utils/array/AddAt.js","webpack:///../../../src/utils/array/BringToTop.js","webpack:///../../../src/utils/array/CountAllMatching.js","webpack:///../../../src/utils/array/Each.js","webpack:///../../../src/utils/array/EachInRange.js","webpack:///../../../src/utils/array/FindClosestInSorted.js","webpack:///../../../src/utils/array/Flatten.js","webpack:///../../../src/utils/array/GetAll.js","webpack:///../../../src/utils/array/GetFirst.js","webpack:///../../../src/utils/array/GetRandom.js","webpack:///../../../src/utils/array/MoveAbove.js","webpack:///../../../src/utils/array/MoveBelow.js","webpack:///../../../src/utils/array/MoveDown.js","webpack:///../../../src/utils/array/MoveTo.js","webpack:///../../../src/utils/array/MoveUp.js","webpack:///../../../src/utils/array/NumberArray.js","webpack:///../../../src/utils/array/NumberArrayStep.js","webpack:///../../../src/utils/array/QuickSelect.js","webpack:///../../../src/utils/array/Range.js","webpack:///../../../src/utils/array/Remove.js","webpack:///../../../src/utils/array/RemoveAt.js","webpack:///../../../src/utils/array/RemoveBetween.js","webpack:///../../../src/utils/array/RemoveRandomElement.js","webpack:///../../../src/utils/array/Replace.js","webpack:///../../../src/utils/array/RotateLeft.js","webpack:///../../../src/utils/array/RotateRight.js","webpack:///../../../src/utils/array/SafeRange.js","webpack:///../../../src/utils/array/SendToBack.js","webpack:///../../../src/utils/array/SetAll.js","webpack:///../../../src/utils/array/Shuffle.js","webpack:///../../../src/utils/array/SortByDigits.js","webpack:///../../../src/utils/array/SpliceOne.js","webpack:///../../../src/utils/array/StableSort.js","webpack:///../../../src/utils/array/Swap.js","webpack:///../../../src/utils/array/index.js","webpack:///../../../src/utils/array/matrix/CheckMatrix.js","webpack:///../../../src/utils/array/matrix/MatrixToString.js","webpack:///../../../src/utils/array/matrix/ReverseColumns.js","webpack:///../../../src/utils/array/matrix/ReverseRows.js","webpack:///../../../src/utils/array/matrix/Rotate180.js","webpack:///../../../src/utils/array/matrix/RotateLeft.js","webpack:///../../../src/utils/array/matrix/RotateMatrix.js","webpack:///../../../src/utils/array/matrix/RotateRight.js","webpack:///../../../src/utils/array/matrix/TranslateMatrix.js","webpack:///../../../src/utils/array/matrix/TransposeMatrix.js","webpack:///../../../src/utils/array/matrix/index.js","webpack:///../../../src/utils/object/DeepCopy.js","webpack:///../../../src/utils/object/Extend.js","webpack:///../../../src/utils/object/GetAdvancedValue.js","webpack:///../../../src/utils/object/GetFastValue.js","webpack:///../../../src/utils/object/GetValue.js","webpack:///../../../src/utils/object/IsPlainObject.js","webpack:///../../../src/utils/string/Pad.js","webpack:///webpack/bootstrap","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["'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\";\r\nvar spine = (() => {\r\n var __defProp = Object.defineProperty;\r\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\r\n var __getOwnPropNames = Object.getOwnPropertyNames;\r\n var __hasOwnProp = Object.prototype.hasOwnProperty;\r\n var __export = (target, all) => {\r\n for (var name in all)\r\n __defProp(target, name, { get: all[name], enumerable: true });\r\n };\r\n var __copyProps = (to, from, except, desc) => {\r\n if (from && typeof from === \"object\" || typeof from === \"function\") {\r\n for (let key of __getOwnPropNames(from))\r\n if (!__hasOwnProp.call(to, key) && key !== except)\r\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\r\n }\r\n return to;\r\n };\r\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\r\n\r\n // spine-canvas/src/index.ts\r\n var src_exports = {};\r\n __export(src_exports, {\r\n AlphaTimeline: () => AlphaTimeline,\r\n Animation: () => Animation,\r\n AnimationState: () => AnimationState,\r\n AnimationStateAdapter: () => AnimationStateAdapter,\r\n AnimationStateData: () => AnimationStateData,\r\n AssetManager: () => AssetManager,\r\n AssetManagerBase: () => AssetManagerBase,\r\n AtlasAttachmentLoader: () => AtlasAttachmentLoader,\r\n Attachment: () => Attachment,\r\n AttachmentTimeline: () => AttachmentTimeline,\r\n BinaryInput: () => BinaryInput,\r\n BlendMode: () => BlendMode,\r\n Bone: () => Bone,\r\n BoneData: () => BoneData,\r\n BoundingBoxAttachment: () => BoundingBoxAttachment,\r\n CURRENT: () => CURRENT,\r\n CanvasTexture: () => CanvasTexture,\r\n ClippingAttachment: () => ClippingAttachment,\r\n Color: () => Color,\r\n ConstraintData: () => ConstraintData,\r\n CurveTimeline: () => CurveTimeline,\r\n CurveTimeline1: () => CurveTimeline1,\r\n CurveTimeline2: () => CurveTimeline2,\r\n DebugUtils: () => DebugUtils,\r\n DeformTimeline: () => DeformTimeline,\r\n Downloader: () => Downloader,\r\n DrawOrderTimeline: () => DrawOrderTimeline,\r\n Event: () => Event,\r\n EventData: () => EventData,\r\n EventQueue: () => EventQueue,\r\n EventTimeline: () => EventTimeline,\r\n EventType: () => EventType,\r\n FIRST: () => FIRST,\r\n FakeTexture: () => FakeTexture,\r\n HOLD_FIRST: () => HOLD_FIRST,\r\n HOLD_MIX: () => HOLD_MIX,\r\n HOLD_SUBSEQUENT: () => HOLD_SUBSEQUENT,\r\n IkConstraint: () => IkConstraint,\r\n IkConstraintData: () => IkConstraintData,\r\n IkConstraintTimeline: () => IkConstraintTimeline,\r\n IntSet: () => IntSet,\r\n Interpolation: () => Interpolation,\r\n MathUtils: () => MathUtils,\r\n MeshAttachment: () => MeshAttachment,\r\n MixBlend: () => MixBlend,\r\n MixDirection: () => MixDirection,\r\n PathAttachment: () => PathAttachment,\r\n PathConstraint: () => PathConstraint,\r\n PathConstraintData: () => PathConstraintData,\r\n PathConstraintMixTimeline: () => PathConstraintMixTimeline,\r\n PathConstraintPositionTimeline: () => PathConstraintPositionTimeline,\r\n PathConstraintSpacingTimeline: () => PathConstraintSpacingTimeline,\r\n PointAttachment: () => PointAttachment,\r\n Pool: () => Pool,\r\n PositionMode: () => PositionMode,\r\n Pow: () => Pow,\r\n PowOut: () => PowOut,\r\n RGB2Timeline: () => RGB2Timeline,\r\n RGBA2Timeline: () => RGBA2Timeline,\r\n RGBATimeline: () => RGBATimeline,\r\n RGBTimeline: () => RGBTimeline,\r\n RegionAttachment: () => RegionAttachment,\r\n RotateMode: () => RotateMode,\r\n RotateTimeline: () => RotateTimeline,\r\n SETUP: () => SETUP,\r\n SUBSEQUENT: () => SUBSEQUENT,\r\n ScaleTimeline: () => ScaleTimeline,\r\n ScaleXTimeline: () => ScaleXTimeline,\r\n ScaleYTimeline: () => ScaleYTimeline,\r\n SequenceTimeline: () => SequenceTimeline,\r\n ShearTimeline: () => ShearTimeline,\r\n ShearXTimeline: () => ShearXTimeline,\r\n ShearYTimeline: () => ShearYTimeline,\r\n Skeleton: () => Skeleton,\r\n SkeletonBinary: () => SkeletonBinary,\r\n SkeletonBounds: () => SkeletonBounds,\r\n SkeletonClipping: () => SkeletonClipping,\r\n SkeletonData: () => SkeletonData,\r\n SkeletonJson: () => SkeletonJson,\r\n SkeletonRenderer: () => SkeletonRenderer,\r\n Skin: () => Skin,\r\n SkinEntry: () => SkinEntry,\r\n Slot: () => Slot,\r\n SlotData: () => SlotData,\r\n SpacingMode: () => SpacingMode,\r\n StringSet: () => StringSet,\r\n Texture: () => Texture,\r\n TextureAtlas: () => TextureAtlas,\r\n TextureAtlasPage: () => TextureAtlasPage,\r\n TextureAtlasRegion: () => TextureAtlasRegion,\r\n TextureFilter: () => TextureFilter,\r\n TextureRegion: () => TextureRegion,\r\n TextureWrap: () => TextureWrap,\r\n TimeKeeper: () => TimeKeeper,\r\n Timeline: () => Timeline,\r\n TrackEntry: () => TrackEntry,\r\n TransformConstraint: () => TransformConstraint,\r\n TransformConstraintData: () => TransformConstraintData,\r\n TransformConstraintTimeline: () => TransformConstraintTimeline,\r\n TransformMode: () => TransformMode,\r\n TranslateTimeline: () => TranslateTimeline,\r\n TranslateXTimeline: () => TranslateXTimeline,\r\n TranslateYTimeline: () => TranslateYTimeline,\r\n Triangulator: () => Triangulator,\r\n Utils: () => Utils,\r\n Vector2: () => Vector2,\r\n VertexAttachment: () => VertexAttachment,\r\n WindowedMean: () => WindowedMean\r\n });\r\n\r\n // spine-core/src/Utils.ts\r\n var IntSet = class {\r\n constructor() {\r\n this.array = new Array();\r\n }\r\n add(value) {\r\n let contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n }\r\n contains(value) {\r\n return this.array[value | 0] != void 0;\r\n }\r\n remove(value) {\r\n this.array[value | 0] = void 0;\r\n }\r\n clear() {\r\n this.array.length = 0;\r\n }\r\n };\r\n var StringSet = class {\r\n constructor() {\r\n this.entries = {};\r\n this.size = 0;\r\n }\r\n add(value) {\r\n let contains = this.entries[value];\r\n this.entries[value] = true;\r\n if (!contains) {\r\n this.size++;\r\n return true;\r\n }\r\n return false;\r\n }\r\n addAll(values) {\r\n let oldSize = this.size;\r\n for (var i = 0, n = values.length; i < n; i++)\r\n this.add(values[i]);\r\n return oldSize != this.size;\r\n }\r\n contains(value) {\r\n return this.entries[value];\r\n }\r\n clear() {\r\n this.entries = {};\r\n this.size = 0;\r\n }\r\n };\r\n var _Color = class {\r\n constructor(r = 0, g = 0, b = 0, a = 0) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n set(r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n return this.clamp();\r\n }\r\n setFromColor(c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n }\r\n setFromString(hex) {\r\n hex = hex.charAt(0) == \"#\" ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255;\r\n this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\r\n return this;\r\n }\r\n add(r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n return this.clamp();\r\n }\r\n clamp() {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n }\r\n static rgba8888ToColor(color, value) {\r\n color.r = ((value & 4278190080) >>> 24) / 255;\r\n color.g = ((value & 16711680) >>> 16) / 255;\r\n color.b = ((value & 65280) >>> 8) / 255;\r\n color.a = (value & 255) / 255;\r\n }\r\n static rgb888ToColor(color, value) {\r\n color.r = ((value & 16711680) >>> 16) / 255;\r\n color.g = ((value & 65280) >>> 8) / 255;\r\n color.b = (value & 255) / 255;\r\n }\r\n static fromString(hex) {\r\n return new _Color().setFromString(hex);\r\n }\r\n };\r\n var Color = _Color;\r\n Color.WHITE = new _Color(1, 1, 1, 1);\r\n Color.RED = new _Color(1, 0, 0, 1);\r\n Color.GREEN = new _Color(0, 1, 0, 1);\r\n Color.BLUE = new _Color(0, 0, 1, 1);\r\n Color.MAGENTA = new _Color(1, 0, 1, 1);\r\n var _MathUtils = class {\r\n static clamp(value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n }\r\n static cosDeg(degrees) {\r\n return Math.cos(degrees * _MathUtils.degRad);\r\n }\r\n static sinDeg(degrees) {\r\n return Math.sin(degrees * _MathUtils.degRad);\r\n }\r\n static signum(value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n }\r\n static toInt(x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n }\r\n static cbrt(x) {\r\n let y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n }\r\n static randomTriangular(min, max) {\r\n return _MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n }\r\n static randomTriangularWith(min, max, mode) {\r\n let u = Math.random();\r\n let d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n }\r\n static isPowerOfTwo(value) {\r\n return value && (value & value - 1) === 0;\r\n }\r\n };\r\n var MathUtils = _MathUtils;\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = _MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / _MathUtils.PI;\r\n MathUtils.radDeg = _MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = _MathUtils.PI / 180;\r\n MathUtils.degRad = _MathUtils.degreesToRadians;\r\n var Interpolation = class {\r\n apply(start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n }\r\n };\r\n var Pow = class extends Interpolation {\r\n constructor(power) {\r\n super();\r\n this.power = 2;\r\n this.power = power;\r\n }\r\n applyInternal(a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n }\r\n };\r\n var PowOut = class extends Pow {\r\n constructor(power) {\r\n super(power);\r\n }\r\n applyInternal(a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n }\r\n };\r\n var _Utils = class {\r\n static arrayCopy(source, sourceStart, dest, destStart, numElements) {\r\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n }\r\n static arrayFill(array, fromIndex, toIndex, value) {\r\n for (let i = fromIndex; i < toIndex; i++)\r\n array[i] = value;\r\n }\r\n static setArraySize(array, size, value = 0) {\r\n let oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (let i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n }\r\n static ensureArrayCapacity(array, size, value = 0) {\r\n if (array.length >= size)\r\n return array;\r\n return _Utils.setArraySize(array, size, value);\r\n }\r\n static newArray(size, defaultValue) {\r\n let array = new Array(size);\r\n for (let i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n }\r\n static newFloatArray(size) {\r\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\r\n return new Float32Array(size);\r\n else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n }\r\n static newShortArray(size) {\r\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\r\n return new Int16Array(size);\r\n else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n }\r\n static toFloatArray(array) {\r\n return _Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n }\r\n static toSinglePrecision(value) {\r\n return _Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n }\r\n static webkit602BugfixHelper(alpha, blend) {\r\n }\r\n static contains(array, element, identity = true) {\r\n for (var i = 0; i < array.length; i++)\r\n if (array[i] == element)\r\n return true;\r\n return false;\r\n }\r\n static enumValue(type, name) {\r\n return type[name[0].toUpperCase() + name.slice(1)];\r\n }\r\n };\r\n var Utils = _Utils;\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== \"undefined\";\r\n var DebugUtils = class {\r\n static logBones(skeleton) {\r\n for (let i = 0; i < skeleton.bones.length; i++) {\r\n let bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n }\r\n };\r\n var Pool = class {\r\n constructor(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n obtain() {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n }\r\n free(item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n }\r\n freeAll(items) {\r\n for (let i = 0; i < items.length; i++)\r\n this.free(items[i]);\r\n }\r\n clear() {\r\n this.items.length = 0;\r\n }\r\n };\r\n var Vector2 = class {\r\n constructor(x = 0, y = 0) {\r\n this.x = x;\r\n this.y = y;\r\n }\r\n set(x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n }\r\n length() {\r\n let x = this.x;\r\n let y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n }\r\n normalize() {\r\n let len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n }\r\n };\r\n var TimeKeeper = class {\r\n constructor() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1e3;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n update() {\r\n let now = Date.now() / 1e3;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n }\r\n };\r\n var WindowedMean = class {\r\n constructor(windowSize = 32) {\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n hasEnoughData() {\r\n return this.addedValues >= this.values.length;\r\n }\r\n addValue(value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n }\r\n getMean() {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n let mean = 0;\r\n for (let i = 0; i < this.values.length; i++)\r\n mean += this.values[i];\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n return 0;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/Attachment.ts\r\n var Attachment = class {\r\n constructor(name) {\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n };\r\n var _VertexAttachment = class extends Attachment {\r\n constructor(name) {\r\n super(name);\r\n this.id = _VertexAttachment.nextID++;\r\n this.bones = null;\r\n this.vertices = [];\r\n this.worldVerticesLength = 0;\r\n this.timelineAttachment = this;\r\n }\r\n computeWorldVertices(slot, start, count, worldVertices2, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n let skeleton = slot.bone.skeleton;\r\n let deformArray = slot.deform;\r\n let vertices = this.vertices;\r\n let bones = this.bones;\r\n if (!bones) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n let bone = slot.bone;\r\n let x = bone.worldX;\r\n let y = bone.worldY;\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (let v2 = start, w = offset; w < count; v2 += 2, w += stride) {\r\n let vx = vertices[v2], vy = vertices[v2 + 1];\r\n worldVertices2[w] = vx * a + vy * b + x;\r\n worldVertices2[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n let v = 0, skip = 0;\r\n for (let i = 0; i < start; i += 2) {\r\n let n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n let skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (let w = offset, b = skip * 3; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n let bone = skeletonBones[bones[v]];\r\n let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices2[w] = wx;\r\n worldVertices2[w + 1] = wy;\r\n }\r\n } else {\r\n let deform = deformArray;\r\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n let bone = skeletonBones[bones[v]];\r\n let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices2[w] = wx;\r\n worldVertices2[w + 1] = wy;\r\n }\r\n }\r\n }\r\n copyTo(attachment) {\r\n if (this.bones) {\r\n attachment.bones = new Array(this.bones.length);\r\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n } else\r\n attachment.bones = null;\r\n if (this.vertices) {\r\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\r\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.timelineAttachment = this.timelineAttachment;\r\n }\r\n };\r\n var VertexAttachment = _VertexAttachment;\r\n VertexAttachment.nextID = 0;\r\n\r\n // spine-core/src/attachments/Sequence.ts\r\n var _Sequence = class {\r\n constructor(count) {\r\n this.id = _Sequence.nextID();\r\n this.start = 0;\r\n this.digits = 0;\r\n this.setupIndex = 0;\r\n this.regions = new Array(count);\r\n }\r\n copy() {\r\n let copy = new _Sequence(this.regions.length);\r\n Utils.arrayCopy(this.regions, 0, copy.regions, 0, this.regions.length);\r\n copy.start = this.start;\r\n copy.digits = this.digits;\r\n copy.setupIndex = this.setupIndex;\r\n return copy;\r\n }\r\n apply(slot, attachment) {\r\n let index = slot.sequenceIndex;\r\n if (index == -1)\r\n index = this.setupIndex;\r\n if (index >= this.regions.length)\r\n index = this.regions.length - 1;\r\n let region = this.regions[index];\r\n if (attachment.region != region) {\r\n attachment.region = region;\r\n attachment.updateRegion();\r\n }\r\n }\r\n getPath(basePath, index) {\r\n let result = basePath;\r\n let frame = (this.start + index).toString();\r\n for (let i = this.digits - frame.length; i > 0; i--)\r\n result += \"0\";\r\n result += frame;\r\n return result;\r\n }\r\n static nextID() {\r\n return _Sequence._nextID++;\r\n }\r\n };\r\n var Sequence = _Sequence;\r\n Sequence._nextID = 0;\r\n var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {\r\n SequenceMode2[SequenceMode2[\"hold\"] = 0] = \"hold\";\r\n SequenceMode2[SequenceMode2[\"once\"] = 1] = \"once\";\r\n SequenceMode2[SequenceMode2[\"loop\"] = 2] = \"loop\";\r\n SequenceMode2[SequenceMode2[\"pingpong\"] = 3] = \"pingpong\";\r\n SequenceMode2[SequenceMode2[\"onceReverse\"] = 4] = \"onceReverse\";\r\n SequenceMode2[SequenceMode2[\"loopReverse\"] = 5] = \"loopReverse\";\r\n SequenceMode2[SequenceMode2[\"pingpongReverse\"] = 6] = \"pingpongReverse\";\r\n return SequenceMode2;\r\n })(SequenceMode || {});\r\n var SequenceModeValues = [\r\n 0 /* hold */,\r\n 1 /* once */,\r\n 2 /* loop */,\r\n 3 /* pingpong */,\r\n 4 /* onceReverse */,\r\n 5 /* loopReverse */,\r\n 6 /* pingpongReverse */\r\n ];\r\n\r\n // spine-core/src/Animation.ts\r\n var Animation = class {\r\n constructor(name, timelines, duration) {\r\n this.timelines = [];\r\n this.timelineIds = new StringSet();\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n this.setTimelines(timelines);\r\n this.duration = duration;\r\n }\r\n setTimelines(timelines) {\r\n if (!timelines)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.timelines = timelines;\r\n this.timelineIds.clear();\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds.addAll(timelines[i].getPropertyIds());\r\n }\r\n hasTimeline(ids) {\r\n for (let i = 0; i < ids.length; i++)\r\n if (this.timelineIds.contains(ids[i]))\r\n return true;\r\n return false;\r\n }\r\n apply(skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n let timelines = this.timelines;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n }\r\n };\r\n var MixBlend = /* @__PURE__ */ ((MixBlend2) => {\r\n MixBlend2[MixBlend2[\"setup\"] = 0] = \"setup\";\r\n MixBlend2[MixBlend2[\"first\"] = 1] = \"first\";\r\n MixBlend2[MixBlend2[\"replace\"] = 2] = \"replace\";\r\n MixBlend2[MixBlend2[\"add\"] = 3] = \"add\";\r\n return MixBlend2;\r\n })(MixBlend || {});\r\n var MixDirection = /* @__PURE__ */ ((MixDirection2) => {\r\n MixDirection2[MixDirection2[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection2[MixDirection2[\"mixOut\"] = 1] = \"mixOut\";\r\n return MixDirection2;\r\n })(MixDirection || {});\r\n var Property = {\r\n rotate: 0,\r\n x: 1,\r\n y: 2,\r\n scaleX: 3,\r\n scaleY: 4,\r\n shearX: 5,\r\n shearY: 6,\r\n rgb: 7,\r\n alpha: 8,\r\n rgb2: 9,\r\n attachment: 10,\r\n deform: 11,\r\n event: 12,\r\n drawOrder: 13,\r\n ikConstraint: 14,\r\n transformConstraint: 15,\r\n pathConstraintPosition: 16,\r\n pathConstraintSpacing: 17,\r\n pathConstraintMix: 18,\r\n sequence: 19\r\n };\r\n var Timeline = class {\r\n constructor(frameCount, propertyIds) {\r\n this.propertyIds = propertyIds;\r\n this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\r\n }\r\n getPropertyIds() {\r\n return this.propertyIds;\r\n }\r\n getFrameEntries() {\r\n return 1;\r\n }\r\n getFrameCount() {\r\n return this.frames.length / this.getFrameEntries();\r\n }\r\n getDuration() {\r\n return this.frames[this.frames.length - this.getFrameEntries()];\r\n }\r\n static search1(frames, time) {\r\n let n = frames.length;\r\n for (let i = 1; i < n; i++)\r\n if (frames[i] > time)\r\n return i - 1;\r\n return n - 1;\r\n }\r\n static search(frames, time, step) {\r\n let n = frames.length;\r\n for (let i = step; i < n; i += step)\r\n if (frames[i] > time)\r\n return i - step;\r\n return n - step;\r\n }\r\n };\r\n var CurveTimeline = class extends Timeline {\r\n constructor(frameCount, bezierCount, propertyIds) {\r\n super(frameCount, propertyIds);\r\n this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);\r\n this.curves[frameCount - 1] = 1;\r\n }\r\n setLinear(frame) {\r\n this.curves[frame] = 0;\r\n }\r\n setStepped(frame) {\r\n this.curves[frame] = 1;\r\n }\r\n shrink(bezierCount) {\r\n let size = this.getFrameCount() + bezierCount * 18;\r\n if (this.curves.length > size) {\r\n let newCurves = Utils.newFloatArray(size);\r\n Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\r\n this.curves = newCurves;\r\n }\r\n }\r\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\r\n let curves = this.curves;\r\n let i = this.getFrameCount() + bezier * 18;\r\n if (value == 0)\r\n curves[frame] = 2 + i;\r\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\r\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 6e-3;\r\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\r\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\r\n let x = time1 + dx, y = value1 + dy;\r\n for (let n = i + 18; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dx += ddx;\r\n dy += ddy;\r\n ddx += dddx;\r\n ddy += dddy;\r\n x += dx;\r\n y += dy;\r\n }\r\n }\r\n getBezierValue(time, frameIndex, valueOffset, i) {\r\n let curves = this.curves;\r\n if (curves[i] > time) {\r\n let x2 = this.frames[frameIndex], y2 = this.frames[frameIndex + valueOffset];\r\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\r\n }\r\n let n = i + 18;\r\n for (i += 2; i < n; i += 2) {\r\n if (curves[i] >= time) {\r\n let x2 = curves[i - 2], y2 = curves[i - 1];\r\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\r\n }\r\n }\r\n frameIndex += this.getFrameEntries();\r\n let x = curves[n - 2], y = curves[n - 1];\r\n return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\r\n }\r\n };\r\n var CurveTimeline1 = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, propertyId) {\r\n super(frameCount, bezierCount, [propertyId]);\r\n }\r\n getFrameEntries() {\r\n return 2;\r\n }\r\n setFrame(frame, time, value) {\r\n frame <<= 1;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = value;\r\n }\r\n getCurveValue(time) {\r\n let frames = this.frames;\r\n let i = frames.length - 2;\r\n for (let ii = 2; ii <= i; ii += 2) {\r\n if (frames[ii] > time) {\r\n i = ii - 2;\r\n break;\r\n }\r\n }\r\n let curveType = this.curves[i >> 1];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i], value = frames[i + 1];\r\n return value + (time - before) / (frames[i + 2] - before) * (frames[i + 2 + 1] - value);\r\n case 1:\r\n return frames[i + 1];\r\n }\r\n return this.getBezierValue(time, i, 1, curveType - 2);\r\n }\r\n };\r\n var CurveTimeline2 = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, propertyId1, propertyId2) {\r\n super(frameCount, bezierCount, [propertyId1, propertyId2]);\r\n }\r\n getFrameEntries() {\r\n return 3;\r\n }\r\n setFrame(frame, time, value1, value2) {\r\n frame *= 3;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = value1;\r\n this.frames[frame + 2] = value2;\r\n }\r\n };\r\n var RotateTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.rotate + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case 1 /* first */:\r\n bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\r\n }\r\n return;\r\n }\r\n let r = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.rotation = bone.data.rotation + r * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n r += bone.data.rotation - bone.rotation;\r\n case 3 /* add */:\r\n bone.rotation += r * alpha;\r\n }\r\n }\r\n };\r\n var TranslateTimeline = class extends CurveTimeline2 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(\r\n frameCount,\r\n bezierCount,\r\n Property.x + \"|\" + boneIndex,\r\n Property.y + \"|\" + boneIndex\r\n );\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case 1 /* first */:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n let x = 0, y = 0;\r\n let i = Timeline.search(frames, time, 3);\r\n let curveType = this.curves[i / 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n let t = (time - before) / (frames[i + 3] - before);\r\n x += (frames[i + 3 + 1] - x) * t;\r\n y += (frames[i + 3 + 2] - y) * t;\r\n break;\r\n case 1:\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n break;\r\n default:\r\n x = this.getBezierValue(time, i, 1, curveType - 2);\r\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n }\r\n };\r\n var TranslateXTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.x + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x;\r\n return;\r\n case 1 /* first */:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n }\r\n return;\r\n }\r\n let x = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x + x * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.x += x * alpha;\r\n }\r\n }\r\n };\r\n var TranslateYTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.y + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.y = bone.data.y;\r\n return;\r\n case 1 /* first */:\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n let y = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.y += y * alpha;\r\n }\r\n }\r\n };\r\n var ScaleTimeline = class extends CurveTimeline2 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(\r\n frameCount,\r\n bezierCount,\r\n Property.scaleX + \"|\" + boneIndex,\r\n Property.scaleY + \"|\" + boneIndex\r\n );\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case 1 /* first */:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n let x, y;\r\n let i = Timeline.search(frames, time, 3);\r\n let curveType = this.curves[i / 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n let t = (time - before) / (frames[i + 3] - before);\r\n x += (frames[i + 3 + 1] - x) * t;\r\n y += (frames[i + 3 + 2] - y) * t;\r\n break;\r\n case 1:\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n break;\r\n default:\r\n x = this.getBezierValue(time, i, 1, curveType - 2);\r\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n x *= bone.data.scaleX;\r\n y *= bone.data.scaleY;\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n } else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n } else {\r\n let bx = 0, by = 0;\r\n if (direction == 1 /* mixOut */) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var ScaleXTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.scaleX = bone.data.scaleX;\r\n return;\r\n case 1 /* first */:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n }\r\n return;\r\n }\r\n let x = this.getCurveValue(time) * bone.data.scaleX;\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */)\r\n bone.scaleX += x - bone.data.scaleX;\r\n else\r\n bone.scaleX = x;\r\n } else {\r\n let bx = 0;\r\n if (direction == 1 /* mixOut */) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = bone.data.scaleX;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = bone.scaleX;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var ScaleYTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case 1 /* first */:\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n let y = this.getCurveValue(time) * bone.data.scaleY;\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */)\r\n bone.scaleY += y - bone.data.scaleY;\r\n else\r\n bone.scaleY = y;\r\n } else {\r\n let by = 0;\r\n if (direction == 1 /* mixOut */) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n by = bone.data.scaleY;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n by = bone.scaleY;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var ShearTimeline = class extends CurveTimeline2 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(\r\n frameCount,\r\n bezierCount,\r\n Property.shearX + \"|\" + boneIndex,\r\n Property.shearY + \"|\" + boneIndex\r\n );\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case 1 /* first */:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n let x = 0, y = 0;\r\n let i = Timeline.search(frames, time, 3);\r\n let curveType = this.curves[i / 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n let t = (time - before) / (frames[i + 3] - before);\r\n x += (frames[i + 3 + 1] - x) * t;\r\n y += (frames[i + 3 + 2] - y) * t;\r\n break;\r\n case 1:\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n break;\r\n default:\r\n x = this.getBezierValue(time, i, 1, curveType - 2);\r\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n }\r\n };\r\n var ShearXTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.shearX + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX;\r\n return;\r\n case 1 /* first */:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n }\r\n return;\r\n }\r\n let x = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.shearX += x * alpha;\r\n }\r\n }\r\n };\r\n var ShearYTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.shearY + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case 1 /* first */:\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n let y = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.shearY += y * alpha;\r\n }\r\n }\r\n };\r\n var RGBATimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex,\r\n Property.alpha + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 5;\r\n }\r\n setFrame(frame, time, r, g, b, a) {\r\n frame *= 5;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n this.frames[frame + 4] = a;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let color = slot.color;\r\n if (time < frames[0]) {\r\n let setup = slot.data.color;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n color.setFromColor(setup);\r\n return;\r\n case 1 /* first */:\r\n color.add(\r\n (setup.r - color.r) * alpha,\r\n (setup.g - color.g) * alpha,\r\n (setup.b - color.b) * alpha,\r\n (setup.a - color.a) * alpha\r\n );\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0, a = 0;\r\n let i = Timeline.search(frames, time, 5);\r\n let curveType = this.curves[i / 5];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n let t = (time - before) / (frames[i + 5] - before);\r\n r += (frames[i + 5 + 1] - r) * t;\r\n g += (frames[i + 5 + 2] - g) * t;\r\n b += (frames[i + 5 + 3] - b) * t;\r\n a += (frames[i + 5 + 4] - a) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n }\r\n if (alpha == 1)\r\n color.set(r, g, b, a);\r\n else {\r\n if (blend == 0 /* setup */)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n }\r\n };\r\n var RGBTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 4;\r\n }\r\n setFrame(frame, time, r, g, b) {\r\n frame <<= 2;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let color = slot.color;\r\n if (time < frames[0]) {\r\n let setup = slot.data.color;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n color.r = setup.r;\r\n color.g = setup.g;\r\n color.b = setup.b;\r\n return;\r\n case 1 /* first */:\r\n color.r += (setup.r - color.r) * alpha;\r\n color.g += (setup.g - color.g) * alpha;\r\n color.b += (setup.b - color.b) * alpha;\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0;\r\n let i = Timeline.search(frames, time, 4);\r\n let curveType = this.curves[i >> 2];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n let t = (time - before) / (frames[i + 4] - before);\r\n r += (frames[i + 4 + 1] - r) * t;\r\n g += (frames[i + 4 + 2] - g) * t;\r\n b += (frames[i + 4 + 3] - b) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n }\r\n if (alpha == 1) {\r\n color.r = r;\r\n color.g = g;\r\n color.b = b;\r\n } else {\r\n if (blend == 0 /* setup */) {\r\n let setup = slot.data.color;\r\n color.r = setup.r;\r\n color.g = setup.g;\r\n color.b = setup.b;\r\n }\r\n color.r += (r - color.r) * alpha;\r\n color.g += (g - color.g) * alpha;\r\n color.b += (b - color.b) * alpha;\r\n }\r\n }\r\n };\r\n var AlphaTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, Property.alpha + \"|\" + slotIndex);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let color = slot.color;\r\n if (time < this.frames[0]) {\r\n let setup = slot.data.color;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n color.a = setup.a;\r\n return;\r\n case 1 /* first */:\r\n color.a += (setup.a - color.a) * alpha;\r\n }\r\n return;\r\n }\r\n let a = this.getCurveValue(time);\r\n if (alpha == 1)\r\n color.a = a;\r\n else {\r\n if (blend == 0 /* setup */)\r\n color.a = slot.data.color.a;\r\n color.a += (a - color.a) * alpha;\r\n }\r\n }\r\n };\r\n var RGBA2Timeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex,\r\n Property.alpha + \"|\" + slotIndex,\r\n Property.rgb2 + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 8;\r\n }\r\n setFrame(frame, time, r, g, b, a, r2, g2, b2) {\r\n frame <<= 3;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n this.frames[frame + 4] = a;\r\n this.frames[frame + 5] = r2;\r\n this.frames[frame + 6] = g2;\r\n this.frames[frame + 7] = b2;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let light = slot.color, dark = slot.darkColor;\r\n if (time < frames[0]) {\r\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n light.setFromColor(setupLight);\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n return;\r\n case 1 /* first */:\r\n light.add(\r\n (setupLight.r - light.r) * alpha,\r\n (setupLight.g - light.g) * alpha,\r\n (setupLight.b - light.b) * alpha,\r\n (setupLight.a - light.a) * alpha\r\n );\r\n dark.r += (setupDark.r - dark.r) * alpha;\r\n dark.g += (setupDark.g - dark.g) * alpha;\r\n dark.b += (setupDark.b - dark.b) * alpha;\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n let i = Timeline.search(frames, time, 8);\r\n let curveType = this.curves[i >> 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n r2 = frames[i + 5];\r\n g2 = frames[i + 6];\r\n b2 = frames[i + 7];\r\n let t = (time - before) / (frames[i + 8] - before);\r\n r += (frames[i + 8 + 1] - r) * t;\r\n g += (frames[i + 8 + 2] - g) * t;\r\n b += (frames[i + 8 + 3] - b) * t;\r\n a += (frames[i + 8 + 4] - a) * t;\r\n r2 += (frames[i + 8 + 5] - r2) * t;\r\n g2 += (frames[i + 8 + 6] - g2) * t;\r\n b2 += (frames[i + 8 + 7] - b2) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n r2 = frames[i + 5];\r\n g2 = frames[i + 6];\r\n b2 = frames[i + 7];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n r2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\r\n g2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\r\n b2 = this.getBezierValue(time, i, 7, curveType + 18 * 6 - 2);\r\n }\r\n if (alpha == 1) {\r\n light.set(r, g, b, a);\r\n dark.r = r2;\r\n dark.g = g2;\r\n dark.b = b2;\r\n } else {\r\n if (blend == 0 /* setup */) {\r\n light.setFromColor(slot.data.color);\r\n let setupDark = slot.data.darkColor;\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.r += (r2 - dark.r) * alpha;\r\n dark.g += (g2 - dark.g) * alpha;\r\n dark.b += (b2 - dark.b) * alpha;\r\n }\r\n }\r\n };\r\n var RGB2Timeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex,\r\n Property.rgb2 + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 7;\r\n }\r\n setFrame(frame, time, r, g, b, r2, g2, b2) {\r\n frame *= 7;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n this.frames[frame + 4] = r2;\r\n this.frames[frame + 5] = g2;\r\n this.frames[frame + 6] = b2;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let light = slot.color, dark = slot.darkColor;\r\n if (time < frames[0]) {\r\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n light.r = setupLight.r;\r\n light.g = setupLight.g;\r\n light.b = setupLight.b;\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n return;\r\n case 1 /* first */:\r\n light.r += (setupLight.r - light.r) * alpha;\r\n light.g += (setupLight.g - light.g) * alpha;\r\n light.b += (setupLight.b - light.b) * alpha;\r\n dark.r += (setupDark.r - dark.r) * alpha;\r\n dark.g += (setupDark.g - dark.g) * alpha;\r\n dark.b += (setupDark.b - dark.b) * alpha;\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n let i = Timeline.search(frames, time, 7);\r\n let curveType = this.curves[i / 7];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n r2 = frames[i + 4];\r\n g2 = frames[i + 5];\r\n b2 = frames[i + 6];\r\n let t = (time - before) / (frames[i + 7] - before);\r\n r += (frames[i + 7 + 1] - r) * t;\r\n g += (frames[i + 7 + 2] - g) * t;\r\n b += (frames[i + 7 + 3] - b) * t;\r\n r2 += (frames[i + 7 + 4] - r2) * t;\r\n g2 += (frames[i + 7 + 5] - g2) * t;\r\n b2 += (frames[i + 7 + 6] - b2) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n r2 = frames[i + 4];\r\n g2 = frames[i + 5];\r\n b2 = frames[i + 6];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n r2 = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n g2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\r\n b2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\r\n }\r\n if (alpha == 1) {\r\n light.r = r;\r\n light.g = g;\r\n light.b = b;\r\n dark.r = r2;\r\n dark.g = g2;\r\n dark.b = b2;\r\n } else {\r\n if (blend == 0 /* setup */) {\r\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.r = setupLight.r;\r\n light.g = setupLight.g;\r\n light.b = setupLight.b;\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n }\r\n light.r += (r - light.r) * alpha;\r\n light.g += (g - light.g) * alpha;\r\n light.b += (b - light.b) * alpha;\r\n dark.r += (r2 - dark.r) * alpha;\r\n dark.g += (g2 - dark.g) * alpha;\r\n dark.b += (b2 - dark.b) * alpha;\r\n }\r\n }\r\n };\r\n var AttachmentTimeline = class extends Timeline {\r\n constructor(frameCount, slotIndex) {\r\n super(frameCount, [\r\n Property.attachment + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, time, attachmentName) {\r\n this.frames[frame] = time;\r\n this.attachmentNames[frame] = attachmentName;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == 1 /* mixOut */) {\r\n if (blend == 0 /* setup */)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n if (time < this.frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\r\n }\r\n setAttachment(skeleton, slot, attachmentName) {\r\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n }\r\n };\r\n var DeformTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex, attachment) {\r\n super(frameCount, bezierCount, [\r\n Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n this.attachment = attachment;\r\n this.vertices = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, time, vertices) {\r\n this.frames[frame] = time;\r\n this.vertices[frame] = vertices;\r\n }\r\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\r\n let curves = this.curves;\r\n let i = this.getFrameCount() + bezier * 18;\r\n if (value == 0)\r\n curves[frame] = 2 + i;\r\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\r\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\r\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\r\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\r\n let x = time1 + dx, y = dy;\r\n for (let n = i + 18; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dx += ddx;\r\n dy += ddy;\r\n ddx += dddx;\r\n ddy += dddy;\r\n x += dx;\r\n y += dy;\r\n }\r\n }\r\n getCurvePercent(time, frame) {\r\n let curves = this.curves;\r\n let i = curves[frame];\r\n switch (i) {\r\n case 0:\r\n let x2 = this.frames[frame];\r\n return (time - x2) / (this.frames[frame + this.getFrameEntries()] - x2);\r\n case 1:\r\n return 0;\r\n }\r\n i -= 2;\r\n if (curves[i] > time) {\r\n let x2 = this.frames[frame];\r\n return curves[i + 1] * (time - x2) / (curves[i] - x2);\r\n }\r\n let n = i + 18;\r\n for (i += 2; i < n; i += 2) {\r\n if (curves[i] >= time) {\r\n let x2 = curves[i - 2], y2 = curves[i - 1];\r\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\r\n }\r\n }\r\n let x = curves[n - 2], y = curves[n - 1];\r\n return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let slotAttachment = slot.getAttachment();\r\n if (!slotAttachment)\r\n return;\r\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)\r\n return;\r\n let deform = slot.deform;\r\n if (deform.length == 0)\r\n blend = 0 /* setup */;\r\n let vertices = this.vertices;\r\n let vertexCount = vertices[0].length;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n deform.length = 0;\r\n return;\r\n case 1 /* first */:\r\n if (alpha == 1) {\r\n deform.length = 0;\r\n return;\r\n }\r\n deform.length = vertexCount;\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\r\n } else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n deform.length = vertexCount;\r\n if (time >= frames[frames.length - 1]) {\r\n let lastVertices = vertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */) {\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += lastVertices[i2] - setupVertices[i2];\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += lastVertices[i2];\r\n }\r\n } else\r\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */: {\r\n let vertexAttachment2 = slotAttachment;\r\n if (!vertexAttachment2.bones) {\r\n let setupVertices = vertexAttachment2.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let setup = setupVertices[i2];\r\n deform[i2] = setup + (lastVertices[i2] - setup) * alpha;\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] = lastVertices[i2] * alpha;\r\n }\r\n break;\r\n }\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += (lastVertices[i2] - deform[i2]) * alpha;\r\n break;\r\n case 3 /* add */:\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += (lastVertices[i2] - setupVertices[i2]) * alpha;\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += lastVertices[i2] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n let frame = Timeline.search1(frames, time);\r\n let percent = this.getCurvePercent(time, frame);\r\n let prevVertices = vertices[frame];\r\n let nextVertices = vertices[frame + 1];\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */) {\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += prev + (nextVertices[i2] - prev) * percent - setupVertices[i2];\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += prev + (nextVertices[i2] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] = prev + (nextVertices[i2] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */: {\r\n let vertexAttachment2 = slotAttachment;\r\n if (!vertexAttachment2.bones) {\r\n let setupVertices = vertexAttachment2.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2], setup = setupVertices[i2];\r\n deform[i2] = setup + (prev + (nextVertices[i2] - prev) * percent - setup) * alpha;\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] = (prev + (nextVertices[i2] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - deform[i2]) * alpha;\r\n }\r\n break;\r\n case 3 /* add */:\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - setupVertices[i2]) * alpha;\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var _EventTimeline = class extends Timeline {\r\n constructor(frameCount) {\r\n super(frameCount, _EventTimeline.propertyIds);\r\n this.events = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, event) {\r\n this.frames[frame] = event.time;\r\n this.events[frame] = event;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (!firedEvents)\r\n return;\r\n let frames = this.frames;\r\n let frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n } else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n let i = 0;\r\n if (lastTime < frames[0])\r\n i = 0;\r\n else {\r\n i = Timeline.search1(frames, lastTime) + 1;\r\n let frameTime = frames[i];\r\n while (i > 0) {\r\n if (frames[i - 1] != frameTime)\r\n break;\r\n i--;\r\n }\r\n }\r\n for (; i < frameCount && time >= frames[i]; i++)\r\n firedEvents.push(this.events[i]);\r\n }\r\n };\r\n var EventTimeline = _EventTimeline;\r\n EventTimeline.propertyIds = [\"\" + Property.event];\r\n var _DrawOrderTimeline = class extends Timeline {\r\n constructor(frameCount) {\r\n super(frameCount, _DrawOrderTimeline.propertyIds);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, time, drawOrder) {\r\n this.frames[frame] = time;\r\n this.drawOrders[frame] = drawOrder;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (direction == 1 /* mixOut */) {\r\n if (blend == 0 /* setup */)\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n if (time < this.frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n let idx = Timeline.search1(this.frames, time);\r\n let drawOrderToSetupIndex = this.drawOrders[idx];\r\n if (!drawOrderToSetupIndex)\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n else {\r\n let drawOrder = skeleton.drawOrder;\r\n let slots = skeleton.slots;\r\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n }\r\n };\r\n var DrawOrderTimeline = _DrawOrderTimeline;\r\n DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\r\n var IkConstraintTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, ikConstraintIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.ikConstraint + \"|\" + ikConstraintIndex\r\n ]);\r\n this.ikConstraintIndex = 0;\r\n this.ikConstraintIndex = ikConstraintIndex;\r\n }\r\n getFrameEntries() {\r\n return 6;\r\n }\r\n setFrame(frame, time, mix, softness, bendDirection, compress, stretch) {\r\n frame *= 6;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = mix;\r\n this.frames[frame + 2] = softness;\r\n this.frames[frame + 3] = bendDirection;\r\n this.frames[frame + 4] = compress ? 1 : 0;\r\n this.frames[frame + 5] = stretch ? 1 : 0;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case 1 /* first */:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n let mix = 0, softness = 0;\r\n let i = Timeline.search(frames, time, 6);\r\n let curveType = this.curves[i / 6];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n mix = frames[i + 1];\r\n softness = frames[i + 2];\r\n let t = (time - before) / (frames[i + 6] - before);\r\n mix += (frames[i + 6 + 1] - mix) * t;\r\n softness += (frames[i + 6 + 2] - softness) * t;\r\n break;\r\n case 1:\r\n mix = frames[i + 1];\r\n softness = frames[i + 2];\r\n break;\r\n default:\r\n mix = this.getBezierValue(time, i, 1, curveType - 2);\r\n softness = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n if (blend == 0 /* setup */) {\r\n constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\r\n if (direction == 1 /* mixOut */) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n } else {\r\n constraint.bendDirection = frames[i + 3];\r\n constraint.compress = frames[i + 4] != 0;\r\n constraint.stretch = frames[i + 5] != 0;\r\n }\r\n } else {\r\n constraint.mix += (mix - constraint.mix) * alpha;\r\n constraint.softness += (softness - constraint.softness) * alpha;\r\n if (direction == 0 /* mixIn */) {\r\n constraint.bendDirection = frames[i + 3];\r\n constraint.compress = frames[i + 4] != 0;\r\n constraint.stretch = frames[i + 5] != 0;\r\n }\r\n }\r\n }\r\n };\r\n var TransformConstraintTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, transformConstraintIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.transformConstraint + \"|\" + transformConstraintIndex\r\n ]);\r\n this.transformConstraintIndex = 0;\r\n this.transformConstraintIndex = transformConstraintIndex;\r\n }\r\n getFrameEntries() {\r\n return 7;\r\n }\r\n setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\r\n let frames = this.frames;\r\n frame *= 7;\r\n frames[frame] = time;\r\n frames[frame + 1] = mixRotate;\r\n frames[frame + 2] = mixX;\r\n frames[frame + 3] = mixY;\r\n frames[frame + 4] = mixScaleX;\r\n frames[frame + 5] = mixScaleY;\r\n frames[frame + 6] = mixShearY;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n let data = constraint.data;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.mixRotate = data.mixRotate;\r\n constraint.mixX = data.mixX;\r\n constraint.mixY = data.mixY;\r\n constraint.mixScaleX = data.mixScaleX;\r\n constraint.mixScaleY = data.mixScaleY;\r\n constraint.mixShearY = data.mixShearY;\r\n return;\r\n case 1 /* first */:\r\n constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (data.mixX - constraint.mixX) * alpha;\r\n constraint.mixY += (data.mixY - constraint.mixY) * alpha;\r\n constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\r\n constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\r\n constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\r\n }\r\n return;\r\n }\r\n let rotate, x, y, scaleX, scaleY, shearY;\r\n let i = Timeline.search(frames, time, 7);\r\n let curveType = this.curves[i / 7];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n scaleX = frames[i + 4];\r\n scaleY = frames[i + 5];\r\n shearY = frames[i + 6];\r\n let t = (time - before) / (frames[i + 7] - before);\r\n rotate += (frames[i + 7 + 1] - rotate) * t;\r\n x += (frames[i + 7 + 2] - x) * t;\r\n y += (frames[i + 7 + 3] - y) * t;\r\n scaleX += (frames[i + 7 + 4] - scaleX) * t;\r\n scaleY += (frames[i + 7 + 5] - scaleY) * t;\r\n shearY += (frames[i + 7 + 6] - shearY) * t;\r\n break;\r\n case 1:\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n scaleX = frames[i + 4];\r\n scaleY = frames[i + 5];\r\n shearY = frames[i + 6];\r\n break;\r\n default:\r\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\r\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n scaleX = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n scaleY = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\r\n shearY = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\r\n }\r\n if (blend == 0 /* setup */) {\r\n let data = constraint.data;\r\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\r\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\r\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\r\n constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\r\n constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\r\n constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\r\n } else {\r\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (x - constraint.mixX) * alpha;\r\n constraint.mixY += (y - constraint.mixY) * alpha;\r\n constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\r\n constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\r\n constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\r\n }\r\n }\r\n };\r\n var PathConstraintPositionTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, pathConstraintIndex) {\r\n super(frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex);\r\n this.pathConstraintIndex = 0;\r\n this.pathConstraintIndex = pathConstraintIndex;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case 1 /* first */:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n let position = this.getCurveValue(time);\r\n if (blend == 0 /* setup */)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n }\r\n };\r\n var PathConstraintSpacingTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, pathConstraintIndex) {\r\n super(frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex);\r\n this.pathConstraintIndex = 0;\r\n this.pathConstraintIndex = pathConstraintIndex;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case 1 /* first */:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n let spacing = this.getCurveValue(time);\r\n if (blend == 0 /* setup */)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n }\r\n };\r\n var PathConstraintMixTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, pathConstraintIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.pathConstraintMix + \"|\" + pathConstraintIndex\r\n ]);\r\n this.pathConstraintIndex = 0;\r\n this.pathConstraintIndex = pathConstraintIndex;\r\n }\r\n getFrameEntries() {\r\n return 4;\r\n }\r\n setFrame(frame, time, mixRotate, mixX, mixY) {\r\n let frames = this.frames;\r\n frame <<= 2;\r\n frames[frame] = time;\r\n frames[frame + 1] = mixRotate;\r\n frames[frame + 2] = mixX;\r\n frames[frame + 3] = mixY;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.mixRotate = constraint.data.mixRotate;\r\n constraint.mixX = constraint.data.mixX;\r\n constraint.mixY = constraint.data.mixY;\r\n return;\r\n case 1 /* first */:\r\n constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\r\n constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\r\n }\r\n return;\r\n }\r\n let rotate, x, y;\r\n let i = Timeline.search(frames, time, 4);\r\n let curveType = this.curves[i >> 2];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n let t = (time - before) / (frames[i + 4] - before);\r\n rotate += (frames[i + 4 + 1] - rotate) * t;\r\n x += (frames[i + 4 + 2] - x) * t;\r\n y += (frames[i + 4 + 3] - y) * t;\r\n break;\r\n case 1:\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n break;\r\n default:\r\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\r\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n }\r\n if (blend == 0 /* setup */) {\r\n let data = constraint.data;\r\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\r\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\r\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\r\n } else {\r\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (x - constraint.mixX) * alpha;\r\n constraint.mixY += (y - constraint.mixY) * alpha;\r\n }\r\n }\r\n };\r\n var _SequenceTimeline = class extends Timeline {\r\n constructor(frameCount, slotIndex, attachment) {\r\n super(frameCount, [\r\n Property.sequence + \"|\" + slotIndex + \"|\" + attachment.sequence.id\r\n ]);\r\n this.slotIndex = slotIndex;\r\n this.attachment = attachment;\r\n }\r\n getFrameEntries() {\r\n return _SequenceTimeline.ENTRIES;\r\n }\r\n getSlotIndex() {\r\n return this.slotIndex;\r\n }\r\n getAttachment() {\r\n return this.attachment;\r\n }\r\n setFrame(frame, time, mode, index, delay) {\r\n let frames = this.frames;\r\n frame *= _SequenceTimeline.ENTRIES;\r\n frames[frame] = time;\r\n frames[frame + _SequenceTimeline.MODE] = mode | index << 4;\r\n frames[frame + _SequenceTimeline.DELAY] = delay;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let slotAttachment = slot.attachment;\r\n let attachment = this.attachment;\r\n if (slotAttachment != attachment) {\r\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)\r\n return;\r\n }\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n slot.sequenceIndex = -1;\r\n return;\r\n }\r\n let i = Timeline.search(frames, time, _SequenceTimeline.ENTRIES);\r\n let before = frames[i];\r\n let modeAndIndex = frames[i + _SequenceTimeline.MODE];\r\n let delay = frames[i + _SequenceTimeline.DELAY];\r\n if (!this.attachment.sequence)\r\n return;\r\n let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;\r\n let mode = SequenceModeValues[modeAndIndex & 15];\r\n if (mode != 0 /* hold */) {\r\n index += (time - before) / delay + 1e-5 | 0;\r\n switch (mode) {\r\n case 1 /* once */:\r\n index = Math.min(count - 1, index);\r\n break;\r\n case 2 /* loop */:\r\n index %= count;\r\n break;\r\n case 3 /* pingpong */: {\r\n let n = (count << 1) - 2;\r\n index = n == 0 ? 0 : index % n;\r\n if (index >= count)\r\n index = n - index;\r\n break;\r\n }\r\n case 4 /* onceReverse */:\r\n index = Math.max(count - 1 - index, 0);\r\n break;\r\n case 5 /* loopReverse */:\r\n index = count - 1 - index % count;\r\n break;\r\n case 6 /* pingpongReverse */: {\r\n let n = (count << 1) - 2;\r\n index = n == 0 ? 0 : (index + count - 1) % n;\r\n if (index >= count)\r\n index = n - index;\r\n }\r\n }\r\n }\r\n slot.sequenceIndex = index;\r\n }\r\n };\r\n var SequenceTimeline = _SequenceTimeline;\r\n SequenceTimeline.ENTRIES = 3;\r\n SequenceTimeline.MODE = 1;\r\n SequenceTimeline.DELAY = 2;\r\n\r\n // spine-core/src/AnimationState.ts\r\n var _AnimationState = class {\r\n constructor(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new StringSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new Pool(() => new TrackEntry());\r\n this.data = data;\r\n }\r\n static emptyAnimation() {\r\n return _AnimationState._emptyAnimation;\r\n }\r\n update(delta) {\r\n delta *= this.timeScale;\r\n let tracks = this.tracks;\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let current = tracks[i];\r\n if (!current)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n let currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n let next = current.next;\r\n if (next) {\r\n let nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n } else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.clearNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\r\n let from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from)\r\n from.mixingTo = null;\r\n while (from) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n }\r\n updateMixingFrom(to, delta) {\r\n let from = to.mixingFrom;\r\n if (!from)\r\n return true;\r\n let finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n }\r\n apply(skeleton) {\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n let events = this.events;\r\n let tracks = this.tracks;\r\n let applied = false;\r\n for (let i2 = 0, n2 = tracks.length; i2 < n2; i2++) {\r\n let current = tracks[i2];\r\n if (!current || current.delay > 0)\r\n continue;\r\n applied = true;\r\n let blend = i2 == 0 ? 1 /* first */ : current.mixBlend;\r\n let mix = current.alpha;\r\n if (current.mixingFrom)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && !current.next)\r\n mix = 0;\r\n let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\r\n let applyEvents = events;\r\n if (current.reverse) {\r\n applyTime = current.animation.duration - applyTime;\r\n applyEvents = null;\r\n }\r\n let timelines = current.animation.timelines;\r\n let timelineCount = timelines.length;\r\n if (i2 == 0 && mix == 1 || blend == 3 /* add */) {\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, 0 /* mixIn */);\r\n }\r\n } else {\r\n let timelineMode = current.timelineMode;\r\n let shortestRotation = current.shortestRotation;\r\n let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;\r\n if (firstFrame)\r\n current.timelinesRotation.length = timelineCount << 1;\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n let timeline2 = timelines[ii];\r\n let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : 0 /* setup */;\r\n if (!shortestRotation && timeline2 instanceof RotateTimeline) {\r\n this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\r\n } else if (timeline2 instanceof AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);\r\n } else {\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n timeline2.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, 0 /* mixIn */);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n }\r\n applyMixingFrom(to, skeleton, blend) {\r\n let from = to.mixingFrom;\r\n if (from.mixingFrom)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n let mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == 1 /* first */)\r\n blend = 0 /* setup */;\r\n } else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != 1 /* first */)\r\n blend = from.mixBlend;\r\n }\r\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n let timelines = from.animation.timelines;\r\n let timelineCount = timelines.length;\r\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\r\n let events = null;\r\n if (from.reverse)\r\n applyTime = from.animation.duration - applyTime;\r\n else if (mix < from.eventThreshold)\r\n events = this.events;\r\n if (blend == 3 /* add */) {\r\n for (let i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, 1 /* mixOut */);\r\n } else {\r\n let timelineMode = from.timelineMode;\r\n let timelineHoldMix = from.timelineHoldMix;\r\n let shortestRotation = from.shortestRotation;\r\n let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;\r\n if (firstFrame)\r\n from.timelinesRotation.length = timelineCount << 1;\r\n from.totalAlpha = 0;\r\n for (let i = 0; i < timelineCount; i++) {\r\n let timeline = timelines[i];\r\n let direction = 1 /* mixOut */;\r\n let timelineBlend;\r\n let alpha = 0;\r\n switch (timelineMode[i]) {\r\n case SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case FIRST:\r\n timelineBlend = 0 /* setup */;\r\n alpha = alphaMix;\r\n break;\r\n case HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case HOLD_FIRST:\r\n timelineBlend = 0 /* setup */;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = 0 /* setup */;\r\n let holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (!shortestRotation && timeline instanceof RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\r\n else {\r\n Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == 0 /* setup */)\r\n direction = 0 /* mixIn */;\r\n timeline.apply(skeleton, animationLast, applyTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n }\r\n applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (time < timeline.frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n } else\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + SETUP;\r\n }\r\n setAttachment(skeleton, slot, attachmentName, attachments) {\r\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + CURRENT;\r\n }\r\n applyRotateTimeline(timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, 0 /* mixIn */);\r\n return;\r\n }\r\n let bone = skeleton.bones[timeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = timeline.frames;\r\n let r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case 1 /* first */:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n } else {\r\n r1 = blend == 0 /* setup */ ? bone.data.rotation : bone.rotation;\r\n r2 = bone.data.rotation + timeline.getCurveValue(time);\r\n }\r\n let total = 0, diff = r2 - r1;\r\n diff -= (16384 - (16384.499999999996 - diff / 360 | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n } else {\r\n let lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n } else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n let current = diff > 0, dir = lastTotal >= 0;\r\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n bone.rotation = r1 + total * alpha;\r\n }\r\n queueEvents(entry, animationTime) {\r\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n let duration = animationEnd - animationStart;\r\n let trackLastWrapped = entry.trackLast % duration;\r\n let events = this.events;\r\n let i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < trackLastWrapped)\r\n break;\r\n if (event.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event);\r\n }\r\n let complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < animationStart)\r\n continue;\r\n this.queue.event(entry, event);\r\n }\r\n }\r\n clearTracks() {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n clearTrack(trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n let current = this.tracks[trackIndex];\r\n if (!current)\r\n return;\r\n this.queue.end(current);\r\n this.clearNext(current);\r\n let entry = current;\r\n while (true) {\r\n let from = entry.mixingFrom;\r\n if (!from)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n }\r\n setCurrent(index, current, interrupt) {\r\n let from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n current.previous = null;\r\n if (from) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n }\r\n setAnimation(trackIndex, animationName, loop = false) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (!animation)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n }\r\n setAnimationWith(trackIndex, animation, loop = false) {\r\n if (!animation)\r\n throw new Error(\"animation cannot be null.\");\r\n let interrupt = true;\r\n let current = this.expandToIndex(trackIndex);\r\n if (current) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.clearNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n } else\r\n this.clearNext(current);\r\n }\r\n let entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n }\r\n addAnimation(trackIndex, animationName, loop = false, delay = 0) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (!animation)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n }\r\n addAnimationWith(trackIndex, animation, loop = false, delay = 0) {\r\n if (!animation)\r\n throw new Error(\"animation cannot be null.\");\r\n let last = this.expandToIndex(trackIndex);\r\n if (last) {\r\n while (last.next)\r\n last = last.next;\r\n }\r\n let entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (!last) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n } else {\r\n last.next = entry;\r\n entry.previous = last;\r\n if (delay <= 0)\r\n delay += last.getTrackComplete() - entry.mixDuration;\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n }\r\n setEmptyAnimation(trackIndex, mixDuration = 0) {\r\n let entry = this.setAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {\r\n let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);\r\n if (delay <= 0)\r\n entry.delay += entry.mixDuration - mixDuration;\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n setEmptyAnimations(mixDuration = 0) {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++) {\r\n let current = this.tracks[i];\r\n if (current)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n expandToIndex(index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n }\r\n trackEntry(trackIndex, animation, loop, last) {\r\n let entry = this.trackEntryPool.obtain();\r\n entry.reset();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.reverse = false;\r\n entry.shortestRotation = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\r\n entry.interruptAlpha = 1;\r\n entry.totalAlpha = 0;\r\n entry.mixBlend = 2 /* replace */;\r\n return entry;\r\n }\r\n clearNext(entry) {\r\n let next = entry.next;\r\n while (next) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n }\r\n _animationsChanged() {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n let tracks = this.tracks;\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let entry = tracks[i];\r\n if (!entry)\r\n continue;\r\n while (entry.mixingFrom)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (!entry.mixingTo || entry.mixBlend != 3 /* add */)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry);\r\n }\r\n }\r\n computeHold(entry) {\r\n let to = entry.mixingTo;\r\n let timelines = entry.animation.timelines;\r\n let timelinesCount = entry.animation.timelines.length;\r\n let timelineMode = entry.timelineMode;\r\n timelineMode.length = timelinesCount;\r\n let timelineHoldMix = entry.timelineHoldMix;\r\n timelineHoldMix.length = 0;\r\n let propertyIDs = this.propertyIDs;\r\n if (to && to.holdPrevious) {\r\n for (let i = 0; i < timelinesCount; i++)\r\n timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\r\n return;\r\n }\r\n outer:\r\n for (let i = 0; i < timelinesCount; i++) {\r\n let timeline = timelines[i];\r\n let ids = timeline.getPropertyIds();\r\n if (!propertyIDs.addAll(ids))\r\n timelineMode[i] = SUBSEQUENT;\r\n else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\r\n timelineMode[i] = FIRST;\r\n } else {\r\n for (let next = to.mixingTo; next; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(ids))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = HOLD_MIX;\r\n timelineHoldMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = HOLD_FIRST;\r\n }\r\n }\r\n }\r\n getCurrent(trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n }\r\n addListener(listener) {\r\n if (!listener)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n }\r\n removeListener(listener) {\r\n let index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n }\r\n clearListeners() {\r\n this.listeners.length = 0;\r\n }\r\n clearListenerNotifications() {\r\n this.queue.clear();\r\n }\r\n };\r\n var AnimationState = _AnimationState;\r\n AnimationState._emptyAnimation = new Animation(\"\", [], 0);\r\n var TrackEntry = class {\r\n constructor() {\r\n this.animation = null;\r\n this.previous = null;\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.listener = null;\r\n this.trackIndex = 0;\r\n this.loop = false;\r\n this.holdPrevious = false;\r\n this.reverse = false;\r\n this.shortestRotation = false;\r\n this.eventThreshold = 0;\r\n this.attachmentThreshold = 0;\r\n this.drawOrderThreshold = 0;\r\n this.animationStart = 0;\r\n this.animationEnd = 0;\r\n this.animationLast = 0;\r\n this.nextAnimationLast = 0;\r\n this.delay = 0;\r\n this.trackTime = 0;\r\n this.trackLast = 0;\r\n this.nextTrackLast = 0;\r\n this.trackEnd = 0;\r\n this.timeScale = 0;\r\n this.alpha = 0;\r\n this.mixTime = 0;\r\n this.mixDuration = 0;\r\n this.interruptAlpha = 0;\r\n this.totalAlpha = 0;\r\n this.mixBlend = 2 /* replace */;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n reset() {\r\n this.next = null;\r\n this.previous = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n }\r\n getAnimationTime() {\r\n if (this.loop) {\r\n let duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return this.trackTime % duration + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n }\r\n setAnimationLast(animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n }\r\n isComplete() {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n }\r\n resetRotationDirections() {\r\n this.timelinesRotation.length = 0;\r\n }\r\n getTrackComplete() {\r\n let duration = this.animationEnd - this.animationStart;\r\n if (duration != 0) {\r\n if (this.loop)\r\n return duration * (1 + (this.trackTime / duration | 0));\r\n if (this.trackTime < duration)\r\n return duration;\r\n }\r\n return this.trackTime;\r\n }\r\n };\r\n var EventQueue = class {\r\n constructor(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n start(entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n interrupt(entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n }\r\n end(entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n dispose(entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n }\r\n complete(entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n }\r\n event(entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n }\r\n drain() {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n let objects = this.objects;\r\n let listeners = this.animState.listeners;\r\n for (let i = 0; i < objects.length; i += 2) {\r\n let type = objects[i];\r\n let entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.start)\r\n listener.start(entry);\r\n }\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.interrupt)\r\n listener.interrupt(entry);\r\n }\r\n break;\r\n case EventType.end:\r\n if (entry.listener && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.end)\r\n listener.end(entry);\r\n }\r\n case EventType.dispose:\r\n if (entry.listener && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.dispose)\r\n listener.dispose(entry);\r\n }\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.complete)\r\n listener.complete(entry);\r\n }\r\n break;\r\n case EventType.event:\r\n let event = objects[i++ + 2];\r\n if (entry.listener && entry.listener.event)\r\n entry.listener.event(entry, event);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.event)\r\n listener.event(entry, event);\r\n }\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n }\r\n clear() {\r\n this.objects.length = 0;\r\n }\r\n };\r\n var EventType = /* @__PURE__ */ ((EventType2) => {\r\n EventType2[EventType2[\"start\"] = 0] = \"start\";\r\n EventType2[EventType2[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType2[EventType2[\"end\"] = 2] = \"end\";\r\n EventType2[EventType2[\"dispose\"] = 3] = \"dispose\";\r\n EventType2[EventType2[\"complete\"] = 4] = \"complete\";\r\n EventType2[EventType2[\"event\"] = 5] = \"event\";\r\n return EventType2;\r\n })(EventType || {});\r\n var AnimationStateAdapter = class {\r\n start(entry) {\r\n }\r\n interrupt(entry) {\r\n }\r\n end(entry) {\r\n }\r\n dispose(entry) {\r\n }\r\n complete(entry) {\r\n }\r\n event(entry, event) {\r\n }\r\n };\r\n var SUBSEQUENT = 0;\r\n var FIRST = 1;\r\n var HOLD_SUBSEQUENT = 2;\r\n var HOLD_FIRST = 3;\r\n var HOLD_MIX = 4;\r\n var SETUP = 1;\r\n var CURRENT = 2;\r\n\r\n // spine-core/src/AnimationStateData.ts\r\n var AnimationStateData = class {\r\n constructor(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (!skeletonData)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n setMix(fromName, toName, duration) {\r\n let from = this.skeletonData.findAnimation(fromName);\r\n if (!from)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n let to = this.skeletonData.findAnimation(toName);\r\n if (!to)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n }\r\n setMixWith(from, to, duration) {\r\n if (!from)\r\n throw new Error(\"from cannot be null.\");\r\n if (!to)\r\n throw new Error(\"to cannot be null.\");\r\n let key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n }\r\n getMix(from, to) {\r\n let key = from.name + \".\" + to.name;\r\n let value = this.animationToMixTime[key];\r\n return value === void 0 ? this.defaultMix : value;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/BoundingBoxAttachment.ts\r\n var BoundingBoxAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.color = new Color(1, 1, 1, 1);\r\n }\r\n copy() {\r\n let copy = new BoundingBoxAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/ClippingAttachment.ts\r\n var ClippingAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.endSlot = null;\r\n this.color = new Color(0.2275, 0.2275, 0.8078, 1);\r\n }\r\n copy() {\r\n let copy = new ClippingAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/Texture.ts\r\n var Texture = class {\r\n constructor(image) {\r\n this._image = image;\r\n }\r\n getImage() {\r\n return this._image;\r\n }\r\n };\r\n var TextureFilter = /* @__PURE__ */ ((TextureFilter3) => {\r\n TextureFilter3[TextureFilter3[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter3[TextureFilter3[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter3[TextureFilter3[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter3[TextureFilter3[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter3[TextureFilter3[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter3[TextureFilter3[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter3[TextureFilter3[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n return TextureFilter3;\r\n })(TextureFilter || {});\r\n var TextureWrap = /* @__PURE__ */ ((TextureWrap3) => {\r\n TextureWrap3[TextureWrap3[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap3[TextureWrap3[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap3[TextureWrap3[\"Repeat\"] = 10497] = \"Repeat\";\r\n return TextureWrap3;\r\n })(TextureWrap || {});\r\n var TextureRegion = class {\r\n constructor() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.degrees = 0;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n };\r\n var FakeTexture = class extends Texture {\r\n setFilters(minFilter, magFilter) {\r\n }\r\n setWraps(uWrap, vWrap) {\r\n }\r\n dispose() {\r\n }\r\n };\r\n\r\n // spine-core/src/TextureAtlas.ts\r\n var TextureAtlas = class {\r\n constructor(atlasText) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n let reader = new TextureAtlasReader(atlasText);\r\n let entry = new Array(4);\r\n let pageFields = {};\r\n pageFields[\"size\"] = (page2) => {\r\n page2.width = parseInt(entry[1]);\r\n page2.height = parseInt(entry[2]);\r\n };\r\n pageFields[\"format\"] = () => {\r\n };\r\n pageFields[\"filter\"] = (page2) => {\r\n page2.minFilter = Utils.enumValue(TextureFilter, entry[1]);\r\n page2.magFilter = Utils.enumValue(TextureFilter, entry[2]);\r\n };\r\n pageFields[\"repeat\"] = (page2) => {\r\n if (entry[1].indexOf(\"x\") != -1)\r\n page2.uWrap = 10497 /* Repeat */;\r\n if (entry[1].indexOf(\"y\") != -1)\r\n page2.vWrap = 10497 /* Repeat */;\r\n };\r\n pageFields[\"pma\"] = (page2) => {\r\n page2.pma = entry[1] == \"true\";\r\n };\r\n var regionFields = {};\r\n regionFields[\"xy\"] = (region) => {\r\n region.x = parseInt(entry[1]);\r\n region.y = parseInt(entry[2]);\r\n };\r\n regionFields[\"size\"] = (region) => {\r\n region.width = parseInt(entry[1]);\r\n region.height = parseInt(entry[2]);\r\n };\r\n regionFields[\"bounds\"] = (region) => {\r\n region.x = parseInt(entry[1]);\r\n region.y = parseInt(entry[2]);\r\n region.width = parseInt(entry[3]);\r\n region.height = parseInt(entry[4]);\r\n };\r\n regionFields[\"offset\"] = (region) => {\r\n region.offsetX = parseInt(entry[1]);\r\n region.offsetY = parseInt(entry[2]);\r\n };\r\n regionFields[\"orig\"] = (region) => {\r\n region.originalWidth = parseInt(entry[1]);\r\n region.originalHeight = parseInt(entry[2]);\r\n };\r\n regionFields[\"offsets\"] = (region) => {\r\n region.offsetX = parseInt(entry[1]);\r\n region.offsetY = parseInt(entry[2]);\r\n region.originalWidth = parseInt(entry[3]);\r\n region.originalHeight = parseInt(entry[4]);\r\n };\r\n regionFields[\"rotate\"] = (region) => {\r\n let value = entry[1];\r\n if (value == \"true\")\r\n region.degrees = 90;\r\n else if (value != \"false\")\r\n region.degrees = parseInt(value);\r\n };\r\n regionFields[\"index\"] = (region) => {\r\n region.index = parseInt(entry[1]);\r\n };\r\n let line = reader.readLine();\r\n while (line && line.trim().length == 0)\r\n line = reader.readLine();\r\n while (true) {\r\n if (!line || line.trim().length == 0)\r\n break;\r\n if (reader.readEntry(entry, line) == 0)\r\n break;\r\n line = reader.readLine();\r\n }\r\n let page = null;\r\n let names = null;\r\n let values = null;\r\n while (true) {\r\n if (line === null)\r\n break;\r\n if (line.trim().length == 0) {\r\n page = null;\r\n line = reader.readLine();\r\n } else if (!page) {\r\n page = new TextureAtlasPage(line.trim());\r\n while (true) {\r\n if (reader.readEntry(entry, line = reader.readLine()) == 0)\r\n break;\r\n let field = pageFields[entry[0]];\r\n if (field)\r\n field(page);\r\n }\r\n this.pages.push(page);\r\n } else {\r\n let region = new TextureAtlasRegion(page, line);\r\n while (true) {\r\n let count = reader.readEntry(entry, line = reader.readLine());\r\n if (count == 0)\r\n break;\r\n let field = regionFields[entry[0]];\r\n if (field)\r\n field(region);\r\n else {\r\n if (!names)\r\n names = [];\r\n if (!values)\r\n values = [];\r\n names.push(entry[0]);\r\n let entryValues = [];\r\n for (let i = 0; i < count; i++)\r\n entryValues.push(parseInt(entry[i + 1]));\r\n values.push(entryValues);\r\n }\r\n }\r\n if (region.originalWidth == 0 && region.originalHeight == 0) {\r\n region.originalWidth = region.width;\r\n region.originalHeight = region.height;\r\n }\r\n if (names && names.length > 0 && values && values.length > 0) {\r\n region.names = names;\r\n region.values = values;\r\n names = null;\r\n values = null;\r\n }\r\n region.u = region.x / page.width;\r\n region.v = region.y / page.height;\r\n if (region.degrees == 90) {\r\n region.u2 = (region.x + region.height) / page.width;\r\n region.v2 = (region.y + region.width) / page.height;\r\n } else {\r\n region.u2 = (region.x + region.width) / page.width;\r\n region.v2 = (region.y + region.height) / page.height;\r\n }\r\n this.regions.push(region);\r\n }\r\n }\r\n }\r\n findRegion(name) {\r\n for (let i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n }\r\n setTextures(assetManager, pathPrefix = \"\") {\r\n for (let page of this.pages)\r\n page.setTexture(assetManager.get(pathPrefix + page.name));\r\n }\r\n dispose() {\r\n var _a;\r\n for (let i = 0; i < this.pages.length; i++) {\r\n (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();\r\n }\r\n }\r\n };\r\n var TextureAtlasReader = class {\r\n constructor(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n readLine() {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n }\r\n readEntry(entry, line) {\r\n if (!line)\r\n return 0;\r\n line = line.trim();\r\n if (line.length == 0)\r\n return 0;\r\n let colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n return 0;\r\n entry[0] = line.substr(0, colon).trim();\r\n for (let i = 1, lastMatch = colon + 1; ; i++) {\r\n let comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1) {\r\n entry[i] = line.substr(lastMatch).trim();\r\n return i;\r\n }\r\n entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n if (i == 4)\r\n return 4;\r\n }\r\n }\r\n };\r\n var TextureAtlasPage = class {\r\n constructor(name) {\r\n this.minFilter = 9728 /* Nearest */;\r\n this.magFilter = 9728 /* Nearest */;\r\n this.uWrap = 33071 /* ClampToEdge */;\r\n this.vWrap = 33071 /* ClampToEdge */;\r\n this.texture = null;\r\n this.width = 0;\r\n this.height = 0;\r\n this.pma = false;\r\n this.name = name;\r\n }\r\n setTexture(texture) {\r\n this.texture = texture;\r\n texture.setFilters(this.minFilter, this.magFilter);\r\n texture.setWraps(this.uWrap, this.vWrap);\r\n }\r\n };\r\n var TextureAtlasRegion = class extends TextureRegion {\r\n constructor(page, name) {\r\n super();\r\n this.x = 0;\r\n this.y = 0;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n this.index = 0;\r\n this.degrees = 0;\r\n this.names = null;\r\n this.values = null;\r\n this.page = page;\r\n this.name = name;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/MeshAttachment.ts\r\n var MeshAttachment = class extends VertexAttachment {\r\n constructor(name, path) {\r\n super(name);\r\n this.region = null;\r\n this.regionUVs = [];\r\n this.uvs = [];\r\n this.triangles = [];\r\n this.color = new Color(1, 1, 1, 1);\r\n this.width = 0;\r\n this.height = 0;\r\n this.hullLength = 0;\r\n this.edges = [];\r\n this.parentMesh = null;\r\n this.sequence = null;\r\n this.tempColor = new Color(0, 0, 0, 0);\r\n this.path = path;\r\n }\r\n updateRegion() {\r\n if (!this.region)\r\n throw new Error(\"Region not set.\");\r\n let regionUVs = this.regionUVs;\r\n if (!this.uvs || this.uvs.length != regionUVs.length)\r\n this.uvs = Utils.newFloatArray(regionUVs.length);\r\n let uvs = this.uvs;\r\n let n = this.uvs.length;\r\n let u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof TextureAtlasRegion) {\r\n let region = this.region, image = region.page.texture.getImage();\r\n let textureWidth = image.width, textureHeight = image.height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n } else if (!this.region) {\r\n u = v = 0;\r\n width = height = 1;\r\n } else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n }\r\n getParentMesh() {\r\n return this.parentMesh;\r\n }\r\n setParentMesh(parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n }\r\n copy() {\r\n if (this.parentMesh)\r\n return this.newLinkedMesh();\r\n let copy = new MeshAttachment(this.name, this.path);\r\n copy.region = this.region;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\r\n if (this.edges) {\r\n copy.edges = new Array(this.edges.length);\r\n Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n }\r\n computeWorldVertices(slot, start, count, worldVertices2, offset, stride) {\r\n if (this.sequence != null)\r\n this.sequence.apply(slot, this);\r\n super.computeWorldVertices(slot, start, count, worldVertices2, offset, stride);\r\n }\r\n newLinkedMesh() {\r\n let copy = new MeshAttachment(this.name, this.path);\r\n copy.region = this.region;\r\n copy.color.setFromColor(this.color);\r\n copy.timelineAttachment = this.timelineAttachment;\r\n copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\r\n if (copy.region != null)\r\n copy.updateRegion();\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/PathAttachment.ts\r\n var PathAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.lengths = [];\r\n this.closed = false;\r\n this.constantSpeed = false;\r\n this.color = new Color(1, 1, 1, 1);\r\n }\r\n copy() {\r\n let copy = new PathAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/PointAttachment.ts\r\n var PointAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.color = new Color(0.38, 0.94, 0, 1);\r\n }\r\n computeWorldPosition(bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n }\r\n computeWorldRotation(bone) {\r\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\r\n let x = cos * bone.a + sin * bone.b;\r\n let y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * MathUtils.radDeg;\r\n }\r\n copy() {\r\n let copy = new PointAttachment(this.name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/RegionAttachment.ts\r\n var _RegionAttachment = class extends Attachment {\r\n constructor(name, path) {\r\n super(name);\r\n this.x = 0;\r\n this.y = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.rotation = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.color = new Color(1, 1, 1, 1);\r\n this.rendererObject = null;\r\n this.region = null;\r\n this.sequence = null;\r\n this.offset = Utils.newFloatArray(8);\r\n this.uvs = Utils.newFloatArray(8);\r\n this.tempColor = new Color(1, 1, 1, 1);\r\n this.path = path;\r\n }\r\n updateRegion() {\r\n if (!this.region)\r\n throw new Error(\"Region not set.\");\r\n let region = this.region;\r\n let uvs = this.uvs;\r\n if (region == null) {\r\n uvs[0] = 0;\r\n uvs[1] = 0;\r\n uvs[2] = 0;\r\n uvs[3] = 1;\r\n uvs[4] = 1;\r\n uvs[5] = 1;\r\n uvs[6] = 1;\r\n uvs[7] = 0;\r\n return;\r\n }\r\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n let localX2 = localX + this.region.width * regionScaleX;\r\n let localY2 = localY + this.region.height * regionScaleY;\r\n let radians = this.rotation * Math.PI / 180;\r\n let cos = Math.cos(radians);\r\n let sin = Math.sin(radians);\r\n let x = this.x, y = this.y;\r\n let localXCos = localX * cos + x;\r\n let localXSin = localX * sin;\r\n let localYCos = localY * cos + y;\r\n let localYSin = localY * sin;\r\n let localX2Cos = localX2 * cos + x;\r\n let localX2Sin = localX2 * sin;\r\n let localY2Cos = localY2 * cos + y;\r\n let localY2Sin = localY2 * sin;\r\n let offset = this.offset;\r\n offset[0] = localXCos - localYSin;\r\n offset[1] = localYCos + localXSin;\r\n offset[2] = localXCos - localY2Sin;\r\n offset[3] = localY2Cos + localXSin;\r\n offset[4] = localX2Cos - localY2Sin;\r\n offset[5] = localY2Cos + localX2Sin;\r\n offset[6] = localX2Cos - localYSin;\r\n offset[7] = localYCos + localX2Sin;\r\n if (region.degrees == 90) {\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n } else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n }\r\n computeWorldVertices(slot, worldVertices2, offset, stride) {\r\n if (this.sequence != null)\r\n this.sequence.apply(slot, this);\r\n let bone = slot.bone;\r\n let vertexOffset = this.offset;\r\n let x = bone.worldX, y = bone.worldY;\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n let offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[0];\r\n offsetY = vertexOffset[1];\r\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[2];\r\n offsetY = vertexOffset[3];\r\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[4];\r\n offsetY = vertexOffset[5];\r\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[6];\r\n offsetY = vertexOffset[7];\r\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\r\n }\r\n copy() {\r\n let copy = new _RegionAttachment(this.name, this.path);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\r\n return copy;\r\n }\r\n };\r\n var RegionAttachment = _RegionAttachment;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n\r\n // spine-core/src/AtlasAttachmentLoader.ts\r\n var AtlasAttachmentLoader = class {\r\n constructor(atlas) {\r\n this.atlas = atlas;\r\n }\r\n loadSequence(name, basePath, sequence) {\r\n let regions = sequence.regions;\r\n for (let i = 0, n = regions.length; i < n; i++) {\r\n let path = sequence.getPath(basePath, i);\r\n let region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (sequence: \" + name + \")\");\r\n regions[i] = region;\r\n regions[i].renderObject = regions[i];\r\n }\r\n }\r\n newRegionAttachment(skin, name, path, sequence) {\r\n let attachment = new RegionAttachment(name, path);\r\n if (sequence != null) {\r\n this.loadSequence(name, path, sequence);\r\n } else {\r\n let region = this.atlas.findRegion(path);\r\n if (!region)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n attachment.region = region;\r\n }\r\n return attachment;\r\n }\r\n newMeshAttachment(skin, name, path, sequence) {\r\n let attachment = new MeshAttachment(name, path);\r\n if (sequence != null) {\r\n this.loadSequence(name, path, sequence);\r\n } else {\r\n let region = this.atlas.findRegion(path);\r\n if (!region)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n attachment.region = region;\r\n }\r\n return attachment;\r\n }\r\n newBoundingBoxAttachment(skin, name) {\r\n return new BoundingBoxAttachment(name);\r\n }\r\n newPathAttachment(skin, name) {\r\n return new PathAttachment(name);\r\n }\r\n newPointAttachment(skin, name) {\r\n return new PointAttachment(name);\r\n }\r\n newClippingAttachment(skin, name) {\r\n return new ClippingAttachment(name);\r\n }\r\n };\r\n\r\n // spine-core/src/BoneData.ts\r\n var BoneData = class {\r\n constructor(index, name, parent) {\r\n this.index = 0;\r\n this.parent = null;\r\n this.length = 0;\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n };\r\n var TransformMode = /* @__PURE__ */ ((TransformMode2) => {\r\n TransformMode2[TransformMode2[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode2[TransformMode2[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode2[TransformMode2[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode2[TransformMode2[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode2[TransformMode2[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n return TransformMode2;\r\n })(TransformMode || {});\r\n\r\n // spine-core/src/Bone.ts\r\n var Bone = class {\r\n constructor(data, skeleton, parent) {\r\n this.parent = null;\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\r\n }\r\n updateWorldTransform() {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n }\r\n updateWorldTransformWith(x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n let parent = this.parent;\r\n if (!parent) {\r\n let skeleton = this.skeleton;\r\n let rotationY = rotation + 90 + shearY;\r\n let sx = skeleton.scaleX;\r\n let sy = skeleton.scaleY;\r\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case 0 /* Normal */: {\r\n let rotationY = rotation + 90 + shearY;\r\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\r\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n let ld = MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case 1 /* OnlyTranslation */: {\r\n let rotationY = rotation + 90 + shearY;\r\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case 2 /* NoRotationOrReflection */: {\r\n let s = pa * pa + pc * pc;\r\n let prx = 0;\r\n if (s > 1e-4) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * MathUtils.radDeg;\r\n } else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\r\n }\r\n let rx = rotation + shearX - prx;\r\n let ry = rotation + shearY - prx + 90;\r\n let la = MathUtils.cosDeg(rx) * scaleX;\r\n let lb = MathUtils.cosDeg(ry) * scaleY;\r\n let lc = MathUtils.sinDeg(rx) * scaleX;\r\n let ld = MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case 3 /* NoScale */:\r\n case 4 /* NoScaleOrReflection */: {\r\n let cos = MathUtils.cosDeg(rotation);\r\n let sin = MathUtils.sinDeg(rotation);\r\n let za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n let s = Math.sqrt(za * za + zc * zc);\r\n if (s > 1e-5)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n let r = Math.PI / 2 + Math.atan2(zc, za);\r\n let zb = Math.cos(r) * s;\r\n let zd = Math.sin(r) * s;\r\n let la = MathUtils.cosDeg(shearX) * scaleX;\r\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\r\n let lc = MathUtils.sinDeg(shearX) * scaleX;\r\n let ld = MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n }\r\n setToSetupPose() {\r\n let data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n }\r\n getWorldRotationX() {\r\n return Math.atan2(this.c, this.a) * MathUtils.radDeg;\r\n }\r\n getWorldRotationY() {\r\n return Math.atan2(this.d, this.b) * MathUtils.radDeg;\r\n }\r\n getWorldScaleX() {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n }\r\n getWorldScaleY() {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n }\r\n updateAppliedTransform() {\r\n let parent = this.parent;\r\n if (!parent) {\r\n this.ax = this.worldX - this.skeleton.x;\r\n this.ay = this.worldY - this.skeleton.y;\r\n this.arotation = Math.atan2(this.c, this.a) * MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * MathUtils.radDeg;\r\n return;\r\n }\r\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n let pid = 1 / (pa * pd - pb * pc);\r\n let dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = dx * pd * pid - dy * pb * pid;\r\n this.ay = dy * pa * pid - dx * pc * pid;\r\n let ia = pid * pd;\r\n let id = pid * pa;\r\n let ib = pid * pb;\r\n let ic = pid * pc;\r\n let ra = ia * this.a - ib * this.c;\r\n let rb = ia * this.b - ib * this.d;\r\n let rc = id * this.c - ic * this.a;\r\n let rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 1e-4) {\r\n let det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\r\n } else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * MathUtils.radDeg;\r\n }\r\n }\r\n worldToLocal(world) {\r\n let invDet = 1 / (this.a * this.d - this.b * this.c);\r\n let x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = x * this.d * invDet - y * this.b * invDet;\r\n world.y = y * this.a * invDet - x * this.c * invDet;\r\n return world;\r\n }\r\n localToWorld(local) {\r\n let x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n }\r\n worldToLocalRotation(worldRotation) {\r\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;\r\n }\r\n localToWorldRotation(localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;\r\n }\r\n rotateWorld(degrees) {\r\n let a = this.a, b = this.b, c = this.c, d = this.d;\r\n let cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n }\r\n };\r\n\r\n // spine-core/src/ConstraintData.ts\r\n var ConstraintData = class {\r\n constructor(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n };\r\n\r\n // spine-core/src/AssetManagerBase.ts\r\n var AssetManagerBase = class {\r\n constructor(textureLoader, pathPrefix = \"\", downloader = new Downloader()) {\r\n this.pathPrefix = \"\";\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n this.downloader = downloader;\r\n }\r\n start(path) {\r\n this.toLoad++;\r\n return this.pathPrefix + path;\r\n }\r\n success(callback, path, asset) {\r\n this.toLoad--;\r\n this.loaded++;\r\n this.assets[path] = asset;\r\n if (callback)\r\n callback(path, asset);\r\n }\r\n error(callback, path, message) {\r\n this.toLoad--;\r\n this.loaded++;\r\n this.errors[path] = message;\r\n if (callback)\r\n callback(path, message);\r\n }\r\n loadAll() {\r\n let promise = new Promise((resolve, reject) => {\r\n let check = () => {\r\n if (this.isLoadingComplete()) {\r\n if (this.hasErrors())\r\n reject(this.errors);\r\n else\r\n resolve(this);\r\n return;\r\n }\r\n requestAnimationFrame(check);\r\n };\r\n requestAnimationFrame(check);\r\n });\r\n return promise;\r\n }\r\n setRawDataURI(path, data) {\r\n this.downloader.rawDataUris[this.pathPrefix + path] = data;\r\n }\r\n loadBinary(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n this.downloader.downloadBinary(path, (data) => {\r\n this.success(success, path, data);\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load binary ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n loadText(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n this.downloader.downloadText(path, (data) => {\r\n this.success(success, path, data);\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load text ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n loadJson(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n this.downloader.downloadJson(path, (data) => {\r\n this.success(success, path, data);\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load JSON ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n loadTexture(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n let isBrowser = !!(typeof window !== \"undefined\" && typeof navigator !== \"undefined\" && window.document);\r\n let isWebWorker = !isBrowser;\r\n if (isWebWorker) {\r\n fetch(path, { mode: \"cors\" }).then((response) => {\r\n if (response.ok)\r\n return response.blob();\r\n this.error(error, path, `Couldn't load image: ${path}`);\r\n return null;\r\n }).then((blob) => {\r\n return blob ? createImageBitmap(blob, { premultiplyAlpha: \"none\", colorSpaceConversion: \"none\" }) : null;\r\n }).then((bitmap) => {\r\n if (bitmap)\r\n this.success(success, path, this.textureLoader(bitmap));\r\n });\r\n } else {\r\n let image = new Image();\r\n image.crossOrigin = \"anonymous\";\r\n image.onload = () => {\r\n this.success(success, path, this.textureLoader(image));\r\n };\r\n image.onerror = () => {\r\n this.error(error, path, `Couldn't load image: ${path}`);\r\n };\r\n if (this.downloader.rawDataUris[path])\r\n path = this.downloader.rawDataUris[path];\r\n image.src = path;\r\n }\r\n }\r\n loadTextureAtlas(path, success = () => {\r\n }, error = () => {\r\n }, fileAlias) {\r\n let index = path.lastIndexOf(\"/\");\r\n let parent = index >= 0 ? path.substring(0, index + 1) : \"\";\r\n path = this.start(path);\r\n this.downloader.downloadText(path, (atlasText) => {\r\n try {\r\n let atlas = new TextureAtlas(atlasText);\r\n let toLoad = atlas.pages.length, abort = false;\r\n for (let page of atlas.pages) {\r\n this.loadTexture(\r\n !fileAlias ? parent + page.name : fileAlias[page.name],\r\n (imagePath, texture) => {\r\n if (!abort) {\r\n page.setTexture(texture);\r\n if (--toLoad == 0)\r\n this.success(success, path, atlas);\r\n }\r\n },\r\n (imagePath, message) => {\r\n if (!abort)\r\n this.error(error, path, `Couldn't load texture atlas ${path} page image: ${imagePath}`);\r\n abort = true;\r\n }\r\n );\r\n }\r\n } catch (e) {\r\n this.error(error, path, `Couldn't parse texture atlas ${path}: ${e.message}`);\r\n }\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n get(path) {\r\n return this.assets[this.pathPrefix + path];\r\n }\r\n require(path) {\r\n path = this.pathPrefix + path;\r\n let asset = this.assets[path];\r\n if (asset)\r\n return asset;\r\n let error = this.errors[path];\r\n throw Error(\"Asset not found: \" + path + (error ? \"\\n\" + error : \"\"));\r\n }\r\n remove(path) {\r\n path = this.pathPrefix + path;\r\n let asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n delete this.assets[path];\r\n return asset;\r\n }\r\n removeAll() {\r\n for (let key in this.assets) {\r\n let asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n }\r\n isLoadingComplete() {\r\n return this.toLoad == 0;\r\n }\r\n getToLoad() {\r\n return this.toLoad;\r\n }\r\n getLoaded() {\r\n return this.loaded;\r\n }\r\n dispose() {\r\n this.removeAll();\r\n }\r\n hasErrors() {\r\n return Object.keys(this.errors).length > 0;\r\n }\r\n getErrors() {\r\n return this.errors;\r\n }\r\n };\r\n var Downloader = class {\r\n constructor() {\r\n this.callbacks = {};\r\n this.rawDataUris = {};\r\n }\r\n dataUriToString(dataUri) {\r\n if (!dataUri.startsWith(\"data:\")) {\r\n throw new Error(\"Not a data URI.\");\r\n }\r\n let base64Idx = dataUri.indexOf(\"base64,\");\r\n if (base64Idx != -1) {\r\n base64Idx += \"base64,\".length;\r\n return atob(dataUri.substr(base64Idx));\r\n } else {\r\n return dataUri.substr(dataUri.indexOf(\",\") + 1);\r\n }\r\n }\r\n base64ToUint8Array(base64) {\r\n var binary_string = window.atob(base64);\r\n var len = binary_string.length;\r\n var bytes = new Uint8Array(len);\r\n for (var i = 0; i < len; i++) {\r\n bytes[i] = binary_string.charCodeAt(i);\r\n }\r\n return bytes;\r\n }\r\n dataUriToUint8Array(dataUri) {\r\n if (!dataUri.startsWith(\"data:\")) {\r\n throw new Error(\"Not a data URI.\");\r\n }\r\n let base64Idx = dataUri.indexOf(\"base64,\");\r\n if (base64Idx == -1)\r\n throw new Error(\"Not a binary data URI.\");\r\n base64Idx += \"base64,\".length;\r\n return this.base64ToUint8Array(dataUri.substr(base64Idx));\r\n }\r\n downloadText(url, success, error) {\r\n if (this.start(url, success, error))\r\n return;\r\n if (this.rawDataUris[url]) {\r\n try {\r\n let dataUri = this.rawDataUris[url];\r\n this.finish(url, 200, this.dataUriToString(dataUri));\r\n } catch (e) {\r\n this.finish(url, 400, JSON.stringify(e));\r\n }\r\n return;\r\n }\r\n let request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.open(\"GET\", url, true);\r\n let done = () => {\r\n this.finish(url, request.status, request.responseText);\r\n };\r\n request.onload = done;\r\n request.onerror = done;\r\n request.send();\r\n }\r\n downloadJson(url, success, error) {\r\n this.downloadText(url, (data) => {\r\n success(JSON.parse(data));\r\n }, error);\r\n }\r\n downloadBinary(url, success, error) {\r\n if (this.start(url, success, error))\r\n return;\r\n if (this.rawDataUris[url]) {\r\n try {\r\n let dataUri = this.rawDataUris[url];\r\n this.finish(url, 200, this.dataUriToUint8Array(dataUri));\r\n } catch (e) {\r\n this.finish(url, 400, JSON.stringify(e));\r\n }\r\n return;\r\n }\r\n let request = new XMLHttpRequest();\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n let onerror = () => {\r\n this.finish(url, request.status, request.response);\r\n };\r\n request.onload = () => {\r\n if (request.status == 200 || request.status == 0)\r\n this.finish(url, 200, new Uint8Array(request.response));\r\n else\r\n onerror();\r\n };\r\n request.onerror = onerror;\r\n request.send();\r\n }\r\n start(url, success, error) {\r\n let callbacks = this.callbacks[url];\r\n try {\r\n if (callbacks)\r\n return true;\r\n this.callbacks[url] = callbacks = [];\r\n } finally {\r\n callbacks.push(success, error);\r\n }\r\n }\r\n finish(url, status, data) {\r\n let callbacks = this.callbacks[url];\r\n delete this.callbacks[url];\r\n let args = status == 200 || status == 0 ? [data] : [status, data];\r\n for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)\r\n callbacks[i].apply(null, args);\r\n }\r\n };\r\n\r\n // spine-core/src/Event.ts\r\n var Event = class {\r\n constructor(time, data) {\r\n this.intValue = 0;\r\n this.floatValue = 0;\r\n this.stringValue = null;\r\n this.time = 0;\r\n this.volume = 0;\r\n this.balance = 0;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n };\r\n\r\n // spine-core/src/EventData.ts\r\n var EventData = class {\r\n constructor(name) {\r\n this.intValue = 0;\r\n this.floatValue = 0;\r\n this.stringValue = null;\r\n this.audioPath = null;\r\n this.volume = 0;\r\n this.balance = 0;\r\n this.name = name;\r\n }\r\n };\r\n\r\n // spine-core/src/IkConstraint.ts\r\n var IkConstraint = class {\r\n constructor(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let bone = skeleton.findBone(data.bones[i].name);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${data.bones[i].name}`);\r\n this.bones.push(bone);\r\n }\r\n let target = skeleton.findBone(data.target.name);\r\n if (!target)\r\n throw new Error(`Couldn't find bone ${data.target.name}`);\r\n this.target = target;\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n if (this.mix == 0)\r\n return;\r\n let target = this.target;\r\n let bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.data.uniform, this.softness, this.mix);\r\n break;\r\n }\r\n }\r\n apply1(bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n let p = bone.parent;\r\n if (!p)\r\n throw new Error(\"IK bone must have parent.\");\r\n let pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case 1 /* OnlyTranslation */:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case 2 /* NoRotationOrReflection */:\r\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n let sa = pa / bone.skeleton.scaleX;\r\n let sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * MathUtils.radDeg;\r\n default:\r\n let x = targetX - p.worldX, y = targetY - p.worldY;\r\n let d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n let sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case 3 /* NoScale */:\r\n case 4 /* NoScaleOrReflection */:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if (compress && dd < b || stretch && dd > b && b > 1e-4) {\r\n let s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(\r\n bone.ax,\r\n bone.ay,\r\n bone.arotation + rotationIK * alpha,\r\n sx,\r\n sy,\r\n bone.ashearX,\r\n bone.ashearY\r\n );\r\n }\r\n apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\r\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\r\n let os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n } else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n } else\r\n os2 = 0;\r\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n let u = Math.abs(psx - psy) <= 1e-4;\r\n if (!u || stretch) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n } else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n let pp = parent.parent;\r\n if (!pp)\r\n throw new Error(\"IK parent must itself have a parent.\");\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n let id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 1e-4) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n let dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) * 0.5;\r\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n let p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer:\r\n if (u) {\r\n l2 *= psx;\r\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1) {\r\n cos = -1;\r\n a2 = Math.PI * bendDir;\r\n } else if (cos > 1) {\r\n cos = 1;\r\n a2 = 0;\r\n if (stretch) {\r\n a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n sx *= a;\r\n if (uniform)\r\n sy *= a;\r\n }\r\n } else\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n } else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n let c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n let q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) * 0.5;\r\n let r0 = q / c2, r1 = c / q;\r\n let r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n let maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) * 0.5) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n } else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n let os = Math.atan2(cy, cx) * s2;\r\n let rotation = parent.arotation;\r\n a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, sy, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n }\r\n };\r\n\r\n // spine-core/src/IkConstraintData.ts\r\n var IkConstraintData = class extends ConstraintData {\r\n constructor(name) {\r\n super(name, 0, false);\r\n this.bones = new Array();\r\n this._target = null;\r\n this.bendDirection = 1;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.uniform = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n }\r\n set target(boneData) {\r\n this._target = boneData;\r\n }\r\n get target() {\r\n if (!this._target)\r\n throw new Error(\"BoneData not set.\");\r\n else\r\n return this._target;\r\n }\r\n };\r\n\r\n // spine-core/src/PathConstraintData.ts\r\n var PathConstraintData = class extends ConstraintData {\r\n constructor(name) {\r\n super(name, 0, false);\r\n this.bones = new Array();\r\n this._target = null;\r\n this.positionMode = PositionMode.Fixed;\r\n this.spacingMode = SpacingMode.Fixed;\r\n this.rotateMode = RotateMode.Chain;\r\n this.offsetRotation = 0;\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n }\r\n set target(slotData) {\r\n this._target = slotData;\r\n }\r\n get target() {\r\n if (!this._target)\r\n throw new Error(\"SlotData not set.\");\r\n else\r\n return this._target;\r\n }\r\n };\r\n var PositionMode = /* @__PURE__ */ ((PositionMode2) => {\r\n PositionMode2[PositionMode2[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode2[PositionMode2[\"Percent\"] = 1] = \"Percent\";\r\n return PositionMode2;\r\n })(PositionMode || {});\r\n var SpacingMode = /* @__PURE__ */ ((SpacingMode2) => {\r\n SpacingMode2[SpacingMode2[\"Length\"] = 0] = \"Length\";\r\n SpacingMode2[SpacingMode2[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode2[SpacingMode2[\"Percent\"] = 2] = \"Percent\";\r\n SpacingMode2[SpacingMode2[\"Proportional\"] = 3] = \"Proportional\";\r\n return SpacingMode2;\r\n })(SpacingMode || {});\r\n var RotateMode = /* @__PURE__ */ ((RotateMode2) => {\r\n RotateMode2[RotateMode2[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode2[RotateMode2[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode2[RotateMode2[\"ChainScale\"] = 2] = \"ChainScale\";\r\n return RotateMode2;\r\n })(RotateMode || {});\r\n\r\n // spine-core/src/PathConstraint.ts\r\n var _PathConstraint = class {\r\n constructor(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (let i = 0, n = data.bones.length; i < n; i++) {\r\n let bone = skeleton.findBone(data.bones[i].name);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\r\n this.bones.push(bone);\r\n }\r\n let target = skeleton.findSlot(data.target.name);\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${data.target.name}`);\r\n this.target = target;\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.mixRotate = data.mixRotate;\r\n this.mixX = data.mixX;\r\n this.mixY = data.mixY;\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n let attachment = this.target.getAttachment();\r\n if (!(attachment instanceof PathAttachment))\r\n return;\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\r\n if (mixRotate == 0 && mixX == 0 && mixY == 0)\r\n return;\r\n let data = this.data;\r\n let tangents = data.rotateMode == 0 /* Tangent */, scale = data.rotateMode == 2 /* ChainScale */;\r\n let bones = this.bones;\r\n let boneCount = bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : [];\r\n let spacing = this.spacing;\r\n switch (data.spacingMode) {\r\n case 2 /* Percent */:\r\n if (scale) {\r\n for (let i = 0, n = spacesCount - 1; i < n; i++) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < _PathConstraint.epsilon)\r\n lengths[i] = 0;\r\n else {\r\n let x = setupLength * bone.a, y = setupLength * bone.c;\r\n lengths[i] = Math.sqrt(x * x + y * y);\r\n }\r\n }\r\n }\r\n Utils.arrayFill(spaces, 1, spacesCount, spacing);\r\n break;\r\n case 3 /* Proportional */:\r\n let sum = 0;\r\n for (let i = 0, n = spacesCount - 1; i < n; ) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < _PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = spacing;\r\n } else {\r\n let x = setupLength * bone.a, y = setupLength * bone.c;\r\n let length = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length;\r\n spaces[++i] = length;\r\n sum += length;\r\n }\r\n }\r\n if (sum > 0) {\r\n sum = spacesCount / sum * spacing;\r\n for (let i = 1; i < spacesCount; i++)\r\n spaces[i] *= sum;\r\n }\r\n break;\r\n default:\r\n let lengthSpacing = data.spacingMode == 0 /* Length */;\r\n for (let i = 0, n = spacesCount - 1; i < n; ) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < _PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = spacing;\r\n } else {\r\n let x = setupLength * bone.a, y = setupLength * bone.c;\r\n let length = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\r\n }\r\n }\r\n }\r\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents);\r\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n let tip = false;\r\n if (offsetRotation == 0)\r\n tip = data.rotateMode == 1 /* Chain */;\r\n else {\r\n tip = false;\r\n let p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n }\r\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n let bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * mixX;\r\n bone.worldY += (boneY - bone.worldY) * mixY;\r\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n let length = lengths[i];\r\n if (length != 0) {\r\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (mixRotate > 0) {\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n let length = bone.data.length;\r\n boneX += (length * (cos * a - sin * c) - dx) * mixRotate;\r\n boneY += (length * (sin * a + cos * c) - dy) * mixRotate;\r\n } else {\r\n r += offsetRotation;\r\n }\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= mixRotate;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.updateAppliedTransform();\r\n }\r\n }\r\n computeWorldPositions(path, spacesCount, tangents) {\r\n let target = this.target;\r\n let position = this.position;\r\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = this.world;\r\n let closed2 = path.closed;\r\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = _PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n let lengths = path.lengths;\r\n curveCount -= closed2 ? 1 : 2;\r\n let pathLength2 = lengths[curveCount];\r\n if (this.data.positionMode == 1 /* Percent */)\r\n position *= pathLength2;\r\n let multiplier2;\r\n switch (this.data.spacingMode) {\r\n case 2 /* Percent */:\r\n multiplier2 = pathLength2;\r\n break;\r\n case 3 /* Proportional */:\r\n multiplier2 = pathLength2 / spacesCount;\r\n break;\r\n default:\r\n multiplier2 = 1;\r\n }\r\n world = Utils.setArraySize(this.world, 8);\r\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i] * multiplier2;\r\n position += space;\r\n let p = position;\r\n if (closed2) {\r\n p %= pathLength2;\r\n if (p < 0)\r\n p += pathLength2;\r\n curve = 0;\r\n } else if (p < 0) {\r\n if (prevCurve != _PathConstraint.BEFORE) {\r\n prevCurve = _PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength2) {\r\n if (prevCurve != _PathConstraint.AFTER) {\r\n prevCurve = _PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength2, world, 0, out, o);\r\n continue;\r\n }\r\n for (; ; curve++) {\r\n let length = lengths[curve];\r\n if (p > length)\r\n continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = lengths[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed2 && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n } else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(\r\n p,\r\n world[0],\r\n world[1],\r\n world[2],\r\n world[3],\r\n world[4],\r\n world[5],\r\n world[6],\r\n world[7],\r\n out,\r\n o,\r\n tangents || i > 0 && space == 0\r\n );\r\n }\r\n return out;\r\n }\r\n if (closed2) {\r\n verticesLength += 2;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n } else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n let curves = Utils.setArraySize(this.curves, curveCount);\r\n let pathLength = 0;\r\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (let i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (this.data.positionMode == 1 /* Percent */)\r\n position *= pathLength;\r\n let multiplier;\r\n switch (this.data.spacingMode) {\r\n case 2 /* Percent */:\r\n multiplier = pathLength;\r\n break;\r\n case 3 /* Proportional */:\r\n multiplier = pathLength / spacesCount;\r\n break;\r\n default:\r\n multiplier = 1;\r\n }\r\n let segments = this.segments;\r\n let curveLength = 0;\r\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i] * multiplier;\r\n position += space;\r\n let p = position;\r\n if (closed2) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n } else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (; ; curve++) {\r\n let length = curves[curve];\r\n if (p > length)\r\n continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = curves[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n let ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 6e-3;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 6e-3;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (; ; segment++) {\r\n let length = segments[segment];\r\n if (p > length)\r\n continue;\r\n if (segment == 0)\r\n p /= length;\r\n else {\r\n let prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || i > 0 && space == 0);\r\n }\r\n return out;\r\n }\r\n addBeforePosition(p, temp, i, out, o) {\r\n let x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n addAfterPosition(p, temp, i, out, o) {\r\n let x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n addCurvePosition(p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n let x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 1e-3)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n }\r\n };\r\n var PathConstraint = _PathConstraint;\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 1e-5;\r\n\r\n // spine-core/src/Slot.ts\r\n var Slot = class {\r\n constructor(data, bone) {\r\n this.darkColor = null;\r\n this.attachment = null;\r\n this.attachmentState = 0;\r\n this.sequenceIndex = -1;\r\n this.deform = new Array();\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!bone)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new Color();\r\n this.darkColor = !data.darkColor ? null : new Color();\r\n this.setToSetupPose();\r\n }\r\n getSkeleton() {\r\n return this.bone.skeleton;\r\n }\r\n getAttachment() {\r\n return this.attachment;\r\n }\r\n setAttachment(attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {\r\n this.deform.length = 0;\r\n }\r\n this.attachment = attachment;\r\n this.sequenceIndex = -1;\r\n }\r\n setToSetupPose() {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (!this.data.attachmentName)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/TransformConstraint.ts\r\n var TransformConstraint = class {\r\n constructor(data, skeleton) {\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n this.mixScaleX = 0;\r\n this.mixScaleY = 0;\r\n this.mixShearY = 0;\r\n this.temp = new Vector2();\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mixRotate = data.mixRotate;\r\n this.mixX = data.mixX;\r\n this.mixY = data.mixY;\r\n this.mixScaleX = data.mixScaleX;\r\n this.mixScaleY = data.mixScaleY;\r\n this.mixShearY = data.mixShearY;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let bone = skeleton.findBone(data.bones[i].name);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\r\n this.bones.push(bone);\r\n }\r\n let target = skeleton.findBone(data.target.name);\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${data.target.name}.`);\r\n this.target = target;\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0)\r\n return;\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n } else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n }\r\n applyAbsoluteWorld() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let translate = mixX != 0 || mixY != 0;\r\n let target = this.target;\r\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect;\r\n let offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (mixRotate != 0) {\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= mixRotate;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n if (translate) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * mixX;\r\n bone.worldY += (temp.y - bone.worldY) * mixY;\r\n }\r\n if (mixScaleX != 0) {\r\n let s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n if (s != 0)\r\n s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n if (mixScaleY != 0) {\r\n let s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n if (s != 0)\r\n s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n }\r\n if (mixShearY > 0) {\r\n let b = bone.b, d = bone.d;\r\n let by = Math.atan2(d, b);\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r = by + (r + offsetShearY) * mixShearY;\r\n let s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n }\r\n bone.updateAppliedTransform();\r\n }\r\n }\r\n applyRelativeWorld() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let translate = mixX != 0 || mixY != 0;\r\n let target = this.target;\r\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (mixRotate != 0) {\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n let r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= mixRotate;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n if (translate) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * mixX;\r\n bone.worldY += temp.y * mixY;\r\n }\r\n if (mixScaleX != 0) {\r\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n if (mixScaleY != 0) {\r\n let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n }\r\n if (mixShearY > 0) {\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n let b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\r\n let s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n }\r\n bone.updateAppliedTransform();\r\n }\r\n }\r\n applyAbsoluteLocal() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let target = this.target;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let rotation = bone.arotation;\r\n if (mixRotate != 0) {\r\n let r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\r\n rotation += r * mixRotate;\r\n }\r\n let x = bone.ax, y = bone.ay;\r\n x += (target.ax - x + this.data.offsetX) * mixX;\r\n y += (target.ay - y + this.data.offsetY) * mixY;\r\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (mixScaleX != 0 && scaleX != 0)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\r\n if (mixScaleY != 0 && scaleY != 0)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\r\n let shearY = bone.ashearY;\r\n if (mixShearY != 0) {\r\n let r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\r\n shearY += r * mixShearY;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n applyRelativeLocal() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let target = this.target;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\r\n let x = bone.ax + (target.ax + this.data.offsetX) * mixX;\r\n let y = bone.ay + (target.ay + this.data.offsetY) * mixY;\r\n let scaleX = bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX + 1);\r\n let scaleY = bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY + 1);\r\n let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/Skeleton.ts\r\n var _Skeleton = class {\r\n constructor(data) {\r\n this._updateCache = new Array();\r\n this.skin = null;\r\n this.scaleX = 1;\r\n this._scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let boneData = data.bones[i];\r\n let bone;\r\n if (!boneData.parent)\r\n bone = new Bone(boneData, this, null);\r\n else {\r\n let parent = this.bones[boneData.parent.index];\r\n bone = new Bone(boneData, this, parent);\r\n parent.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (let i = 0; i < data.slots.length; i++) {\r\n let slotData = data.slots[i];\r\n let bone = this.bones[slotData.boneData.index];\r\n let slot = new Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (let i = 0; i < data.ikConstraints.length; i++) {\r\n let ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (let i = 0; i < data.transformConstraints.length; i++) {\r\n let transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (let i = 0; i < data.pathConstraints.length; i++) {\r\n let pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n get scaleY() {\r\n return _Skeleton.yDown ? -this._scaleY : this._scaleY;\r\n }\r\n set scaleY(scaleY) {\r\n this._scaleY = scaleY;\r\n }\r\n updateCache() {\r\n let updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin) {\r\n let skinBones = this.skin.bones;\r\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\r\n let bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone);\r\n }\r\n }\r\n let ikConstraints = this.ikConstraints;\r\n let transformConstraints = this.transformConstraints;\r\n let pathConstraints = this.pathConstraints;\r\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n let constraintCount = ikCount + transformCount + pathCount;\r\n outer:\r\n for (let i = 0; i < constraintCount; i++) {\r\n for (let ii = 0; ii < ikCount; ii++) {\r\n let constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < transformCount; ii++) {\r\n let constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < pathCount; ii++) {\r\n let constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n }\r\n sortIkConstraint(constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\r\n if (!constraint.active)\r\n return;\r\n let target = constraint.target;\r\n this.sortBone(target);\r\n let constrained = constraint.bones;\r\n let parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length == 1) {\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n } else {\r\n let child = constrained[constrained.length - 1];\r\n this.sortBone(child);\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n child.sorted = true;\r\n }\r\n }\r\n sortPathConstraint(constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\r\n if (!constraint.active)\r\n return;\r\n let slot = constraint.target;\r\n let slotIndex = slot.data.index;\r\n let slotBone = slot.bone;\r\n if (this.skin)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (let i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (let i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n }\r\n sortTransformConstraint(constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (let i = 0; i < boneCount; i++) {\r\n let child = constrained[i];\r\n this.sortBone(child.parent);\r\n this.sortBone(child);\r\n }\r\n } else {\r\n for (let i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (let i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n }\r\n sortPathConstraintAttachment(skin, slotIndex, slotBone) {\r\n let attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (let key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n }\r\n sortPathConstraintAttachmentWith(attachment, slotBone) {\r\n if (!(attachment instanceof PathAttachment))\r\n return;\r\n let pathBones = attachment.bones;\r\n if (!pathBones)\r\n this.sortBone(slotBone);\r\n else {\r\n let bones = this.bones;\r\n for (let i = 0, n = pathBones.length; i < n; ) {\r\n let nn = pathBones[i++];\r\n nn += i;\r\n while (i < nn)\r\n this.sortBone(bones[pathBones[i++]]);\r\n }\r\n }\r\n }\r\n sortBone(bone) {\r\n if (!bone)\r\n return;\r\n if (bone.sorted)\r\n return;\r\n let parent = bone.parent;\r\n if (parent)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n }\r\n sortReset(bones) {\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n }\r\n updateWorldTransform() {\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n }\r\n let updateCache = this._updateCache;\r\n for (let i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n }\r\n updateWorldTransformWith(parent) {\r\n let rootBone = this.getRootBone();\r\n if (!rootBone)\r\n throw new Error(\"Root bone must not be null.\");\r\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n rootBone.worldX = pa * this.x + pb * this.y + parent.worldX;\r\n rootBone.worldY = pc * this.x + pd * this.y + parent.worldY;\r\n let rotationY = rootBone.rotation + 90 + rootBone.shearY;\r\n let la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\r\n let lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\r\n let lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\r\n let ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\r\n rootBone.a = (pa * la + pb * lc) * this.scaleX;\r\n rootBone.b = (pa * lb + pb * ld) * this.scaleX;\r\n rootBone.c = (pc * la + pd * lc) * this.scaleY;\r\n rootBone.d = (pc * lb + pd * ld) * this.scaleY;\r\n let updateCache = this._updateCache;\r\n for (let i = 0, n = updateCache.length; i < n; i++) {\r\n let updatable = updateCache[i];\r\n if (updatable != rootBone)\r\n updatable.update();\r\n }\r\n }\r\n setToSetupPose() {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n }\r\n setBonesToSetupPose() {\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n let data = constraint.data;\r\n constraint.mixRotate = data.mixRotate;\r\n constraint.mixX = data.mixX;\r\n constraint.mixY = data.mixY;\r\n constraint.mixScaleX = data.mixScaleX;\r\n constraint.mixScaleY = data.mixScaleY;\r\n constraint.mixShearY = data.mixShearY;\r\n }\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n let data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.mixRotate = data.mixRotate;\r\n constraint.mixX = data.mixX;\r\n constraint.mixY = data.mixY;\r\n }\r\n }\r\n setSlotsToSetupPose() {\r\n let slots = this.slots;\r\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n }\r\n getRootBone() {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n }\r\n findBone(boneName) {\r\n if (!boneName)\r\n throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n }\r\n findSlot(slotName) {\r\n if (!slotName)\r\n throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n }\r\n setSkinByName(skinName) {\r\n let skin = this.data.findSkin(skinName);\r\n if (!skin)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n }\r\n setSkin(newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin) {\r\n if (this.skin)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n let name = slot.data.attachmentName;\r\n if (name) {\r\n let attachment = newSkin.getAttachment(i, name);\r\n if (attachment)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n }\r\n getAttachmentByName(slotName, attachmentName) {\r\n let slot = this.data.findSlot(slotName);\r\n if (!slot)\r\n throw new Error(`Can't find slot with name ${slotName}`);\r\n return this.getAttachment(slot.index, attachmentName);\r\n }\r\n getAttachment(slotIndex, attachmentName) {\r\n if (!attachmentName)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin) {\r\n let attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n }\r\n setAttachment(slotName, attachmentName) {\r\n if (!slotName)\r\n throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n let attachment = null;\r\n if (attachmentName) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (!attachment)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n }\r\n findIkConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n }\r\n findTransformConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n findPathConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n getBoundsRect() {\r\n let offset = new Vector2();\r\n let size = new Vector2();\r\n this.getBounds(offset, size);\r\n return { x: offset.x, y: offset.y, width: size.x, height: size.y };\r\n }\r\n getBounds(offset, size, temp = new Array(2)) {\r\n if (!offset)\r\n throw new Error(\"offset cannot be null.\");\r\n if (!size)\r\n throw new Error(\"size cannot be null.\");\r\n let drawOrder = this.drawOrder;\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let verticesLength = 0;\r\n let vertices = null;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot, vertices, 0, 2);\r\n } else if (attachment instanceof MeshAttachment) {\r\n let mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices) {\r\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n let x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n }\r\n };\r\n var Skeleton = _Skeleton;\r\n Skeleton.yDown = false;\r\n\r\n // spine-core/src/SkeletonData.ts\r\n var SkeletonData = class {\r\n constructor() {\r\n this.name = null;\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.defaultSkin = null;\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.version = null;\r\n this.hash = null;\r\n this.fps = 0;\r\n this.imagesPath = null;\r\n this.audioPath = null;\r\n }\r\n findBone(boneName) {\r\n if (!boneName)\r\n throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n }\r\n findSlot(slotName) {\r\n if (!slotName)\r\n throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n }\r\n findSkin(skinName) {\r\n if (!skinName)\r\n throw new Error(\"skinName cannot be null.\");\r\n let skins = this.skins;\r\n for (let i = 0, n = skins.length; i < n; i++) {\r\n let skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n }\r\n findEvent(eventDataName) {\r\n if (!eventDataName)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n let events = this.events;\r\n for (let i = 0, n = events.length; i < n; i++) {\r\n let event = events[i];\r\n if (event.name == eventDataName)\r\n return event;\r\n }\r\n return null;\r\n }\r\n findAnimation(animationName) {\r\n if (!animationName)\r\n throw new Error(\"animationName cannot be null.\");\r\n let animations = this.animations;\r\n for (let i = 0, n = animations.length; i < n; i++) {\r\n let animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n }\r\n findIkConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n findTransformConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n findPathConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n };\r\n\r\n // spine-core/src/Skin.ts\r\n var SkinEntry = class {\r\n constructor(slotIndex = 0, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n };\r\n var Skin = class {\r\n constructor(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n setAttachment(slotIndex, name, attachment) {\r\n if (!attachment)\r\n throw new Error(\"attachment cannot be null.\");\r\n let attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n }\r\n addSkin(skin) {\r\n for (let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.bones.length; ii++) {\r\n if (this.bones[ii] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.constraints.length; ii++) {\r\n if (this.constraints[ii] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n copySkin(skin) {\r\n for (let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.bones.length; ii++) {\r\n if (this.bones[ii] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.constraints.length; ii++) {\r\n if (this.constraints[ii] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (!attachment.attachment)\r\n continue;\r\n if (attachment.attachment instanceof MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n } else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n }\r\n getAttachment(slotIndex, name) {\r\n let dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n }\r\n removeAttachment(slotIndex, name) {\r\n let dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n delete dictionary[name];\r\n }\r\n getAttachments() {\r\n let entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n let slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n }\r\n getAttachmentsForSlot(slotIndex, attachments) {\r\n let slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name, attachment));\r\n }\r\n }\r\n }\r\n clear() {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n }\r\n attachAll(skeleton, oldSkin) {\r\n let slotIndex = 0;\r\n for (let i = 0; i < skeleton.slots.length; i++) {\r\n let slot = skeleton.slots[i];\r\n let slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n let dictionary = oldSkin.attachments[slotIndex];\r\n for (let key in dictionary) {\r\n let skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n let attachment = this.getAttachment(slotIndex, key);\r\n if (attachment)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/SlotData.ts\r\n var SlotData = class {\r\n constructor(index, name, boneData) {\r\n this.index = 0;\r\n this.color = new Color(1, 1, 1, 1);\r\n this.darkColor = null;\r\n this.attachmentName = null;\r\n this.blendMode = BlendMode.Normal;\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n if (!boneData)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n };\r\n var BlendMode = /* @__PURE__ */ ((BlendMode3) => {\r\n BlendMode3[BlendMode3[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode3[BlendMode3[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode3[BlendMode3[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode3[BlendMode3[\"Screen\"] = 3] = \"Screen\";\r\n return BlendMode3;\r\n })(BlendMode || {});\r\n\r\n // spine-core/src/TransformConstraintData.ts\r\n var TransformConstraintData = class extends ConstraintData {\r\n constructor(name) {\r\n super(name, 0, false);\r\n this.bones = new Array();\r\n this._target = null;\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n this.mixScaleX = 0;\r\n this.mixScaleY = 0;\r\n this.mixShearY = 0;\r\n this.offsetRotation = 0;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.offsetScaleX = 0;\r\n this.offsetScaleY = 0;\r\n this.offsetShearY = 0;\r\n this.relative = false;\r\n this.local = false;\r\n }\r\n set target(boneData) {\r\n this._target = boneData;\r\n }\r\n get target() {\r\n if (!this._target)\r\n throw new Error(\"BoneData not set.\");\r\n else\r\n return this._target;\r\n }\r\n };\r\n\r\n // spine-core/src/SkeletonBinary.ts\r\n var SkeletonBinary = class {\r\n constructor(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n readSkeletonData(binary) {\r\n let scale = this.scale;\r\n let skeletonData = new SkeletonData();\r\n skeletonData.name = \"\";\r\n let input = new BinaryInput(binary);\r\n let lowHash = input.readInt32();\r\n let highHash = input.readInt32();\r\n skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\r\n skeletonData.version = input.readString();\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n let nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n let n = 0;\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let str = input.readString();\r\n if (!str)\r\n throw new Error(\"String in string table must not be null.\");\r\n input.strings.push(str);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"Bone name must not be null.\");\r\n let parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n let data = new BoneData(i, name, parent);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let slotName = input.readString();\r\n if (!slotName)\r\n throw new Error(\"Slot name must not be null.\");\r\n let boneData = skeletonData.bones[input.readInt(true)];\r\n let data = new SlotData(i, slotName, boneData);\r\n Color.rgba8888ToColor(data.color, input.readInt32());\r\n let darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = input.readInt(true);\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0, nn; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"IK constraint data name must not be null.\");\r\n let data = new IkConstraintData(name);\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (let ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0, nn; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"Transform constraint data name must not be null.\");\r\n let data = new TransformConstraintData(name);\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (let ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.mixRotate = input.readFloat();\r\n data.mixX = input.readFloat();\r\n data.mixY = input.readFloat();\r\n data.mixScaleX = input.readFloat();\r\n data.mixScaleY = input.readFloat();\r\n data.mixShearY = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0, nn; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"Path constraint data name must not be null.\");\r\n let data = new PathConstraintData(name);\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (let ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = input.readInt(true);\r\n data.spacingMode = input.readInt(true);\r\n data.rotateMode = input.readInt(true);\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == 0 /* Fixed */)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\r\n data.spacing *= scale;\r\n data.mixRotate = input.readFloat();\r\n data.mixX = input.readFloat();\r\n data.mixY = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n let i = skeletonData.skins.length;\r\n Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++) {\r\n let skin = this.readSkin(input, skeletonData, false, nonessential);\r\n if (!skin)\r\n throw new Error(\"readSkin() should not have returned null.\");\r\n skeletonData.skins[i] = skin;\r\n }\r\n }\r\n n = this.linkedMeshes.length;\r\n for (let i = 0; i < n; i++) {\r\n let linkedMesh = this.linkedMeshes[i];\r\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (!skin)\r\n throw new Error(\"Not skin found for linked mesh.\");\r\n if (!linkedMesh.parent)\r\n throw new Error(\"Linked mesh parent must not be null\");\r\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (!parent)\r\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\r\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent);\r\n if (linkedMesh.mesh.region != null)\r\n linkedMesh.mesh.updateRegion();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let eventName = input.readStringRef();\r\n if (!eventName)\r\n throw new Error();\r\n let data = new EventData(eventName);\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let animationName = input.readString();\r\n if (!animationName)\r\n throw new Error(\"Animatio name must not be null.\");\r\n skeletonData.animations.push(this.readAnimation(input, animationName, skeletonData));\r\n }\r\n return skeletonData;\r\n }\r\n readSkin(input, skeletonData, defaultSkin, nonessential) {\r\n let skin = null;\r\n let slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new Skin(\"default\");\r\n } else {\r\n let skinName = input.readStringRef();\r\n if (!skinName)\r\n throw new Error(\"Skin name must not be null.\");\r\n skin = new Skin(skinName);\r\n skin.bones.length = input.readInt(true);\r\n for (let i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (let i = 0; i < slotCount; i++) {\r\n let slotIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let name = input.readStringRef();\r\n if (!name)\r\n throw new Error(\"Attachment name must not be null\");\r\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\r\n if (attachment)\r\n skin.setAttachment(slotIndex, name, attachment);\r\n }\r\n }\r\n return skin;\r\n }\r\n readAttachment(input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n let scale = this.scale;\r\n let name = input.readStringRef();\r\n if (!name)\r\n name = attachmentName;\r\n switch (input.readByte()) {\r\n case AttachmentType.Region: {\r\n let path = input.readStringRef();\r\n let rotation = input.readFloat();\r\n let x = input.readFloat();\r\n let y = input.readFloat();\r\n let scaleX = input.readFloat();\r\n let scaleY = input.readFloat();\r\n let width = input.readFloat();\r\n let height = input.readFloat();\r\n let color = input.readInt32();\r\n let sequence = this.readSequence(input);\r\n if (!path)\r\n path = name;\r\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\r\n if (!region)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n Color.rgba8888ToColor(region.color, color);\r\n region.sequence = sequence;\r\n if (sequence == null)\r\n region.updateRegion();\r\n return region;\r\n }\r\n case AttachmentType.BoundingBox: {\r\n let vertexCount = input.readInt(true);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let color = nonessential ? input.readInt32() : 0;\r\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (!box)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case AttachmentType.Mesh: {\r\n let path = input.readStringRef();\r\n let color = input.readInt32();\r\n let vertexCount = input.readInt(true);\r\n let uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n let triangles = this.readShortArray(input);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let hullLength = input.readInt(true);\r\n let sequence = this.readSequence(input);\r\n let edges = [];\r\n let width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (!path)\r\n path = name;\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\r\n if (!mesh)\r\n return null;\r\n mesh.path = path;\r\n Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n if (sequence == null)\r\n mesh.updateRegion();\r\n mesh.hullLength = hullLength << 1;\r\n mesh.sequence = sequence;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case AttachmentType.LinkedMesh: {\r\n let path = input.readStringRef();\r\n let color = input.readInt32();\r\n let skinName = input.readStringRef();\r\n let parent = input.readStringRef();\r\n let inheritTimelines = input.readBoolean();\r\n let sequence = this.readSequence(input);\r\n let width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (!path)\r\n path = name;\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\r\n if (!mesh)\r\n return null;\r\n mesh.path = path;\r\n Color.rgba8888ToColor(mesh.color, color);\r\n mesh.sequence = sequence;\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));\r\n return mesh;\r\n }\r\n case AttachmentType.Path: {\r\n let closed2 = input.readBoolean();\r\n let constantSpeed = input.readBoolean();\r\n let vertexCount = input.readInt(true);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let lengths = Utils.newArray(vertexCount / 3, 0);\r\n for (let i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n let color = nonessential ? input.readInt32() : 0;\r\n let path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (!path)\r\n return null;\r\n path.closed = closed2;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case AttachmentType.Point: {\r\n let rotation = input.readFloat();\r\n let x = input.readFloat();\r\n let y = input.readFloat();\r\n let color = nonessential ? input.readInt32() : 0;\r\n let point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (!point)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case AttachmentType.Clipping: {\r\n let endSlotIndex = input.readInt(true);\r\n let vertexCount = input.readInt(true);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let color = nonessential ? input.readInt32() : 0;\r\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (!clip)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n }\r\n readSequence(input) {\r\n if (!input.readBoolean())\r\n return null;\r\n let sequence = new Sequence(input.readInt(true));\r\n sequence.start = input.readInt(true);\r\n sequence.digits = input.readInt(true);\r\n sequence.setupIndex = input.readInt(true);\r\n return sequence;\r\n }\r\n readVertices(input, vertexCount) {\r\n let scale = this.scale;\r\n let verticesLength = vertexCount << 1;\r\n let vertices = new Vertices();\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n let weights = new Array();\r\n let bonesArray = new Array();\r\n for (let i = 0; i < vertexCount; i++) {\r\n let boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (let ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n }\r\n readFloatArray(input, n, scale) {\r\n let array = new Array(n);\r\n if (scale == 1) {\r\n for (let i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n } else {\r\n for (let i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n }\r\n readShortArray(input) {\r\n let n = input.readInt(true);\r\n let array = new Array(n);\r\n for (let i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n }\r\n readAnimation(input, name, skeletonData) {\r\n input.readInt(true);\r\n let timelines = new Array();\r\n let scale = this.scale;\r\n let tempColor1 = new Color();\r\n let tempColor2 = new Color();\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let slotIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let timelineType = input.readByte();\r\n let frameCount = input.readInt(true);\r\n let frameLast = frameCount - 1;\r\n switch (timelineType) {\r\n case SLOT_ATTACHMENT: {\r\n let timeline = new AttachmentTimeline(frameCount, slotIndex);\r\n for (let frame = 0; frame < frameCount; frame++)\r\n timeline.setFrame(frame, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGBA: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n let a = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b, a);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n let a2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\r\n }\r\n time = time2;\r\n r = r2;\r\n g = g2;\r\n b = b2;\r\n a = a2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGB: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\r\n }\r\n time = time2;\r\n r = r2;\r\n g = g2;\r\n b = b2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGBA2: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n let a = input.readUnsignedByte() / 255;\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let nr = input.readUnsignedByte() / 255;\r\n let ng = input.readUnsignedByte() / 255;\r\n let nb = input.readUnsignedByte() / 255;\r\n let na = input.readUnsignedByte() / 255;\r\n let nr2 = input.readUnsignedByte() / 255;\r\n let ng2 = input.readUnsignedByte() / 255;\r\n let nb2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\r\n setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\r\n setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\r\n setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\r\n }\r\n time = time2;\r\n r = nr;\r\n g = ng;\r\n b = nb;\r\n a = na;\r\n r2 = nr2;\r\n g2 = ng2;\r\n b2 = nb2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGB2: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let nr = input.readUnsignedByte() / 255;\r\n let ng = input.readUnsignedByte() / 255;\r\n let nb = input.readUnsignedByte() / 255;\r\n let nr2 = input.readUnsignedByte() / 255;\r\n let ng2 = input.readUnsignedByte() / 255;\r\n let nb2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\r\n setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\r\n setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\r\n }\r\n time = time2;\r\n r = nr;\r\n g = ng;\r\n b = nb;\r\n r2 = nr2;\r\n g2 = ng2;\r\n b2 = nb2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_ALPHA: {\r\n let timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\r\n let time = input.readFloat(), a = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, a);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let a2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\r\n }\r\n time = time2;\r\n a = a2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let boneIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\r\n switch (type) {\r\n case BONE_ROTATE:\r\n timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_TRANSLATE:\r\n timelines.push(readTimeline2(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\r\n break;\r\n case BONE_TRANSLATEX:\r\n timelines.push(readTimeline1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\r\n break;\r\n case BONE_TRANSLATEY:\r\n timelines.push(readTimeline1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\r\n break;\r\n case BONE_SCALE:\r\n timelines.push(readTimeline2(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SCALEX:\r\n timelines.push(readTimeline1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SCALEY:\r\n timelines.push(readTimeline1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SHEAR:\r\n timelines.push(readTimeline2(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SHEARX:\r\n timelines.push(readTimeline1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SHEARY:\r\n timelines.push(readTimeline1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\r\n }\r\n }\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\r\n let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\r\n let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\r\n }\r\n time = time2;\r\n mix = mix2;\r\n softness = softness2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\r\n let timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\r\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\r\n setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\r\n setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n mixScaleX = mixScaleX2;\r\n mixScaleY = mixScaleY2;\r\n mixShearY = mixShearY2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let index = input.readInt(true);\r\n let data = skeletonData.pathConstraints[index];\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n switch (input.readByte()) {\r\n case PATH_POSITION:\r\n timelines.push(readTimeline1(\r\n input,\r\n new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),\r\n data.positionMode == 0 /* Fixed */ ? scale : 1\r\n ));\r\n break;\r\n case PATH_SPACING:\r\n timelines.push(readTimeline1(\r\n input,\r\n new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),\r\n data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */ ? scale : 1\r\n ));\r\n break;\r\n case PATH_MIX:\r\n let timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\r\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\r\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let skin = skeletonData.skins[input.readInt(true)];\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let slotIndex = input.readInt(true);\r\n for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n let attachmentName = input.readStringRef();\r\n if (!attachmentName)\r\n throw new Error(\"attachmentName must not be null.\");\r\n let attachment = skin.getAttachment(slotIndex, attachmentName);\r\n let timelineType = input.readByte();\r\n let frameCount = input.readInt(true);\r\n let frameLast = frameCount - 1;\r\n switch (timelineType) {\r\n case ATTACHMENT_DEFORM: {\r\n let vertexAttachment = attachment;\r\n let weighted = vertexAttachment.bones;\r\n let vertices = vertexAttachment.vertices;\r\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n let bezierCount = input.readInt(true);\r\n let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);\r\n let time = input.readFloat();\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n let deform;\r\n let end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = Utils.newFloatArray(deformLength);\r\n let start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (let v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n } else {\r\n for (let v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (let v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frame, time, deform);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\r\n }\r\n time = time2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case ATTACHMENT_SEQUENCE: {\r\n let timeline = new SequenceTimeline(frameCount, slotIndex, attachment);\r\n for (let frame = 0; frame < frameCount; frame++) {\r\n let time = input.readFloat();\r\n let modeAndIndex = input.readInt32();\r\n timeline.setFrame(\r\n frame,\r\n time,\r\n SequenceModeValues[modeAndIndex & 15],\r\n modeAndIndex >> 4,\r\n input.readFloat()\r\n );\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n let drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n let timeline = new DrawOrderTimeline(drawOrderCount);\r\n let slotCount = skeletonData.slots.length;\r\n for (let i = 0; i < drawOrderCount; i++) {\r\n let time = input.readFloat();\r\n let offsetCount = input.readInt(true);\r\n let drawOrder = Utils.newArray(slotCount, 0);\r\n for (let ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n let unchanged = Utils.newArray(slotCount - offsetCount, 0);\r\n let originalIndex = 0, unchangedIndex = 0;\r\n for (let ii = 0; ii < offsetCount; ii++) {\r\n let slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (let ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n }\r\n let eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n let timeline = new EventTimeline(eventCount);\r\n for (let i = 0; i < eventCount; i++) {\r\n let time = input.readFloat();\r\n let eventData = skeletonData.events[input.readInt(true)];\r\n let event = new Event(time, eventData);\r\n event.intValue = input.readInt(false);\r\n event.floatValue = input.readFloat();\r\n event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event.data.audioPath) {\r\n event.volume = input.readFloat();\r\n event.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event);\r\n }\r\n timelines.push(timeline);\r\n }\r\n let duration = 0;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n duration = Math.max(duration, timelines[i].getDuration());\r\n return new Animation(name, timelines, duration);\r\n }\r\n };\r\n var BinaryInput = class {\r\n constructor(data, strings = new Array(), index = 0, buffer = new DataView(data.buffer)) {\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n readByte() {\r\n return this.buffer.getInt8(this.index++);\r\n }\r\n readUnsignedByte() {\r\n return this.buffer.getUint8(this.index++);\r\n }\r\n readShort() {\r\n let value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n }\r\n readInt32() {\r\n let value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n }\r\n readInt(optimizePositive) {\r\n let b = this.readByte();\r\n let result = b & 127;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 7;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 14;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 21;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : result >>> 1 ^ -(result & 1);\r\n }\r\n readStringRef() {\r\n let index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n }\r\n readString() {\r\n let byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n let chars = \"\";\r\n let charCount = 0;\r\n for (let i = 0; i < byteCount; ) {\r\n let b = this.readUnsignedByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode((b & 31) << 6 | this.readByte() & 63);\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode((b & 15) << 12 | (this.readByte() & 63) << 6 | this.readByte() & 63);\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n }\r\n readFloat() {\r\n let value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n }\r\n readBoolean() {\r\n return this.readByte() != 0;\r\n }\r\n };\r\n var LinkedMesh = class {\r\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritTimeline = inheritDeform;\r\n }\r\n };\r\n var Vertices = class {\r\n constructor(bones = null, vertices = null) {\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n };\r\n var AttachmentType = /* @__PURE__ */ ((AttachmentType2) => {\r\n AttachmentType2[AttachmentType2[\"Region\"] = 0] = \"Region\";\r\n AttachmentType2[AttachmentType2[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType2[AttachmentType2[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType2[AttachmentType2[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType2[AttachmentType2[\"Path\"] = 4] = \"Path\";\r\n AttachmentType2[AttachmentType2[\"Point\"] = 5] = \"Point\";\r\n AttachmentType2[AttachmentType2[\"Clipping\"] = 6] = \"Clipping\";\r\n return AttachmentType2;\r\n })(AttachmentType || {});\r\n function readTimeline1(input, timeline, scale) {\r\n let time = input.readFloat(), value = input.readFloat() * scale;\r\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\r\n timeline.setFrame(frame, time, value);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), value2 = input.readFloat() * scale;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\r\n }\r\n time = time2;\r\n value = value2;\r\n }\r\n return timeline;\r\n }\r\n function readTimeline2(input, timeline, scale) {\r\n let time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\r\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\r\n timeline.setFrame(frame, time, value1, value2);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\r\n }\r\n time = time2;\r\n value1 = nvalue1;\r\n value2 = nvalue2;\r\n }\r\n return timeline;\r\n }\r\n function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\r\n timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\r\n }\r\n var BONE_ROTATE = 0;\r\n var BONE_TRANSLATE = 1;\r\n var BONE_TRANSLATEX = 2;\r\n var BONE_TRANSLATEY = 3;\r\n var BONE_SCALE = 4;\r\n var BONE_SCALEX = 5;\r\n var BONE_SCALEY = 6;\r\n var BONE_SHEAR = 7;\r\n var BONE_SHEARX = 8;\r\n var BONE_SHEARY = 9;\r\n var SLOT_ATTACHMENT = 0;\r\n var SLOT_RGBA = 1;\r\n var SLOT_RGB = 2;\r\n var SLOT_RGBA2 = 3;\r\n var SLOT_RGB2 = 4;\r\n var SLOT_ALPHA = 5;\r\n var ATTACHMENT_DEFORM = 0;\r\n var ATTACHMENT_SEQUENCE = 1;\r\n var PATH_POSITION = 0;\r\n var PATH_SPACING = 1;\r\n var PATH_MIX = 2;\r\n var CURVE_STEPPED = 1;\r\n var CURVE_BEZIER = 2;\r\n\r\n // spine-core/src/SkeletonBounds.ts\r\n var SkeletonBounds = class {\r\n constructor() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new Pool(() => {\r\n return Utils.newFloatArray(16);\r\n });\r\n }\r\n update(skeleton, updateAabb) {\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n let boundingBoxes = this.boundingBoxes;\r\n let polygons = this.polygons;\r\n let polygonPool = this.polygonPool;\r\n let slots = skeleton.slots;\r\n let slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (let i = 0; i < slotCount; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof BoundingBoxAttachment) {\r\n let boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n let polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n } else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n }\r\n aabbCompute() {\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++) {\r\n let polygon = polygons[i];\r\n let vertices = polygon;\r\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n let x = vertices[ii];\r\n let y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n }\r\n aabbContainsPoint(x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n }\r\n aabbIntersectsSegment(x1, y1, x2, y2) {\r\n let minX = this.minX;\r\n let minY = this.minY;\r\n let maxX = this.maxX;\r\n let maxY = this.maxY;\r\n if (x1 <= minX && x2 <= minX || y1 <= minY && y2 <= minY || x1 >= maxX && x2 >= maxX || y1 >= maxY && y2 >= maxY)\r\n return false;\r\n let m = (y2 - y1) / (x2 - x1);\r\n let y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n let x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n }\r\n aabbIntersectsSkeleton(bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n }\r\n containsPoint(x, y) {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n }\r\n containsPointPolygon(polygon, x, y) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n let prevIndex = nn - 2;\r\n let inside = false;\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let vertexY = vertices[ii + 1];\r\n let prevY = vertices[prevIndex + 1];\r\n if (vertexY < y && prevY >= y || prevY < y && vertexY >= y) {\r\n let vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n }\r\n intersectsSegment(x1, y1, x2, y2) {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n }\r\n intersectsSegmentPolygon(polygon, x1, y1, x2, y2) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n let width12 = x1 - x2, height12 = y1 - y2;\r\n let det1 = x1 * y2 - y1 * x2;\r\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let x4 = vertices[ii], y4 = vertices[ii + 1];\r\n let det2 = x3 * y4 - y3 * x4;\r\n let width34 = x3 - x4, height34 = y3 - y4;\r\n let det3 = width12 * height34 - height12 * width34;\r\n let x = (det1 * width34 - width12 * det2) / det3;\r\n if ((x >= x3 && x <= x4 || x >= x4 && x <= x3) && (x >= x1 && x <= x2 || x >= x2 && x <= x1)) {\r\n let y = (det1 * height34 - height12 * det2) / det3;\r\n if ((y >= y3 && y <= y4 || y >= y4 && y <= y3) && (y >= y1 && y <= y2 || y >= y2 && y <= y1))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n }\r\n getPolygon(boundingBox) {\r\n if (!boundingBox)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n let index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n }\r\n getWidth() {\r\n return this.maxX - this.minX;\r\n }\r\n getHeight() {\r\n return this.maxY - this.minY;\r\n }\r\n };\r\n\r\n // spine-core/src/Triangulator.ts\r\n var Triangulator = class {\r\n constructor() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new Pool(() => {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new Pool(() => {\r\n return new Array();\r\n });\r\n }\r\n triangulate(verticesArray) {\r\n let vertices = verticesArray;\r\n let vertexCount = verticesArray.length >> 1;\r\n let indices = this.indicesArray;\r\n indices.length = 0;\r\n for (let i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n let isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (let i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n let triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n let previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer:\r\n if (!isConcave[i]) {\r\n let p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n let p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n let p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n let p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n let v = indices[ii] << 1;\r\n let vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n let previousIndex = (vertexCount + i - 1) % vertexCount;\r\n let nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n }\r\n decompose(verticesArray, triangles) {\r\n let vertices = verticesArray;\r\n let convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n let convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n let polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n let polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n let fanBaseIndex = -1, lastWinding = 0;\r\n for (let i = 0, n = triangles.length; i < n; i += 3) {\r\n let t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n let x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n let x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n let x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n let merged = false;\r\n if (fanBaseIndex == t1) {\r\n let o = polygon.length - 4;\r\n let winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n let winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n } else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (let i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n let firstIndex = polygonIndices[0];\r\n let lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n let o = polygon.length - 4;\r\n let prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n let prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n let firstX = polygon[0], firstY = polygon[1];\r\n let secondX = polygon[2], secondY = polygon[3];\r\n let winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (let ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n let otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n let otherFirstIndex = otherIndices[0];\r\n let otherSecondIndex = otherIndices[1];\r\n let otherLastIndex = otherIndices[2];\r\n let otherPoly = convexPolygons[ii];\r\n let x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n let winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n let winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (let i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n }\r\n static isConcave(index, vertexCount, vertices, indices) {\r\n let previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n let current = indices[index] << 1;\r\n let next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(\r\n vertices[previous],\r\n vertices[previous + 1],\r\n vertices[current],\r\n vertices[current + 1],\r\n vertices[next],\r\n vertices[next + 1]\r\n );\r\n }\r\n static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n }\r\n static winding(p1x, p1y, p2x, p2y, p3x, p3y) {\r\n let px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n }\r\n };\r\n\r\n // spine-core/src/SkeletonClipping.ts\r\n var SkeletonClipping = class {\r\n constructor() {\r\n this.triangulator = new Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n }\r\n clipStart(slot, clip) {\r\n if (this.clipAttachment)\r\n return 0;\r\n this.clipAttachment = clip;\r\n let n = clip.worldVerticesLength;\r\n let vertices = Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n let clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n let clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (let i = 0, n2 = clippingPolygons.length; i < n2; i++) {\r\n let polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n }\r\n clipEndWithSlot(slot) {\r\n if (this.clipAttachment && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n }\r\n clipEnd() {\r\n if (!this.clipAttachment)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n }\r\n isClipping() {\r\n return this.clipAttachment != null;\r\n }\r\n clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n let clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n let clippedTriangles = this.clippedTriangles;\r\n let polygons = this.clippingPolygons;\r\n let polygonsCount = polygons.length;\r\n let vertexSize = twoColor ? 12 : 8;\r\n let index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer:\r\n for (let i = 0; i < trianglesLength; i += 3) {\r\n let vertexOffset = triangles[i] << 1;\r\n let x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n let u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n let x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n let u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n let x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n let u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (let p = 0; p < polygonsCount; p++) {\r\n let s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n let clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n let d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n let d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n let clipOutputCount = clipOutputLength >> 1;\r\n let clipOutputItems = this.clipOutput;\r\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (let ii = 0; ii < clipOutputLength; ii += 2) {\r\n let x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n let c0 = x - x3, c1 = y - y3;\r\n let a = (d0 * c0 + d1 * c1) * d;\r\n let b = (d4 * c0 + d2 * c1) * d;\r\n let c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (let ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = index + ii;\r\n clippedTrianglesItems[s + 2] = index + ii + 1;\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n } else {\r\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n } else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = index + 1;\r\n clippedTrianglesItems[s + 2] = index + 2;\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n }\r\n clip(x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n let originalOutput = output;\r\n let clipped = false;\r\n let input;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n } else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n let clippingVertices = clippingArea;\r\n let clippingVerticesLast = clippingArea.length - 4;\r\n for (let i = 0; ; i += 2) {\r\n let edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n let edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n let deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n let inputVertices = input;\r\n let inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (let ii = 0; ii < inputVerticesLength; ii += 2) {\r\n let inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n let inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n let side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 1e-6) {\r\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n } else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n } else if (side2) {\r\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 1e-6) {\r\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n } else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n let temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (let i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n } else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n }\r\n static makeClockwise(polygon) {\r\n let vertices = polygon;\r\n let verticeslength = polygon.length;\r\n let area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (let i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n let x = vertices[i], y = vertices[i + 1];\r\n let other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/SkeletonJson.ts\r\n var SkeletonJson = class {\r\n constructor(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n readSkeletonData(json) {\r\n let scale = this.scale;\r\n let skeletonData = new SkeletonData();\r\n let root = typeof json === \"string\" ? JSON.parse(json) : json;\r\n let skeletonMap = root.skeleton;\r\n if (skeletonMap) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (let i = 0; i < root.bones.length; i++) {\r\n let boneMap = root.bones[i];\r\n let parent = null;\r\n let parentName = getValue(boneMap, \"parent\", null);\r\n if (parentName)\r\n parent = skeletonData.findBone(parentName);\r\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\r\n data.length = getValue(boneMap, \"length\", 0) * scale;\r\n data.x = getValue(boneMap, \"x\", 0) * scale;\r\n data.y = getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = getValue(boneMap, \"shearX\", 0);\r\n data.shearY = getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\r\n data.skinRequired = getValue(boneMap, \"skin\", false);\r\n let color = getValue(boneMap, \"color\", null);\r\n if (color)\r\n data.color.setFromString(color);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (let i = 0; i < root.slots.length; i++) {\r\n let slotMap = root.slots[i];\r\n let boneData = skeletonData.findBone(slotMap.bone);\r\n if (!boneData)\r\n throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);\r\n let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\r\n let color = getValue(slotMap, \"color\", null);\r\n if (color)\r\n data.color.setFromString(color);\r\n let dark = getValue(slotMap, \"dark\", null);\r\n if (dark)\r\n data.darkColor = Color.fromString(dark);\r\n data.attachmentName = getValue(slotMap, \"attachment\", null);\r\n data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (let i = 0; i < root.ik.length; i++) {\r\n let constraintMap = root.ik[i];\r\n let data = new IkConstraintData(constraintMap.name);\r\n data.order = getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\r\n let bone = skeletonData.findBone(constraintMap.bones[ii]);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${constraintMap.bones[ii]} for IK constraint ${constraintMap.name}.`);\r\n data.bones.push(bone);\r\n }\r\n let target = skeletonData.findBone(constraintMap.target);\r\n ;\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${constraintMap.target} for IK constraint ${constraintMap.name}.`);\r\n data.target = target;\r\n data.mix = getValue(constraintMap, \"mix\", 1);\r\n data.softness = getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = getValue(constraintMap, \"compress\", false);\r\n data.stretch = getValue(constraintMap, \"stretch\", false);\r\n data.uniform = getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (let i = 0; i < root.transform.length; i++) {\r\n let constraintMap = root.transform[i];\r\n let data = new TransformConstraintData(constraintMap.name);\r\n data.order = getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\r\n let boneName = constraintMap.bones[ii];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${boneName} for transform constraint ${constraintMap.name}.`);\r\n data.bones.push(bone);\r\n }\r\n let targetName = constraintMap.target;\r\n let target = skeletonData.findBone(targetName);\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${targetName} for transform constraint ${constraintMap.name}.`);\r\n data.target = target;\r\n data.local = getValue(constraintMap, \"local\", false);\r\n data.relative = getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\r\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\r\n data.mixX = getValue(constraintMap, \"mixX\", 1);\r\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\r\n data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\r\n data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\r\n data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (let i = 0; i < root.path.length; i++) {\r\n let constraintMap = root.path[i];\r\n let data = new PathConstraintData(constraintMap.name);\r\n data.order = getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\r\n let boneName = constraintMap.bones[ii];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${boneName} for path constraint ${constraintMap.name}.`);\r\n data.bones.push(bone);\r\n }\r\n let targetName = constraintMap.target;\r\n let target = skeletonData.findSlot(targetName);\r\n if (!target)\r\n throw new Error(`Couldn't find target slot ${targetName} for path constraint ${constraintMap.name}.`);\r\n data.target = target;\r\n data.positionMode = Utils.enumValue(PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\r\n data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\r\n data.rotateMode = Utils.enumValue(RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\r\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\r\n data.position = getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == 0 /* Fixed */)\r\n data.position *= scale;\r\n data.spacing = getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\r\n data.spacing *= scale;\r\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\r\n data.mixX = getValue(constraintMap, \"mixX\", 1);\r\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (let i = 0; i < root.skins.length; i++) {\r\n let skinMap = root.skins[i];\r\n let skin = new Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\r\n let boneName = skinMap.bones[ii];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${boneName} for skin ${skinMap.name}.`);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\r\n let constraintName = skinMap.ik[ii];\r\n let constraint = skeletonData.findIkConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(`Couldn't find IK constraint ${constraintName} for skin ${skinMap.name}.`);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\r\n let constraintName = skinMap.transform[ii];\r\n let constraint = skeletonData.findTransformConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(`Couldn't find transform constraint ${constraintName} for skin ${skinMap.name}.`);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (let ii = 0; ii < skinMap.path.length; ii++) {\r\n let constraintName = skinMap.path[ii];\r\n let constraint = skeletonData.findPathConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(`Couldn't find path constraint ${constraintName} for skin ${skinMap.name}.`);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (let slotName in skinMap.attachments) {\r\n let slot = skeletonData.findSlot(slotName);\r\n if (!slot)\r\n throw new Error(`Couldn't find slot ${slotName} for skin ${skinMap.name}.`);\r\n let slotMap = skinMap.attachments[slotName];\r\n for (let entryName in slotMap) {\r\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n let linkedMesh = this.linkedMeshes[i];\r\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (!skin)\r\n throw new Error(`Skin not found: ${linkedMesh.skin}`);\r\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (!parent)\r\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\r\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent);\r\n if (linkedMesh.mesh.region != null)\r\n linkedMesh.mesh.updateRegion();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (let eventName in root.events) {\r\n let eventMap = root.events[eventName];\r\n let data = new EventData(eventName);\r\n data.intValue = getValue(eventMap, \"int\", 0);\r\n data.floatValue = getValue(eventMap, \"float\", 0);\r\n data.stringValue = getValue(eventMap, \"string\", \"\");\r\n data.audioPath = getValue(eventMap, \"audio\", null);\r\n if (data.audioPath) {\r\n data.volume = getValue(eventMap, \"volume\", 1);\r\n data.balance = getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (let animationName in root.animations) {\r\n let animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n }\r\n readAttachment(map, skin, slotIndex, name, skeletonData) {\r\n let scale = this.scale;\r\n name = getValue(map, \"name\", name);\r\n switch (getValue(map, \"type\", \"region\")) {\r\n case \"region\": {\r\n let path = getValue(map, \"path\", name);\r\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\r\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\r\n if (!region)\r\n return null;\r\n region.path = path;\r\n region.x = getValue(map, \"x\", 0) * scale;\r\n region.y = getValue(map, \"y\", 0) * scale;\r\n region.scaleX = getValue(map, \"scaleX\", 1);\r\n region.scaleY = getValue(map, \"scaleY\", 1);\r\n region.rotation = getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n region.sequence = sequence;\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n region.color.setFromString(color);\r\n if (region.region != null)\r\n region.updateRegion();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (!box)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n let path = getValue(map, \"path\", name);\r\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\r\n if (!mesh)\r\n return null;\r\n mesh.path = path;\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n mesh.color.setFromString(color);\r\n mesh.width = getValue(map, \"width\", 0) * scale;\r\n mesh.height = getValue(map, \"height\", 0) * scale;\r\n mesh.sequence = sequence;\r\n let parent = getValue(map, \"parent\", null);\r\n if (parent) {\r\n this.linkedMeshes.push(new LinkedMesh2(mesh, getValue(map, \"skin\", null), slotIndex, parent, getValue(map, \"timelines\", true)));\r\n return mesh;\r\n }\r\n let uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n if (mesh.region != null)\r\n mesh.updateRegion();\r\n mesh.edges = getValue(map, \"edges\", null);\r\n mesh.hullLength = getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n let path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (!path)\r\n return null;\r\n path.closed = getValue(map, \"closed\", false);\r\n path.constantSpeed = getValue(map, \"constantSpeed\", true);\r\n let vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n let lengths = Utils.newArray(vertexCount / 3, 0);\r\n for (let i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n let point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (!point)\r\n return null;\r\n point.x = getValue(map, \"x\", 0) * scale;\r\n point.y = getValue(map, \"y\", 0) * scale;\r\n point.rotation = getValue(map, \"rotation\", 0);\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (!clip)\r\n return null;\r\n let end = getValue(map, \"end\", null);\r\n if (end)\r\n clip.endSlot = skeletonData.findSlot(end);\r\n let vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n }\r\n readSequence(map) {\r\n if (map == null)\r\n return null;\r\n let sequence = new Sequence(getValue(map, \"count\", 0));\r\n sequence.start = getValue(map, \"start\", 1);\r\n sequence.digits = getValue(map, \"digits\", 0);\r\n sequence.setupIndex = getValue(map, \"setup\", 0);\r\n return sequence;\r\n }\r\n readVertices(map, attachment, verticesLength) {\r\n let scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n let vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n let scaledVertices = Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (let i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n let weights = new Array();\r\n let bones = new Array();\r\n for (let i = 0, n = vertices.length; i < n; ) {\r\n let boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (let nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = Utils.toFloatArray(weights);\r\n }\r\n readAnimation(map, name, skeletonData) {\r\n let scale = this.scale;\r\n let timelines = new Array();\r\n if (map.slots) {\r\n for (let slotName in map.slots) {\r\n let slotMap = map.slots[slotName];\r\n let slot = skeletonData.findSlot(slotName);\r\n if (!slot)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n let slotIndex = slot.index;\r\n for (let timelineName in slotMap) {\r\n let timelineMap = slotMap[timelineName];\r\n if (!timelineMap)\r\n continue;\r\n let frames = timelineMap.length;\r\n if (timelineName == \"attachment\") {\r\n let timeline = new AttachmentTimeline(frames, slotIndex);\r\n for (let frame = 0; frame < frames; frame++) {\r\n let keyMap = timelineMap[frame];\r\n timeline.setFrame(frame, getValue(keyMap, \"time\", 0), getValue(keyMap, \"name\", null));\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"rgba\") {\r\n let timeline = new RGBATimeline(frames, frames << 2, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.color);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.color);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"rgb\") {\r\n let timeline = new RGBTimeline(frames, frames * 3, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.color);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.color);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"alpha\") {\r\n timelines.push(readTimeline12(timelineMap, new AlphaTimeline(frames, frames, slotIndex), 0, 1));\r\n } else if (timelineName == \"rgba2\") {\r\n let timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.light);\r\n let color2 = Color.fromString(keyMap.dark);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.light);\r\n let newColor2 = Color.fromString(nextMap.dark);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n color2 = newColor2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"rgb2\") {\r\n let timeline = new RGB2Timeline(frames, frames * 6, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.light);\r\n let color2 = Color.fromString(keyMap.dark);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.light);\r\n let newColor2 = Color.fromString(nextMap.dark);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n color2 = newColor2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (let boneName in map.bones) {\r\n let boneMap = map.bones[boneName];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n let boneIndex = bone.index;\r\n for (let timelineName in boneMap) {\r\n let timelineMap = boneMap[timelineName];\r\n let frames = timelineMap.length;\r\n if (frames == 0)\r\n continue;\r\n if (timelineName === \"rotate\") {\r\n timelines.push(readTimeline12(timelineMap, new RotateTimeline(frames, frames, boneIndex), 0, 1));\r\n } else if (timelineName === \"translate\") {\r\n let timeline = new TranslateTimeline(frames, frames << 1, boneIndex);\r\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, scale));\r\n } else if (timelineName === \"translatex\") {\r\n let timeline = new TranslateXTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\r\n } else if (timelineName === \"translatey\") {\r\n let timeline = new TranslateYTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\r\n } else if (timelineName === \"scale\") {\r\n let timeline = new ScaleTimeline(frames, frames << 1, boneIndex);\r\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 1, 1));\r\n } else if (timelineName === \"scalex\") {\r\n let timeline = new ScaleXTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\r\n } else if (timelineName === \"scaley\") {\r\n let timeline = new ScaleYTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\r\n } else if (timelineName === \"shear\") {\r\n let timeline = new ShearTimeline(frames, frames << 1, boneIndex);\r\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, 1));\r\n } else if (timelineName === \"shearx\") {\r\n let timeline = new ShearXTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\r\n } else if (timelineName === \"sheary\") {\r\n let timeline = new ShearYTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\r\n }\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (let constraintName in map.ik) {\r\n let constraintMap = map.ik[constraintName];\r\n let keyMap = constraintMap[0];\r\n if (!keyMap)\r\n continue;\r\n let constraint = skeletonData.findIkConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(\"IK Constraint not found: \" + constraintName);\r\n let constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n let timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mix = getValue(keyMap, \"mix\", 1);\r\n let softness = getValue(keyMap, \"softness\", 0) * scale;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\r\n let nextMap = constraintMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let mix2 = getValue(nextMap, \"mix\", 1);\r\n let softness2 = getValue(nextMap, \"softness\", 0) * scale;\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\r\n }\r\n time = time2;\r\n mix = mix2;\r\n softness = softness2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n if (map.transform) {\r\n for (let constraintName in map.transform) {\r\n let timelineMap = map.transform[constraintName];\r\n let keyMap = timelineMap[0];\r\n if (!keyMap)\r\n continue;\r\n let constraint = skeletonData.findTransformConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(\"Transform constraint not found: \" + constraintName);\r\n let constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n let timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\r\n let mixX = getValue(keyMap, \"mixX\", 1);\r\n let mixY = getValue(keyMap, \"mixY\", mixX);\r\n let mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\r\n let mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\r\n let mixShearY = getValue(keyMap, \"mixShearY\", 1);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\r\n let mixX2 = getValue(nextMap, \"mixX\", 1);\r\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\r\n let mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\r\n let mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\r\n let mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n mixScaleX = mixScaleX2;\r\n mixScaleY = mixScaleY2;\r\n mixScaleX = mixScaleX2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n if (map.path) {\r\n for (let constraintName in map.path) {\r\n let constraintMap = map.path[constraintName];\r\n let constraint = skeletonData.findPathConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n let constraintIndex = skeletonData.pathConstraints.indexOf(constraint);\r\n for (let timelineName in constraintMap) {\r\n let timelineMap = constraintMap[timelineName];\r\n let keyMap = timelineMap[0];\r\n if (!keyMap)\r\n continue;\r\n let frames = timelineMap.length;\r\n if (timelineName === \"position\") {\r\n let timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.positionMode == 0 /* Fixed */ ? scale : 1));\r\n } else if (timelineName === \"spacing\") {\r\n let timeline = new PathConstraintSpacingTimeline(frames, frames, constraintIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.spacingMode == 0 /* Length */ || constraint.spacingMode == 1 /* Fixed */ ? scale : 1));\r\n } else if (timelineName === \"mix\") {\r\n let timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\r\n let mixX = getValue(keyMap, \"mixX\", 1);\r\n let mixY = getValue(keyMap, \"mixY\", mixX);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\r\n let mixX2 = getValue(nextMap, \"mixX\", 1);\r\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n if (map.attachments) {\r\n for (let attachmentsName in map.attachments) {\r\n let attachmentsMap = map.attachments[attachmentsName];\r\n let skin = skeletonData.findSkin(attachmentsName);\r\n if (!skin)\r\n throw new Error(\"Skin not found: \" + attachmentsName);\r\n for (let slotMapName in attachmentsMap) {\r\n let slotMap = attachmentsMap[slotMapName];\r\n let slot = skeletonData.findSlot(slotMapName);\r\n if (!slot)\r\n throw new Error(\"Slot not found: \" + slotMapName);\r\n let slotIndex = slot.index;\r\n for (let attachmentMapName in slotMap) {\r\n let attachmentMap = slotMap[attachmentMapName];\r\n let attachment = skin.getAttachment(slotIndex, attachmentMapName);\r\n for (let timelineMapName in attachmentMap) {\r\n let timelineMap = attachmentMap[timelineMapName];\r\n let keyMap = timelineMap[0];\r\n if (!keyMap)\r\n continue;\r\n if (timelineMapName == \"deform\") {\r\n let weighted = attachment.bones;\r\n let vertices = attachment.vertices;\r\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n let timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\r\n let time = getValue(keyMap, \"time\", 0);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n let deform;\r\n let verticesValue = getValue(keyMap, \"vertices\", null);\r\n if (!verticesValue)\r\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = Utils.newFloatArray(deformLength);\r\n let start = getValue(keyMap, \"offset\", 0);\r\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (let i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (let i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frame, time, deform);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let curve = keyMap.curve;\r\n if (curve)\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\r\n time = time2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineMapName == \"sequence\") {\r\n let timeline = new SequenceTimeline(timelineMap.length, slotIndex, attachment);\r\n let lastDelay = 0;\r\n for (let frame = 0; frame < timelineMap.length; frame++) {\r\n let delay = getValue(keyMap, \"delay\", lastDelay);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mode = SequenceMode[getValue(keyMap, \"mode\", \"hold\")];\r\n let index = getValue(keyMap, \"index\", 0);\r\n timeline.setFrame(frame, time, mode, index, delay);\r\n lastDelay = delay;\r\n keyMap = timelineMap[frame + 1];\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (map.drawOrder) {\r\n let timeline = new DrawOrderTimeline(map.drawOrder.length);\r\n let slotCount = skeletonData.slots.length;\r\n let frame = 0;\r\n for (let i = 0; i < map.drawOrder.length; i++, frame++) {\r\n let drawOrderMap = map.drawOrder[i];\r\n let drawOrder = null;\r\n let offsets = getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets) {\r\n drawOrder = Utils.newArray(slotCount, -1);\r\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\r\n let originalIndex = 0, unchangedIndex = 0;\r\n for (let ii = 0; ii < offsets.length; ii++) {\r\n let offsetMap = offsets[ii];\r\n let slot = skeletonData.findSlot(offsetMap.slot);\r\n if (!slot)\r\n throw new Error(\"Slot not found: \" + slot);\r\n let slotIndex = slot.index;\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (let ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n }\r\n if (map.events) {\r\n let timeline = new EventTimeline(map.events.length);\r\n let frame = 0;\r\n for (let i = 0; i < map.events.length; i++, frame++) {\r\n let eventMap = map.events[i];\r\n let eventData = skeletonData.findEvent(eventMap.name);\r\n if (!eventData)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n let event = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\r\n event.intValue = getValue(eventMap, \"int\", eventData.intValue);\r\n event.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\r\n event.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event.data.audioPath) {\r\n event.volume = getValue(eventMap, \"volume\", 1);\r\n event.balance = getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frame, event);\r\n }\r\n timelines.push(timeline);\r\n }\r\n let duration = 0;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n duration = Math.max(duration, timelines[i].getDuration());\r\n skeletonData.animations.push(new Animation(name, timelines, duration));\r\n }\r\n };\r\n var LinkedMesh2 = class {\r\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritTimeline = inheritDeform;\r\n }\r\n };\r\n function readTimeline12(keys, timeline, defaultValue, scale) {\r\n let keyMap = keys[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let value = getValue(keyMap, \"value\", defaultValue) * scale;\r\n let bezier = 0;\r\n for (let frame = 0; ; frame++) {\r\n timeline.setFrame(frame, time, value);\r\n let nextMap = keys[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n return timeline;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let value2 = getValue(nextMap, \"value\", defaultValue) * scale;\r\n if (keyMap.curve)\r\n bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\r\n time = time2;\r\n value = value2;\r\n keyMap = nextMap;\r\n }\r\n }\r\n function readTimeline22(keys, timeline, name1, name2, defaultValue, scale) {\r\n let keyMap = keys[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let value1 = getValue(keyMap, name1, defaultValue) * scale;\r\n let value2 = getValue(keyMap, name2, defaultValue) * scale;\r\n let bezier = 0;\r\n for (let frame = 0; ; frame++) {\r\n timeline.setFrame(frame, time, value1, value2);\r\n let nextMap = keys[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n return timeline;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\r\n let nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\r\n }\r\n time = time2;\r\n value1 = nvalue1;\r\n value2 = nvalue2;\r\n keyMap = nextMap;\r\n }\r\n }\r\n function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\r\n if (curve == \"stepped\") {\r\n timeline.setStepped(frame);\r\n return bezier;\r\n }\r\n let i = value << 2;\r\n let cx1 = curve[i];\r\n let cy1 = curve[i + 1] * scale;\r\n let cx2 = curve[i + 2];\r\n let cy2 = curve[i + 3] * scale;\r\n timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\r\n return bezier + 1;\r\n }\r\n function getValue(map, property, defaultValue) {\r\n return map[property] !== void 0 ? map[property] : defaultValue;\r\n }\r\n\r\n // spine-core/src/polyfills.ts\r\n (() => {\r\n if (typeof Math.fround === \"undefined\") {\r\n Math.fround = function(array) {\r\n return function(x) {\r\n return array[0] = x, array[0];\r\n };\r\n }(new Float32Array(1));\r\n }\r\n })();\r\n\r\n // spine-canvas/src/CanvasTexture.ts\r\n var CanvasTexture = class extends Texture {\r\n constructor(image) {\r\n super(image);\r\n }\r\n setFilters(minFilter, magFilter) {\r\n }\r\n setWraps(uWrap, vWrap) {\r\n }\r\n dispose() {\r\n }\r\n };\r\n\r\n // spine-canvas/src/AssetManager.ts\r\n var AssetManager = class extends AssetManagerBase {\r\n constructor(pathPrefix = \"\", downloader = new Downloader()) {\r\n super((image) => {\r\n return new CanvasTexture(image);\r\n }, pathPrefix, downloader);\r\n }\r\n };\r\n\r\n // spine-canvas/src/SkeletonRenderer.ts\r\n var worldVertices = Utils.newFloatArray(8);\r\n var _SkeletonRenderer = class {\r\n constructor(context) {\r\n this.triangleRendering = false;\r\n this.debugRendering = false;\r\n this.vertices = Utils.newFloatArray(8 * 1024);\r\n this.tempColor = new Color();\r\n this.ctx = context;\r\n }\r\n draw(skeleton) {\r\n if (this.triangleRendering)\r\n this.drawTriangles(skeleton);\r\n else\r\n this.drawImages(skeleton);\r\n }\r\n drawImages(skeleton) {\r\n let ctx = this.ctx;\r\n let color = this.tempColor;\r\n let skeletonColor = skeleton.color;\r\n let drawOrder = skeleton.drawOrder;\r\n if (this.debugRendering)\r\n ctx.strokeStyle = \"green\";\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = drawOrder[i];\r\n let bone = slot.bone;\r\n if (!bone.active)\r\n continue;\r\n let attachment = slot.getAttachment();\r\n if (!(attachment instanceof RegionAttachment))\r\n continue;\r\n attachment.computeWorldVertices(slot, worldVertices, 0, 2);\r\n let region = attachment.region;\r\n let image = region.page.texture.getImage();\r\n let slotColor = slot.color;\r\n let regionColor = attachment.color;\r\n color.set(\r\n skeletonColor.r * slotColor.r * regionColor.r,\r\n skeletonColor.g * slotColor.g * regionColor.g,\r\n skeletonColor.b * slotColor.b * regionColor.b,\r\n skeletonColor.a * slotColor.a * regionColor.a\r\n );\r\n ctx.save();\r\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n ctx.translate(attachment.offset[0], attachment.offset[1]);\r\n ctx.rotate(attachment.rotation * Math.PI / 180);\r\n let atlasScale = attachment.width / region.originalWidth;\r\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n let w = region.width, h = region.height;\r\n ctx.translate(w / 2, h / 2);\r\n if (attachment.region.degrees == 90) {\r\n let t = w;\r\n w = h;\r\n h = t;\r\n ctx.rotate(-Math.PI / 2);\r\n }\r\n ctx.scale(1, -1);\r\n ctx.translate(-w / 2, -h / 2);\r\n ctx.globalAlpha = color.a;\r\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n if (this.debugRendering)\r\n ctx.strokeRect(0, 0, w, h);\r\n ctx.restore();\r\n }\r\n }\r\n drawTriangles(skeleton) {\r\n let ctx = this.ctx;\r\n let color = this.tempColor;\r\n let skeletonColor = skeleton.color;\r\n let drawOrder = skeleton.drawOrder;\r\n let blendMode = null;\r\n let vertices = this.vertices;\r\n let triangles = null;\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = drawOrder[i];\r\n let attachment = slot.getAttachment();\r\n let texture;\r\n let region;\r\n if (attachment instanceof RegionAttachment) {\r\n let regionAttachment = attachment;\r\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n triangles = _SkeletonRenderer.QUAD_TRIANGLES;\r\n region = regionAttachment.region;\r\n texture = region.page.texture.getImage();\r\n } else if (attachment instanceof MeshAttachment) {\r\n let mesh = attachment;\r\n vertices = this.computeMeshVertices(slot, mesh, false);\r\n triangles = mesh.triangles;\r\n let region2 = mesh.region.renderObject;\r\n texture = region2.page.texture.getImage();\r\n } else\r\n continue;\r\n if (texture) {\r\n if (slot.data.blendMode != blendMode)\r\n blendMode = slot.data.blendMode;\r\n let slotColor = slot.color;\r\n let attachmentColor = attachment.color;\r\n color.set(\r\n skeletonColor.r * slotColor.r * attachmentColor.r,\r\n skeletonColor.g * slotColor.g * attachmentColor.g,\r\n skeletonColor.b * slotColor.b * attachmentColor.b,\r\n skeletonColor.a * slotColor.a * attachmentColor.a\r\n );\r\n ctx.globalAlpha = color.a;\r\n for (var j = 0; j < triangles.length; j += 3) {\r\n let t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n let x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n let x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n let x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n if (this.debugRendering) {\r\n ctx.strokeStyle = \"green\";\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x0, y0);\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n }\r\n this.ctx.globalAlpha = 1;\r\n }\r\n drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n let ctx = this.ctx;\r\n u0 *= img.width;\r\n v0 *= img.height;\r\n u1 *= img.width;\r\n v1 *= img.height;\r\n u2 *= img.width;\r\n v2 *= img.height;\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.closePath();\r\n x1 -= x0;\r\n y1 -= y0;\r\n x2 -= x0;\r\n y2 -= y0;\r\n u1 -= u0;\r\n v1 -= v0;\r\n u2 -= u0;\r\n v2 -= v0;\r\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n ctx.save();\r\n ctx.transform(a, b, c, d, e, f);\r\n ctx.clip();\r\n ctx.drawImage(img, 0, 0);\r\n ctx.restore();\r\n }\r\n computeRegionVertices(slot, region, pma) {\r\n let skeletonColor = slot.bone.skeleton.color;\r\n let slotColor = slot.color;\r\n let regionColor = region.color;\r\n let alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n let multiplier = pma ? alpha : 1;\r\n let color = this.tempColor;\r\n color.set(\r\n skeletonColor.r * slotColor.r * regionColor.r * multiplier,\r\n skeletonColor.g * slotColor.g * regionColor.g * multiplier,\r\n skeletonColor.b * slotColor.b * regionColor.b * multiplier,\r\n alpha\r\n );\r\n region.computeWorldVertices(slot, this.vertices, 0, _SkeletonRenderer.VERTEX_SIZE);\r\n let vertices = this.vertices;\r\n let uvs = region.uvs;\r\n vertices[RegionAttachment.C1R] = color.r;\r\n vertices[RegionAttachment.C1G] = color.g;\r\n vertices[RegionAttachment.C1B] = color.b;\r\n vertices[RegionAttachment.C1A] = color.a;\r\n vertices[RegionAttachment.U1] = uvs[0];\r\n vertices[RegionAttachment.V1] = uvs[1];\r\n vertices[RegionAttachment.C2R] = color.r;\r\n vertices[RegionAttachment.C2G] = color.g;\r\n vertices[RegionAttachment.C2B] = color.b;\r\n vertices[RegionAttachment.C2A] = color.a;\r\n vertices[RegionAttachment.U2] = uvs[2];\r\n vertices[RegionAttachment.V2] = uvs[3];\r\n vertices[RegionAttachment.C3R] = color.r;\r\n vertices[RegionAttachment.C3G] = color.g;\r\n vertices[RegionAttachment.C3B] = color.b;\r\n vertices[RegionAttachment.C3A] = color.a;\r\n vertices[RegionAttachment.U3] = uvs[4];\r\n vertices[RegionAttachment.V3] = uvs[5];\r\n vertices[RegionAttachment.C4R] = color.r;\r\n vertices[RegionAttachment.C4G] = color.g;\r\n vertices[RegionAttachment.C4B] = color.b;\r\n vertices[RegionAttachment.C4A] = color.a;\r\n vertices[RegionAttachment.U4] = uvs[6];\r\n vertices[RegionAttachment.V4] = uvs[7];\r\n return vertices;\r\n }\r\n computeMeshVertices(slot, mesh, pma) {\r\n let skeletonColor = slot.bone.skeleton.color;\r\n let slotColor = slot.color;\r\n let regionColor = mesh.color;\r\n let alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n let multiplier = pma ? alpha : 1;\r\n let color = this.tempColor;\r\n color.set(\r\n skeletonColor.r * slotColor.r * regionColor.r * multiplier,\r\n skeletonColor.g * slotColor.g * regionColor.g * multiplier,\r\n skeletonColor.b * slotColor.b * regionColor.b * multiplier,\r\n alpha\r\n );\r\n let vertexCount = mesh.worldVerticesLength / 2;\r\n let vertices = this.vertices;\r\n if (vertices.length < mesh.worldVerticesLength)\r\n this.vertices = vertices = Utils.newFloatArray(mesh.worldVerticesLength);\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, _SkeletonRenderer.VERTEX_SIZE);\r\n let uvs = mesh.uvs;\r\n for (let i = 0, u = 0, v = 2; i < vertexCount; i++) {\r\n vertices[v++] = color.r;\r\n vertices[v++] = color.g;\r\n vertices[v++] = color.b;\r\n vertices[v++] = color.a;\r\n vertices[v++] = uvs[u++];\r\n vertices[v++] = uvs[u++];\r\n v += 2;\r\n }\r\n return vertices;\r\n }\r\n };\r\n var SkeletonRenderer = _SkeletonRenderer;\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n return __toCommonJS(src_exports);\r\n})();\r\n//# sourceMappingURL=spine-canvas.js.map\r\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n","\"use strict\";\r\nvar spine = (() => {\r\n var __defProp = Object.defineProperty;\r\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\r\n var __getOwnPropNames = Object.getOwnPropertyNames;\r\n var __hasOwnProp = Object.prototype.hasOwnProperty;\r\n var __export = (target, all) => {\r\n for (var name in all)\r\n __defProp(target, name, { get: all[name], enumerable: true });\r\n };\r\n var __copyProps = (to, from, except, desc) => {\r\n if (from && typeof from === \"object\" || typeof from === \"function\") {\r\n for (let key of __getOwnPropNames(from))\r\n if (!__hasOwnProp.call(to, key) && key !== except)\r\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\r\n }\r\n return to;\r\n };\r\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\r\n\r\n // spine-webgl/src/index.ts\r\n var src_exports = {};\r\n __export(src_exports, {\r\n AlphaTimeline: () => AlphaTimeline,\r\n Animation: () => Animation,\r\n AnimationState: () => AnimationState,\r\n AnimationStateAdapter: () => AnimationStateAdapter,\r\n AnimationStateData: () => AnimationStateData,\r\n AssetManager: () => AssetManager,\r\n AssetManagerBase: () => AssetManagerBase,\r\n AtlasAttachmentLoader: () => AtlasAttachmentLoader,\r\n Attachment: () => Attachment,\r\n AttachmentTimeline: () => AttachmentTimeline,\r\n BinaryInput: () => BinaryInput,\r\n BlendMode: () => BlendMode,\r\n Bone: () => Bone,\r\n BoneData: () => BoneData,\r\n BoundingBoxAttachment: () => BoundingBoxAttachment,\r\n CURRENT: () => CURRENT,\r\n CameraController: () => CameraController,\r\n ClippingAttachment: () => ClippingAttachment,\r\n Color: () => Color,\r\n Color2Attribute: () => Color2Attribute,\r\n ColorAttribute: () => ColorAttribute,\r\n ConstraintData: () => ConstraintData,\r\n CurveTimeline: () => CurveTimeline,\r\n CurveTimeline1: () => CurveTimeline1,\r\n CurveTimeline2: () => CurveTimeline2,\r\n DebugUtils: () => DebugUtils,\r\n DeformTimeline: () => DeformTimeline,\r\n Downloader: () => Downloader,\r\n DrawOrderTimeline: () => DrawOrderTimeline,\r\n Event: () => Event,\r\n EventData: () => EventData,\r\n EventQueue: () => EventQueue,\r\n EventTimeline: () => EventTimeline,\r\n EventType: () => EventType,\r\n FIRST: () => FIRST,\r\n FakeTexture: () => FakeTexture,\r\n GLTexture: () => GLTexture,\r\n HOLD_FIRST: () => HOLD_FIRST,\r\n HOLD_MIX: () => HOLD_MIX,\r\n HOLD_SUBSEQUENT: () => HOLD_SUBSEQUENT,\r\n IkConstraint: () => IkConstraint,\r\n IkConstraintData: () => IkConstraintData,\r\n IkConstraintTimeline: () => IkConstraintTimeline,\r\n Input: () => Input,\r\n IntSet: () => IntSet,\r\n Interpolation: () => Interpolation,\r\n LoadingScreen: () => LoadingScreen,\r\n M00: () => M00,\r\n M01: () => M01,\r\n M02: () => M02,\r\n M03: () => M03,\r\n M10: () => M10,\r\n M11: () => M11,\r\n M12: () => M12,\r\n M13: () => M13,\r\n M20: () => M20,\r\n M21: () => M21,\r\n M22: () => M22,\r\n M23: () => M23,\r\n M30: () => M30,\r\n M31: () => M31,\r\n M32: () => M32,\r\n M33: () => M33,\r\n ManagedWebGLRenderingContext: () => ManagedWebGLRenderingContext,\r\n MathUtils: () => MathUtils,\r\n Matrix4: () => Matrix42,\r\n Mesh: () => Mesh,\r\n MeshAttachment: () => MeshAttachment,\r\n MixBlend: () => MixBlend,\r\n MixDirection: () => MixDirection,\r\n OrthoCamera: () => OrthoCamera,\r\n PathAttachment: () => PathAttachment,\r\n PathConstraint: () => PathConstraint,\r\n PathConstraintData: () => PathConstraintData,\r\n PathConstraintMixTimeline: () => PathConstraintMixTimeline,\r\n PathConstraintPositionTimeline: () => PathConstraintPositionTimeline,\r\n PathConstraintSpacingTimeline: () => PathConstraintSpacingTimeline,\r\n PointAttachment: () => PointAttachment,\r\n PolygonBatcher: () => PolygonBatcher,\r\n Pool: () => Pool,\r\n Position2Attribute: () => Position2Attribute,\r\n Position3Attribute: () => Position3Attribute,\r\n PositionMode: () => PositionMode,\r\n Pow: () => Pow,\r\n PowOut: () => PowOut,\r\n RGB2Timeline: () => RGB2Timeline,\r\n RGBA2Timeline: () => RGBA2Timeline,\r\n RGBATimeline: () => RGBATimeline,\r\n RGBTimeline: () => RGBTimeline,\r\n RegionAttachment: () => RegionAttachment,\r\n ResizeMode: () => ResizeMode,\r\n RotateMode: () => RotateMode,\r\n RotateTimeline: () => RotateTimeline,\r\n SETUP: () => SETUP,\r\n SUBSEQUENT: () => SUBSEQUENT,\r\n ScaleTimeline: () => ScaleTimeline,\r\n ScaleXTimeline: () => ScaleXTimeline,\r\n ScaleYTimeline: () => ScaleYTimeline,\r\n SceneRenderer: () => SceneRenderer,\r\n SequenceTimeline: () => SequenceTimeline,\r\n Shader: () => Shader,\r\n ShapeRenderer: () => ShapeRenderer,\r\n ShapeType: () => ShapeType,\r\n ShearTimeline: () => ShearTimeline,\r\n ShearXTimeline: () => ShearXTimeline,\r\n ShearYTimeline: () => ShearYTimeline,\r\n Skeleton: () => Skeleton,\r\n SkeletonBinary: () => SkeletonBinary,\r\n SkeletonBounds: () => SkeletonBounds,\r\n SkeletonClipping: () => SkeletonClipping,\r\n SkeletonData: () => SkeletonData,\r\n SkeletonDebugRenderer: () => SkeletonDebugRenderer,\r\n SkeletonJson: () => SkeletonJson,\r\n SkeletonRenderer: () => SkeletonRenderer,\r\n Skin: () => Skin,\r\n SkinEntry: () => SkinEntry,\r\n Slot: () => Slot,\r\n SlotData: () => SlotData,\r\n SpacingMode: () => SpacingMode,\r\n SpineCanvas: () => SpineCanvas,\r\n StringSet: () => StringSet,\r\n TexCoordAttribute: () => TexCoordAttribute,\r\n Texture: () => Texture,\r\n TextureAtlas: () => TextureAtlas,\r\n TextureAtlasPage: () => TextureAtlasPage,\r\n TextureAtlasRegion: () => TextureAtlasRegion,\r\n TextureFilter: () => TextureFilter,\r\n TextureRegion: () => TextureRegion,\r\n TextureWrap: () => TextureWrap,\r\n TimeKeeper: () => TimeKeeper,\r\n Timeline: () => Timeline,\r\n Touch: () => Touch,\r\n TrackEntry: () => TrackEntry,\r\n TransformConstraint: () => TransformConstraint,\r\n TransformConstraintData: () => TransformConstraintData,\r\n TransformConstraintTimeline: () => TransformConstraintTimeline,\r\n TransformMode: () => TransformMode,\r\n TranslateTimeline: () => TranslateTimeline,\r\n TranslateXTimeline: () => TranslateXTimeline,\r\n TranslateYTimeline: () => TranslateYTimeline,\r\n Triangulator: () => Triangulator,\r\n Utils: () => Utils,\r\n Vector2: () => Vector2,\r\n Vector3: () => Vector3,\r\n VertexAttachment: () => VertexAttachment,\r\n VertexAttribute: () => VertexAttribute,\r\n VertexAttributeType: () => VertexAttributeType,\r\n WebGLBlendModeConverter: () => WebGLBlendModeConverter,\r\n WindowedMean: () => WindowedMean\r\n });\r\n\r\n // spine-core/src/Utils.ts\r\n var IntSet = class {\r\n constructor() {\r\n this.array = new Array();\r\n }\r\n add(value) {\r\n let contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n }\r\n contains(value) {\r\n return this.array[value | 0] != void 0;\r\n }\r\n remove(value) {\r\n this.array[value | 0] = void 0;\r\n }\r\n clear() {\r\n this.array.length = 0;\r\n }\r\n };\r\n var StringSet = class {\r\n constructor() {\r\n this.entries = {};\r\n this.size = 0;\r\n }\r\n add(value) {\r\n let contains = this.entries[value];\r\n this.entries[value] = true;\r\n if (!contains) {\r\n this.size++;\r\n return true;\r\n }\r\n return false;\r\n }\r\n addAll(values) {\r\n let oldSize = this.size;\r\n for (var i = 0, n = values.length; i < n; i++)\r\n this.add(values[i]);\r\n return oldSize != this.size;\r\n }\r\n contains(value) {\r\n return this.entries[value];\r\n }\r\n clear() {\r\n this.entries = {};\r\n this.size = 0;\r\n }\r\n };\r\n var _Color = class {\r\n constructor(r = 0, g = 0, b = 0, a = 0) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n set(r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n return this.clamp();\r\n }\r\n setFromColor(c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n }\r\n setFromString(hex) {\r\n hex = hex.charAt(0) == \"#\" ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255;\r\n this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\r\n return this;\r\n }\r\n add(r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n return this.clamp();\r\n }\r\n clamp() {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n }\r\n static rgba8888ToColor(color, value) {\r\n color.r = ((value & 4278190080) >>> 24) / 255;\r\n color.g = ((value & 16711680) >>> 16) / 255;\r\n color.b = ((value & 65280) >>> 8) / 255;\r\n color.a = (value & 255) / 255;\r\n }\r\n static rgb888ToColor(color, value) {\r\n color.r = ((value & 16711680) >>> 16) / 255;\r\n color.g = ((value & 65280) >>> 8) / 255;\r\n color.b = (value & 255) / 255;\r\n }\r\n static fromString(hex) {\r\n return new _Color().setFromString(hex);\r\n }\r\n };\r\n var Color = _Color;\r\n Color.WHITE = new _Color(1, 1, 1, 1);\r\n Color.RED = new _Color(1, 0, 0, 1);\r\n Color.GREEN = new _Color(0, 1, 0, 1);\r\n Color.BLUE = new _Color(0, 0, 1, 1);\r\n Color.MAGENTA = new _Color(1, 0, 1, 1);\r\n var _MathUtils = class {\r\n static clamp(value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n }\r\n static cosDeg(degrees) {\r\n return Math.cos(degrees * _MathUtils.degRad);\r\n }\r\n static sinDeg(degrees) {\r\n return Math.sin(degrees * _MathUtils.degRad);\r\n }\r\n static signum(value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n }\r\n static toInt(x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n }\r\n static cbrt(x) {\r\n let y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n }\r\n static randomTriangular(min, max) {\r\n return _MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n }\r\n static randomTriangularWith(min, max, mode) {\r\n let u = Math.random();\r\n let d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n }\r\n static isPowerOfTwo(value) {\r\n return value && (value & value - 1) === 0;\r\n }\r\n };\r\n var MathUtils = _MathUtils;\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = _MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / _MathUtils.PI;\r\n MathUtils.radDeg = _MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = _MathUtils.PI / 180;\r\n MathUtils.degRad = _MathUtils.degreesToRadians;\r\n var Interpolation = class {\r\n apply(start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n }\r\n };\r\n var Pow = class extends Interpolation {\r\n constructor(power) {\r\n super();\r\n this.power = 2;\r\n this.power = power;\r\n }\r\n applyInternal(a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n }\r\n };\r\n var PowOut = class extends Pow {\r\n constructor(power) {\r\n super(power);\r\n }\r\n applyInternal(a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n }\r\n };\r\n var _Utils = class {\r\n static arrayCopy(source, sourceStart, dest, destStart, numElements) {\r\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n }\r\n static arrayFill(array, fromIndex, toIndex, value) {\r\n for (let i = fromIndex; i < toIndex; i++)\r\n array[i] = value;\r\n }\r\n static setArraySize(array, size, value = 0) {\r\n let oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (let i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n }\r\n static ensureArrayCapacity(array, size, value = 0) {\r\n if (array.length >= size)\r\n return array;\r\n return _Utils.setArraySize(array, size, value);\r\n }\r\n static newArray(size, defaultValue) {\r\n let array = new Array(size);\r\n for (let i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n }\r\n static newFloatArray(size) {\r\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\r\n return new Float32Array(size);\r\n else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n }\r\n static newShortArray(size) {\r\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\r\n return new Int16Array(size);\r\n else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n }\r\n static toFloatArray(array) {\r\n return _Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n }\r\n static toSinglePrecision(value) {\r\n return _Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n }\r\n static webkit602BugfixHelper(alpha, blend) {\r\n }\r\n static contains(array, element, identity = true) {\r\n for (var i = 0; i < array.length; i++)\r\n if (array[i] == element)\r\n return true;\r\n return false;\r\n }\r\n static enumValue(type, name) {\r\n return type[name[0].toUpperCase() + name.slice(1)];\r\n }\r\n };\r\n var Utils = _Utils;\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== \"undefined\";\r\n var DebugUtils = class {\r\n static logBones(skeleton) {\r\n for (let i = 0; i < skeleton.bones.length; i++) {\r\n let bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n }\r\n };\r\n var Pool = class {\r\n constructor(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n obtain() {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n }\r\n free(item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n }\r\n freeAll(items) {\r\n for (let i = 0; i < items.length; i++)\r\n this.free(items[i]);\r\n }\r\n clear() {\r\n this.items.length = 0;\r\n }\r\n };\r\n var Vector2 = class {\r\n constructor(x = 0, y = 0) {\r\n this.x = x;\r\n this.y = y;\r\n }\r\n set(x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n }\r\n length() {\r\n let x = this.x;\r\n let y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n }\r\n normalize() {\r\n let len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n }\r\n };\r\n var TimeKeeper = class {\r\n constructor() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1e3;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n update() {\r\n let now = Date.now() / 1e3;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n }\r\n };\r\n var WindowedMean = class {\r\n constructor(windowSize = 32) {\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n hasEnoughData() {\r\n return this.addedValues >= this.values.length;\r\n }\r\n addValue(value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n }\r\n getMean() {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n let mean = 0;\r\n for (let i = 0; i < this.values.length; i++)\r\n mean += this.values[i];\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n return 0;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/Attachment.ts\r\n var Attachment = class {\r\n constructor(name) {\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n };\r\n var _VertexAttachment = class extends Attachment {\r\n constructor(name) {\r\n super(name);\r\n this.id = _VertexAttachment.nextID++;\r\n this.bones = null;\r\n this.vertices = [];\r\n this.worldVerticesLength = 0;\r\n this.timelineAttachment = this;\r\n }\r\n computeWorldVertices(slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n let skeleton = slot.bone.skeleton;\r\n let deformArray = slot.deform;\r\n let vertices = this.vertices;\r\n let bones = this.bones;\r\n if (!bones) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n let bone = slot.bone;\r\n let x = bone.worldX;\r\n let y = bone.worldY;\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (let v2 = start, w = offset; w < count; v2 += 2, w += stride) {\r\n let vx = vertices[v2], vy = vertices[v2 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n let v = 0, skip = 0;\r\n for (let i = 0; i < start; i += 2) {\r\n let n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n let skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (let w = offset, b = skip * 3; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n let bone = skeletonBones[bones[v]];\r\n let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n } else {\r\n let deform = deformArray;\r\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n let bone = skeletonBones[bones[v]];\r\n let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n }\r\n copyTo(attachment) {\r\n if (this.bones) {\r\n attachment.bones = new Array(this.bones.length);\r\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n } else\r\n attachment.bones = null;\r\n if (this.vertices) {\r\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\r\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.timelineAttachment = this.timelineAttachment;\r\n }\r\n };\r\n var VertexAttachment = _VertexAttachment;\r\n VertexAttachment.nextID = 0;\r\n\r\n // spine-core/src/attachments/Sequence.ts\r\n var _Sequence = class {\r\n constructor(count) {\r\n this.id = _Sequence.nextID();\r\n this.start = 0;\r\n this.digits = 0;\r\n this.setupIndex = 0;\r\n this.regions = new Array(count);\r\n }\r\n copy() {\r\n let copy = new _Sequence(this.regions.length);\r\n Utils.arrayCopy(this.regions, 0, copy.regions, 0, this.regions.length);\r\n copy.start = this.start;\r\n copy.digits = this.digits;\r\n copy.setupIndex = this.setupIndex;\r\n return copy;\r\n }\r\n apply(slot, attachment) {\r\n let index = slot.sequenceIndex;\r\n if (index == -1)\r\n index = this.setupIndex;\r\n if (index >= this.regions.length)\r\n index = this.regions.length - 1;\r\n let region = this.regions[index];\r\n if (attachment.region != region) {\r\n attachment.region = region;\r\n attachment.updateRegion();\r\n }\r\n }\r\n getPath(basePath, index) {\r\n let result = basePath;\r\n let frame = (this.start + index).toString();\r\n for (let i = this.digits - frame.length; i > 0; i--)\r\n result += \"0\";\r\n result += frame;\r\n return result;\r\n }\r\n static nextID() {\r\n return _Sequence._nextID++;\r\n }\r\n };\r\n var Sequence = _Sequence;\r\n Sequence._nextID = 0;\r\n var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {\r\n SequenceMode2[SequenceMode2[\"hold\"] = 0] = \"hold\";\r\n SequenceMode2[SequenceMode2[\"once\"] = 1] = \"once\";\r\n SequenceMode2[SequenceMode2[\"loop\"] = 2] = \"loop\";\r\n SequenceMode2[SequenceMode2[\"pingpong\"] = 3] = \"pingpong\";\r\n SequenceMode2[SequenceMode2[\"onceReverse\"] = 4] = \"onceReverse\";\r\n SequenceMode2[SequenceMode2[\"loopReverse\"] = 5] = \"loopReverse\";\r\n SequenceMode2[SequenceMode2[\"pingpongReverse\"] = 6] = \"pingpongReverse\";\r\n return SequenceMode2;\r\n })(SequenceMode || {});\r\n var SequenceModeValues = [\r\n 0 /* hold */,\r\n 1 /* once */,\r\n 2 /* loop */,\r\n 3 /* pingpong */,\r\n 4 /* onceReverse */,\r\n 5 /* loopReverse */,\r\n 6 /* pingpongReverse */\r\n ];\r\n\r\n // spine-core/src/Animation.ts\r\n var Animation = class {\r\n constructor(name, timelines, duration) {\r\n this.timelines = [];\r\n this.timelineIds = new StringSet();\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n this.setTimelines(timelines);\r\n this.duration = duration;\r\n }\r\n setTimelines(timelines) {\r\n if (!timelines)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.timelines = timelines;\r\n this.timelineIds.clear();\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds.addAll(timelines[i].getPropertyIds());\r\n }\r\n hasTimeline(ids) {\r\n for (let i = 0; i < ids.length; i++)\r\n if (this.timelineIds.contains(ids[i]))\r\n return true;\r\n return false;\r\n }\r\n apply(skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n let timelines = this.timelines;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n }\r\n };\r\n var MixBlend = /* @__PURE__ */ ((MixBlend2) => {\r\n MixBlend2[MixBlend2[\"setup\"] = 0] = \"setup\";\r\n MixBlend2[MixBlend2[\"first\"] = 1] = \"first\";\r\n MixBlend2[MixBlend2[\"replace\"] = 2] = \"replace\";\r\n MixBlend2[MixBlend2[\"add\"] = 3] = \"add\";\r\n return MixBlend2;\r\n })(MixBlend || {});\r\n var MixDirection = /* @__PURE__ */ ((MixDirection2) => {\r\n MixDirection2[MixDirection2[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection2[MixDirection2[\"mixOut\"] = 1] = \"mixOut\";\r\n return MixDirection2;\r\n })(MixDirection || {});\r\n var Property = {\r\n rotate: 0,\r\n x: 1,\r\n y: 2,\r\n scaleX: 3,\r\n scaleY: 4,\r\n shearX: 5,\r\n shearY: 6,\r\n rgb: 7,\r\n alpha: 8,\r\n rgb2: 9,\r\n attachment: 10,\r\n deform: 11,\r\n event: 12,\r\n drawOrder: 13,\r\n ikConstraint: 14,\r\n transformConstraint: 15,\r\n pathConstraintPosition: 16,\r\n pathConstraintSpacing: 17,\r\n pathConstraintMix: 18,\r\n sequence: 19\r\n };\r\n var Timeline = class {\r\n constructor(frameCount, propertyIds) {\r\n this.propertyIds = propertyIds;\r\n this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\r\n }\r\n getPropertyIds() {\r\n return this.propertyIds;\r\n }\r\n getFrameEntries() {\r\n return 1;\r\n }\r\n getFrameCount() {\r\n return this.frames.length / this.getFrameEntries();\r\n }\r\n getDuration() {\r\n return this.frames[this.frames.length - this.getFrameEntries()];\r\n }\r\n static search1(frames, time) {\r\n let n = frames.length;\r\n for (let i = 1; i < n; i++)\r\n if (frames[i] > time)\r\n return i - 1;\r\n return n - 1;\r\n }\r\n static search(frames, time, step) {\r\n let n = frames.length;\r\n for (let i = step; i < n; i += step)\r\n if (frames[i] > time)\r\n return i - step;\r\n return n - step;\r\n }\r\n };\r\n var CurveTimeline = class extends Timeline {\r\n constructor(frameCount, bezierCount, propertyIds) {\r\n super(frameCount, propertyIds);\r\n this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);\r\n this.curves[frameCount - 1] = 1;\r\n }\r\n setLinear(frame) {\r\n this.curves[frame] = 0;\r\n }\r\n setStepped(frame) {\r\n this.curves[frame] = 1;\r\n }\r\n shrink(bezierCount) {\r\n let size = this.getFrameCount() + bezierCount * 18;\r\n if (this.curves.length > size) {\r\n let newCurves = Utils.newFloatArray(size);\r\n Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\r\n this.curves = newCurves;\r\n }\r\n }\r\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\r\n let curves = this.curves;\r\n let i = this.getFrameCount() + bezier * 18;\r\n if (value == 0)\r\n curves[frame] = 2 + i;\r\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\r\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 6e-3;\r\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\r\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\r\n let x = time1 + dx, y = value1 + dy;\r\n for (let n = i + 18; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dx += ddx;\r\n dy += ddy;\r\n ddx += dddx;\r\n ddy += dddy;\r\n x += dx;\r\n y += dy;\r\n }\r\n }\r\n getBezierValue(time, frameIndex, valueOffset, i) {\r\n let curves = this.curves;\r\n if (curves[i] > time) {\r\n let x2 = this.frames[frameIndex], y2 = this.frames[frameIndex + valueOffset];\r\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\r\n }\r\n let n = i + 18;\r\n for (i += 2; i < n; i += 2) {\r\n if (curves[i] >= time) {\r\n let x2 = curves[i - 2], y2 = curves[i - 1];\r\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\r\n }\r\n }\r\n frameIndex += this.getFrameEntries();\r\n let x = curves[n - 2], y = curves[n - 1];\r\n return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\r\n }\r\n };\r\n var CurveTimeline1 = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, propertyId) {\r\n super(frameCount, bezierCount, [propertyId]);\r\n }\r\n getFrameEntries() {\r\n return 2;\r\n }\r\n setFrame(frame, time, value) {\r\n frame <<= 1;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = value;\r\n }\r\n getCurveValue(time) {\r\n let frames = this.frames;\r\n let i = frames.length - 2;\r\n for (let ii = 2; ii <= i; ii += 2) {\r\n if (frames[ii] > time) {\r\n i = ii - 2;\r\n break;\r\n }\r\n }\r\n let curveType = this.curves[i >> 1];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i], value = frames[i + 1];\r\n return value + (time - before) / (frames[i + 2] - before) * (frames[i + 2 + 1] - value);\r\n case 1:\r\n return frames[i + 1];\r\n }\r\n return this.getBezierValue(time, i, 1, curveType - 2);\r\n }\r\n };\r\n var CurveTimeline2 = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, propertyId1, propertyId2) {\r\n super(frameCount, bezierCount, [propertyId1, propertyId2]);\r\n }\r\n getFrameEntries() {\r\n return 3;\r\n }\r\n setFrame(frame, time, value1, value2) {\r\n frame *= 3;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = value1;\r\n this.frames[frame + 2] = value2;\r\n }\r\n };\r\n var RotateTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.rotate + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case 1 /* first */:\r\n bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\r\n }\r\n return;\r\n }\r\n let r = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.rotation = bone.data.rotation + r * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n r += bone.data.rotation - bone.rotation;\r\n case 3 /* add */:\r\n bone.rotation += r * alpha;\r\n }\r\n }\r\n };\r\n var TranslateTimeline = class extends CurveTimeline2 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(\r\n frameCount,\r\n bezierCount,\r\n Property.x + \"|\" + boneIndex,\r\n Property.y + \"|\" + boneIndex\r\n );\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case 1 /* first */:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n let x = 0, y = 0;\r\n let i = Timeline.search(frames, time, 3);\r\n let curveType = this.curves[i / 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n let t = (time - before) / (frames[i + 3] - before);\r\n x += (frames[i + 3 + 1] - x) * t;\r\n y += (frames[i + 3 + 2] - y) * t;\r\n break;\r\n case 1:\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n break;\r\n default:\r\n x = this.getBezierValue(time, i, 1, curveType - 2);\r\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n }\r\n };\r\n var TranslateXTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.x + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x;\r\n return;\r\n case 1 /* first */:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n }\r\n return;\r\n }\r\n let x = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x + x * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.x += x * alpha;\r\n }\r\n }\r\n };\r\n var TranslateYTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.y + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.y = bone.data.y;\r\n return;\r\n case 1 /* first */:\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n let y = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.y += y * alpha;\r\n }\r\n }\r\n };\r\n var ScaleTimeline = class extends CurveTimeline2 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(\r\n frameCount,\r\n bezierCount,\r\n Property.scaleX + \"|\" + boneIndex,\r\n Property.scaleY + \"|\" + boneIndex\r\n );\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case 1 /* first */:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n let x, y;\r\n let i = Timeline.search(frames, time, 3);\r\n let curveType = this.curves[i / 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n let t = (time - before) / (frames[i + 3] - before);\r\n x += (frames[i + 3 + 1] - x) * t;\r\n y += (frames[i + 3 + 2] - y) * t;\r\n break;\r\n case 1:\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n break;\r\n default:\r\n x = this.getBezierValue(time, i, 1, curveType - 2);\r\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n x *= bone.data.scaleX;\r\n y *= bone.data.scaleY;\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n } else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n } else {\r\n let bx = 0, by = 0;\r\n if (direction == 1 /* mixOut */) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var ScaleXTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.scaleX = bone.data.scaleX;\r\n return;\r\n case 1 /* first */:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n }\r\n return;\r\n }\r\n let x = this.getCurveValue(time) * bone.data.scaleX;\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */)\r\n bone.scaleX += x - bone.data.scaleX;\r\n else\r\n bone.scaleX = x;\r\n } else {\r\n let bx = 0;\r\n if (direction == 1 /* mixOut */) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = bone.data.scaleX;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = bone.scaleX;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var ScaleYTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case 1 /* first */:\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n let y = this.getCurveValue(time) * bone.data.scaleY;\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */)\r\n bone.scaleY += y - bone.data.scaleY;\r\n else\r\n bone.scaleY = y;\r\n } else {\r\n let by = 0;\r\n if (direction == 1 /* mixOut */) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n by = bone.data.scaleY;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n by = bone.scaleY;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var ShearTimeline = class extends CurveTimeline2 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(\r\n frameCount,\r\n bezierCount,\r\n Property.shearX + \"|\" + boneIndex,\r\n Property.shearY + \"|\" + boneIndex\r\n );\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case 1 /* first */:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n let x = 0, y = 0;\r\n let i = Timeline.search(frames, time, 3);\r\n let curveType = this.curves[i / 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n let t = (time - before) / (frames[i + 3] - before);\r\n x += (frames[i + 3 + 1] - x) * t;\r\n y += (frames[i + 3 + 2] - y) * t;\r\n break;\r\n case 1:\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n break;\r\n default:\r\n x = this.getBezierValue(time, i, 1, curveType - 2);\r\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n }\r\n };\r\n var ShearXTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.shearX + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX;\r\n return;\r\n case 1 /* first */:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n }\r\n return;\r\n }\r\n let x = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.shearX += x * alpha;\r\n }\r\n }\r\n };\r\n var ShearYTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.shearY + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case 1 /* first */:\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n let y = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.shearY += y * alpha;\r\n }\r\n }\r\n };\r\n var RGBATimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex,\r\n Property.alpha + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 5;\r\n }\r\n setFrame(frame, time, r, g, b, a) {\r\n frame *= 5;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n this.frames[frame + 4] = a;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let color = slot.color;\r\n if (time < frames[0]) {\r\n let setup = slot.data.color;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n color.setFromColor(setup);\r\n return;\r\n case 1 /* first */:\r\n color.add(\r\n (setup.r - color.r) * alpha,\r\n (setup.g - color.g) * alpha,\r\n (setup.b - color.b) * alpha,\r\n (setup.a - color.a) * alpha\r\n );\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0, a = 0;\r\n let i = Timeline.search(frames, time, 5);\r\n let curveType = this.curves[i / 5];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n let t = (time - before) / (frames[i + 5] - before);\r\n r += (frames[i + 5 + 1] - r) * t;\r\n g += (frames[i + 5 + 2] - g) * t;\r\n b += (frames[i + 5 + 3] - b) * t;\r\n a += (frames[i + 5 + 4] - a) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n }\r\n if (alpha == 1)\r\n color.set(r, g, b, a);\r\n else {\r\n if (blend == 0 /* setup */)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n }\r\n };\r\n var RGBTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 4;\r\n }\r\n setFrame(frame, time, r, g, b) {\r\n frame <<= 2;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let color = slot.color;\r\n if (time < frames[0]) {\r\n let setup = slot.data.color;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n color.r = setup.r;\r\n color.g = setup.g;\r\n color.b = setup.b;\r\n return;\r\n case 1 /* first */:\r\n color.r += (setup.r - color.r) * alpha;\r\n color.g += (setup.g - color.g) * alpha;\r\n color.b += (setup.b - color.b) * alpha;\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0;\r\n let i = Timeline.search(frames, time, 4);\r\n let curveType = this.curves[i >> 2];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n let t = (time - before) / (frames[i + 4] - before);\r\n r += (frames[i + 4 + 1] - r) * t;\r\n g += (frames[i + 4 + 2] - g) * t;\r\n b += (frames[i + 4 + 3] - b) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n }\r\n if (alpha == 1) {\r\n color.r = r;\r\n color.g = g;\r\n color.b = b;\r\n } else {\r\n if (blend == 0 /* setup */) {\r\n let setup = slot.data.color;\r\n color.r = setup.r;\r\n color.g = setup.g;\r\n color.b = setup.b;\r\n }\r\n color.r += (r - color.r) * alpha;\r\n color.g += (g - color.g) * alpha;\r\n color.b += (b - color.b) * alpha;\r\n }\r\n }\r\n };\r\n var AlphaTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, Property.alpha + \"|\" + slotIndex);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let color = slot.color;\r\n if (time < this.frames[0]) {\r\n let setup = slot.data.color;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n color.a = setup.a;\r\n return;\r\n case 1 /* first */:\r\n color.a += (setup.a - color.a) * alpha;\r\n }\r\n return;\r\n }\r\n let a = this.getCurveValue(time);\r\n if (alpha == 1)\r\n color.a = a;\r\n else {\r\n if (blend == 0 /* setup */)\r\n color.a = slot.data.color.a;\r\n color.a += (a - color.a) * alpha;\r\n }\r\n }\r\n };\r\n var RGBA2Timeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex,\r\n Property.alpha + \"|\" + slotIndex,\r\n Property.rgb2 + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 8;\r\n }\r\n setFrame(frame, time, r, g, b, a, r2, g2, b2) {\r\n frame <<= 3;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n this.frames[frame + 4] = a;\r\n this.frames[frame + 5] = r2;\r\n this.frames[frame + 6] = g2;\r\n this.frames[frame + 7] = b2;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let light = slot.color, dark = slot.darkColor;\r\n if (time < frames[0]) {\r\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n light.setFromColor(setupLight);\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n return;\r\n case 1 /* first */:\r\n light.add(\r\n (setupLight.r - light.r) * alpha,\r\n (setupLight.g - light.g) * alpha,\r\n (setupLight.b - light.b) * alpha,\r\n (setupLight.a - light.a) * alpha\r\n );\r\n dark.r += (setupDark.r - dark.r) * alpha;\r\n dark.g += (setupDark.g - dark.g) * alpha;\r\n dark.b += (setupDark.b - dark.b) * alpha;\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n let i = Timeline.search(frames, time, 8);\r\n let curveType = this.curves[i >> 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n r2 = frames[i + 5];\r\n g2 = frames[i + 6];\r\n b2 = frames[i + 7];\r\n let t = (time - before) / (frames[i + 8] - before);\r\n r += (frames[i + 8 + 1] - r) * t;\r\n g += (frames[i + 8 + 2] - g) * t;\r\n b += (frames[i + 8 + 3] - b) * t;\r\n a += (frames[i + 8 + 4] - a) * t;\r\n r2 += (frames[i + 8 + 5] - r2) * t;\r\n g2 += (frames[i + 8 + 6] - g2) * t;\r\n b2 += (frames[i + 8 + 7] - b2) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n r2 = frames[i + 5];\r\n g2 = frames[i + 6];\r\n b2 = frames[i + 7];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n r2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\r\n g2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\r\n b2 = this.getBezierValue(time, i, 7, curveType + 18 * 6 - 2);\r\n }\r\n if (alpha == 1) {\r\n light.set(r, g, b, a);\r\n dark.r = r2;\r\n dark.g = g2;\r\n dark.b = b2;\r\n } else {\r\n if (blend == 0 /* setup */) {\r\n light.setFromColor(slot.data.color);\r\n let setupDark = slot.data.darkColor;\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.r += (r2 - dark.r) * alpha;\r\n dark.g += (g2 - dark.g) * alpha;\r\n dark.b += (b2 - dark.b) * alpha;\r\n }\r\n }\r\n };\r\n var RGB2Timeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex,\r\n Property.rgb2 + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 7;\r\n }\r\n setFrame(frame, time, r, g, b, r2, g2, b2) {\r\n frame *= 7;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n this.frames[frame + 4] = r2;\r\n this.frames[frame + 5] = g2;\r\n this.frames[frame + 6] = b2;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let light = slot.color, dark = slot.darkColor;\r\n if (time < frames[0]) {\r\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n light.r = setupLight.r;\r\n light.g = setupLight.g;\r\n light.b = setupLight.b;\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n return;\r\n case 1 /* first */:\r\n light.r += (setupLight.r - light.r) * alpha;\r\n light.g += (setupLight.g - light.g) * alpha;\r\n light.b += (setupLight.b - light.b) * alpha;\r\n dark.r += (setupDark.r - dark.r) * alpha;\r\n dark.g += (setupDark.g - dark.g) * alpha;\r\n dark.b += (setupDark.b - dark.b) * alpha;\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n let i = Timeline.search(frames, time, 7);\r\n let curveType = this.curves[i / 7];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n r2 = frames[i + 4];\r\n g2 = frames[i + 5];\r\n b2 = frames[i + 6];\r\n let t = (time - before) / (frames[i + 7] - before);\r\n r += (frames[i + 7 + 1] - r) * t;\r\n g += (frames[i + 7 + 2] - g) * t;\r\n b += (frames[i + 7 + 3] - b) * t;\r\n r2 += (frames[i + 7 + 4] - r2) * t;\r\n g2 += (frames[i + 7 + 5] - g2) * t;\r\n b2 += (frames[i + 7 + 6] - b2) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n r2 = frames[i + 4];\r\n g2 = frames[i + 5];\r\n b2 = frames[i + 6];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n r2 = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n g2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\r\n b2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\r\n }\r\n if (alpha == 1) {\r\n light.r = r;\r\n light.g = g;\r\n light.b = b;\r\n dark.r = r2;\r\n dark.g = g2;\r\n dark.b = b2;\r\n } else {\r\n if (blend == 0 /* setup */) {\r\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.r = setupLight.r;\r\n light.g = setupLight.g;\r\n light.b = setupLight.b;\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n }\r\n light.r += (r - light.r) * alpha;\r\n light.g += (g - light.g) * alpha;\r\n light.b += (b - light.b) * alpha;\r\n dark.r += (r2 - dark.r) * alpha;\r\n dark.g += (g2 - dark.g) * alpha;\r\n dark.b += (b2 - dark.b) * alpha;\r\n }\r\n }\r\n };\r\n var AttachmentTimeline = class extends Timeline {\r\n constructor(frameCount, slotIndex) {\r\n super(frameCount, [\r\n Property.attachment + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, time, attachmentName) {\r\n this.frames[frame] = time;\r\n this.attachmentNames[frame] = attachmentName;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == 1 /* mixOut */) {\r\n if (blend == 0 /* setup */)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n if (time < this.frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\r\n }\r\n setAttachment(skeleton, slot, attachmentName) {\r\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n }\r\n };\r\n var DeformTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex, attachment) {\r\n super(frameCount, bezierCount, [\r\n Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n this.attachment = attachment;\r\n this.vertices = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, time, vertices) {\r\n this.frames[frame] = time;\r\n this.vertices[frame] = vertices;\r\n }\r\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\r\n let curves = this.curves;\r\n let i = this.getFrameCount() + bezier * 18;\r\n if (value == 0)\r\n curves[frame] = 2 + i;\r\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\r\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\r\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\r\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\r\n let x = time1 + dx, y = dy;\r\n for (let n = i + 18; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dx += ddx;\r\n dy += ddy;\r\n ddx += dddx;\r\n ddy += dddy;\r\n x += dx;\r\n y += dy;\r\n }\r\n }\r\n getCurvePercent(time, frame) {\r\n let curves = this.curves;\r\n let i = curves[frame];\r\n switch (i) {\r\n case 0:\r\n let x2 = this.frames[frame];\r\n return (time - x2) / (this.frames[frame + this.getFrameEntries()] - x2);\r\n case 1:\r\n return 0;\r\n }\r\n i -= 2;\r\n if (curves[i] > time) {\r\n let x2 = this.frames[frame];\r\n return curves[i + 1] * (time - x2) / (curves[i] - x2);\r\n }\r\n let n = i + 18;\r\n for (i += 2; i < n; i += 2) {\r\n if (curves[i] >= time) {\r\n let x2 = curves[i - 2], y2 = curves[i - 1];\r\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\r\n }\r\n }\r\n let x = curves[n - 2], y = curves[n - 1];\r\n return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let slotAttachment = slot.getAttachment();\r\n if (!slotAttachment)\r\n return;\r\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)\r\n return;\r\n let deform = slot.deform;\r\n if (deform.length == 0)\r\n blend = 0 /* setup */;\r\n let vertices = this.vertices;\r\n let vertexCount = vertices[0].length;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n deform.length = 0;\r\n return;\r\n case 1 /* first */:\r\n if (alpha == 1) {\r\n deform.length = 0;\r\n return;\r\n }\r\n deform.length = vertexCount;\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\r\n } else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n deform.length = vertexCount;\r\n if (time >= frames[frames.length - 1]) {\r\n let lastVertices = vertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */) {\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += lastVertices[i2] - setupVertices[i2];\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += lastVertices[i2];\r\n }\r\n } else\r\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */: {\r\n let vertexAttachment2 = slotAttachment;\r\n if (!vertexAttachment2.bones) {\r\n let setupVertices = vertexAttachment2.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let setup = setupVertices[i2];\r\n deform[i2] = setup + (lastVertices[i2] - setup) * alpha;\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] = lastVertices[i2] * alpha;\r\n }\r\n break;\r\n }\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += (lastVertices[i2] - deform[i2]) * alpha;\r\n break;\r\n case 3 /* add */:\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += (lastVertices[i2] - setupVertices[i2]) * alpha;\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += lastVertices[i2] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n let frame = Timeline.search1(frames, time);\r\n let percent = this.getCurvePercent(time, frame);\r\n let prevVertices = vertices[frame];\r\n let nextVertices = vertices[frame + 1];\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */) {\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += prev + (nextVertices[i2] - prev) * percent - setupVertices[i2];\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += prev + (nextVertices[i2] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] = prev + (nextVertices[i2] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */: {\r\n let vertexAttachment2 = slotAttachment;\r\n if (!vertexAttachment2.bones) {\r\n let setupVertices = vertexAttachment2.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2], setup = setupVertices[i2];\r\n deform[i2] = setup + (prev + (nextVertices[i2] - prev) * percent - setup) * alpha;\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] = (prev + (nextVertices[i2] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - deform[i2]) * alpha;\r\n }\r\n break;\r\n case 3 /* add */:\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - setupVertices[i2]) * alpha;\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var _EventTimeline = class extends Timeline {\r\n constructor(frameCount) {\r\n super(frameCount, _EventTimeline.propertyIds);\r\n this.events = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, event) {\r\n this.frames[frame] = event.time;\r\n this.events[frame] = event;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (!firedEvents)\r\n return;\r\n let frames = this.frames;\r\n let frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n } else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n let i = 0;\r\n if (lastTime < frames[0])\r\n i = 0;\r\n else {\r\n i = Timeline.search1(frames, lastTime) + 1;\r\n let frameTime = frames[i];\r\n while (i > 0) {\r\n if (frames[i - 1] != frameTime)\r\n break;\r\n i--;\r\n }\r\n }\r\n for (; i < frameCount && time >= frames[i]; i++)\r\n firedEvents.push(this.events[i]);\r\n }\r\n };\r\n var EventTimeline = _EventTimeline;\r\n EventTimeline.propertyIds = [\"\" + Property.event];\r\n var _DrawOrderTimeline = class extends Timeline {\r\n constructor(frameCount) {\r\n super(frameCount, _DrawOrderTimeline.propertyIds);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, time, drawOrder) {\r\n this.frames[frame] = time;\r\n this.drawOrders[frame] = drawOrder;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (direction == 1 /* mixOut */) {\r\n if (blend == 0 /* setup */)\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n if (time < this.frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n let idx = Timeline.search1(this.frames, time);\r\n let drawOrderToSetupIndex = this.drawOrders[idx];\r\n if (!drawOrderToSetupIndex)\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n else {\r\n let drawOrder = skeleton.drawOrder;\r\n let slots = skeleton.slots;\r\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n }\r\n };\r\n var DrawOrderTimeline = _DrawOrderTimeline;\r\n DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\r\n var IkConstraintTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, ikConstraintIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.ikConstraint + \"|\" + ikConstraintIndex\r\n ]);\r\n this.ikConstraintIndex = 0;\r\n this.ikConstraintIndex = ikConstraintIndex;\r\n }\r\n getFrameEntries() {\r\n return 6;\r\n }\r\n setFrame(frame, time, mix, softness, bendDirection, compress, stretch) {\r\n frame *= 6;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = mix;\r\n this.frames[frame + 2] = softness;\r\n this.frames[frame + 3] = bendDirection;\r\n this.frames[frame + 4] = compress ? 1 : 0;\r\n this.frames[frame + 5] = stretch ? 1 : 0;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case 1 /* first */:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n let mix = 0, softness = 0;\r\n let i = Timeline.search(frames, time, 6);\r\n let curveType = this.curves[i / 6];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n mix = frames[i + 1];\r\n softness = frames[i + 2];\r\n let t = (time - before) / (frames[i + 6] - before);\r\n mix += (frames[i + 6 + 1] - mix) * t;\r\n softness += (frames[i + 6 + 2] - softness) * t;\r\n break;\r\n case 1:\r\n mix = frames[i + 1];\r\n softness = frames[i + 2];\r\n break;\r\n default:\r\n mix = this.getBezierValue(time, i, 1, curveType - 2);\r\n softness = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n if (blend == 0 /* setup */) {\r\n constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\r\n if (direction == 1 /* mixOut */) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n } else {\r\n constraint.bendDirection = frames[i + 3];\r\n constraint.compress = frames[i + 4] != 0;\r\n constraint.stretch = frames[i + 5] != 0;\r\n }\r\n } else {\r\n constraint.mix += (mix - constraint.mix) * alpha;\r\n constraint.softness += (softness - constraint.softness) * alpha;\r\n if (direction == 0 /* mixIn */) {\r\n constraint.bendDirection = frames[i + 3];\r\n constraint.compress = frames[i + 4] != 0;\r\n constraint.stretch = frames[i + 5] != 0;\r\n }\r\n }\r\n }\r\n };\r\n var TransformConstraintTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, transformConstraintIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.transformConstraint + \"|\" + transformConstraintIndex\r\n ]);\r\n this.transformConstraintIndex = 0;\r\n this.transformConstraintIndex = transformConstraintIndex;\r\n }\r\n getFrameEntries() {\r\n return 7;\r\n }\r\n setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\r\n let frames = this.frames;\r\n frame *= 7;\r\n frames[frame] = time;\r\n frames[frame + 1] = mixRotate;\r\n frames[frame + 2] = mixX;\r\n frames[frame + 3] = mixY;\r\n frames[frame + 4] = mixScaleX;\r\n frames[frame + 5] = mixScaleY;\r\n frames[frame + 6] = mixShearY;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n let data = constraint.data;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.mixRotate = data.mixRotate;\r\n constraint.mixX = data.mixX;\r\n constraint.mixY = data.mixY;\r\n constraint.mixScaleX = data.mixScaleX;\r\n constraint.mixScaleY = data.mixScaleY;\r\n constraint.mixShearY = data.mixShearY;\r\n return;\r\n case 1 /* first */:\r\n constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (data.mixX - constraint.mixX) * alpha;\r\n constraint.mixY += (data.mixY - constraint.mixY) * alpha;\r\n constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\r\n constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\r\n constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\r\n }\r\n return;\r\n }\r\n let rotate, x, y, scaleX, scaleY, shearY;\r\n let i = Timeline.search(frames, time, 7);\r\n let curveType = this.curves[i / 7];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n scaleX = frames[i + 4];\r\n scaleY = frames[i + 5];\r\n shearY = frames[i + 6];\r\n let t = (time - before) / (frames[i + 7] - before);\r\n rotate += (frames[i + 7 + 1] - rotate) * t;\r\n x += (frames[i + 7 + 2] - x) * t;\r\n y += (frames[i + 7 + 3] - y) * t;\r\n scaleX += (frames[i + 7 + 4] - scaleX) * t;\r\n scaleY += (frames[i + 7 + 5] - scaleY) * t;\r\n shearY += (frames[i + 7 + 6] - shearY) * t;\r\n break;\r\n case 1:\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n scaleX = frames[i + 4];\r\n scaleY = frames[i + 5];\r\n shearY = frames[i + 6];\r\n break;\r\n default:\r\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\r\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n scaleX = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n scaleY = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\r\n shearY = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\r\n }\r\n if (blend == 0 /* setup */) {\r\n let data = constraint.data;\r\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\r\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\r\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\r\n constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\r\n constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\r\n constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\r\n } else {\r\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (x - constraint.mixX) * alpha;\r\n constraint.mixY += (y - constraint.mixY) * alpha;\r\n constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\r\n constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\r\n constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\r\n }\r\n }\r\n };\r\n var PathConstraintPositionTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, pathConstraintIndex) {\r\n super(frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex);\r\n this.pathConstraintIndex = 0;\r\n this.pathConstraintIndex = pathConstraintIndex;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case 1 /* first */:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n let position = this.getCurveValue(time);\r\n if (blend == 0 /* setup */)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n }\r\n };\r\n var PathConstraintSpacingTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, pathConstraintIndex) {\r\n super(frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex);\r\n this.pathConstraintIndex = 0;\r\n this.pathConstraintIndex = pathConstraintIndex;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case 1 /* first */:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n let spacing = this.getCurveValue(time);\r\n if (blend == 0 /* setup */)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n }\r\n };\r\n var PathConstraintMixTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, pathConstraintIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.pathConstraintMix + \"|\" + pathConstraintIndex\r\n ]);\r\n this.pathConstraintIndex = 0;\r\n this.pathConstraintIndex = pathConstraintIndex;\r\n }\r\n getFrameEntries() {\r\n return 4;\r\n }\r\n setFrame(frame, time, mixRotate, mixX, mixY) {\r\n let frames = this.frames;\r\n frame <<= 2;\r\n frames[frame] = time;\r\n frames[frame + 1] = mixRotate;\r\n frames[frame + 2] = mixX;\r\n frames[frame + 3] = mixY;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.mixRotate = constraint.data.mixRotate;\r\n constraint.mixX = constraint.data.mixX;\r\n constraint.mixY = constraint.data.mixY;\r\n return;\r\n case 1 /* first */:\r\n constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\r\n constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\r\n }\r\n return;\r\n }\r\n let rotate, x, y;\r\n let i = Timeline.search(frames, time, 4);\r\n let curveType = this.curves[i >> 2];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n let t = (time - before) / (frames[i + 4] - before);\r\n rotate += (frames[i + 4 + 1] - rotate) * t;\r\n x += (frames[i + 4 + 2] - x) * t;\r\n y += (frames[i + 4 + 3] - y) * t;\r\n break;\r\n case 1:\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n break;\r\n default:\r\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\r\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n }\r\n if (blend == 0 /* setup */) {\r\n let data = constraint.data;\r\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\r\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\r\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\r\n } else {\r\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (x - constraint.mixX) * alpha;\r\n constraint.mixY += (y - constraint.mixY) * alpha;\r\n }\r\n }\r\n };\r\n var _SequenceTimeline = class extends Timeline {\r\n constructor(frameCount, slotIndex, attachment) {\r\n super(frameCount, [\r\n Property.sequence + \"|\" + slotIndex + \"|\" + attachment.sequence.id\r\n ]);\r\n this.slotIndex = slotIndex;\r\n this.attachment = attachment;\r\n }\r\n getFrameEntries() {\r\n return _SequenceTimeline.ENTRIES;\r\n }\r\n getSlotIndex() {\r\n return this.slotIndex;\r\n }\r\n getAttachment() {\r\n return this.attachment;\r\n }\r\n setFrame(frame, time, mode, index, delay) {\r\n let frames = this.frames;\r\n frame *= _SequenceTimeline.ENTRIES;\r\n frames[frame] = time;\r\n frames[frame + _SequenceTimeline.MODE] = mode | index << 4;\r\n frames[frame + _SequenceTimeline.DELAY] = delay;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let slotAttachment = slot.attachment;\r\n let attachment = this.attachment;\r\n if (slotAttachment != attachment) {\r\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)\r\n return;\r\n }\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n slot.sequenceIndex = -1;\r\n return;\r\n }\r\n let i = Timeline.search(frames, time, _SequenceTimeline.ENTRIES);\r\n let before = frames[i];\r\n let modeAndIndex = frames[i + _SequenceTimeline.MODE];\r\n let delay = frames[i + _SequenceTimeline.DELAY];\r\n if (!this.attachment.sequence)\r\n return;\r\n let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;\r\n let mode = SequenceModeValues[modeAndIndex & 15];\r\n if (mode != 0 /* hold */) {\r\n index += (time - before) / delay + 1e-5 | 0;\r\n switch (mode) {\r\n case 1 /* once */:\r\n index = Math.min(count - 1, index);\r\n break;\r\n case 2 /* loop */:\r\n index %= count;\r\n break;\r\n case 3 /* pingpong */: {\r\n let n = (count << 1) - 2;\r\n index = n == 0 ? 0 : index % n;\r\n if (index >= count)\r\n index = n - index;\r\n break;\r\n }\r\n case 4 /* onceReverse */:\r\n index = Math.max(count - 1 - index, 0);\r\n break;\r\n case 5 /* loopReverse */:\r\n index = count - 1 - index % count;\r\n break;\r\n case 6 /* pingpongReverse */: {\r\n let n = (count << 1) - 2;\r\n index = n == 0 ? 0 : (index + count - 1) % n;\r\n if (index >= count)\r\n index = n - index;\r\n }\r\n }\r\n }\r\n slot.sequenceIndex = index;\r\n }\r\n };\r\n var SequenceTimeline = _SequenceTimeline;\r\n SequenceTimeline.ENTRIES = 3;\r\n SequenceTimeline.MODE = 1;\r\n SequenceTimeline.DELAY = 2;\r\n\r\n // spine-core/src/AnimationState.ts\r\n var _AnimationState = class {\r\n constructor(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new StringSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new Pool(() => new TrackEntry());\r\n this.data = data;\r\n }\r\n static emptyAnimation() {\r\n return _AnimationState._emptyAnimation;\r\n }\r\n update(delta) {\r\n delta *= this.timeScale;\r\n let tracks = this.tracks;\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let current = tracks[i];\r\n if (!current)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n let currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n let next = current.next;\r\n if (next) {\r\n let nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n } else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.clearNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\r\n let from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from)\r\n from.mixingTo = null;\r\n while (from) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n }\r\n updateMixingFrom(to, delta) {\r\n let from = to.mixingFrom;\r\n if (!from)\r\n return true;\r\n let finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n }\r\n apply(skeleton) {\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n let events = this.events;\r\n let tracks = this.tracks;\r\n let applied = false;\r\n for (let i2 = 0, n2 = tracks.length; i2 < n2; i2++) {\r\n let current = tracks[i2];\r\n if (!current || current.delay > 0)\r\n continue;\r\n applied = true;\r\n let blend = i2 == 0 ? 1 /* first */ : current.mixBlend;\r\n let mix = current.alpha;\r\n if (current.mixingFrom)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && !current.next)\r\n mix = 0;\r\n let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\r\n let applyEvents = events;\r\n if (current.reverse) {\r\n applyTime = current.animation.duration - applyTime;\r\n applyEvents = null;\r\n }\r\n let timelines = current.animation.timelines;\r\n let timelineCount = timelines.length;\r\n if (i2 == 0 && mix == 1 || blend == 3 /* add */) {\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, 0 /* mixIn */);\r\n }\r\n } else {\r\n let timelineMode = current.timelineMode;\r\n let shortestRotation = current.shortestRotation;\r\n let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;\r\n if (firstFrame)\r\n current.timelinesRotation.length = timelineCount << 1;\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n let timeline2 = timelines[ii];\r\n let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : 0 /* setup */;\r\n if (!shortestRotation && timeline2 instanceof RotateTimeline) {\r\n this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\r\n } else if (timeline2 instanceof AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);\r\n } else {\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n timeline2.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, 0 /* mixIn */);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n }\r\n applyMixingFrom(to, skeleton, blend) {\r\n let from = to.mixingFrom;\r\n if (from.mixingFrom)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n let mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == 1 /* first */)\r\n blend = 0 /* setup */;\r\n } else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != 1 /* first */)\r\n blend = from.mixBlend;\r\n }\r\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n let timelines = from.animation.timelines;\r\n let timelineCount = timelines.length;\r\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\r\n let events = null;\r\n if (from.reverse)\r\n applyTime = from.animation.duration - applyTime;\r\n else if (mix < from.eventThreshold)\r\n events = this.events;\r\n if (blend == 3 /* add */) {\r\n for (let i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, 1 /* mixOut */);\r\n } else {\r\n let timelineMode = from.timelineMode;\r\n let timelineHoldMix = from.timelineHoldMix;\r\n let shortestRotation = from.shortestRotation;\r\n let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;\r\n if (firstFrame)\r\n from.timelinesRotation.length = timelineCount << 1;\r\n from.totalAlpha = 0;\r\n for (let i = 0; i < timelineCount; i++) {\r\n let timeline = timelines[i];\r\n let direction = 1 /* mixOut */;\r\n let timelineBlend;\r\n let alpha = 0;\r\n switch (timelineMode[i]) {\r\n case SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case FIRST:\r\n timelineBlend = 0 /* setup */;\r\n alpha = alphaMix;\r\n break;\r\n case HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case HOLD_FIRST:\r\n timelineBlend = 0 /* setup */;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = 0 /* setup */;\r\n let holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (!shortestRotation && timeline instanceof RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\r\n else {\r\n Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == 0 /* setup */)\r\n direction = 0 /* mixIn */;\r\n timeline.apply(skeleton, animationLast, applyTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n }\r\n applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (time < timeline.frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n } else\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + SETUP;\r\n }\r\n setAttachment(skeleton, slot, attachmentName, attachments) {\r\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + CURRENT;\r\n }\r\n applyRotateTimeline(timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, 0 /* mixIn */);\r\n return;\r\n }\r\n let bone = skeleton.bones[timeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = timeline.frames;\r\n let r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case 1 /* first */:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n } else {\r\n r1 = blend == 0 /* setup */ ? bone.data.rotation : bone.rotation;\r\n r2 = bone.data.rotation + timeline.getCurveValue(time);\r\n }\r\n let total = 0, diff = r2 - r1;\r\n diff -= (16384 - (16384.499999999996 - diff / 360 | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n } else {\r\n let lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n } else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n let current = diff > 0, dir = lastTotal >= 0;\r\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n bone.rotation = r1 + total * alpha;\r\n }\r\n queueEvents(entry, animationTime) {\r\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n let duration = animationEnd - animationStart;\r\n let trackLastWrapped = entry.trackLast % duration;\r\n let events = this.events;\r\n let i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < trackLastWrapped)\r\n break;\r\n if (event.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event);\r\n }\r\n let complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < animationStart)\r\n continue;\r\n this.queue.event(entry, event);\r\n }\r\n }\r\n clearTracks() {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n clearTrack(trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n let current = this.tracks[trackIndex];\r\n if (!current)\r\n return;\r\n this.queue.end(current);\r\n this.clearNext(current);\r\n let entry = current;\r\n while (true) {\r\n let from = entry.mixingFrom;\r\n if (!from)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n }\r\n setCurrent(index, current, interrupt) {\r\n let from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n current.previous = null;\r\n if (from) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n }\r\n setAnimation(trackIndex, animationName, loop = false) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (!animation)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n }\r\n setAnimationWith(trackIndex, animation, loop = false) {\r\n if (!animation)\r\n throw new Error(\"animation cannot be null.\");\r\n let interrupt = true;\r\n let current = this.expandToIndex(trackIndex);\r\n if (current) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.clearNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n } else\r\n this.clearNext(current);\r\n }\r\n let entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n }\r\n addAnimation(trackIndex, animationName, loop = false, delay = 0) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (!animation)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n }\r\n addAnimationWith(trackIndex, animation, loop = false, delay = 0) {\r\n if (!animation)\r\n throw new Error(\"animation cannot be null.\");\r\n let last = this.expandToIndex(trackIndex);\r\n if (last) {\r\n while (last.next)\r\n last = last.next;\r\n }\r\n let entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (!last) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n } else {\r\n last.next = entry;\r\n entry.previous = last;\r\n if (delay <= 0)\r\n delay += last.getTrackComplete() - entry.mixDuration;\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n }\r\n setEmptyAnimation(trackIndex, mixDuration = 0) {\r\n let entry = this.setAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {\r\n let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);\r\n if (delay <= 0)\r\n entry.delay += entry.mixDuration - mixDuration;\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n setEmptyAnimations(mixDuration = 0) {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++) {\r\n let current = this.tracks[i];\r\n if (current)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n expandToIndex(index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n }\r\n trackEntry(trackIndex, animation, loop, last) {\r\n let entry = this.trackEntryPool.obtain();\r\n entry.reset();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.reverse = false;\r\n entry.shortestRotation = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\r\n entry.interruptAlpha = 1;\r\n entry.totalAlpha = 0;\r\n entry.mixBlend = 2 /* replace */;\r\n return entry;\r\n }\r\n clearNext(entry) {\r\n let next = entry.next;\r\n while (next) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n }\r\n _animationsChanged() {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n let tracks = this.tracks;\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let entry = tracks[i];\r\n if (!entry)\r\n continue;\r\n while (entry.mixingFrom)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (!entry.mixingTo || entry.mixBlend != 3 /* add */)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry);\r\n }\r\n }\r\n computeHold(entry) {\r\n let to = entry.mixingTo;\r\n let timelines = entry.animation.timelines;\r\n let timelinesCount = entry.animation.timelines.length;\r\n let timelineMode = entry.timelineMode;\r\n timelineMode.length = timelinesCount;\r\n let timelineHoldMix = entry.timelineHoldMix;\r\n timelineHoldMix.length = 0;\r\n let propertyIDs = this.propertyIDs;\r\n if (to && to.holdPrevious) {\r\n for (let i = 0; i < timelinesCount; i++)\r\n timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\r\n return;\r\n }\r\n outer:\r\n for (let i = 0; i < timelinesCount; i++) {\r\n let timeline = timelines[i];\r\n let ids = timeline.getPropertyIds();\r\n if (!propertyIDs.addAll(ids))\r\n timelineMode[i] = SUBSEQUENT;\r\n else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\r\n timelineMode[i] = FIRST;\r\n } else {\r\n for (let next = to.mixingTo; next; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(ids))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = HOLD_MIX;\r\n timelineHoldMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = HOLD_FIRST;\r\n }\r\n }\r\n }\r\n getCurrent(trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n }\r\n addListener(listener) {\r\n if (!listener)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n }\r\n removeListener(listener) {\r\n let index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n }\r\n clearListeners() {\r\n this.listeners.length = 0;\r\n }\r\n clearListenerNotifications() {\r\n this.queue.clear();\r\n }\r\n };\r\n var AnimationState = _AnimationState;\r\n AnimationState._emptyAnimation = new Animation(\"\", [], 0);\r\n var TrackEntry = class {\r\n constructor() {\r\n this.animation = null;\r\n this.previous = null;\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.listener = null;\r\n this.trackIndex = 0;\r\n this.loop = false;\r\n this.holdPrevious = false;\r\n this.reverse = false;\r\n this.shortestRotation = false;\r\n this.eventThreshold = 0;\r\n this.attachmentThreshold = 0;\r\n this.drawOrderThreshold = 0;\r\n this.animationStart = 0;\r\n this.animationEnd = 0;\r\n this.animationLast = 0;\r\n this.nextAnimationLast = 0;\r\n this.delay = 0;\r\n this.trackTime = 0;\r\n this.trackLast = 0;\r\n this.nextTrackLast = 0;\r\n this.trackEnd = 0;\r\n this.timeScale = 0;\r\n this.alpha = 0;\r\n this.mixTime = 0;\r\n this.mixDuration = 0;\r\n this.interruptAlpha = 0;\r\n this.totalAlpha = 0;\r\n this.mixBlend = 2 /* replace */;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n reset() {\r\n this.next = null;\r\n this.previous = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n }\r\n getAnimationTime() {\r\n if (this.loop) {\r\n let duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return this.trackTime % duration + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n }\r\n setAnimationLast(animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n }\r\n isComplete() {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n }\r\n resetRotationDirections() {\r\n this.timelinesRotation.length = 0;\r\n }\r\n getTrackComplete() {\r\n let duration = this.animationEnd - this.animationStart;\r\n if (duration != 0) {\r\n if (this.loop)\r\n return duration * (1 + (this.trackTime / duration | 0));\r\n if (this.trackTime < duration)\r\n return duration;\r\n }\r\n return this.trackTime;\r\n }\r\n };\r\n var EventQueue = class {\r\n constructor(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n start(entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n interrupt(entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n }\r\n end(entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n dispose(entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n }\r\n complete(entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n }\r\n event(entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n }\r\n drain() {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n let objects = this.objects;\r\n let listeners = this.animState.listeners;\r\n for (let i = 0; i < objects.length; i += 2) {\r\n let type = objects[i];\r\n let entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.start)\r\n listener.start(entry);\r\n }\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.interrupt)\r\n listener.interrupt(entry);\r\n }\r\n break;\r\n case EventType.end:\r\n if (entry.listener && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.end)\r\n listener.end(entry);\r\n }\r\n case EventType.dispose:\r\n if (entry.listener && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.dispose)\r\n listener.dispose(entry);\r\n }\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.complete)\r\n listener.complete(entry);\r\n }\r\n break;\r\n case EventType.event:\r\n let event = objects[i++ + 2];\r\n if (entry.listener && entry.listener.event)\r\n entry.listener.event(entry, event);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.event)\r\n listener.event(entry, event);\r\n }\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n }\r\n clear() {\r\n this.objects.length = 0;\r\n }\r\n };\r\n var EventType = /* @__PURE__ */ ((EventType2) => {\r\n EventType2[EventType2[\"start\"] = 0] = \"start\";\r\n EventType2[EventType2[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType2[EventType2[\"end\"] = 2] = \"end\";\r\n EventType2[EventType2[\"dispose\"] = 3] = \"dispose\";\r\n EventType2[EventType2[\"complete\"] = 4] = \"complete\";\r\n EventType2[EventType2[\"event\"] = 5] = \"event\";\r\n return EventType2;\r\n })(EventType || {});\r\n var AnimationStateAdapter = class {\r\n start(entry) {\r\n }\r\n interrupt(entry) {\r\n }\r\n end(entry) {\r\n }\r\n dispose(entry) {\r\n }\r\n complete(entry) {\r\n }\r\n event(entry, event) {\r\n }\r\n };\r\n var SUBSEQUENT = 0;\r\n var FIRST = 1;\r\n var HOLD_SUBSEQUENT = 2;\r\n var HOLD_FIRST = 3;\r\n var HOLD_MIX = 4;\r\n var SETUP = 1;\r\n var CURRENT = 2;\r\n\r\n // spine-core/src/AnimationStateData.ts\r\n var AnimationStateData = class {\r\n constructor(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (!skeletonData)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n setMix(fromName, toName, duration) {\r\n let from = this.skeletonData.findAnimation(fromName);\r\n if (!from)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n let to = this.skeletonData.findAnimation(toName);\r\n if (!to)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n }\r\n setMixWith(from, to, duration) {\r\n if (!from)\r\n throw new Error(\"from cannot be null.\");\r\n if (!to)\r\n throw new Error(\"to cannot be null.\");\r\n let key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n }\r\n getMix(from, to) {\r\n let key = from.name + \".\" + to.name;\r\n let value = this.animationToMixTime[key];\r\n return value === void 0 ? this.defaultMix : value;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/BoundingBoxAttachment.ts\r\n var BoundingBoxAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.color = new Color(1, 1, 1, 1);\r\n }\r\n copy() {\r\n let copy = new BoundingBoxAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/ClippingAttachment.ts\r\n var ClippingAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.endSlot = null;\r\n this.color = new Color(0.2275, 0.2275, 0.8078, 1);\r\n }\r\n copy() {\r\n let copy = new ClippingAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/Texture.ts\r\n var Texture = class {\r\n constructor(image) {\r\n this._image = image;\r\n }\r\n getImage() {\r\n return this._image;\r\n }\r\n };\r\n var TextureFilter = /* @__PURE__ */ ((TextureFilter2) => {\r\n TextureFilter2[TextureFilter2[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter2[TextureFilter2[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter2[TextureFilter2[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter2[TextureFilter2[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter2[TextureFilter2[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter2[TextureFilter2[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter2[TextureFilter2[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n return TextureFilter2;\r\n })(TextureFilter || {});\r\n var TextureWrap = /* @__PURE__ */ ((TextureWrap3) => {\r\n TextureWrap3[TextureWrap3[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap3[TextureWrap3[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap3[TextureWrap3[\"Repeat\"] = 10497] = \"Repeat\";\r\n return TextureWrap3;\r\n })(TextureWrap || {});\r\n var TextureRegion = class {\r\n constructor() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.degrees = 0;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n };\r\n var FakeTexture = class extends Texture {\r\n setFilters(minFilter, magFilter) {\r\n }\r\n setWraps(uWrap, vWrap) {\r\n }\r\n dispose() {\r\n }\r\n };\r\n\r\n // spine-core/src/TextureAtlas.ts\r\n var TextureAtlas = class {\r\n constructor(atlasText) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n let reader = new TextureAtlasReader(atlasText);\r\n let entry = new Array(4);\r\n let pageFields = {};\r\n pageFields[\"size\"] = (page2) => {\r\n page2.width = parseInt(entry[1]);\r\n page2.height = parseInt(entry[2]);\r\n };\r\n pageFields[\"format\"] = () => {\r\n };\r\n pageFields[\"filter\"] = (page2) => {\r\n page2.minFilter = Utils.enumValue(TextureFilter, entry[1]);\r\n page2.magFilter = Utils.enumValue(TextureFilter, entry[2]);\r\n };\r\n pageFields[\"repeat\"] = (page2) => {\r\n if (entry[1].indexOf(\"x\") != -1)\r\n page2.uWrap = 10497 /* Repeat */;\r\n if (entry[1].indexOf(\"y\") != -1)\r\n page2.vWrap = 10497 /* Repeat */;\r\n };\r\n pageFields[\"pma\"] = (page2) => {\r\n page2.pma = entry[1] == \"true\";\r\n };\r\n var regionFields = {};\r\n regionFields[\"xy\"] = (region) => {\r\n region.x = parseInt(entry[1]);\r\n region.y = parseInt(entry[2]);\r\n };\r\n regionFields[\"size\"] = (region) => {\r\n region.width = parseInt(entry[1]);\r\n region.height = parseInt(entry[2]);\r\n };\r\n regionFields[\"bounds\"] = (region) => {\r\n region.x = parseInt(entry[1]);\r\n region.y = parseInt(entry[2]);\r\n region.width = parseInt(entry[3]);\r\n region.height = parseInt(entry[4]);\r\n };\r\n regionFields[\"offset\"] = (region) => {\r\n region.offsetX = parseInt(entry[1]);\r\n region.offsetY = parseInt(entry[2]);\r\n };\r\n regionFields[\"orig\"] = (region) => {\r\n region.originalWidth = parseInt(entry[1]);\r\n region.originalHeight = parseInt(entry[2]);\r\n };\r\n regionFields[\"offsets\"] = (region) => {\r\n region.offsetX = parseInt(entry[1]);\r\n region.offsetY = parseInt(entry[2]);\r\n region.originalWidth = parseInt(entry[3]);\r\n region.originalHeight = parseInt(entry[4]);\r\n };\r\n regionFields[\"rotate\"] = (region) => {\r\n let value = entry[1];\r\n if (value == \"true\")\r\n region.degrees = 90;\r\n else if (value != \"false\")\r\n region.degrees = parseInt(value);\r\n };\r\n regionFields[\"index\"] = (region) => {\r\n region.index = parseInt(entry[1]);\r\n };\r\n let line = reader.readLine();\r\n while (line && line.trim().length == 0)\r\n line = reader.readLine();\r\n while (true) {\r\n if (!line || line.trim().length == 0)\r\n break;\r\n if (reader.readEntry(entry, line) == 0)\r\n break;\r\n line = reader.readLine();\r\n }\r\n let page = null;\r\n let names = null;\r\n let values = null;\r\n while (true) {\r\n if (line === null)\r\n break;\r\n if (line.trim().length == 0) {\r\n page = null;\r\n line = reader.readLine();\r\n } else if (!page) {\r\n page = new TextureAtlasPage(line.trim());\r\n while (true) {\r\n if (reader.readEntry(entry, line = reader.readLine()) == 0)\r\n break;\r\n let field = pageFields[entry[0]];\r\n if (field)\r\n field(page);\r\n }\r\n this.pages.push(page);\r\n } else {\r\n let region = new TextureAtlasRegion(page, line);\r\n while (true) {\r\n let count = reader.readEntry(entry, line = reader.readLine());\r\n if (count == 0)\r\n break;\r\n let field = regionFields[entry[0]];\r\n if (field)\r\n field(region);\r\n else {\r\n if (!names)\r\n names = [];\r\n if (!values)\r\n values = [];\r\n names.push(entry[0]);\r\n let entryValues = [];\r\n for (let i = 0; i < count; i++)\r\n entryValues.push(parseInt(entry[i + 1]));\r\n values.push(entryValues);\r\n }\r\n }\r\n if (region.originalWidth == 0 && region.originalHeight == 0) {\r\n region.originalWidth = region.width;\r\n region.originalHeight = region.height;\r\n }\r\n if (names && names.length > 0 && values && values.length > 0) {\r\n region.names = names;\r\n region.values = values;\r\n names = null;\r\n values = null;\r\n }\r\n region.u = region.x / page.width;\r\n region.v = region.y / page.height;\r\n if (region.degrees == 90) {\r\n region.u2 = (region.x + region.height) / page.width;\r\n region.v2 = (region.y + region.width) / page.height;\r\n } else {\r\n region.u2 = (region.x + region.width) / page.width;\r\n region.v2 = (region.y + region.height) / page.height;\r\n }\r\n this.regions.push(region);\r\n }\r\n }\r\n }\r\n findRegion(name) {\r\n for (let i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n }\r\n setTextures(assetManager, pathPrefix = \"\") {\r\n for (let page of this.pages)\r\n page.setTexture(assetManager.get(pathPrefix + page.name));\r\n }\r\n dispose() {\r\n var _a;\r\n for (let i = 0; i < this.pages.length; i++) {\r\n (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();\r\n }\r\n }\r\n };\r\n var TextureAtlasReader = class {\r\n constructor(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n readLine() {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n }\r\n readEntry(entry, line) {\r\n if (!line)\r\n return 0;\r\n line = line.trim();\r\n if (line.length == 0)\r\n return 0;\r\n let colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n return 0;\r\n entry[0] = line.substr(0, colon).trim();\r\n for (let i = 1, lastMatch = colon + 1; ; i++) {\r\n let comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1) {\r\n entry[i] = line.substr(lastMatch).trim();\r\n return i;\r\n }\r\n entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n if (i == 4)\r\n return 4;\r\n }\r\n }\r\n };\r\n var TextureAtlasPage = class {\r\n constructor(name) {\r\n this.minFilter = 9728 /* Nearest */;\r\n this.magFilter = 9728 /* Nearest */;\r\n this.uWrap = 33071 /* ClampToEdge */;\r\n this.vWrap = 33071 /* ClampToEdge */;\r\n this.texture = null;\r\n this.width = 0;\r\n this.height = 0;\r\n this.pma = false;\r\n this.name = name;\r\n }\r\n setTexture(texture) {\r\n this.texture = texture;\r\n texture.setFilters(this.minFilter, this.magFilter);\r\n texture.setWraps(this.uWrap, this.vWrap);\r\n }\r\n };\r\n var TextureAtlasRegion = class extends TextureRegion {\r\n constructor(page, name) {\r\n super();\r\n this.x = 0;\r\n this.y = 0;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n this.index = 0;\r\n this.degrees = 0;\r\n this.names = null;\r\n this.values = null;\r\n this.page = page;\r\n this.name = name;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/MeshAttachment.ts\r\n var MeshAttachment = class extends VertexAttachment {\r\n constructor(name, path) {\r\n super(name);\r\n this.region = null;\r\n this.regionUVs = [];\r\n this.uvs = [];\r\n this.triangles = [];\r\n this.color = new Color(1, 1, 1, 1);\r\n this.width = 0;\r\n this.height = 0;\r\n this.hullLength = 0;\r\n this.edges = [];\r\n this.parentMesh = null;\r\n this.sequence = null;\r\n this.tempColor = new Color(0, 0, 0, 0);\r\n this.path = path;\r\n }\r\n updateRegion() {\r\n if (!this.region)\r\n throw new Error(\"Region not set.\");\r\n let regionUVs = this.regionUVs;\r\n if (!this.uvs || this.uvs.length != regionUVs.length)\r\n this.uvs = Utils.newFloatArray(regionUVs.length);\r\n let uvs = this.uvs;\r\n let n = this.uvs.length;\r\n let u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof TextureAtlasRegion) {\r\n let region = this.region, image = region.page.texture.getImage();\r\n let textureWidth = image.width, textureHeight = image.height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n } else if (!this.region) {\r\n u = v = 0;\r\n width = height = 1;\r\n } else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n }\r\n getParentMesh() {\r\n return this.parentMesh;\r\n }\r\n setParentMesh(parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n }\r\n copy() {\r\n if (this.parentMesh)\r\n return this.newLinkedMesh();\r\n let copy = new MeshAttachment(this.name, this.path);\r\n copy.region = this.region;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\r\n if (this.edges) {\r\n copy.edges = new Array(this.edges.length);\r\n Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n }\r\n computeWorldVertices(slot, start, count, worldVertices, offset, stride) {\r\n if (this.sequence != null)\r\n this.sequence.apply(slot, this);\r\n super.computeWorldVertices(slot, start, count, worldVertices, offset, stride);\r\n }\r\n newLinkedMesh() {\r\n let copy = new MeshAttachment(this.name, this.path);\r\n copy.region = this.region;\r\n copy.color.setFromColor(this.color);\r\n copy.timelineAttachment = this.timelineAttachment;\r\n copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\r\n if (copy.region != null)\r\n copy.updateRegion();\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/PathAttachment.ts\r\n var PathAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.lengths = [];\r\n this.closed = false;\r\n this.constantSpeed = false;\r\n this.color = new Color(1, 1, 1, 1);\r\n }\r\n copy() {\r\n let copy = new PathAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/PointAttachment.ts\r\n var PointAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.color = new Color(0.38, 0.94, 0, 1);\r\n }\r\n computeWorldPosition(bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n }\r\n computeWorldRotation(bone) {\r\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\r\n let x = cos * bone.a + sin * bone.b;\r\n let y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * MathUtils.radDeg;\r\n }\r\n copy() {\r\n let copy = new PointAttachment(this.name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/RegionAttachment.ts\r\n var _RegionAttachment = class extends Attachment {\r\n constructor(name, path) {\r\n super(name);\r\n this.x = 0;\r\n this.y = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.rotation = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.color = new Color(1, 1, 1, 1);\r\n this.rendererObject = null;\r\n this.region = null;\r\n this.sequence = null;\r\n this.offset = Utils.newFloatArray(8);\r\n this.uvs = Utils.newFloatArray(8);\r\n this.tempColor = new Color(1, 1, 1, 1);\r\n this.path = path;\r\n }\r\n updateRegion() {\r\n if (!this.region)\r\n throw new Error(\"Region not set.\");\r\n let region = this.region;\r\n let uvs = this.uvs;\r\n if (region == null) {\r\n uvs[0] = 0;\r\n uvs[1] = 0;\r\n uvs[2] = 0;\r\n uvs[3] = 1;\r\n uvs[4] = 1;\r\n uvs[5] = 1;\r\n uvs[6] = 1;\r\n uvs[7] = 0;\r\n return;\r\n }\r\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n let localX2 = localX + this.region.width * regionScaleX;\r\n let localY2 = localY + this.region.height * regionScaleY;\r\n let radians = this.rotation * Math.PI / 180;\r\n let cos = Math.cos(radians);\r\n let sin = Math.sin(radians);\r\n let x = this.x, y = this.y;\r\n let localXCos = localX * cos + x;\r\n let localXSin = localX * sin;\r\n let localYCos = localY * cos + y;\r\n let localYSin = localY * sin;\r\n let localX2Cos = localX2 * cos + x;\r\n let localX2Sin = localX2 * sin;\r\n let localY2Cos = localY2 * cos + y;\r\n let localY2Sin = localY2 * sin;\r\n let offset = this.offset;\r\n offset[0] = localXCos - localYSin;\r\n offset[1] = localYCos + localXSin;\r\n offset[2] = localXCos - localY2Sin;\r\n offset[3] = localY2Cos + localXSin;\r\n offset[4] = localX2Cos - localY2Sin;\r\n offset[5] = localY2Cos + localX2Sin;\r\n offset[6] = localX2Cos - localYSin;\r\n offset[7] = localYCos + localX2Sin;\r\n if (region.degrees == 90) {\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n } else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n }\r\n computeWorldVertices(slot, worldVertices, offset, stride) {\r\n if (this.sequence != null)\r\n this.sequence.apply(slot, this);\r\n let bone = slot.bone;\r\n let vertexOffset = this.offset;\r\n let x = bone.worldX, y = bone.worldY;\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n let offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[0];\r\n offsetY = vertexOffset[1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[2];\r\n offsetY = vertexOffset[3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[4];\r\n offsetY = vertexOffset[5];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[6];\r\n offsetY = vertexOffset[7];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n }\r\n copy() {\r\n let copy = new _RegionAttachment(this.name, this.path);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\r\n return copy;\r\n }\r\n };\r\n var RegionAttachment = _RegionAttachment;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n\r\n // spine-core/src/AtlasAttachmentLoader.ts\r\n var AtlasAttachmentLoader = class {\r\n constructor(atlas) {\r\n this.atlas = atlas;\r\n }\r\n loadSequence(name, basePath, sequence) {\r\n let regions = sequence.regions;\r\n for (let i = 0, n = regions.length; i < n; i++) {\r\n let path = sequence.getPath(basePath, i);\r\n let region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (sequence: \" + name + \")\");\r\n regions[i] = region;\r\n regions[i].renderObject = regions[i];\r\n }\r\n }\r\n newRegionAttachment(skin, name, path, sequence) {\r\n let attachment = new RegionAttachment(name, path);\r\n if (sequence != null) {\r\n this.loadSequence(name, path, sequence);\r\n } else {\r\n let region = this.atlas.findRegion(path);\r\n if (!region)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n attachment.region = region;\r\n }\r\n return attachment;\r\n }\r\n newMeshAttachment(skin, name, path, sequence) {\r\n let attachment = new MeshAttachment(name, path);\r\n if (sequence != null) {\r\n this.loadSequence(name, path, sequence);\r\n } else {\r\n let region = this.atlas.findRegion(path);\r\n if (!region)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n attachment.region = region;\r\n }\r\n return attachment;\r\n }\r\n newBoundingBoxAttachment(skin, name) {\r\n return new BoundingBoxAttachment(name);\r\n }\r\n newPathAttachment(skin, name) {\r\n return new PathAttachment(name);\r\n }\r\n newPointAttachment(skin, name) {\r\n return new PointAttachment(name);\r\n }\r\n newClippingAttachment(skin, name) {\r\n return new ClippingAttachment(name);\r\n }\r\n };\r\n\r\n // spine-core/src/BoneData.ts\r\n var BoneData = class {\r\n constructor(index, name, parent) {\r\n this.index = 0;\r\n this.parent = null;\r\n this.length = 0;\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n };\r\n var TransformMode = /* @__PURE__ */ ((TransformMode2) => {\r\n TransformMode2[TransformMode2[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode2[TransformMode2[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode2[TransformMode2[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode2[TransformMode2[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode2[TransformMode2[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n return TransformMode2;\r\n })(TransformMode || {});\r\n\r\n // spine-core/src/Bone.ts\r\n var Bone = class {\r\n constructor(data, skeleton, parent) {\r\n this.parent = null;\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\r\n }\r\n updateWorldTransform() {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n }\r\n updateWorldTransformWith(x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n let parent = this.parent;\r\n if (!parent) {\r\n let skeleton = this.skeleton;\r\n let rotationY = rotation + 90 + shearY;\r\n let sx = skeleton.scaleX;\r\n let sy = skeleton.scaleY;\r\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case 0 /* Normal */: {\r\n let rotationY = rotation + 90 + shearY;\r\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\r\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n let ld = MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case 1 /* OnlyTranslation */: {\r\n let rotationY = rotation + 90 + shearY;\r\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case 2 /* NoRotationOrReflection */: {\r\n let s = pa * pa + pc * pc;\r\n let prx = 0;\r\n if (s > 1e-4) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * MathUtils.radDeg;\r\n } else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\r\n }\r\n let rx = rotation + shearX - prx;\r\n let ry = rotation + shearY - prx + 90;\r\n let la = MathUtils.cosDeg(rx) * scaleX;\r\n let lb = MathUtils.cosDeg(ry) * scaleY;\r\n let lc = MathUtils.sinDeg(rx) * scaleX;\r\n let ld = MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case 3 /* NoScale */:\r\n case 4 /* NoScaleOrReflection */: {\r\n let cos = MathUtils.cosDeg(rotation);\r\n let sin = MathUtils.sinDeg(rotation);\r\n let za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n let s = Math.sqrt(za * za + zc * zc);\r\n if (s > 1e-5)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n let r = Math.PI / 2 + Math.atan2(zc, za);\r\n let zb = Math.cos(r) * s;\r\n let zd = Math.sin(r) * s;\r\n let la = MathUtils.cosDeg(shearX) * scaleX;\r\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\r\n let lc = MathUtils.sinDeg(shearX) * scaleX;\r\n let ld = MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n }\r\n setToSetupPose() {\r\n let data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n }\r\n getWorldRotationX() {\r\n return Math.atan2(this.c, this.a) * MathUtils.radDeg;\r\n }\r\n getWorldRotationY() {\r\n return Math.atan2(this.d, this.b) * MathUtils.radDeg;\r\n }\r\n getWorldScaleX() {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n }\r\n getWorldScaleY() {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n }\r\n updateAppliedTransform() {\r\n let parent = this.parent;\r\n if (!parent) {\r\n this.ax = this.worldX - this.skeleton.x;\r\n this.ay = this.worldY - this.skeleton.y;\r\n this.arotation = Math.atan2(this.c, this.a) * MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * MathUtils.radDeg;\r\n return;\r\n }\r\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n let pid = 1 / (pa * pd - pb * pc);\r\n let dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = dx * pd * pid - dy * pb * pid;\r\n this.ay = dy * pa * pid - dx * pc * pid;\r\n let ia = pid * pd;\r\n let id = pid * pa;\r\n let ib = pid * pb;\r\n let ic = pid * pc;\r\n let ra = ia * this.a - ib * this.c;\r\n let rb = ia * this.b - ib * this.d;\r\n let rc = id * this.c - ic * this.a;\r\n let rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 1e-4) {\r\n let det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\r\n } else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * MathUtils.radDeg;\r\n }\r\n }\r\n worldToLocal(world) {\r\n let invDet = 1 / (this.a * this.d - this.b * this.c);\r\n let x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = x * this.d * invDet - y * this.b * invDet;\r\n world.y = y * this.a * invDet - x * this.c * invDet;\r\n return world;\r\n }\r\n localToWorld(local) {\r\n let x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n }\r\n worldToLocalRotation(worldRotation) {\r\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;\r\n }\r\n localToWorldRotation(localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;\r\n }\r\n rotateWorld(degrees) {\r\n let a = this.a, b = this.b, c = this.c, d = this.d;\r\n let cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n }\r\n };\r\n\r\n // spine-core/src/ConstraintData.ts\r\n var ConstraintData = class {\r\n constructor(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n };\r\n\r\n // spine-core/src/AssetManagerBase.ts\r\n var AssetManagerBase = class {\r\n constructor(textureLoader, pathPrefix = \"\", downloader = new Downloader()) {\r\n this.pathPrefix = \"\";\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n this.downloader = downloader;\r\n }\r\n start(path) {\r\n this.toLoad++;\r\n return this.pathPrefix + path;\r\n }\r\n success(callback, path, asset) {\r\n this.toLoad--;\r\n this.loaded++;\r\n this.assets[path] = asset;\r\n if (callback)\r\n callback(path, asset);\r\n }\r\n error(callback, path, message) {\r\n this.toLoad--;\r\n this.loaded++;\r\n this.errors[path] = message;\r\n if (callback)\r\n callback(path, message);\r\n }\r\n loadAll() {\r\n let promise = new Promise((resolve, reject) => {\r\n let check = () => {\r\n if (this.isLoadingComplete()) {\r\n if (this.hasErrors())\r\n reject(this.errors);\r\n else\r\n resolve(this);\r\n return;\r\n }\r\n requestAnimationFrame(check);\r\n };\r\n requestAnimationFrame(check);\r\n });\r\n return promise;\r\n }\r\n setRawDataURI(path, data) {\r\n this.downloader.rawDataUris[this.pathPrefix + path] = data;\r\n }\r\n loadBinary(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n this.downloader.downloadBinary(path, (data) => {\r\n this.success(success, path, data);\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load binary ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n loadText(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n this.downloader.downloadText(path, (data) => {\r\n this.success(success, path, data);\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load text ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n loadJson(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n this.downloader.downloadJson(path, (data) => {\r\n this.success(success, path, data);\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load JSON ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n loadTexture(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n let isBrowser = !!(typeof window !== \"undefined\" && typeof navigator !== \"undefined\" && window.document);\r\n let isWebWorker = !isBrowser;\r\n if (isWebWorker) {\r\n fetch(path, { mode: \"cors\" }).then((response) => {\r\n if (response.ok)\r\n return response.blob();\r\n this.error(error, path, `Couldn't load image: ${path}`);\r\n return null;\r\n }).then((blob) => {\r\n return blob ? createImageBitmap(blob, { premultiplyAlpha: \"none\", colorSpaceConversion: \"none\" }) : null;\r\n }).then((bitmap) => {\r\n if (bitmap)\r\n this.success(success, path, this.textureLoader(bitmap));\r\n });\r\n } else {\r\n let image = new Image();\r\n image.crossOrigin = \"anonymous\";\r\n image.onload = () => {\r\n this.success(success, path, this.textureLoader(image));\r\n };\r\n image.onerror = () => {\r\n this.error(error, path, `Couldn't load image: ${path}`);\r\n };\r\n if (this.downloader.rawDataUris[path])\r\n path = this.downloader.rawDataUris[path];\r\n image.src = path;\r\n }\r\n }\r\n loadTextureAtlas(path, success = () => {\r\n }, error = () => {\r\n }, fileAlias) {\r\n let index = path.lastIndexOf(\"/\");\r\n let parent = index >= 0 ? path.substring(0, index + 1) : \"\";\r\n path = this.start(path);\r\n this.downloader.downloadText(path, (atlasText) => {\r\n try {\r\n let atlas = new TextureAtlas(atlasText);\r\n let toLoad = atlas.pages.length, abort = false;\r\n for (let page of atlas.pages) {\r\n this.loadTexture(\r\n !fileAlias ? parent + page.name : fileAlias[page.name],\r\n (imagePath, texture) => {\r\n if (!abort) {\r\n page.setTexture(texture);\r\n if (--toLoad == 0)\r\n this.success(success, path, atlas);\r\n }\r\n },\r\n (imagePath, message) => {\r\n if (!abort)\r\n this.error(error, path, `Couldn't load texture atlas ${path} page image: ${imagePath}`);\r\n abort = true;\r\n }\r\n );\r\n }\r\n } catch (e) {\r\n this.error(error, path, `Couldn't parse texture atlas ${path}: ${e.message}`);\r\n }\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n get(path) {\r\n return this.assets[this.pathPrefix + path];\r\n }\r\n require(path) {\r\n path = this.pathPrefix + path;\r\n let asset = this.assets[path];\r\n if (asset)\r\n return asset;\r\n let error = this.errors[path];\r\n throw Error(\"Asset not found: \" + path + (error ? \"\\n\" + error : \"\"));\r\n }\r\n remove(path) {\r\n path = this.pathPrefix + path;\r\n let asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n delete this.assets[path];\r\n return asset;\r\n }\r\n removeAll() {\r\n for (let key in this.assets) {\r\n let asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n }\r\n isLoadingComplete() {\r\n return this.toLoad == 0;\r\n }\r\n getToLoad() {\r\n return this.toLoad;\r\n }\r\n getLoaded() {\r\n return this.loaded;\r\n }\r\n dispose() {\r\n this.removeAll();\r\n }\r\n hasErrors() {\r\n return Object.keys(this.errors).length > 0;\r\n }\r\n getErrors() {\r\n return this.errors;\r\n }\r\n };\r\n var Downloader = class {\r\n constructor() {\r\n this.callbacks = {};\r\n this.rawDataUris = {};\r\n }\r\n dataUriToString(dataUri) {\r\n if (!dataUri.startsWith(\"data:\")) {\r\n throw new Error(\"Not a data URI.\");\r\n }\r\n let base64Idx = dataUri.indexOf(\"base64,\");\r\n if (base64Idx != -1) {\r\n base64Idx += \"base64,\".length;\r\n return atob(dataUri.substr(base64Idx));\r\n } else {\r\n return dataUri.substr(dataUri.indexOf(\",\") + 1);\r\n }\r\n }\r\n base64ToUint8Array(base64) {\r\n var binary_string = window.atob(base64);\r\n var len = binary_string.length;\r\n var bytes = new Uint8Array(len);\r\n for (var i = 0; i < len; i++) {\r\n bytes[i] = binary_string.charCodeAt(i);\r\n }\r\n return bytes;\r\n }\r\n dataUriToUint8Array(dataUri) {\r\n if (!dataUri.startsWith(\"data:\")) {\r\n throw new Error(\"Not a data URI.\");\r\n }\r\n let base64Idx = dataUri.indexOf(\"base64,\");\r\n if (base64Idx == -1)\r\n throw new Error(\"Not a binary data URI.\");\r\n base64Idx += \"base64,\".length;\r\n return this.base64ToUint8Array(dataUri.substr(base64Idx));\r\n }\r\n downloadText(url, success, error) {\r\n if (this.start(url, success, error))\r\n return;\r\n if (this.rawDataUris[url]) {\r\n try {\r\n let dataUri = this.rawDataUris[url];\r\n this.finish(url, 200, this.dataUriToString(dataUri));\r\n } catch (e) {\r\n this.finish(url, 400, JSON.stringify(e));\r\n }\r\n return;\r\n }\r\n let request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.open(\"GET\", url, true);\r\n let done = () => {\r\n this.finish(url, request.status, request.responseText);\r\n };\r\n request.onload = done;\r\n request.onerror = done;\r\n request.send();\r\n }\r\n downloadJson(url, success, error) {\r\n this.downloadText(url, (data) => {\r\n success(JSON.parse(data));\r\n }, error);\r\n }\r\n downloadBinary(url, success, error) {\r\n if (this.start(url, success, error))\r\n return;\r\n if (this.rawDataUris[url]) {\r\n try {\r\n let dataUri = this.rawDataUris[url];\r\n this.finish(url, 200, this.dataUriToUint8Array(dataUri));\r\n } catch (e) {\r\n this.finish(url, 400, JSON.stringify(e));\r\n }\r\n return;\r\n }\r\n let request = new XMLHttpRequest();\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n let onerror = () => {\r\n this.finish(url, request.status, request.response);\r\n };\r\n request.onload = () => {\r\n if (request.status == 200 || request.status == 0)\r\n this.finish(url, 200, new Uint8Array(request.response));\r\n else\r\n onerror();\r\n };\r\n request.onerror = onerror;\r\n request.send();\r\n }\r\n start(url, success, error) {\r\n let callbacks = this.callbacks[url];\r\n try {\r\n if (callbacks)\r\n return true;\r\n this.callbacks[url] = callbacks = [];\r\n } finally {\r\n callbacks.push(success, error);\r\n }\r\n }\r\n finish(url, status, data) {\r\n let callbacks = this.callbacks[url];\r\n delete this.callbacks[url];\r\n let args = status == 200 || status == 0 ? [data] : [status, data];\r\n for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)\r\n callbacks[i].apply(null, args);\r\n }\r\n };\r\n\r\n // spine-core/src/Event.ts\r\n var Event = class {\r\n constructor(time, data) {\r\n this.intValue = 0;\r\n this.floatValue = 0;\r\n this.stringValue = null;\r\n this.time = 0;\r\n this.volume = 0;\r\n this.balance = 0;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n };\r\n\r\n // spine-core/src/EventData.ts\r\n var EventData = class {\r\n constructor(name) {\r\n this.intValue = 0;\r\n this.floatValue = 0;\r\n this.stringValue = null;\r\n this.audioPath = null;\r\n this.volume = 0;\r\n this.balance = 0;\r\n this.name = name;\r\n }\r\n };\r\n\r\n // spine-core/src/IkConstraint.ts\r\n var IkConstraint = class {\r\n constructor(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let bone = skeleton.findBone(data.bones[i].name);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${data.bones[i].name}`);\r\n this.bones.push(bone);\r\n }\r\n let target = skeleton.findBone(data.target.name);\r\n if (!target)\r\n throw new Error(`Couldn't find bone ${data.target.name}`);\r\n this.target = target;\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n if (this.mix == 0)\r\n return;\r\n let target = this.target;\r\n let bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.data.uniform, this.softness, this.mix);\r\n break;\r\n }\r\n }\r\n apply1(bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n let p = bone.parent;\r\n if (!p)\r\n throw new Error(\"IK bone must have parent.\");\r\n let pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case 1 /* OnlyTranslation */:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case 2 /* NoRotationOrReflection */:\r\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n let sa = pa / bone.skeleton.scaleX;\r\n let sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * MathUtils.radDeg;\r\n default:\r\n let x = targetX - p.worldX, y = targetY - p.worldY;\r\n let d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n let sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case 3 /* NoScale */:\r\n case 4 /* NoScaleOrReflection */:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if (compress && dd < b || stretch && dd > b && b > 1e-4) {\r\n let s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(\r\n bone.ax,\r\n bone.ay,\r\n bone.arotation + rotationIK * alpha,\r\n sx,\r\n sy,\r\n bone.ashearX,\r\n bone.ashearY\r\n );\r\n }\r\n apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\r\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\r\n let os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n } else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n } else\r\n os2 = 0;\r\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n let u = Math.abs(psx - psy) <= 1e-4;\r\n if (!u || stretch) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n } else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n let pp = parent.parent;\r\n if (!pp)\r\n throw new Error(\"IK parent must itself have a parent.\");\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n let id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 1e-4) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n let dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) * 0.5;\r\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n let p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer:\r\n if (u) {\r\n l2 *= psx;\r\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1) {\r\n cos = -1;\r\n a2 = Math.PI * bendDir;\r\n } else if (cos > 1) {\r\n cos = 1;\r\n a2 = 0;\r\n if (stretch) {\r\n a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n sx *= a;\r\n if (uniform)\r\n sy *= a;\r\n }\r\n } else\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n } else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n let c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n let q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) * 0.5;\r\n let r0 = q / c2, r1 = c / q;\r\n let r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n let maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) * 0.5) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n } else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n let os = Math.atan2(cy, cx) * s2;\r\n let rotation = parent.arotation;\r\n a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, sy, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n }\r\n };\r\n\r\n // spine-core/src/IkConstraintData.ts\r\n var IkConstraintData = class extends ConstraintData {\r\n constructor(name) {\r\n super(name, 0, false);\r\n this.bones = new Array();\r\n this._target = null;\r\n this.bendDirection = 1;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.uniform = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n }\r\n set target(boneData) {\r\n this._target = boneData;\r\n }\r\n get target() {\r\n if (!this._target)\r\n throw new Error(\"BoneData not set.\");\r\n else\r\n return this._target;\r\n }\r\n };\r\n\r\n // spine-core/src/PathConstraintData.ts\r\n var PathConstraintData = class extends ConstraintData {\r\n constructor(name) {\r\n super(name, 0, false);\r\n this.bones = new Array();\r\n this._target = null;\r\n this.positionMode = PositionMode.Fixed;\r\n this.spacingMode = SpacingMode.Fixed;\r\n this.rotateMode = RotateMode.Chain;\r\n this.offsetRotation = 0;\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n }\r\n set target(slotData) {\r\n this._target = slotData;\r\n }\r\n get target() {\r\n if (!this._target)\r\n throw new Error(\"SlotData not set.\");\r\n else\r\n return this._target;\r\n }\r\n };\r\n var PositionMode = /* @__PURE__ */ ((PositionMode2) => {\r\n PositionMode2[PositionMode2[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode2[PositionMode2[\"Percent\"] = 1] = \"Percent\";\r\n return PositionMode2;\r\n })(PositionMode || {});\r\n var SpacingMode = /* @__PURE__ */ ((SpacingMode2) => {\r\n SpacingMode2[SpacingMode2[\"Length\"] = 0] = \"Length\";\r\n SpacingMode2[SpacingMode2[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode2[SpacingMode2[\"Percent\"] = 2] = \"Percent\";\r\n SpacingMode2[SpacingMode2[\"Proportional\"] = 3] = \"Proportional\";\r\n return SpacingMode2;\r\n })(SpacingMode || {});\r\n var RotateMode = /* @__PURE__ */ ((RotateMode2) => {\r\n RotateMode2[RotateMode2[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode2[RotateMode2[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode2[RotateMode2[\"ChainScale\"] = 2] = \"ChainScale\";\r\n return RotateMode2;\r\n })(RotateMode || {});\r\n\r\n // spine-core/src/PathConstraint.ts\r\n var _PathConstraint = class {\r\n constructor(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (let i = 0, n = data.bones.length; i < n; i++) {\r\n let bone = skeleton.findBone(data.bones[i].name);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\r\n this.bones.push(bone);\r\n }\r\n let target = skeleton.findSlot(data.target.name);\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${data.target.name}`);\r\n this.target = target;\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.mixRotate = data.mixRotate;\r\n this.mixX = data.mixX;\r\n this.mixY = data.mixY;\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n let attachment = this.target.getAttachment();\r\n if (!(attachment instanceof PathAttachment))\r\n return;\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\r\n if (mixRotate == 0 && mixX == 0 && mixY == 0)\r\n return;\r\n let data = this.data;\r\n let tangents = data.rotateMode == 0 /* Tangent */, scale = data.rotateMode == 2 /* ChainScale */;\r\n let bones = this.bones;\r\n let boneCount = bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : [];\r\n let spacing = this.spacing;\r\n switch (data.spacingMode) {\r\n case 2 /* Percent */:\r\n if (scale) {\r\n for (let i = 0, n = spacesCount - 1; i < n; i++) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < _PathConstraint.epsilon)\r\n lengths[i] = 0;\r\n else {\r\n let x = setupLength * bone.a, y = setupLength * bone.c;\r\n lengths[i] = Math.sqrt(x * x + y * y);\r\n }\r\n }\r\n }\r\n Utils.arrayFill(spaces, 1, spacesCount, spacing);\r\n break;\r\n case 3 /* Proportional */:\r\n let sum = 0;\r\n for (let i = 0, n = spacesCount - 1; i < n; ) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < _PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = spacing;\r\n } else {\r\n let x = setupLength * bone.a, y = setupLength * bone.c;\r\n let length = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length;\r\n spaces[++i] = length;\r\n sum += length;\r\n }\r\n }\r\n if (sum > 0) {\r\n sum = spacesCount / sum * spacing;\r\n for (let i = 1; i < spacesCount; i++)\r\n spaces[i] *= sum;\r\n }\r\n break;\r\n default:\r\n let lengthSpacing = data.spacingMode == 0 /* Length */;\r\n for (let i = 0, n = spacesCount - 1; i < n; ) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < _PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = spacing;\r\n } else {\r\n let x = setupLength * bone.a, y = setupLength * bone.c;\r\n let length = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\r\n }\r\n }\r\n }\r\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents);\r\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n let tip = false;\r\n if (offsetRotation == 0)\r\n tip = data.rotateMode == 1 /* Chain */;\r\n else {\r\n tip = false;\r\n let p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n }\r\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n let bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * mixX;\r\n bone.worldY += (boneY - bone.worldY) * mixY;\r\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n let length = lengths[i];\r\n if (length != 0) {\r\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (mixRotate > 0) {\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n let length = bone.data.length;\r\n boneX += (length * (cos * a - sin * c) - dx) * mixRotate;\r\n boneY += (length * (sin * a + cos * c) - dy) * mixRotate;\r\n } else {\r\n r += offsetRotation;\r\n }\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= mixRotate;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.updateAppliedTransform();\r\n }\r\n }\r\n computeWorldPositions(path, spacesCount, tangents) {\r\n let target = this.target;\r\n let position = this.position;\r\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = this.world;\r\n let closed2 = path.closed;\r\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = _PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n let lengths = path.lengths;\r\n curveCount -= closed2 ? 1 : 2;\r\n let pathLength2 = lengths[curveCount];\r\n if (this.data.positionMode == 1 /* Percent */)\r\n position *= pathLength2;\r\n let multiplier2;\r\n switch (this.data.spacingMode) {\r\n case 2 /* Percent */:\r\n multiplier2 = pathLength2;\r\n break;\r\n case 3 /* Proportional */:\r\n multiplier2 = pathLength2 / spacesCount;\r\n break;\r\n default:\r\n multiplier2 = 1;\r\n }\r\n world = Utils.setArraySize(this.world, 8);\r\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i] * multiplier2;\r\n position += space;\r\n let p = position;\r\n if (closed2) {\r\n p %= pathLength2;\r\n if (p < 0)\r\n p += pathLength2;\r\n curve = 0;\r\n } else if (p < 0) {\r\n if (prevCurve != _PathConstraint.BEFORE) {\r\n prevCurve = _PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength2) {\r\n if (prevCurve != _PathConstraint.AFTER) {\r\n prevCurve = _PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength2, world, 0, out, o);\r\n continue;\r\n }\r\n for (; ; curve++) {\r\n let length = lengths[curve];\r\n if (p > length)\r\n continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = lengths[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed2 && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n } else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(\r\n p,\r\n world[0],\r\n world[1],\r\n world[2],\r\n world[3],\r\n world[4],\r\n world[5],\r\n world[6],\r\n world[7],\r\n out,\r\n o,\r\n tangents || i > 0 && space == 0\r\n );\r\n }\r\n return out;\r\n }\r\n if (closed2) {\r\n verticesLength += 2;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n } else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n let curves = Utils.setArraySize(this.curves, curveCount);\r\n let pathLength = 0;\r\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (let i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (this.data.positionMode == 1 /* Percent */)\r\n position *= pathLength;\r\n let multiplier;\r\n switch (this.data.spacingMode) {\r\n case 2 /* Percent */:\r\n multiplier = pathLength;\r\n break;\r\n case 3 /* Proportional */:\r\n multiplier = pathLength / spacesCount;\r\n break;\r\n default:\r\n multiplier = 1;\r\n }\r\n let segments = this.segments;\r\n let curveLength = 0;\r\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i] * multiplier;\r\n position += space;\r\n let p = position;\r\n if (closed2) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n } else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (; ; curve++) {\r\n let length = curves[curve];\r\n if (p > length)\r\n continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = curves[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n let ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 6e-3;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 6e-3;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (; ; segment++) {\r\n let length = segments[segment];\r\n if (p > length)\r\n continue;\r\n if (segment == 0)\r\n p /= length;\r\n else {\r\n let prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || i > 0 && space == 0);\r\n }\r\n return out;\r\n }\r\n addBeforePosition(p, temp, i, out, o) {\r\n let x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n addAfterPosition(p, temp, i, out, o) {\r\n let x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n addCurvePosition(p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n let x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 1e-3)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n }\r\n };\r\n var PathConstraint = _PathConstraint;\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 1e-5;\r\n\r\n // spine-core/src/Slot.ts\r\n var Slot = class {\r\n constructor(data, bone) {\r\n this.darkColor = null;\r\n this.attachment = null;\r\n this.attachmentState = 0;\r\n this.sequenceIndex = -1;\r\n this.deform = new Array();\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!bone)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new Color();\r\n this.darkColor = !data.darkColor ? null : new Color();\r\n this.setToSetupPose();\r\n }\r\n getSkeleton() {\r\n return this.bone.skeleton;\r\n }\r\n getAttachment() {\r\n return this.attachment;\r\n }\r\n setAttachment(attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {\r\n this.deform.length = 0;\r\n }\r\n this.attachment = attachment;\r\n this.sequenceIndex = -1;\r\n }\r\n setToSetupPose() {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (!this.data.attachmentName)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/TransformConstraint.ts\r\n var TransformConstraint = class {\r\n constructor(data, skeleton) {\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n this.mixScaleX = 0;\r\n this.mixScaleY = 0;\r\n this.mixShearY = 0;\r\n this.temp = new Vector2();\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mixRotate = data.mixRotate;\r\n this.mixX = data.mixX;\r\n this.mixY = data.mixY;\r\n this.mixScaleX = data.mixScaleX;\r\n this.mixScaleY = data.mixScaleY;\r\n this.mixShearY = data.mixShearY;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let bone = skeleton.findBone(data.bones[i].name);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\r\n this.bones.push(bone);\r\n }\r\n let target = skeleton.findBone(data.target.name);\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${data.target.name}.`);\r\n this.target = target;\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0)\r\n return;\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n } else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n }\r\n applyAbsoluteWorld() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let translate = mixX != 0 || mixY != 0;\r\n let target = this.target;\r\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect;\r\n let offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (mixRotate != 0) {\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= mixRotate;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n if (translate) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * mixX;\r\n bone.worldY += (temp.y - bone.worldY) * mixY;\r\n }\r\n if (mixScaleX != 0) {\r\n let s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n if (s != 0)\r\n s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n if (mixScaleY != 0) {\r\n let s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n if (s != 0)\r\n s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n }\r\n if (mixShearY > 0) {\r\n let b = bone.b, d = bone.d;\r\n let by = Math.atan2(d, b);\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r = by + (r + offsetShearY) * mixShearY;\r\n let s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n }\r\n bone.updateAppliedTransform();\r\n }\r\n }\r\n applyRelativeWorld() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let translate = mixX != 0 || mixY != 0;\r\n let target = this.target;\r\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (mixRotate != 0) {\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n let r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= mixRotate;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n if (translate) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * mixX;\r\n bone.worldY += temp.y * mixY;\r\n }\r\n if (mixScaleX != 0) {\r\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n if (mixScaleY != 0) {\r\n let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n }\r\n if (mixShearY > 0) {\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n let b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\r\n let s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n }\r\n bone.updateAppliedTransform();\r\n }\r\n }\r\n applyAbsoluteLocal() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let target = this.target;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let rotation = bone.arotation;\r\n if (mixRotate != 0) {\r\n let r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\r\n rotation += r * mixRotate;\r\n }\r\n let x = bone.ax, y = bone.ay;\r\n x += (target.ax - x + this.data.offsetX) * mixX;\r\n y += (target.ay - y + this.data.offsetY) * mixY;\r\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (mixScaleX != 0 && scaleX != 0)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\r\n if (mixScaleY != 0 && scaleY != 0)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\r\n let shearY = bone.ashearY;\r\n if (mixShearY != 0) {\r\n let r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\r\n shearY += r * mixShearY;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n applyRelativeLocal() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let target = this.target;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\r\n let x = bone.ax + (target.ax + this.data.offsetX) * mixX;\r\n let y = bone.ay + (target.ay + this.data.offsetY) * mixY;\r\n let scaleX = bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX + 1);\r\n let scaleY = bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY + 1);\r\n let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/Skeleton.ts\r\n var _Skeleton = class {\r\n constructor(data) {\r\n this._updateCache = new Array();\r\n this.skin = null;\r\n this.scaleX = 1;\r\n this._scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let boneData = data.bones[i];\r\n let bone;\r\n if (!boneData.parent)\r\n bone = new Bone(boneData, this, null);\r\n else {\r\n let parent = this.bones[boneData.parent.index];\r\n bone = new Bone(boneData, this, parent);\r\n parent.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (let i = 0; i < data.slots.length; i++) {\r\n let slotData = data.slots[i];\r\n let bone = this.bones[slotData.boneData.index];\r\n let slot = new Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (let i = 0; i < data.ikConstraints.length; i++) {\r\n let ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (let i = 0; i < data.transformConstraints.length; i++) {\r\n let transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (let i = 0; i < data.pathConstraints.length; i++) {\r\n let pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n get scaleY() {\r\n return _Skeleton.yDown ? -this._scaleY : this._scaleY;\r\n }\r\n set scaleY(scaleY) {\r\n this._scaleY = scaleY;\r\n }\r\n updateCache() {\r\n let updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin) {\r\n let skinBones = this.skin.bones;\r\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\r\n let bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone);\r\n }\r\n }\r\n let ikConstraints = this.ikConstraints;\r\n let transformConstraints = this.transformConstraints;\r\n let pathConstraints = this.pathConstraints;\r\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n let constraintCount = ikCount + transformCount + pathCount;\r\n outer:\r\n for (let i = 0; i < constraintCount; i++) {\r\n for (let ii = 0; ii < ikCount; ii++) {\r\n let constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < transformCount; ii++) {\r\n let constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < pathCount; ii++) {\r\n let constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n }\r\n sortIkConstraint(constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\r\n if (!constraint.active)\r\n return;\r\n let target = constraint.target;\r\n this.sortBone(target);\r\n let constrained = constraint.bones;\r\n let parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length == 1) {\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n } else {\r\n let child = constrained[constrained.length - 1];\r\n this.sortBone(child);\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n child.sorted = true;\r\n }\r\n }\r\n sortPathConstraint(constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\r\n if (!constraint.active)\r\n return;\r\n let slot = constraint.target;\r\n let slotIndex = slot.data.index;\r\n let slotBone = slot.bone;\r\n if (this.skin)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (let i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (let i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n }\r\n sortTransformConstraint(constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (let i = 0; i < boneCount; i++) {\r\n let child = constrained[i];\r\n this.sortBone(child.parent);\r\n this.sortBone(child);\r\n }\r\n } else {\r\n for (let i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (let i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n }\r\n sortPathConstraintAttachment(skin, slotIndex, slotBone) {\r\n let attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (let key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n }\r\n sortPathConstraintAttachmentWith(attachment, slotBone) {\r\n if (!(attachment instanceof PathAttachment))\r\n return;\r\n let pathBones = attachment.bones;\r\n if (!pathBones)\r\n this.sortBone(slotBone);\r\n else {\r\n let bones = this.bones;\r\n for (let i = 0, n = pathBones.length; i < n; ) {\r\n let nn = pathBones[i++];\r\n nn += i;\r\n while (i < nn)\r\n this.sortBone(bones[pathBones[i++]]);\r\n }\r\n }\r\n }\r\n sortBone(bone) {\r\n if (!bone)\r\n return;\r\n if (bone.sorted)\r\n return;\r\n let parent = bone.parent;\r\n if (parent)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n }\r\n sortReset(bones) {\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n }\r\n updateWorldTransform() {\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n }\r\n let updateCache = this._updateCache;\r\n for (let i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n }\r\n updateWorldTransformWith(parent) {\r\n let rootBone = this.getRootBone();\r\n if (!rootBone)\r\n throw new Error(\"Root bone must not be null.\");\r\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n rootBone.worldX = pa * this.x + pb * this.y + parent.worldX;\r\n rootBone.worldY = pc * this.x + pd * this.y + parent.worldY;\r\n let rotationY = rootBone.rotation + 90 + rootBone.shearY;\r\n let la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\r\n let lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\r\n let lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\r\n let ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\r\n rootBone.a = (pa * la + pb * lc) * this.scaleX;\r\n rootBone.b = (pa * lb + pb * ld) * this.scaleX;\r\n rootBone.c = (pc * la + pd * lc) * this.scaleY;\r\n rootBone.d = (pc * lb + pd * ld) * this.scaleY;\r\n let updateCache = this._updateCache;\r\n for (let i = 0, n = updateCache.length; i < n; i++) {\r\n let updatable = updateCache[i];\r\n if (updatable != rootBone)\r\n updatable.update();\r\n }\r\n }\r\n setToSetupPose() {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n }\r\n setBonesToSetupPose() {\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n let data = constraint.data;\r\n constraint.mixRotate = data.mixRotate;\r\n constraint.mixX = data.mixX;\r\n constraint.mixY = data.mixY;\r\n constraint.mixScaleX = data.mixScaleX;\r\n constraint.mixScaleY = data.mixScaleY;\r\n constraint.mixShearY = data.mixShearY;\r\n }\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n let data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.mixRotate = data.mixRotate;\r\n constraint.mixX = data.mixX;\r\n constraint.mixY = data.mixY;\r\n }\r\n }\r\n setSlotsToSetupPose() {\r\n let slots = this.slots;\r\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n }\r\n getRootBone() {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n }\r\n findBone(boneName) {\r\n if (!boneName)\r\n throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n }\r\n findSlot(slotName) {\r\n if (!slotName)\r\n throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n }\r\n setSkinByName(skinName) {\r\n let skin = this.data.findSkin(skinName);\r\n if (!skin)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n }\r\n setSkin(newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin) {\r\n if (this.skin)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n let name = slot.data.attachmentName;\r\n if (name) {\r\n let attachment = newSkin.getAttachment(i, name);\r\n if (attachment)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n }\r\n getAttachmentByName(slotName, attachmentName) {\r\n let slot = this.data.findSlot(slotName);\r\n if (!slot)\r\n throw new Error(`Can't find slot with name ${slotName}`);\r\n return this.getAttachment(slot.index, attachmentName);\r\n }\r\n getAttachment(slotIndex, attachmentName) {\r\n if (!attachmentName)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin) {\r\n let attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n }\r\n setAttachment(slotName, attachmentName) {\r\n if (!slotName)\r\n throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n let attachment = null;\r\n if (attachmentName) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (!attachment)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n }\r\n findIkConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n }\r\n findTransformConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n findPathConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n getBoundsRect() {\r\n let offset = new Vector2();\r\n let size = new Vector2();\r\n this.getBounds(offset, size);\r\n return { x: offset.x, y: offset.y, width: size.x, height: size.y };\r\n }\r\n getBounds(offset, size, temp = new Array(2)) {\r\n if (!offset)\r\n throw new Error(\"offset cannot be null.\");\r\n if (!size)\r\n throw new Error(\"size cannot be null.\");\r\n let drawOrder = this.drawOrder;\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let verticesLength = 0;\r\n let vertices = null;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot, vertices, 0, 2);\r\n } else if (attachment instanceof MeshAttachment) {\r\n let mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices) {\r\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n let x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n }\r\n };\r\n var Skeleton = _Skeleton;\r\n Skeleton.yDown = false;\r\n\r\n // spine-core/src/SkeletonData.ts\r\n var SkeletonData = class {\r\n constructor() {\r\n this.name = null;\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.defaultSkin = null;\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.version = null;\r\n this.hash = null;\r\n this.fps = 0;\r\n this.imagesPath = null;\r\n this.audioPath = null;\r\n }\r\n findBone(boneName) {\r\n if (!boneName)\r\n throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n }\r\n findSlot(slotName) {\r\n if (!slotName)\r\n throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n }\r\n findSkin(skinName) {\r\n if (!skinName)\r\n throw new Error(\"skinName cannot be null.\");\r\n let skins = this.skins;\r\n for (let i = 0, n = skins.length; i < n; i++) {\r\n let skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n }\r\n findEvent(eventDataName) {\r\n if (!eventDataName)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n let events = this.events;\r\n for (let i = 0, n = events.length; i < n; i++) {\r\n let event = events[i];\r\n if (event.name == eventDataName)\r\n return event;\r\n }\r\n return null;\r\n }\r\n findAnimation(animationName) {\r\n if (!animationName)\r\n throw new Error(\"animationName cannot be null.\");\r\n let animations = this.animations;\r\n for (let i = 0, n = animations.length; i < n; i++) {\r\n let animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n }\r\n findIkConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n findTransformConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n findPathConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n };\r\n\r\n // spine-core/src/Skin.ts\r\n var SkinEntry = class {\r\n constructor(slotIndex = 0, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n };\r\n var Skin = class {\r\n constructor(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n setAttachment(slotIndex, name, attachment) {\r\n if (!attachment)\r\n throw new Error(\"attachment cannot be null.\");\r\n let attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n }\r\n addSkin(skin) {\r\n for (let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.bones.length; ii++) {\r\n if (this.bones[ii] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.constraints.length; ii++) {\r\n if (this.constraints[ii] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n copySkin(skin) {\r\n for (let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.bones.length; ii++) {\r\n if (this.bones[ii] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.constraints.length; ii++) {\r\n if (this.constraints[ii] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (!attachment.attachment)\r\n continue;\r\n if (attachment.attachment instanceof MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n } else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n }\r\n getAttachment(slotIndex, name) {\r\n let dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n }\r\n removeAttachment(slotIndex, name) {\r\n let dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n delete dictionary[name];\r\n }\r\n getAttachments() {\r\n let entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n let slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n }\r\n getAttachmentsForSlot(slotIndex, attachments) {\r\n let slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name, attachment));\r\n }\r\n }\r\n }\r\n clear() {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n }\r\n attachAll(skeleton, oldSkin) {\r\n let slotIndex = 0;\r\n for (let i = 0; i < skeleton.slots.length; i++) {\r\n let slot = skeleton.slots[i];\r\n let slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n let dictionary = oldSkin.attachments[slotIndex];\r\n for (let key in dictionary) {\r\n let skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n let attachment = this.getAttachment(slotIndex, key);\r\n if (attachment)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/SlotData.ts\r\n var SlotData = class {\r\n constructor(index, name, boneData) {\r\n this.index = 0;\r\n this.color = new Color(1, 1, 1, 1);\r\n this.darkColor = null;\r\n this.attachmentName = null;\r\n this.blendMode = BlendMode.Normal;\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n if (!boneData)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n };\r\n var BlendMode = /* @__PURE__ */ ((BlendMode3) => {\r\n BlendMode3[BlendMode3[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode3[BlendMode3[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode3[BlendMode3[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode3[BlendMode3[\"Screen\"] = 3] = \"Screen\";\r\n return BlendMode3;\r\n })(BlendMode || {});\r\n\r\n // spine-core/src/TransformConstraintData.ts\r\n var TransformConstraintData = class extends ConstraintData {\r\n constructor(name) {\r\n super(name, 0, false);\r\n this.bones = new Array();\r\n this._target = null;\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n this.mixScaleX = 0;\r\n this.mixScaleY = 0;\r\n this.mixShearY = 0;\r\n this.offsetRotation = 0;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.offsetScaleX = 0;\r\n this.offsetScaleY = 0;\r\n this.offsetShearY = 0;\r\n this.relative = false;\r\n this.local = false;\r\n }\r\n set target(boneData) {\r\n this._target = boneData;\r\n }\r\n get target() {\r\n if (!this._target)\r\n throw new Error(\"BoneData not set.\");\r\n else\r\n return this._target;\r\n }\r\n };\r\n\r\n // spine-core/src/SkeletonBinary.ts\r\n var SkeletonBinary = class {\r\n constructor(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n readSkeletonData(binary) {\r\n let scale = this.scale;\r\n let skeletonData = new SkeletonData();\r\n skeletonData.name = \"\";\r\n let input = new BinaryInput(binary);\r\n let lowHash = input.readInt32();\r\n let highHash = input.readInt32();\r\n skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\r\n skeletonData.version = input.readString();\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n let nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n let n = 0;\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let str = input.readString();\r\n if (!str)\r\n throw new Error(\"String in string table must not be null.\");\r\n input.strings.push(str);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"Bone name must not be null.\");\r\n let parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n let data = new BoneData(i, name, parent);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let slotName = input.readString();\r\n if (!slotName)\r\n throw new Error(\"Slot name must not be null.\");\r\n let boneData = skeletonData.bones[input.readInt(true)];\r\n let data = new SlotData(i, slotName, boneData);\r\n Color.rgba8888ToColor(data.color, input.readInt32());\r\n let darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = input.readInt(true);\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0, nn; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"IK constraint data name must not be null.\");\r\n let data = new IkConstraintData(name);\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (let ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0, nn; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"Transform constraint data name must not be null.\");\r\n let data = new TransformConstraintData(name);\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (let ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.mixRotate = input.readFloat();\r\n data.mixX = input.readFloat();\r\n data.mixY = input.readFloat();\r\n data.mixScaleX = input.readFloat();\r\n data.mixScaleY = input.readFloat();\r\n data.mixShearY = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0, nn; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"Path constraint data name must not be null.\");\r\n let data = new PathConstraintData(name);\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (let ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = input.readInt(true);\r\n data.spacingMode = input.readInt(true);\r\n data.rotateMode = input.readInt(true);\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == 0 /* Fixed */)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\r\n data.spacing *= scale;\r\n data.mixRotate = input.readFloat();\r\n data.mixX = input.readFloat();\r\n data.mixY = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n let i = skeletonData.skins.length;\r\n Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++) {\r\n let skin = this.readSkin(input, skeletonData, false, nonessential);\r\n if (!skin)\r\n throw new Error(\"readSkin() should not have returned null.\");\r\n skeletonData.skins[i] = skin;\r\n }\r\n }\r\n n = this.linkedMeshes.length;\r\n for (let i = 0; i < n; i++) {\r\n let linkedMesh = this.linkedMeshes[i];\r\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (!skin)\r\n throw new Error(\"Not skin found for linked mesh.\");\r\n if (!linkedMesh.parent)\r\n throw new Error(\"Linked mesh parent must not be null\");\r\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (!parent)\r\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\r\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent);\r\n if (linkedMesh.mesh.region != null)\r\n linkedMesh.mesh.updateRegion();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let eventName = input.readStringRef();\r\n if (!eventName)\r\n throw new Error();\r\n let data = new EventData(eventName);\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let animationName = input.readString();\r\n if (!animationName)\r\n throw new Error(\"Animatio name must not be null.\");\r\n skeletonData.animations.push(this.readAnimation(input, animationName, skeletonData));\r\n }\r\n return skeletonData;\r\n }\r\n readSkin(input, skeletonData, defaultSkin, nonessential) {\r\n let skin = null;\r\n let slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new Skin(\"default\");\r\n } else {\r\n let skinName = input.readStringRef();\r\n if (!skinName)\r\n throw new Error(\"Skin name must not be null.\");\r\n skin = new Skin(skinName);\r\n skin.bones.length = input.readInt(true);\r\n for (let i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (let i = 0; i < slotCount; i++) {\r\n let slotIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let name = input.readStringRef();\r\n if (!name)\r\n throw new Error(\"Attachment name must not be null\");\r\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\r\n if (attachment)\r\n skin.setAttachment(slotIndex, name, attachment);\r\n }\r\n }\r\n return skin;\r\n }\r\n readAttachment(input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n let scale = this.scale;\r\n let name = input.readStringRef();\r\n if (!name)\r\n name = attachmentName;\r\n switch (input.readByte()) {\r\n case AttachmentType.Region: {\r\n let path = input.readStringRef();\r\n let rotation = input.readFloat();\r\n let x = input.readFloat();\r\n let y = input.readFloat();\r\n let scaleX = input.readFloat();\r\n let scaleY = input.readFloat();\r\n let width = input.readFloat();\r\n let height = input.readFloat();\r\n let color = input.readInt32();\r\n let sequence = this.readSequence(input);\r\n if (!path)\r\n path = name;\r\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\r\n if (!region)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n Color.rgba8888ToColor(region.color, color);\r\n region.sequence = sequence;\r\n if (sequence == null)\r\n region.updateRegion();\r\n return region;\r\n }\r\n case AttachmentType.BoundingBox: {\r\n let vertexCount = input.readInt(true);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let color = nonessential ? input.readInt32() : 0;\r\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (!box)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case AttachmentType.Mesh: {\r\n let path = input.readStringRef();\r\n let color = input.readInt32();\r\n let vertexCount = input.readInt(true);\r\n let uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n let triangles = this.readShortArray(input);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let hullLength = input.readInt(true);\r\n let sequence = this.readSequence(input);\r\n let edges = [];\r\n let width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (!path)\r\n path = name;\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\r\n if (!mesh)\r\n return null;\r\n mesh.path = path;\r\n Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n if (sequence == null)\r\n mesh.updateRegion();\r\n mesh.hullLength = hullLength << 1;\r\n mesh.sequence = sequence;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case AttachmentType.LinkedMesh: {\r\n let path = input.readStringRef();\r\n let color = input.readInt32();\r\n let skinName = input.readStringRef();\r\n let parent = input.readStringRef();\r\n let inheritTimelines = input.readBoolean();\r\n let sequence = this.readSequence(input);\r\n let width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (!path)\r\n path = name;\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\r\n if (!mesh)\r\n return null;\r\n mesh.path = path;\r\n Color.rgba8888ToColor(mesh.color, color);\r\n mesh.sequence = sequence;\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));\r\n return mesh;\r\n }\r\n case AttachmentType.Path: {\r\n let closed2 = input.readBoolean();\r\n let constantSpeed = input.readBoolean();\r\n let vertexCount = input.readInt(true);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let lengths = Utils.newArray(vertexCount / 3, 0);\r\n for (let i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n let color = nonessential ? input.readInt32() : 0;\r\n let path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (!path)\r\n return null;\r\n path.closed = closed2;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case AttachmentType.Point: {\r\n let rotation = input.readFloat();\r\n let x = input.readFloat();\r\n let y = input.readFloat();\r\n let color = nonessential ? input.readInt32() : 0;\r\n let point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (!point)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case AttachmentType.Clipping: {\r\n let endSlotIndex = input.readInt(true);\r\n let vertexCount = input.readInt(true);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let color = nonessential ? input.readInt32() : 0;\r\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (!clip)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n }\r\n readSequence(input) {\r\n if (!input.readBoolean())\r\n return null;\r\n let sequence = new Sequence(input.readInt(true));\r\n sequence.start = input.readInt(true);\r\n sequence.digits = input.readInt(true);\r\n sequence.setupIndex = input.readInt(true);\r\n return sequence;\r\n }\r\n readVertices(input, vertexCount) {\r\n let scale = this.scale;\r\n let verticesLength = vertexCount << 1;\r\n let vertices = new Vertices();\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n let weights = new Array();\r\n let bonesArray = new Array();\r\n for (let i = 0; i < vertexCount; i++) {\r\n let boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (let ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n }\r\n readFloatArray(input, n, scale) {\r\n let array = new Array(n);\r\n if (scale == 1) {\r\n for (let i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n } else {\r\n for (let i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n }\r\n readShortArray(input) {\r\n let n = input.readInt(true);\r\n let array = new Array(n);\r\n for (let i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n }\r\n readAnimation(input, name, skeletonData) {\r\n input.readInt(true);\r\n let timelines = new Array();\r\n let scale = this.scale;\r\n let tempColor1 = new Color();\r\n let tempColor2 = new Color();\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let slotIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let timelineType = input.readByte();\r\n let frameCount = input.readInt(true);\r\n let frameLast = frameCount - 1;\r\n switch (timelineType) {\r\n case SLOT_ATTACHMENT: {\r\n let timeline = new AttachmentTimeline(frameCount, slotIndex);\r\n for (let frame = 0; frame < frameCount; frame++)\r\n timeline.setFrame(frame, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGBA: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n let a = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b, a);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n let a2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\r\n }\r\n time = time2;\r\n r = r2;\r\n g = g2;\r\n b = b2;\r\n a = a2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGB: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\r\n }\r\n time = time2;\r\n r = r2;\r\n g = g2;\r\n b = b2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGBA2: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n let a = input.readUnsignedByte() / 255;\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let nr = input.readUnsignedByte() / 255;\r\n let ng = input.readUnsignedByte() / 255;\r\n let nb = input.readUnsignedByte() / 255;\r\n let na = input.readUnsignedByte() / 255;\r\n let nr2 = input.readUnsignedByte() / 255;\r\n let ng2 = input.readUnsignedByte() / 255;\r\n let nb2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\r\n setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\r\n setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\r\n setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\r\n }\r\n time = time2;\r\n r = nr;\r\n g = ng;\r\n b = nb;\r\n a = na;\r\n r2 = nr2;\r\n g2 = ng2;\r\n b2 = nb2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGB2: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let nr = input.readUnsignedByte() / 255;\r\n let ng = input.readUnsignedByte() / 255;\r\n let nb = input.readUnsignedByte() / 255;\r\n let nr2 = input.readUnsignedByte() / 255;\r\n let ng2 = input.readUnsignedByte() / 255;\r\n let nb2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\r\n setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\r\n setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\r\n }\r\n time = time2;\r\n r = nr;\r\n g = ng;\r\n b = nb;\r\n r2 = nr2;\r\n g2 = ng2;\r\n b2 = nb2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_ALPHA: {\r\n let timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\r\n let time = input.readFloat(), a = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, a);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let a2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\r\n }\r\n time = time2;\r\n a = a2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let boneIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\r\n switch (type) {\r\n case BONE_ROTATE:\r\n timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_TRANSLATE:\r\n timelines.push(readTimeline2(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\r\n break;\r\n case BONE_TRANSLATEX:\r\n timelines.push(readTimeline1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\r\n break;\r\n case BONE_TRANSLATEY:\r\n timelines.push(readTimeline1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\r\n break;\r\n case BONE_SCALE:\r\n timelines.push(readTimeline2(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SCALEX:\r\n timelines.push(readTimeline1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SCALEY:\r\n timelines.push(readTimeline1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SHEAR:\r\n timelines.push(readTimeline2(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SHEARX:\r\n timelines.push(readTimeline1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SHEARY:\r\n timelines.push(readTimeline1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\r\n }\r\n }\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\r\n let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\r\n let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\r\n }\r\n time = time2;\r\n mix = mix2;\r\n softness = softness2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\r\n let timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\r\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\r\n setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\r\n setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n mixScaleX = mixScaleX2;\r\n mixScaleY = mixScaleY2;\r\n mixShearY = mixShearY2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let index = input.readInt(true);\r\n let data = skeletonData.pathConstraints[index];\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n switch (input.readByte()) {\r\n case PATH_POSITION:\r\n timelines.push(readTimeline1(\r\n input,\r\n new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),\r\n data.positionMode == 0 /* Fixed */ ? scale : 1\r\n ));\r\n break;\r\n case PATH_SPACING:\r\n timelines.push(readTimeline1(\r\n input,\r\n new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),\r\n data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */ ? scale : 1\r\n ));\r\n break;\r\n case PATH_MIX:\r\n let timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\r\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\r\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let skin = skeletonData.skins[input.readInt(true)];\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let slotIndex = input.readInt(true);\r\n for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n let attachmentName = input.readStringRef();\r\n if (!attachmentName)\r\n throw new Error(\"attachmentName must not be null.\");\r\n let attachment = skin.getAttachment(slotIndex, attachmentName);\r\n let timelineType = input.readByte();\r\n let frameCount = input.readInt(true);\r\n let frameLast = frameCount - 1;\r\n switch (timelineType) {\r\n case ATTACHMENT_DEFORM: {\r\n let vertexAttachment = attachment;\r\n let weighted = vertexAttachment.bones;\r\n let vertices = vertexAttachment.vertices;\r\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n let bezierCount = input.readInt(true);\r\n let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);\r\n let time = input.readFloat();\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n let deform;\r\n let end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = Utils.newFloatArray(deformLength);\r\n let start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (let v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n } else {\r\n for (let v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (let v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frame, time, deform);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\r\n }\r\n time = time2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case ATTACHMENT_SEQUENCE: {\r\n let timeline = new SequenceTimeline(frameCount, slotIndex, attachment);\r\n for (let frame = 0; frame < frameCount; frame++) {\r\n let time = input.readFloat();\r\n let modeAndIndex = input.readInt32();\r\n timeline.setFrame(\r\n frame,\r\n time,\r\n SequenceModeValues[modeAndIndex & 15],\r\n modeAndIndex >> 4,\r\n input.readFloat()\r\n );\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n let drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n let timeline = new DrawOrderTimeline(drawOrderCount);\r\n let slotCount = skeletonData.slots.length;\r\n for (let i = 0; i < drawOrderCount; i++) {\r\n let time = input.readFloat();\r\n let offsetCount = input.readInt(true);\r\n let drawOrder = Utils.newArray(slotCount, 0);\r\n for (let ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n let unchanged = Utils.newArray(slotCount - offsetCount, 0);\r\n let originalIndex = 0, unchangedIndex = 0;\r\n for (let ii = 0; ii < offsetCount; ii++) {\r\n let slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (let ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n }\r\n let eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n let timeline = new EventTimeline(eventCount);\r\n for (let i = 0; i < eventCount; i++) {\r\n let time = input.readFloat();\r\n let eventData = skeletonData.events[input.readInt(true)];\r\n let event = new Event(time, eventData);\r\n event.intValue = input.readInt(false);\r\n event.floatValue = input.readFloat();\r\n event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event.data.audioPath) {\r\n event.volume = input.readFloat();\r\n event.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event);\r\n }\r\n timelines.push(timeline);\r\n }\r\n let duration = 0;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n duration = Math.max(duration, timelines[i].getDuration());\r\n return new Animation(name, timelines, duration);\r\n }\r\n };\r\n var BinaryInput = class {\r\n constructor(data, strings = new Array(), index = 0, buffer = new DataView(data.buffer)) {\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n readByte() {\r\n return this.buffer.getInt8(this.index++);\r\n }\r\n readUnsignedByte() {\r\n return this.buffer.getUint8(this.index++);\r\n }\r\n readShort() {\r\n let value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n }\r\n readInt32() {\r\n let value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n }\r\n readInt(optimizePositive) {\r\n let b = this.readByte();\r\n let result = b & 127;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 7;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 14;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 21;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : result >>> 1 ^ -(result & 1);\r\n }\r\n readStringRef() {\r\n let index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n }\r\n readString() {\r\n let byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n let chars = \"\";\r\n let charCount = 0;\r\n for (let i = 0; i < byteCount; ) {\r\n let b = this.readUnsignedByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode((b & 31) << 6 | this.readByte() & 63);\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode((b & 15) << 12 | (this.readByte() & 63) << 6 | this.readByte() & 63);\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n }\r\n readFloat() {\r\n let value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n }\r\n readBoolean() {\r\n return this.readByte() != 0;\r\n }\r\n };\r\n var LinkedMesh = class {\r\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritTimeline = inheritDeform;\r\n }\r\n };\r\n var Vertices = class {\r\n constructor(bones = null, vertices = null) {\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n };\r\n var AttachmentType = /* @__PURE__ */ ((AttachmentType2) => {\r\n AttachmentType2[AttachmentType2[\"Region\"] = 0] = \"Region\";\r\n AttachmentType2[AttachmentType2[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType2[AttachmentType2[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType2[AttachmentType2[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType2[AttachmentType2[\"Path\"] = 4] = \"Path\";\r\n AttachmentType2[AttachmentType2[\"Point\"] = 5] = \"Point\";\r\n AttachmentType2[AttachmentType2[\"Clipping\"] = 6] = \"Clipping\";\r\n return AttachmentType2;\r\n })(AttachmentType || {});\r\n function readTimeline1(input, timeline, scale) {\r\n let time = input.readFloat(), value = input.readFloat() * scale;\r\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\r\n timeline.setFrame(frame, time, value);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), value2 = input.readFloat() * scale;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\r\n }\r\n time = time2;\r\n value = value2;\r\n }\r\n return timeline;\r\n }\r\n function readTimeline2(input, timeline, scale) {\r\n let time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\r\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\r\n timeline.setFrame(frame, time, value1, value2);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\r\n }\r\n time = time2;\r\n value1 = nvalue1;\r\n value2 = nvalue2;\r\n }\r\n return timeline;\r\n }\r\n function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\r\n timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\r\n }\r\n var BONE_ROTATE = 0;\r\n var BONE_TRANSLATE = 1;\r\n var BONE_TRANSLATEX = 2;\r\n var BONE_TRANSLATEY = 3;\r\n var BONE_SCALE = 4;\r\n var BONE_SCALEX = 5;\r\n var BONE_SCALEY = 6;\r\n var BONE_SHEAR = 7;\r\n var BONE_SHEARX = 8;\r\n var BONE_SHEARY = 9;\r\n var SLOT_ATTACHMENT = 0;\r\n var SLOT_RGBA = 1;\r\n var SLOT_RGB = 2;\r\n var SLOT_RGBA2 = 3;\r\n var SLOT_RGB2 = 4;\r\n var SLOT_ALPHA = 5;\r\n var ATTACHMENT_DEFORM = 0;\r\n var ATTACHMENT_SEQUENCE = 1;\r\n var PATH_POSITION = 0;\r\n var PATH_SPACING = 1;\r\n var PATH_MIX = 2;\r\n var CURVE_STEPPED = 1;\r\n var CURVE_BEZIER = 2;\r\n\r\n // spine-core/src/SkeletonBounds.ts\r\n var SkeletonBounds = class {\r\n constructor() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new Pool(() => {\r\n return Utils.newFloatArray(16);\r\n });\r\n }\r\n update(skeleton, updateAabb) {\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n let boundingBoxes = this.boundingBoxes;\r\n let polygons = this.polygons;\r\n let polygonPool = this.polygonPool;\r\n let slots = skeleton.slots;\r\n let slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (let i = 0; i < slotCount; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof BoundingBoxAttachment) {\r\n let boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n let polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n } else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n }\r\n aabbCompute() {\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++) {\r\n let polygon = polygons[i];\r\n let vertices = polygon;\r\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n let x = vertices[ii];\r\n let y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n }\r\n aabbContainsPoint(x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n }\r\n aabbIntersectsSegment(x1, y1, x2, y2) {\r\n let minX = this.minX;\r\n let minY = this.minY;\r\n let maxX = this.maxX;\r\n let maxY = this.maxY;\r\n if (x1 <= minX && x2 <= minX || y1 <= minY && y2 <= minY || x1 >= maxX && x2 >= maxX || y1 >= maxY && y2 >= maxY)\r\n return false;\r\n let m = (y2 - y1) / (x2 - x1);\r\n let y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n let x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n }\r\n aabbIntersectsSkeleton(bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n }\r\n containsPoint(x, y) {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n }\r\n containsPointPolygon(polygon, x, y) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n let prevIndex = nn - 2;\r\n let inside = false;\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let vertexY = vertices[ii + 1];\r\n let prevY = vertices[prevIndex + 1];\r\n if (vertexY < y && prevY >= y || prevY < y && vertexY >= y) {\r\n let vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n }\r\n intersectsSegment(x1, y1, x2, y2) {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n }\r\n intersectsSegmentPolygon(polygon, x1, y1, x2, y2) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n let width12 = x1 - x2, height12 = y1 - y2;\r\n let det1 = x1 * y2 - y1 * x2;\r\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let x4 = vertices[ii], y4 = vertices[ii + 1];\r\n let det2 = x3 * y4 - y3 * x4;\r\n let width34 = x3 - x4, height34 = y3 - y4;\r\n let det3 = width12 * height34 - height12 * width34;\r\n let x = (det1 * width34 - width12 * det2) / det3;\r\n if ((x >= x3 && x <= x4 || x >= x4 && x <= x3) && (x >= x1 && x <= x2 || x >= x2 && x <= x1)) {\r\n let y = (det1 * height34 - height12 * det2) / det3;\r\n if ((y >= y3 && y <= y4 || y >= y4 && y <= y3) && (y >= y1 && y <= y2 || y >= y2 && y <= y1))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n }\r\n getPolygon(boundingBox) {\r\n if (!boundingBox)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n let index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n }\r\n getWidth() {\r\n return this.maxX - this.minX;\r\n }\r\n getHeight() {\r\n return this.maxY - this.minY;\r\n }\r\n };\r\n\r\n // spine-core/src/Triangulator.ts\r\n var Triangulator = class {\r\n constructor() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new Pool(() => {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new Pool(() => {\r\n return new Array();\r\n });\r\n }\r\n triangulate(verticesArray) {\r\n let vertices = verticesArray;\r\n let vertexCount = verticesArray.length >> 1;\r\n let indices = this.indicesArray;\r\n indices.length = 0;\r\n for (let i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n let isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (let i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n let triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n let previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer:\r\n if (!isConcave[i]) {\r\n let p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n let p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n let p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n let p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n let v = indices[ii] << 1;\r\n let vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n let previousIndex = (vertexCount + i - 1) % vertexCount;\r\n let nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n }\r\n decompose(verticesArray, triangles) {\r\n let vertices = verticesArray;\r\n let convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n let convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n let polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n let polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n let fanBaseIndex = -1, lastWinding = 0;\r\n for (let i = 0, n = triangles.length; i < n; i += 3) {\r\n let t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n let x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n let x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n let x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n let merged = false;\r\n if (fanBaseIndex == t1) {\r\n let o = polygon.length - 4;\r\n let winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n let winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n } else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (let i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n let firstIndex = polygonIndices[0];\r\n let lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n let o = polygon.length - 4;\r\n let prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n let prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n let firstX = polygon[0], firstY = polygon[1];\r\n let secondX = polygon[2], secondY = polygon[3];\r\n let winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (let ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n let otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n let otherFirstIndex = otherIndices[0];\r\n let otherSecondIndex = otherIndices[1];\r\n let otherLastIndex = otherIndices[2];\r\n let otherPoly = convexPolygons[ii];\r\n let x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n let winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n let winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (let i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n }\r\n static isConcave(index, vertexCount, vertices, indices) {\r\n let previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n let current = indices[index] << 1;\r\n let next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(\r\n vertices[previous],\r\n vertices[previous + 1],\r\n vertices[current],\r\n vertices[current + 1],\r\n vertices[next],\r\n vertices[next + 1]\r\n );\r\n }\r\n static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n }\r\n static winding(p1x, p1y, p2x, p2y, p3x, p3y) {\r\n let px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n }\r\n };\r\n\r\n // spine-core/src/SkeletonClipping.ts\r\n var SkeletonClipping = class {\r\n constructor() {\r\n this.triangulator = new Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n }\r\n clipStart(slot, clip) {\r\n if (this.clipAttachment)\r\n return 0;\r\n this.clipAttachment = clip;\r\n let n = clip.worldVerticesLength;\r\n let vertices = Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n let clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n let clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (let i = 0, n2 = clippingPolygons.length; i < n2; i++) {\r\n let polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n }\r\n clipEndWithSlot(slot) {\r\n if (this.clipAttachment && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n }\r\n clipEnd() {\r\n if (!this.clipAttachment)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n }\r\n isClipping() {\r\n return this.clipAttachment != null;\r\n }\r\n clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n let clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n let clippedTriangles = this.clippedTriangles;\r\n let polygons = this.clippingPolygons;\r\n let polygonsCount = polygons.length;\r\n let vertexSize = twoColor ? 12 : 8;\r\n let index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer:\r\n for (let i = 0; i < trianglesLength; i += 3) {\r\n let vertexOffset = triangles[i] << 1;\r\n let x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n let u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n let x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n let u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n let x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n let u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (let p = 0; p < polygonsCount; p++) {\r\n let s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n let clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n let d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n let d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n let clipOutputCount = clipOutputLength >> 1;\r\n let clipOutputItems = this.clipOutput;\r\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (let ii = 0; ii < clipOutputLength; ii += 2) {\r\n let x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n let c0 = x - x3, c1 = y - y3;\r\n let a = (d0 * c0 + d1 * c1) * d;\r\n let b = (d4 * c0 + d2 * c1) * d;\r\n let c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (let ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = index + ii;\r\n clippedTrianglesItems[s + 2] = index + ii + 1;\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n } else {\r\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n } else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = index + 1;\r\n clippedTrianglesItems[s + 2] = index + 2;\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n }\r\n clip(x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n let originalOutput = output;\r\n let clipped = false;\r\n let input;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n } else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n let clippingVertices = clippingArea;\r\n let clippingVerticesLast = clippingArea.length - 4;\r\n for (let i = 0; ; i += 2) {\r\n let edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n let edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n let deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n let inputVertices = input;\r\n let inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (let ii = 0; ii < inputVerticesLength; ii += 2) {\r\n let inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n let inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n let side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 1e-6) {\r\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n } else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n } else if (side2) {\r\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 1e-6) {\r\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n } else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n let temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (let i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n } else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n }\r\n static makeClockwise(polygon) {\r\n let vertices = polygon;\r\n let verticeslength = polygon.length;\r\n let area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (let i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n let x = vertices[i], y = vertices[i + 1];\r\n let other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/SkeletonJson.ts\r\n var SkeletonJson = class {\r\n constructor(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n readSkeletonData(json) {\r\n let scale = this.scale;\r\n let skeletonData = new SkeletonData();\r\n let root = typeof json === \"string\" ? JSON.parse(json) : json;\r\n let skeletonMap = root.skeleton;\r\n if (skeletonMap) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (let i = 0; i < root.bones.length; i++) {\r\n let boneMap = root.bones[i];\r\n let parent = null;\r\n let parentName = getValue(boneMap, \"parent\", null);\r\n if (parentName)\r\n parent = skeletonData.findBone(parentName);\r\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\r\n data.length = getValue(boneMap, \"length\", 0) * scale;\r\n data.x = getValue(boneMap, \"x\", 0) * scale;\r\n data.y = getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = getValue(boneMap, \"shearX\", 0);\r\n data.shearY = getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\r\n data.skinRequired = getValue(boneMap, \"skin\", false);\r\n let color = getValue(boneMap, \"color\", null);\r\n if (color)\r\n data.color.setFromString(color);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (let i = 0; i < root.slots.length; i++) {\r\n let slotMap = root.slots[i];\r\n let boneData = skeletonData.findBone(slotMap.bone);\r\n if (!boneData)\r\n throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);\r\n let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\r\n let color = getValue(slotMap, \"color\", null);\r\n if (color)\r\n data.color.setFromString(color);\r\n let dark = getValue(slotMap, \"dark\", null);\r\n if (dark)\r\n data.darkColor = Color.fromString(dark);\r\n data.attachmentName = getValue(slotMap, \"attachment\", null);\r\n data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (let i = 0; i < root.ik.length; i++) {\r\n let constraintMap = root.ik[i];\r\n let data = new IkConstraintData(constraintMap.name);\r\n data.order = getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\r\n let bone = skeletonData.findBone(constraintMap.bones[ii]);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${constraintMap.bones[ii]} for IK constraint ${constraintMap.name}.`);\r\n data.bones.push(bone);\r\n }\r\n let target = skeletonData.findBone(constraintMap.target);\r\n ;\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${constraintMap.target} for IK constraint ${constraintMap.name}.`);\r\n data.target = target;\r\n data.mix = getValue(constraintMap, \"mix\", 1);\r\n data.softness = getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = getValue(constraintMap, \"compress\", false);\r\n data.stretch = getValue(constraintMap, \"stretch\", false);\r\n data.uniform = getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (let i = 0; i < root.transform.length; i++) {\r\n let constraintMap = root.transform[i];\r\n let data = new TransformConstraintData(constraintMap.name);\r\n data.order = getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\r\n let boneName = constraintMap.bones[ii];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${boneName} for transform constraint ${constraintMap.name}.`);\r\n data.bones.push(bone);\r\n }\r\n let targetName = constraintMap.target;\r\n let target = skeletonData.findBone(targetName);\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${targetName} for transform constraint ${constraintMap.name}.`);\r\n data.target = target;\r\n data.local = getValue(constraintMap, \"local\", false);\r\n data.relative = getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\r\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\r\n data.mixX = getValue(constraintMap, \"mixX\", 1);\r\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\r\n data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\r\n data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\r\n data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (let i = 0; i < root.path.length; i++) {\r\n let constraintMap = root.path[i];\r\n let data = new PathConstraintData(constraintMap.name);\r\n data.order = getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\r\n let boneName = constraintMap.bones[ii];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${boneName} for path constraint ${constraintMap.name}.`);\r\n data.bones.push(bone);\r\n }\r\n let targetName = constraintMap.target;\r\n let target = skeletonData.findSlot(targetName);\r\n if (!target)\r\n throw new Error(`Couldn't find target slot ${targetName} for path constraint ${constraintMap.name}.`);\r\n data.target = target;\r\n data.positionMode = Utils.enumValue(PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\r\n data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\r\n data.rotateMode = Utils.enumValue(RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\r\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\r\n data.position = getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == 0 /* Fixed */)\r\n data.position *= scale;\r\n data.spacing = getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\r\n data.spacing *= scale;\r\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\r\n data.mixX = getValue(constraintMap, \"mixX\", 1);\r\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (let i = 0; i < root.skins.length; i++) {\r\n let skinMap = root.skins[i];\r\n let skin = new Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\r\n let boneName = skinMap.bones[ii];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${boneName} for skin ${skinMap.name}.`);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\r\n let constraintName = skinMap.ik[ii];\r\n let constraint = skeletonData.findIkConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(`Couldn't find IK constraint ${constraintName} for skin ${skinMap.name}.`);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\r\n let constraintName = skinMap.transform[ii];\r\n let constraint = skeletonData.findTransformConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(`Couldn't find transform constraint ${constraintName} for skin ${skinMap.name}.`);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (let ii = 0; ii < skinMap.path.length; ii++) {\r\n let constraintName = skinMap.path[ii];\r\n let constraint = skeletonData.findPathConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(`Couldn't find path constraint ${constraintName} for skin ${skinMap.name}.`);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (let slotName in skinMap.attachments) {\r\n let slot = skeletonData.findSlot(slotName);\r\n if (!slot)\r\n throw new Error(`Couldn't find slot ${slotName} for skin ${skinMap.name}.`);\r\n let slotMap = skinMap.attachments[slotName];\r\n for (let entryName in slotMap) {\r\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n let linkedMesh = this.linkedMeshes[i];\r\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (!skin)\r\n throw new Error(`Skin not found: ${linkedMesh.skin}`);\r\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (!parent)\r\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\r\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent);\r\n if (linkedMesh.mesh.region != null)\r\n linkedMesh.mesh.updateRegion();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (let eventName in root.events) {\r\n let eventMap = root.events[eventName];\r\n let data = new EventData(eventName);\r\n data.intValue = getValue(eventMap, \"int\", 0);\r\n data.floatValue = getValue(eventMap, \"float\", 0);\r\n data.stringValue = getValue(eventMap, \"string\", \"\");\r\n data.audioPath = getValue(eventMap, \"audio\", null);\r\n if (data.audioPath) {\r\n data.volume = getValue(eventMap, \"volume\", 1);\r\n data.balance = getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (let animationName in root.animations) {\r\n let animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n }\r\n readAttachment(map, skin, slotIndex, name, skeletonData) {\r\n let scale = this.scale;\r\n name = getValue(map, \"name\", name);\r\n switch (getValue(map, \"type\", \"region\")) {\r\n case \"region\": {\r\n let path = getValue(map, \"path\", name);\r\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\r\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\r\n if (!region)\r\n return null;\r\n region.path = path;\r\n region.x = getValue(map, \"x\", 0) * scale;\r\n region.y = getValue(map, \"y\", 0) * scale;\r\n region.scaleX = getValue(map, \"scaleX\", 1);\r\n region.scaleY = getValue(map, \"scaleY\", 1);\r\n region.rotation = getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n region.sequence = sequence;\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n region.color.setFromString(color);\r\n if (region.region != null)\r\n region.updateRegion();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (!box)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n let path = getValue(map, \"path\", name);\r\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\r\n if (!mesh)\r\n return null;\r\n mesh.path = path;\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n mesh.color.setFromString(color);\r\n mesh.width = getValue(map, \"width\", 0) * scale;\r\n mesh.height = getValue(map, \"height\", 0) * scale;\r\n mesh.sequence = sequence;\r\n let parent = getValue(map, \"parent\", null);\r\n if (parent) {\r\n this.linkedMeshes.push(new LinkedMesh2(mesh, getValue(map, \"skin\", null), slotIndex, parent, getValue(map, \"timelines\", true)));\r\n return mesh;\r\n }\r\n let uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n if (mesh.region != null)\r\n mesh.updateRegion();\r\n mesh.edges = getValue(map, \"edges\", null);\r\n mesh.hullLength = getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n let path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (!path)\r\n return null;\r\n path.closed = getValue(map, \"closed\", false);\r\n path.constantSpeed = getValue(map, \"constantSpeed\", true);\r\n let vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n let lengths = Utils.newArray(vertexCount / 3, 0);\r\n for (let i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n let point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (!point)\r\n return null;\r\n point.x = getValue(map, \"x\", 0) * scale;\r\n point.y = getValue(map, \"y\", 0) * scale;\r\n point.rotation = getValue(map, \"rotation\", 0);\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (!clip)\r\n return null;\r\n let end = getValue(map, \"end\", null);\r\n if (end)\r\n clip.endSlot = skeletonData.findSlot(end);\r\n let vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n }\r\n readSequence(map) {\r\n if (map == null)\r\n return null;\r\n let sequence = new Sequence(getValue(map, \"count\", 0));\r\n sequence.start = getValue(map, \"start\", 1);\r\n sequence.digits = getValue(map, \"digits\", 0);\r\n sequence.setupIndex = getValue(map, \"setup\", 0);\r\n return sequence;\r\n }\r\n readVertices(map, attachment, verticesLength) {\r\n let scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n let vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n let scaledVertices = Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (let i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n let weights = new Array();\r\n let bones = new Array();\r\n for (let i = 0, n = vertices.length; i < n; ) {\r\n let boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (let nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = Utils.toFloatArray(weights);\r\n }\r\n readAnimation(map, name, skeletonData) {\r\n let scale = this.scale;\r\n let timelines = new Array();\r\n if (map.slots) {\r\n for (let slotName in map.slots) {\r\n let slotMap = map.slots[slotName];\r\n let slot = skeletonData.findSlot(slotName);\r\n if (!slot)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n let slotIndex = slot.index;\r\n for (let timelineName in slotMap) {\r\n let timelineMap = slotMap[timelineName];\r\n if (!timelineMap)\r\n continue;\r\n let frames = timelineMap.length;\r\n if (timelineName == \"attachment\") {\r\n let timeline = new AttachmentTimeline(frames, slotIndex);\r\n for (let frame = 0; frame < frames; frame++) {\r\n let keyMap = timelineMap[frame];\r\n timeline.setFrame(frame, getValue(keyMap, \"time\", 0), getValue(keyMap, \"name\", null));\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"rgba\") {\r\n let timeline = new RGBATimeline(frames, frames << 2, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.color);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.color);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"rgb\") {\r\n let timeline = new RGBTimeline(frames, frames * 3, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.color);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.color);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"alpha\") {\r\n timelines.push(readTimeline12(timelineMap, new AlphaTimeline(frames, frames, slotIndex), 0, 1));\r\n } else if (timelineName == \"rgba2\") {\r\n let timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.light);\r\n let color2 = Color.fromString(keyMap.dark);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.light);\r\n let newColor2 = Color.fromString(nextMap.dark);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n color2 = newColor2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"rgb2\") {\r\n let timeline = new RGB2Timeline(frames, frames * 6, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.light);\r\n let color2 = Color.fromString(keyMap.dark);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.light);\r\n let newColor2 = Color.fromString(nextMap.dark);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n color2 = newColor2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (let boneName in map.bones) {\r\n let boneMap = map.bones[boneName];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n let boneIndex = bone.index;\r\n for (let timelineName in boneMap) {\r\n let timelineMap = boneMap[timelineName];\r\n let frames = timelineMap.length;\r\n if (frames == 0)\r\n continue;\r\n if (timelineName === \"rotate\") {\r\n timelines.push(readTimeline12(timelineMap, new RotateTimeline(frames, frames, boneIndex), 0, 1));\r\n } else if (timelineName === \"translate\") {\r\n let timeline = new TranslateTimeline(frames, frames << 1, boneIndex);\r\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, scale));\r\n } else if (timelineName === \"translatex\") {\r\n let timeline = new TranslateXTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\r\n } else if (timelineName === \"translatey\") {\r\n let timeline = new TranslateYTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\r\n } else if (timelineName === \"scale\") {\r\n let timeline = new ScaleTimeline(frames, frames << 1, boneIndex);\r\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 1, 1));\r\n } else if (timelineName === \"scalex\") {\r\n let timeline = new ScaleXTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\r\n } else if (timelineName === \"scaley\") {\r\n let timeline = new ScaleYTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\r\n } else if (timelineName === \"shear\") {\r\n let timeline = new ShearTimeline(frames, frames << 1, boneIndex);\r\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, 1));\r\n } else if (timelineName === \"shearx\") {\r\n let timeline = new ShearXTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\r\n } else if (timelineName === \"sheary\") {\r\n let timeline = new ShearYTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\r\n }\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (let constraintName in map.ik) {\r\n let constraintMap = map.ik[constraintName];\r\n let keyMap = constraintMap[0];\r\n if (!keyMap)\r\n continue;\r\n let constraint = skeletonData.findIkConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(\"IK Constraint not found: \" + constraintName);\r\n let constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n let timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mix = getValue(keyMap, \"mix\", 1);\r\n let softness = getValue(keyMap, \"softness\", 0) * scale;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\r\n let nextMap = constraintMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let mix2 = getValue(nextMap, \"mix\", 1);\r\n let softness2 = getValue(nextMap, \"softness\", 0) * scale;\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\r\n }\r\n time = time2;\r\n mix = mix2;\r\n softness = softness2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n if (map.transform) {\r\n for (let constraintName in map.transform) {\r\n let timelineMap = map.transform[constraintName];\r\n let keyMap = timelineMap[0];\r\n if (!keyMap)\r\n continue;\r\n let constraint = skeletonData.findTransformConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(\"Transform constraint not found: \" + constraintName);\r\n let constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n let timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\r\n let mixX = getValue(keyMap, \"mixX\", 1);\r\n let mixY = getValue(keyMap, \"mixY\", mixX);\r\n let mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\r\n let mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\r\n let mixShearY = getValue(keyMap, \"mixShearY\", 1);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\r\n let mixX2 = getValue(nextMap, \"mixX\", 1);\r\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\r\n let mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\r\n let mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\r\n let mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n mixScaleX = mixScaleX2;\r\n mixScaleY = mixScaleY2;\r\n mixScaleX = mixScaleX2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n if (map.path) {\r\n for (let constraintName in map.path) {\r\n let constraintMap = map.path[constraintName];\r\n let constraint = skeletonData.findPathConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n let constraintIndex = skeletonData.pathConstraints.indexOf(constraint);\r\n for (let timelineName in constraintMap) {\r\n let timelineMap = constraintMap[timelineName];\r\n let keyMap = timelineMap[0];\r\n if (!keyMap)\r\n continue;\r\n let frames = timelineMap.length;\r\n if (timelineName === \"position\") {\r\n let timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.positionMode == 0 /* Fixed */ ? scale : 1));\r\n } else if (timelineName === \"spacing\") {\r\n let timeline = new PathConstraintSpacingTimeline(frames, frames, constraintIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.spacingMode == 0 /* Length */ || constraint.spacingMode == 1 /* Fixed */ ? scale : 1));\r\n } else if (timelineName === \"mix\") {\r\n let timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\r\n let mixX = getValue(keyMap, \"mixX\", 1);\r\n let mixY = getValue(keyMap, \"mixY\", mixX);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\r\n let mixX2 = getValue(nextMap, \"mixX\", 1);\r\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n if (map.attachments) {\r\n for (let attachmentsName in map.attachments) {\r\n let attachmentsMap = map.attachments[attachmentsName];\r\n let skin = skeletonData.findSkin(attachmentsName);\r\n if (!skin)\r\n throw new Error(\"Skin not found: \" + attachmentsName);\r\n for (let slotMapName in attachmentsMap) {\r\n let slotMap = attachmentsMap[slotMapName];\r\n let slot = skeletonData.findSlot(slotMapName);\r\n if (!slot)\r\n throw new Error(\"Slot not found: \" + slotMapName);\r\n let slotIndex = slot.index;\r\n for (let attachmentMapName in slotMap) {\r\n let attachmentMap = slotMap[attachmentMapName];\r\n let attachment = skin.getAttachment(slotIndex, attachmentMapName);\r\n for (let timelineMapName in attachmentMap) {\r\n let timelineMap = attachmentMap[timelineMapName];\r\n let keyMap = timelineMap[0];\r\n if (!keyMap)\r\n continue;\r\n if (timelineMapName == \"deform\") {\r\n let weighted = attachment.bones;\r\n let vertices = attachment.vertices;\r\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n let timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\r\n let time = getValue(keyMap, \"time\", 0);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n let deform;\r\n let verticesValue = getValue(keyMap, \"vertices\", null);\r\n if (!verticesValue)\r\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = Utils.newFloatArray(deformLength);\r\n let start = getValue(keyMap, \"offset\", 0);\r\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (let i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (let i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frame, time, deform);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let curve = keyMap.curve;\r\n if (curve)\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\r\n time = time2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineMapName == \"sequence\") {\r\n let timeline = new SequenceTimeline(timelineMap.length, slotIndex, attachment);\r\n let lastDelay = 0;\r\n for (let frame = 0; frame < timelineMap.length; frame++) {\r\n let delay = getValue(keyMap, \"delay\", lastDelay);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mode = SequenceMode[getValue(keyMap, \"mode\", \"hold\")];\r\n let index = getValue(keyMap, \"index\", 0);\r\n timeline.setFrame(frame, time, mode, index, delay);\r\n lastDelay = delay;\r\n keyMap = timelineMap[frame + 1];\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (map.drawOrder) {\r\n let timeline = new DrawOrderTimeline(map.drawOrder.length);\r\n let slotCount = skeletonData.slots.length;\r\n let frame = 0;\r\n for (let i = 0; i < map.drawOrder.length; i++, frame++) {\r\n let drawOrderMap = map.drawOrder[i];\r\n let drawOrder = null;\r\n let offsets = getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets) {\r\n drawOrder = Utils.newArray(slotCount, -1);\r\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\r\n let originalIndex = 0, unchangedIndex = 0;\r\n for (let ii = 0; ii < offsets.length; ii++) {\r\n let offsetMap = offsets[ii];\r\n let slot = skeletonData.findSlot(offsetMap.slot);\r\n if (!slot)\r\n throw new Error(\"Slot not found: \" + slot);\r\n let slotIndex = slot.index;\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (let ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n }\r\n if (map.events) {\r\n let timeline = new EventTimeline(map.events.length);\r\n let frame = 0;\r\n for (let i = 0; i < map.events.length; i++, frame++) {\r\n let eventMap = map.events[i];\r\n let eventData = skeletonData.findEvent(eventMap.name);\r\n if (!eventData)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n let event = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\r\n event.intValue = getValue(eventMap, \"int\", eventData.intValue);\r\n event.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\r\n event.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event.data.audioPath) {\r\n event.volume = getValue(eventMap, \"volume\", 1);\r\n event.balance = getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frame, event);\r\n }\r\n timelines.push(timeline);\r\n }\r\n let duration = 0;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n duration = Math.max(duration, timelines[i].getDuration());\r\n skeletonData.animations.push(new Animation(name, timelines, duration));\r\n }\r\n };\r\n var LinkedMesh2 = class {\r\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritTimeline = inheritDeform;\r\n }\r\n };\r\n function readTimeline12(keys, timeline, defaultValue, scale) {\r\n let keyMap = keys[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let value = getValue(keyMap, \"value\", defaultValue) * scale;\r\n let bezier = 0;\r\n for (let frame = 0; ; frame++) {\r\n timeline.setFrame(frame, time, value);\r\n let nextMap = keys[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n return timeline;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let value2 = getValue(nextMap, \"value\", defaultValue) * scale;\r\n if (keyMap.curve)\r\n bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\r\n time = time2;\r\n value = value2;\r\n keyMap = nextMap;\r\n }\r\n }\r\n function readTimeline22(keys, timeline, name1, name2, defaultValue, scale) {\r\n let keyMap = keys[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let value1 = getValue(keyMap, name1, defaultValue) * scale;\r\n let value2 = getValue(keyMap, name2, defaultValue) * scale;\r\n let bezier = 0;\r\n for (let frame = 0; ; frame++) {\r\n timeline.setFrame(frame, time, value1, value2);\r\n let nextMap = keys[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n return timeline;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\r\n let nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\r\n }\r\n time = time2;\r\n value1 = nvalue1;\r\n value2 = nvalue2;\r\n keyMap = nextMap;\r\n }\r\n }\r\n function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\r\n if (curve == \"stepped\") {\r\n timeline.setStepped(frame);\r\n return bezier;\r\n }\r\n let i = value << 2;\r\n let cx1 = curve[i];\r\n let cy1 = curve[i + 1] * scale;\r\n let cx2 = curve[i + 2];\r\n let cy2 = curve[i + 3] * scale;\r\n timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\r\n return bezier + 1;\r\n }\r\n function getValue(map, property, defaultValue) {\r\n return map[property] !== void 0 ? map[property] : defaultValue;\r\n }\r\n\r\n // spine-core/src/polyfills.ts\r\n (() => {\r\n if (typeof Math.fround === \"undefined\") {\r\n Math.fround = function(array) {\r\n return function(x) {\r\n return array[0] = x, array[0];\r\n };\r\n }(new Float32Array(1));\r\n }\r\n })();\r\n\r\n // spine-webgl/src/WebGL.ts\r\n var ManagedWebGLRenderingContext = class {\r\n constructor(canvasOrContext, contextConfig = { alpha: \"true\" }) {\r\n this.restorables = new Array();\r\n if (!(canvasOrContext instanceof WebGLRenderingContext || typeof WebGL2RenderingContext !== \"undefined\" && canvasOrContext instanceof WebGL2RenderingContext)) {\r\n let canvas = canvasOrContext;\r\n this.gl = canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig);\r\n this.canvas = canvas;\r\n canvas.addEventListener(\"webglcontextlost\", (e) => {\r\n let event = e;\r\n if (e)\r\n e.preventDefault();\r\n });\r\n canvas.addEventListener(\"webglcontextrestored\", (e) => {\r\n for (let i = 0, n = this.restorables.length; i < n; i++)\r\n this.restorables[i].restore();\r\n });\r\n } else {\r\n this.gl = canvasOrContext;\r\n this.canvas = this.gl.canvas;\r\n }\r\n }\r\n addRestorable(restorable) {\r\n this.restorables.push(restorable);\r\n }\r\n removeRestorable(restorable) {\r\n let index = this.restorables.indexOf(restorable);\r\n if (index > -1)\r\n this.restorables.splice(index, 1);\r\n }\r\n };\r\n var ONE = 1;\r\n var ONE_MINUS_SRC_COLOR = 769;\r\n var SRC_ALPHA = 770;\r\n var ONE_MINUS_SRC_ALPHA = 771;\r\n var DST_COLOR = 774;\r\n var WebGLBlendModeConverter = class {\r\n static getDestGLBlendMode(blendMode) {\r\n switch (blendMode) {\r\n case 0 /* Normal */:\r\n return ONE_MINUS_SRC_ALPHA;\r\n case 1 /* Additive */:\r\n return ONE;\r\n case 2 /* Multiply */:\r\n return ONE_MINUS_SRC_ALPHA;\r\n case 3 /* Screen */:\r\n return ONE_MINUS_SRC_ALPHA;\r\n default:\r\n throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n }\r\n static getSourceColorGLBlendMode(blendMode, premultipliedAlpha = false) {\r\n switch (blendMode) {\r\n case 0 /* Normal */:\r\n return premultipliedAlpha ? ONE : SRC_ALPHA;\r\n case 1 /* Additive */:\r\n return premultipliedAlpha ? ONE : SRC_ALPHA;\r\n case 2 /* Multiply */:\r\n return DST_COLOR;\r\n case 3 /* Screen */:\r\n return ONE;\r\n default:\r\n throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n }\r\n static getSourceAlphaGLBlendMode(blendMode) {\r\n switch (blendMode) {\r\n case 0 /* Normal */:\r\n return ONE;\r\n case 1 /* Additive */:\r\n return ONE;\r\n case 2 /* Multiply */:\r\n return ONE_MINUS_SRC_ALPHA;\r\n case 3 /* Screen */:\r\n return ONE_MINUS_SRC_COLOR;\r\n default:\r\n throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n }\r\n };\r\n\r\n // spine-webgl/src/GLTexture.ts\r\n var _GLTexture = class extends Texture {\r\n constructor(context, image, useMipMaps = false) {\r\n super(image);\r\n this.texture = null;\r\n this.boundUnit = 0;\r\n this.useMipMaps = false;\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n this.useMipMaps = useMipMaps;\r\n this.restore();\r\n this.context.addRestorable(this);\r\n }\r\n setFilters(minFilter, magFilter) {\r\n let gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, _GLTexture.validateMagFilter(magFilter));\r\n this.useMipMaps = _GLTexture.usesMipMaps(minFilter);\r\n if (this.useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n }\r\n static validateMagFilter(magFilter) {\r\n switch (magFilter) {\r\n case 9987 /* MipMap */:\r\n case 9987 /* MipMapLinearLinear */:\r\n case 9985 /* MipMapLinearNearest */:\r\n case 9986 /* MipMapNearestLinear */:\r\n case 9984 /* MipMapNearestNearest */:\r\n return 9729 /* Linear */;\r\n default:\r\n return magFilter;\r\n }\r\n }\r\n static usesMipMaps(filter) {\r\n switch (filter) {\r\n case 9987 /* MipMap */:\r\n case 9987 /* MipMapLinearLinear */:\r\n case 9985 /* MipMapLinearNearest */:\r\n case 9986 /* MipMapNearestLinear */:\r\n case 9984 /* MipMapNearestNearest */:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n setWraps(uWrap, vWrap) {\r\n let gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\r\n }\r\n update(useMipMaps) {\r\n let gl = this.context.gl;\r\n if (!this.texture)\r\n this.texture = this.context.gl.createTexture();\r\n this.bind();\r\n if (_GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n }\r\n restore() {\r\n this.texture = null;\r\n this.update(this.useMipMaps);\r\n }\r\n bind(unit = 0) {\r\n let gl = this.context.gl;\r\n this.boundUnit = unit;\r\n gl.activeTexture(gl.TEXTURE0 + unit);\r\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\r\n }\r\n unbind() {\r\n let gl = this.context.gl;\r\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\r\n gl.bindTexture(gl.TEXTURE_2D, null);\r\n }\r\n dispose() {\r\n this.context.removeRestorable(this);\r\n let gl = this.context.gl;\r\n gl.deleteTexture(this.texture);\r\n }\r\n };\r\n var GLTexture = _GLTexture;\r\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\r\n\r\n // spine-webgl/src/AssetManager.ts\r\n var AssetManager = class extends AssetManagerBase {\r\n constructor(context, pathPrefix = \"\", downloader = new Downloader()) {\r\n super((image) => {\r\n return new GLTexture(context, image);\r\n }, pathPrefix, downloader);\r\n }\r\n };\r\n\r\n // spine-webgl/src/Vector3.ts\r\n var Vector3 = class {\r\n constructor(x = 0, y = 0, z = 0) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n setFrom(v) {\r\n this.x = v.x;\r\n this.y = v.y;\r\n this.z = v.z;\r\n return this;\r\n }\r\n set(x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n }\r\n add(v) {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n return this;\r\n }\r\n sub(v) {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n return this;\r\n }\r\n scale(s) {\r\n this.x *= s;\r\n this.y *= s;\r\n this.z *= s;\r\n return this;\r\n }\r\n normalize() {\r\n let len = this.length();\r\n if (len == 0)\r\n return this;\r\n len = 1 / len;\r\n this.x *= len;\r\n this.y *= len;\r\n this.z *= len;\r\n return this;\r\n }\r\n cross(v) {\r\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\r\n }\r\n multiply(matrix) {\r\n let l_mat = matrix.values;\r\n return this.set(\r\n this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03],\r\n this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13],\r\n this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]\r\n );\r\n }\r\n project(matrix) {\r\n let l_mat = matrix.values;\r\n let l_w = 1 / (this.x * l_mat[M30] + this.y * l_mat[M31] + this.z * l_mat[M32] + l_mat[M33]);\r\n return this.set(\r\n (this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03]) * l_w,\r\n (this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13]) * l_w,\r\n (this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]) * l_w\r\n );\r\n }\r\n dot(v) {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n }\r\n length() {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n }\r\n distance(v) {\r\n let a = v.x - this.x;\r\n let b = v.y - this.y;\r\n let c = v.z - this.z;\r\n return Math.sqrt(a * a + b * b + c * c);\r\n }\r\n };\r\n\r\n // spine-webgl/src/Matrix4.ts\r\n var M00 = 0;\r\n var M01 = 4;\r\n var M02 = 8;\r\n var M03 = 12;\r\n var M10 = 1;\r\n var M11 = 5;\r\n var M12 = 9;\r\n var M13 = 13;\r\n var M20 = 2;\r\n var M21 = 6;\r\n var M22 = 10;\r\n var M23 = 14;\r\n var M30 = 3;\r\n var M31 = 7;\r\n var M32 = 11;\r\n var M33 = 15;\r\n var _Matrix4 = class {\r\n constructor() {\r\n this.temp = new Float32Array(16);\r\n this.values = new Float32Array(16);\r\n let v = this.values;\r\n v[M00] = 1;\r\n v[M11] = 1;\r\n v[M22] = 1;\r\n v[M33] = 1;\r\n }\r\n set(values) {\r\n this.values.set(values);\r\n return this;\r\n }\r\n transpose() {\r\n let t = this.temp;\r\n let v = this.values;\r\n t[M00] = v[M00];\r\n t[M01] = v[M10];\r\n t[M02] = v[M20];\r\n t[M03] = v[M30];\r\n t[M10] = v[M01];\r\n t[M11] = v[M11];\r\n t[M12] = v[M21];\r\n t[M13] = v[M31];\r\n t[M20] = v[M02];\r\n t[M21] = v[M12];\r\n t[M22] = v[M22];\r\n t[M23] = v[M32];\r\n t[M30] = v[M03];\r\n t[M31] = v[M13];\r\n t[M32] = v[M23];\r\n t[M33] = v[M33];\r\n return this.set(t);\r\n }\r\n identity() {\r\n let v = this.values;\r\n v[M00] = 1;\r\n v[M01] = 0;\r\n v[M02] = 0;\r\n v[M03] = 0;\r\n v[M10] = 0;\r\n v[M11] = 1;\r\n v[M12] = 0;\r\n v[M13] = 0;\r\n v[M20] = 0;\r\n v[M21] = 0;\r\n v[M22] = 1;\r\n v[M23] = 0;\r\n v[M30] = 0;\r\n v[M31] = 0;\r\n v[M32] = 0;\r\n v[M33] = 1;\r\n return this;\r\n }\r\n invert() {\r\n let v = this.values;\r\n let t = this.temp;\r\n let l_det = v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33];\r\n if (l_det == 0)\r\n throw new Error(\"non-invertible matrix\");\r\n let inv_det = 1 / l_det;\r\n t[M00] = v[M12] * v[M23] * v[M31] - v[M13] * v[M22] * v[M31] + v[M13] * v[M21] * v[M32] - v[M11] * v[M23] * v[M32] - v[M12] * v[M21] * v[M33] + v[M11] * v[M22] * v[M33];\r\n t[M01] = v[M03] * v[M22] * v[M31] - v[M02] * v[M23] * v[M31] - v[M03] * v[M21] * v[M32] + v[M01] * v[M23] * v[M32] + v[M02] * v[M21] * v[M33] - v[M01] * v[M22] * v[M33];\r\n t[M02] = v[M02] * v[M13] * v[M31] - v[M03] * v[M12] * v[M31] + v[M03] * v[M11] * v[M32] - v[M01] * v[M13] * v[M32] - v[M02] * v[M11] * v[M33] + v[M01] * v[M12] * v[M33];\r\n t[M03] = v[M03] * v[M12] * v[M21] - v[M02] * v[M13] * v[M21] - v[M03] * v[M11] * v[M22] + v[M01] * v[M13] * v[M22] + v[M02] * v[M11] * v[M23] - v[M01] * v[M12] * v[M23];\r\n t[M10] = v[M13] * v[M22] * v[M30] - v[M12] * v[M23] * v[M30] - v[M13] * v[M20] * v[M32] + v[M10] * v[M23] * v[M32] + v[M12] * v[M20] * v[M33] - v[M10] * v[M22] * v[M33];\r\n t[M11] = v[M02] * v[M23] * v[M30] - v[M03] * v[M22] * v[M30] + v[M03] * v[M20] * v[M32] - v[M00] * v[M23] * v[M32] - v[M02] * v[M20] * v[M33] + v[M00] * v[M22] * v[M33];\r\n t[M12] = v[M03] * v[M12] * v[M30] - v[M02] * v[M13] * v[M30] - v[M03] * v[M10] * v[M32] + v[M00] * v[M13] * v[M32] + v[M02] * v[M10] * v[M33] - v[M00] * v[M12] * v[M33];\r\n t[M13] = v[M02] * v[M13] * v[M20] - v[M03] * v[M12] * v[M20] + v[M03] * v[M10] * v[M22] - v[M00] * v[M13] * v[M22] - v[M02] * v[M10] * v[M23] + v[M00] * v[M12] * v[M23];\r\n t[M20] = v[M11] * v[M23] * v[M30] - v[M13] * v[M21] * v[M30] + v[M13] * v[M20] * v[M31] - v[M10] * v[M23] * v[M31] - v[M11] * v[M20] * v[M33] + v[M10] * v[M21] * v[M33];\r\n t[M21] = v[M03] * v[M21] * v[M30] - v[M01] * v[M23] * v[M30] - v[M03] * v[M20] * v[M31] + v[M00] * v[M23] * v[M31] + v[M01] * v[M20] * v[M33] - v[M00] * v[M21] * v[M33];\r\n t[M22] = v[M01] * v[M13] * v[M30] - v[M03] * v[M11] * v[M30] + v[M03] * v[M10] * v[M31] - v[M00] * v[M13] * v[M31] - v[M01] * v[M10] * v[M33] + v[M00] * v[M11] * v[M33];\r\n t[M23] = v[M03] * v[M11] * v[M20] - v[M01] * v[M13] * v[M20] - v[M03] * v[M10] * v[M21] + v[M00] * v[M13] * v[M21] + v[M01] * v[M10] * v[M23] - v[M00] * v[M11] * v[M23];\r\n t[M30] = v[M12] * v[M21] * v[M30] - v[M11] * v[M22] * v[M30] - v[M12] * v[M20] * v[M31] + v[M10] * v[M22] * v[M31] + v[M11] * v[M20] * v[M32] - v[M10] * v[M21] * v[M32];\r\n t[M31] = v[M01] * v[M22] * v[M30] - v[M02] * v[M21] * v[M30] + v[M02] * v[M20] * v[M31] - v[M00] * v[M22] * v[M31] - v[M01] * v[M20] * v[M32] + v[M00] * v[M21] * v[M32];\r\n t[M32] = v[M02] * v[M11] * v[M30] - v[M01] * v[M12] * v[M30] - v[M02] * v[M10] * v[M31] + v[M00] * v[M12] * v[M31] + v[M01] * v[M10] * v[M32] - v[M00] * v[M11] * v[M32];\r\n t[M33] = v[M01] * v[M12] * v[M20] - v[M02] * v[M11] * v[M20] + v[M02] * v[M10] * v[M21] - v[M00] * v[M12] * v[M21] - v[M01] * v[M10] * v[M22] + v[M00] * v[M11] * v[M22];\r\n v[M00] = t[M00] * inv_det;\r\n v[M01] = t[M01] * inv_det;\r\n v[M02] = t[M02] * inv_det;\r\n v[M03] = t[M03] * inv_det;\r\n v[M10] = t[M10] * inv_det;\r\n v[M11] = t[M11] * inv_det;\r\n v[M12] = t[M12] * inv_det;\r\n v[M13] = t[M13] * inv_det;\r\n v[M20] = t[M20] * inv_det;\r\n v[M21] = t[M21] * inv_det;\r\n v[M22] = t[M22] * inv_det;\r\n v[M23] = t[M23] * inv_det;\r\n v[M30] = t[M30] * inv_det;\r\n v[M31] = t[M31] * inv_det;\r\n v[M32] = t[M32] * inv_det;\r\n v[M33] = t[M33] * inv_det;\r\n return this;\r\n }\r\n determinant() {\r\n let v = this.values;\r\n return v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33];\r\n }\r\n translate(x, y, z) {\r\n let v = this.values;\r\n v[M03] += x;\r\n v[M13] += y;\r\n v[M23] += z;\r\n return this;\r\n }\r\n copy() {\r\n return new _Matrix4().set(this.values);\r\n }\r\n projection(near, far, fovy, aspectRatio) {\r\n this.identity();\r\n let l_fd = 1 / Math.tan(fovy * (Math.PI / 180) / 2);\r\n let l_a1 = (far + near) / (near - far);\r\n let l_a2 = 2 * far * near / (near - far);\r\n let v = this.values;\r\n v[M00] = l_fd / aspectRatio;\r\n v[M10] = 0;\r\n v[M20] = 0;\r\n v[M30] = 0;\r\n v[M01] = 0;\r\n v[M11] = l_fd;\r\n v[M21] = 0;\r\n v[M31] = 0;\r\n v[M02] = 0;\r\n v[M12] = 0;\r\n v[M22] = l_a1;\r\n v[M32] = -1;\r\n v[M03] = 0;\r\n v[M13] = 0;\r\n v[M23] = l_a2;\r\n v[M33] = 0;\r\n return this;\r\n }\r\n ortho2d(x, y, width, height) {\r\n return this.ortho(x, x + width, y, y + height, 0, 1);\r\n }\r\n ortho(left, right, bottom, top, near, far) {\r\n this.identity();\r\n let x_orth = 2 / (right - left);\r\n let y_orth = 2 / (top - bottom);\r\n let z_orth = -2 / (far - near);\r\n let tx = -(right + left) / (right - left);\r\n let ty = -(top + bottom) / (top - bottom);\r\n let tz = -(far + near) / (far - near);\r\n let v = this.values;\r\n v[M00] = x_orth;\r\n v[M10] = 0;\r\n v[M20] = 0;\r\n v[M30] = 0;\r\n v[M01] = 0;\r\n v[M11] = y_orth;\r\n v[M21] = 0;\r\n v[M31] = 0;\r\n v[M02] = 0;\r\n v[M12] = 0;\r\n v[M22] = z_orth;\r\n v[M32] = 0;\r\n v[M03] = tx;\r\n v[M13] = ty;\r\n v[M23] = tz;\r\n v[M33] = 1;\r\n return this;\r\n }\r\n multiply(matrix) {\r\n let t = this.temp;\r\n let v = this.values;\r\n let m = matrix.values;\r\n t[M00] = v[M00] * m[M00] + v[M01] * m[M10] + v[M02] * m[M20] + v[M03] * m[M30];\r\n t[M01] = v[M00] * m[M01] + v[M01] * m[M11] + v[M02] * m[M21] + v[M03] * m[M31];\r\n t[M02] = v[M00] * m[M02] + v[M01] * m[M12] + v[M02] * m[M22] + v[M03] * m[M32];\r\n t[M03] = v[M00] * m[M03] + v[M01] * m[M13] + v[M02] * m[M23] + v[M03] * m[M33];\r\n t[M10] = v[M10] * m[M00] + v[M11] * m[M10] + v[M12] * m[M20] + v[M13] * m[M30];\r\n t[M11] = v[M10] * m[M01] + v[M11] * m[M11] + v[M12] * m[M21] + v[M13] * m[M31];\r\n t[M12] = v[M10] * m[M02] + v[M11] * m[M12] + v[M12] * m[M22] + v[M13] * m[M32];\r\n t[M13] = v[M10] * m[M03] + v[M11] * m[M13] + v[M12] * m[M23] + v[M13] * m[M33];\r\n t[M20] = v[M20] * m[M00] + v[M21] * m[M10] + v[M22] * m[M20] + v[M23] * m[M30];\r\n t[M21] = v[M20] * m[M01] + v[M21] * m[M11] + v[M22] * m[M21] + v[M23] * m[M31];\r\n t[M22] = v[M20] * m[M02] + v[M21] * m[M12] + v[M22] * m[M22] + v[M23] * m[M32];\r\n t[M23] = v[M20] * m[M03] + v[M21] * m[M13] + v[M22] * m[M23] + v[M23] * m[M33];\r\n t[M30] = v[M30] * m[M00] + v[M31] * m[M10] + v[M32] * m[M20] + v[M33] * m[M30];\r\n t[M31] = v[M30] * m[M01] + v[M31] * m[M11] + v[M32] * m[M21] + v[M33] * m[M31];\r\n t[M32] = v[M30] * m[M02] + v[M31] * m[M12] + v[M32] * m[M22] + v[M33] * m[M32];\r\n t[M33] = v[M30] * m[M03] + v[M31] * m[M13] + v[M32] * m[M23] + v[M33] * m[M33];\r\n return this.set(this.temp);\r\n }\r\n multiplyLeft(matrix) {\r\n let t = this.temp;\r\n let v = this.values;\r\n let m = matrix.values;\r\n t[M00] = m[M00] * v[M00] + m[M01] * v[M10] + m[M02] * v[M20] + m[M03] * v[M30];\r\n t[M01] = m[M00] * v[M01] + m[M01] * v[M11] + m[M02] * v[M21] + m[M03] * v[M31];\r\n t[M02] = m[M00] * v[M02] + m[M01] * v[M12] + m[M02] * v[M22] + m[M03] * v[M32];\r\n t[M03] = m[M00] * v[M03] + m[M01] * v[M13] + m[M02] * v[M23] + m[M03] * v[M33];\r\n t[M10] = m[M10] * v[M00] + m[M11] * v[M10] + m[M12] * v[M20] + m[M13] * v[M30];\r\n t[M11] = m[M10] * v[M01] + m[M11] * v[M11] + m[M12] * v[M21] + m[M13] * v[M31];\r\n t[M12] = m[M10] * v[M02] + m[M11] * v[M12] + m[M12] * v[M22] + m[M13] * v[M32];\r\n t[M13] = m[M10] * v[M03] + m[M11] * v[M13] + m[M12] * v[M23] + m[M13] * v[M33];\r\n t[M20] = m[M20] * v[M00] + m[M21] * v[M10] + m[M22] * v[M20] + m[M23] * v[M30];\r\n t[M21] = m[M20] * v[M01] + m[M21] * v[M11] + m[M22] * v[M21] + m[M23] * v[M31];\r\n t[M22] = m[M20] * v[M02] + m[M21] * v[M12] + m[M22] * v[M22] + m[M23] * v[M32];\r\n t[M23] = m[M20] * v[M03] + m[M21] * v[M13] + m[M22] * v[M23] + m[M23] * v[M33];\r\n t[M30] = m[M30] * v[M00] + m[M31] * v[M10] + m[M32] * v[M20] + m[M33] * v[M30];\r\n t[M31] = m[M30] * v[M01] + m[M31] * v[M11] + m[M32] * v[M21] + m[M33] * v[M31];\r\n t[M32] = m[M30] * v[M02] + m[M31] * v[M12] + m[M32] * v[M22] + m[M33] * v[M32];\r\n t[M33] = m[M30] * v[M03] + m[M31] * v[M13] + m[M32] * v[M23] + m[M33] * v[M33];\r\n return this.set(this.temp);\r\n }\r\n lookAt(position, direction, up) {\r\n let xAxis = _Matrix4.xAxis, yAxis = _Matrix4.yAxis, zAxis = _Matrix4.zAxis;\r\n zAxis.setFrom(direction).normalize();\r\n xAxis.setFrom(direction).normalize();\r\n xAxis.cross(up).normalize();\r\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\r\n this.identity();\r\n let val = this.values;\r\n val[M00] = xAxis.x;\r\n val[M01] = xAxis.y;\r\n val[M02] = xAxis.z;\r\n val[M10] = yAxis.x;\r\n val[M11] = yAxis.y;\r\n val[M12] = yAxis.z;\r\n val[M20] = -zAxis.x;\r\n val[M21] = -zAxis.y;\r\n val[M22] = -zAxis.z;\r\n _Matrix4.tmpMatrix.identity();\r\n _Matrix4.tmpMatrix.values[M03] = -position.x;\r\n _Matrix4.tmpMatrix.values[M13] = -position.y;\r\n _Matrix4.tmpMatrix.values[M23] = -position.z;\r\n this.multiply(_Matrix4.tmpMatrix);\r\n return this;\r\n }\r\n };\r\n var Matrix42 = _Matrix4;\r\n Matrix42.xAxis = new Vector3();\r\n Matrix42.yAxis = new Vector3();\r\n Matrix42.zAxis = new Vector3();\r\n Matrix42.tmpMatrix = new _Matrix4();\r\n\r\n // spine-webgl/src/Camera.ts\r\n var OrthoCamera = class {\r\n constructor(viewportWidth, viewportHeight) {\r\n this.position = new Vector3(0, 0, 0);\r\n this.direction = new Vector3(0, 0, -1);\r\n this.up = new Vector3(0, 1, 0);\r\n this.near = 0;\r\n this.far = 100;\r\n this.zoom = 1;\r\n this.viewportWidth = 0;\r\n this.viewportHeight = 0;\r\n this.projectionView = new Matrix42();\r\n this.inverseProjectionView = new Matrix42();\r\n this.projection = new Matrix42();\r\n this.view = new Matrix42();\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n this.update();\r\n }\r\n update() {\r\n let projection = this.projection;\r\n let view = this.view;\r\n let projectionView = this.projectionView;\r\n let inverseProjectionView = this.inverseProjectionView;\r\n let zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\r\n projection.ortho(\r\n zoom * (-viewportWidth / 2),\r\n zoom * (viewportWidth / 2),\r\n zoom * (-viewportHeight / 2),\r\n zoom * (viewportHeight / 2),\r\n this.near,\r\n this.far\r\n );\r\n view.lookAt(this.position, this.direction, this.up);\r\n projectionView.set(projection.values);\r\n projectionView.multiply(view);\r\n inverseProjectionView.set(projectionView.values).invert();\r\n }\r\n screenToWorld(screenCoords, screenWidth, screenHeight) {\r\n let x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\r\n screenCoords.x = 2 * x / screenWidth - 1;\r\n screenCoords.y = 2 * y / screenHeight - 1;\r\n screenCoords.z = 2 * screenCoords.z - 1;\r\n screenCoords.project(this.inverseProjectionView);\r\n return screenCoords;\r\n }\r\n worldToScreen(worldCoords, screenWidth, screenHeight) {\r\n worldCoords.project(this.projectionView);\r\n worldCoords.x = screenWidth * (worldCoords.x + 1) / 2;\r\n worldCoords.y = screenHeight * (worldCoords.y + 1) / 2;\r\n worldCoords.z = (worldCoords.z + 1) / 2;\r\n return worldCoords;\r\n }\r\n setViewport(viewportWidth, viewportHeight) {\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n }\r\n };\r\n\r\n // spine-webgl/src/Input.ts\r\n var Input = class {\r\n constructor(element) {\r\n this.mouseX = 0;\r\n this.mouseY = 0;\r\n this.buttonDown = false;\r\n this.touch0 = null;\r\n this.touch1 = null;\r\n this.initialPinchDistance = 0;\r\n this.listeners = new Array();\r\n this.eventListeners = [];\r\n this.element = element;\r\n this.setupCallbacks(element);\r\n }\r\n setupCallbacks(element) {\r\n let mouseDown = (ev) => {\r\n if (ev instanceof MouseEvent) {\r\n let rect = element.getBoundingClientRect();\r\n this.mouseX = ev.clientX - rect.left;\r\n ;\r\n this.mouseY = ev.clientY - rect.top;\r\n this.buttonDown = true;\r\n this.listeners.map((listener) => {\r\n if (listener.down)\r\n listener.down(this.mouseX, this.mouseY);\r\n });\r\n document.addEventListener(\"mousemove\", mouseMove);\r\n document.addEventListener(\"mouseup\", mouseUp);\r\n }\r\n };\r\n let mouseMove = (ev) => {\r\n if (ev instanceof MouseEvent) {\r\n let rect = element.getBoundingClientRect();\r\n this.mouseX = ev.clientX - rect.left;\r\n ;\r\n this.mouseY = ev.clientY - rect.top;\r\n this.listeners.map((listener) => {\r\n if (this.buttonDown) {\r\n if (listener.dragged)\r\n listener.dragged(this.mouseX, this.mouseY);\r\n } else {\r\n if (listener.moved)\r\n listener.moved(this.mouseX, this.mouseY);\r\n }\r\n });\r\n }\r\n };\r\n let mouseUp = (ev) => {\r\n if (ev instanceof MouseEvent) {\r\n let rect = element.getBoundingClientRect();\r\n this.mouseX = ev.clientX - rect.left;\r\n ;\r\n this.mouseY = ev.clientY - rect.top;\r\n this.buttonDown = false;\r\n this.listeners.map((listener) => {\r\n if (listener.up)\r\n listener.up(this.mouseX, this.mouseY);\r\n });\r\n document.removeEventListener(\"mousemove\", mouseMove);\r\n document.removeEventListener(\"mouseup\", mouseUp);\r\n }\r\n };\r\n let mouseWheel = (e) => {\r\n e.preventDefault();\r\n let deltaY = e.deltaY;\r\n if (e.deltaMode == WheelEvent.DOM_DELTA_LINE)\r\n deltaY *= 8;\r\n if (e.deltaMode == WheelEvent.DOM_DELTA_PAGE)\r\n deltaY *= 24;\r\n this.listeners.map((listener) => {\r\n if (listener.wheel)\r\n listener.wheel(e.deltaY);\r\n });\r\n };\r\n element.addEventListener(\"mousedown\", mouseDown, true);\r\n element.addEventListener(\"mousemove\", mouseMove, true);\r\n element.addEventListener(\"mouseup\", mouseUp, true);\r\n element.addEventListener(\"wheel\", mouseWheel, true);\r\n element.addEventListener(\"touchstart\", (ev) => {\r\n if (!this.touch0 || !this.touch1) {\r\n var touches = ev.changedTouches;\r\n let nativeTouch = touches.item(0);\r\n if (!nativeTouch)\r\n return;\r\n let rect = element.getBoundingClientRect();\r\n let x = nativeTouch.clientX - rect.left;\r\n let y = nativeTouch.clientY - rect.top;\r\n let touch = new Touch(nativeTouch.identifier, x, y);\r\n this.mouseX = x;\r\n this.mouseY = y;\r\n this.buttonDown = true;\r\n if (!this.touch0) {\r\n this.touch0 = touch;\r\n this.listeners.map((listener) => {\r\n if (listener.down)\r\n listener.down(touch.x, touch.y);\r\n });\r\n } else if (!this.touch1) {\r\n this.touch1 = touch;\r\n let dx = this.touch1.x - this.touch0.x;\r\n let dy = this.touch1.x - this.touch0.x;\r\n this.initialPinchDistance = Math.sqrt(dx * dx + dy * dy);\r\n this.listeners.map((listener) => {\r\n if (listener.zoom)\r\n listener.zoom(this.initialPinchDistance, this.initialPinchDistance);\r\n });\r\n }\r\n }\r\n ev.preventDefault();\r\n }, false);\r\n element.addEventListener(\"touchmove\", (ev) => {\r\n if (this.touch0) {\r\n var touches = ev.changedTouches;\r\n let rect = element.getBoundingClientRect();\r\n for (var i = 0; i < touches.length; i++) {\r\n var nativeTouch = touches[i];\r\n let x = nativeTouch.clientX - rect.left;\r\n let y = nativeTouch.clientY - rect.top;\r\n if (this.touch0.identifier === nativeTouch.identifier) {\r\n this.touch0.x = this.mouseX = x;\r\n this.touch0.y = this.mouseY = y;\r\n this.listeners.map((listener) => {\r\n if (listener.dragged)\r\n listener.dragged(x, y);\r\n });\r\n }\r\n if (this.touch1 && this.touch1.identifier === nativeTouch.identifier) {\r\n this.touch1.x = this.mouseX = x;\r\n this.touch1.y = this.mouseY = y;\r\n }\r\n }\r\n if (this.touch0 && this.touch1) {\r\n let dx = this.touch1.x - this.touch0.x;\r\n let dy = this.touch1.x - this.touch0.x;\r\n let distance = Math.sqrt(dx * dx + dy * dy);\r\n this.listeners.map((listener) => {\r\n if (listener.zoom)\r\n listener.zoom(this.initialPinchDistance, distance);\r\n });\r\n }\r\n }\r\n ev.preventDefault();\r\n }, false);\r\n let touchEnd = (ev) => {\r\n if (this.touch0) {\r\n var touches = ev.changedTouches;\r\n let rect = element.getBoundingClientRect();\r\n for (var i = 0; i < touches.length; i++) {\r\n var nativeTouch = touches[i];\r\n let x = nativeTouch.clientX - rect.left;\r\n let y = nativeTouch.clientY - rect.top;\r\n if (this.touch0.identifier === nativeTouch.identifier) {\r\n this.touch0 = null;\r\n this.mouseX = x;\r\n this.mouseY = y;\r\n this.listeners.map((listener) => {\r\n if (listener.up)\r\n listener.up(x, y);\r\n });\r\n if (!this.touch1) {\r\n this.buttonDown = false;\r\n break;\r\n } else {\r\n this.touch0 = this.touch1;\r\n this.touch1 = null;\r\n this.mouseX = this.touch0.x;\r\n this.mouseX = this.touch0.x;\r\n this.buttonDown = true;\r\n this.listeners.map((listener) => {\r\n if (listener.down)\r\n listener.down(this.touch0.x, this.touch0.y);\r\n });\r\n }\r\n }\r\n if (this.touch1 && this.touch1.identifier) {\r\n this.touch1 = null;\r\n }\r\n }\r\n }\r\n ev.preventDefault();\r\n };\r\n element.addEventListener(\"touchend\", touchEnd, false);\r\n element.addEventListener(\"touchcancel\", touchEnd);\r\n }\r\n addListener(listener) {\r\n this.listeners.push(listener);\r\n }\r\n removeListener(listener) {\r\n let idx = this.listeners.indexOf(listener);\r\n if (idx > -1) {\r\n this.listeners.splice(idx, 1);\r\n }\r\n }\r\n };\r\n var Touch = class {\r\n constructor(identifier, x, y) {\r\n this.identifier = identifier;\r\n this.x = x;\r\n this.y = y;\r\n }\r\n };\r\n\r\n // spine-webgl/src/CameraController.ts\r\n var CameraController = class {\r\n constructor(canvas, camera) {\r\n this.canvas = canvas;\r\n this.camera = camera;\r\n let cameraX = 0, cameraY = 0, cameraZoom = 0;\r\n let mouseX = 0, mouseY = 0;\r\n let lastX = 0, lastY = 0;\r\n let initialZoom = 0;\r\n new Input(canvas).addListener({\r\n down: (x, y) => {\r\n cameraX = camera.position.x;\r\n cameraY = camera.position.y;\r\n mouseX = lastX = x;\r\n mouseY = lastY = y;\r\n initialZoom = camera.zoom;\r\n },\r\n dragged: (x, y) => {\r\n let deltaX = x - mouseX;\r\n let deltaY = y - mouseY;\r\n let originWorld = camera.screenToWorld(new Vector3(0, 0), canvas.clientWidth, canvas.clientHeight);\r\n let deltaWorld = camera.screenToWorld(new Vector3(deltaX, deltaY), canvas.clientWidth, canvas.clientHeight).sub(originWorld);\r\n camera.position.set(cameraX - deltaWorld.x, cameraY - deltaWorld.y, 0);\r\n camera.update();\r\n lastX = x;\r\n lastY = y;\r\n },\r\n wheel: (delta) => {\r\n let zoomAmount = delta / 200 * camera.zoom;\r\n let newZoom = camera.zoom + zoomAmount;\r\n if (newZoom > 0) {\r\n let x = 0, y = 0;\r\n if (delta < 0) {\r\n x = lastX;\r\n y = lastY;\r\n } else {\r\n let viewCenter = new Vector3(canvas.clientWidth / 2 + 15, canvas.clientHeight / 2);\r\n let mouseToCenterX = lastX - viewCenter.x;\r\n let mouseToCenterY = canvas.clientHeight - 1 - lastY - viewCenter.y;\r\n x = viewCenter.x - mouseToCenterX;\r\n y = canvas.clientHeight - 1 - viewCenter.y + mouseToCenterY;\r\n }\r\n let oldDistance = camera.screenToWorld(new Vector3(x, y), canvas.clientWidth, canvas.clientHeight);\r\n camera.zoom = newZoom;\r\n camera.update();\r\n let newDistance = camera.screenToWorld(new Vector3(x, y), canvas.clientWidth, canvas.clientHeight);\r\n camera.position.add(oldDistance.sub(newDistance));\r\n camera.update();\r\n }\r\n },\r\n zoom: (initialDistance, distance) => {\r\n let newZoom = initialDistance / distance;\r\n camera.zoom = initialZoom * newZoom;\r\n },\r\n up: (x, y) => {\r\n lastX = x;\r\n lastY = y;\r\n },\r\n moved: (x, y) => {\r\n lastX = x;\r\n lastY = y;\r\n }\r\n });\r\n }\r\n };\r\n\r\n // spine-webgl/src/Shader.ts\r\n var _Shader = class {\r\n constructor(context, vertexShader, fragmentShader) {\r\n this.vertexShader = vertexShader;\r\n this.fragmentShader = fragmentShader;\r\n this.vs = null;\r\n this.fs = null;\r\n this.program = null;\r\n this.tmp2x2 = new Float32Array(2 * 2);\r\n this.tmp3x3 = new Float32Array(3 * 3);\r\n this.tmp4x4 = new Float32Array(4 * 4);\r\n this.vsSource = vertexShader;\r\n this.fsSource = fragmentShader;\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n this.context.addRestorable(this);\r\n this.compile();\r\n }\r\n getProgram() {\r\n return this.program;\r\n }\r\n getVertexShader() {\r\n return this.vertexShader;\r\n }\r\n getFragmentShader() {\r\n return this.fragmentShader;\r\n }\r\n getVertexShaderSource() {\r\n return this.vsSource;\r\n }\r\n getFragmentSource() {\r\n return this.fsSource;\r\n }\r\n compile() {\r\n let gl = this.context.gl;\r\n try {\r\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\r\n if (!this.vs)\r\n throw new Error(\"Couldn't compile vertex shader.\");\r\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\r\n if (!this.fs)\r\n throw new Error(\"Couldn#t compile fragment shader.\");\r\n this.program = this.compileProgram(this.vs, this.fs);\r\n } catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n }\r\n compileShader(type, source) {\r\n let gl = this.context.gl;\r\n let shader = gl.createShader(type);\r\n if (!shader)\r\n throw new Error(\"Couldn't create shader.\");\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\r\n let error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\r\n gl.deleteShader(shader);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return shader;\r\n }\r\n compileProgram(vs, fs) {\r\n let gl = this.context.gl;\r\n let program = gl.createProgram();\r\n if (!program)\r\n throw new Error(\"Couldn't compile program.\");\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\r\n let error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\r\n gl.deleteProgram(program);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return program;\r\n }\r\n restore() {\r\n this.compile();\r\n }\r\n bind() {\r\n this.context.gl.useProgram(this.program);\r\n }\r\n unbind() {\r\n this.context.gl.useProgram(null);\r\n }\r\n setUniformi(uniform, value) {\r\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\r\n }\r\n setUniformf(uniform, value) {\r\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\r\n }\r\n setUniform2f(uniform, value, value2) {\r\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\r\n }\r\n setUniform3f(uniform, value, value2, value3) {\r\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\r\n }\r\n setUniform4f(uniform, value, value2, value3, value4) {\r\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\r\n }\r\n setUniform2x2f(uniform, value) {\r\n let gl = this.context.gl;\r\n this.tmp2x2.set(value);\r\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\r\n }\r\n setUniform3x3f(uniform, value) {\r\n let gl = this.context.gl;\r\n this.tmp3x3.set(value);\r\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\r\n }\r\n setUniform4x4f(uniform, value) {\r\n let gl = this.context.gl;\r\n this.tmp4x4.set(value);\r\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\r\n }\r\n getUniformLocation(uniform) {\r\n let gl = this.context.gl;\r\n if (!this.program)\r\n throw new Error(\"Shader not compiled.\");\r\n let location = gl.getUniformLocation(this.program, uniform);\r\n if (!location && !gl.isContextLost())\r\n throw new Error(`Couldn't find location for uniform ${uniform}`);\r\n return location;\r\n }\r\n getAttributeLocation(attribute) {\r\n let gl = this.context.gl;\r\n if (!this.program)\r\n throw new Error(\"Shader not compiled.\");\r\n let location = gl.getAttribLocation(this.program, attribute);\r\n if (location == -1 && !gl.isContextLost())\r\n throw new Error(`Couldn't find location for attribute ${attribute}`);\r\n return location;\r\n }\r\n dispose() {\r\n this.context.removeRestorable(this);\r\n let gl = this.context.gl;\r\n if (this.vs) {\r\n gl.deleteShader(this.vs);\r\n this.vs = null;\r\n }\r\n if (this.fs) {\r\n gl.deleteShader(this.fs);\r\n this.fs = null;\r\n }\r\n if (this.program) {\r\n gl.deleteProgram(this.program);\r\n this.program = null;\r\n }\r\n }\r\n static newColoredTextured(context) {\r\n let vs = `\r\n\t\t\t\tattribute vec4 ${_Shader.POSITION};\r\n\t\t\t\tattribute vec4 ${_Shader.COLOR};\r\n\t\t\t\tattribute vec2 ${_Shader.TEXCOORDS};\r\n\t\t\t\tuniform mat4 ${_Shader.MVP_MATRIX};\r\n\t\t\t\tvarying vec4 v_color;\r\n\t\t\t\tvarying vec2 v_texCoords;\r\n\r\n\t\t\t\tvoid main () {\r\n\t\t\t\t\tv_color = ${_Shader.COLOR};\r\n\t\t\t\t\tv_texCoords = ${_Shader.TEXCOORDS};\r\n\t\t\t\t\tgl_Position = ${_Shader.MVP_MATRIX} * ${_Shader.POSITION};\r\n\t\t\t\t}\r\n\t\t\t`;\r\n let fs = `\r\n\t\t\t\t#ifdef GL_ES\r\n\t\t\t\t\t#define LOWP lowp\r\n\t\t\t\t\tprecision mediump float;\r\n\t\t\t\t#else\r\n\t\t\t\t\t#define LOWP\r\n\t\t\t\t#endif\r\n\t\t\t\tvarying LOWP vec4 v_color;\r\n\t\t\t\tvarying vec2 v_texCoords;\r\n\t\t\t\tuniform sampler2D u_texture;\r\n\r\n\t\t\t\tvoid main () {\r\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\r\n\t\t\t\t}\r\n\t\t\t`;\r\n return new _Shader(context, vs, fs);\r\n }\r\n static newTwoColoredTextured(context) {\r\n let vs = `\r\n\t\t\t\tattribute vec4 ${_Shader.POSITION};\r\n\t\t\t\tattribute vec4 ${_Shader.COLOR};\r\n\t\t\t\tattribute vec4 ${_Shader.COLOR2};\r\n\t\t\t\tattribute vec2 ${_Shader.TEXCOORDS};\r\n\t\t\t\tuniform mat4 ${_Shader.MVP_MATRIX};\r\n\t\t\t\tvarying vec4 v_light;\r\n\t\t\t\tvarying vec4 v_dark;\r\n\t\t\t\tvarying vec2 v_texCoords;\r\n\r\n\t\t\t\tvoid main () {\r\n\t\t\t\t\tv_light = ${_Shader.COLOR};\r\n\t\t\t\t\tv_dark = ${_Shader.COLOR2};\r\n\t\t\t\t\tv_texCoords = ${_Shader.TEXCOORDS};\r\n\t\t\t\t\tgl_Position = ${_Shader.MVP_MATRIX} * ${_Shader.POSITION};\r\n\t\t\t\t}\r\n\t\t\t`;\r\n let fs = `\r\n\t\t\t\t#ifdef GL_ES\r\n\t\t\t\t\t#define LOWP lowp\r\n\t\t\t\t\tprecision mediump float;\r\n\t\t\t\t#else\r\n\t\t\t\t\t#define LOWP\r\n\t\t\t\t#endif\r\n\t\t\t\tvarying LOWP vec4 v_light;\r\n\t\t\t\tvarying LOWP vec4 v_dark;\r\n\t\t\t\tvarying vec2 v_texCoords;\r\n\t\t\t\tuniform sampler2D u_texture;\r\n\r\n\t\t\t\tvoid main () {\r\n\t\t\t\t\tvec4 texColor = texture2D(u_texture, v_texCoords);\r\n\t\t\t\t\tgl_FragColor.a = texColor.a * v_light.a;\r\n\t\t\t\t\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\r\n\t\t\t\t}\r\n\t\t\t`;\r\n return new _Shader(context, vs, fs);\r\n }\r\n static newColored(context) {\r\n let vs = `\r\n\t\t\t\tattribute vec4 ${_Shader.POSITION};\r\n\t\t\t\tattribute vec4 ${_Shader.COLOR};\r\n\t\t\t\tuniform mat4 ${_Shader.MVP_MATRIX};\r\n\t\t\t\tvarying vec4 v_color;\r\n\r\n\t\t\t\tvoid main () {\r\n\t\t\t\t\tv_color = ${_Shader.COLOR};\r\n\t\t\t\t\tgl_Position = ${_Shader.MVP_MATRIX} * ${_Shader.POSITION};\r\n\t\t\t\t}\r\n\t\t\t`;\r\n let fs = `\r\n\t\t\t\t#ifdef GL_ES\r\n\t\t\t\t\t#define LOWP lowp\r\n\t\t\t\t\tprecision mediump float;\r\n\t\t\t\t#else\r\n\t\t\t\t\t#define LOWP\r\n\t\t\t\t#endif\r\n\t\t\t\tvarying LOWP vec4 v_color;\r\n\r\n\t\t\t\tvoid main () {\r\n\t\t\t\t\tgl_FragColor = v_color;\r\n\t\t\t\t}\r\n\t\t\t`;\r\n return new _Shader(context, vs, fs);\r\n }\r\n };\r\n var Shader = _Shader;\r\n Shader.MVP_MATRIX = \"u_projTrans\";\r\n Shader.POSITION = \"a_position\";\r\n Shader.COLOR = \"a_color\";\r\n Shader.COLOR2 = \"a_color2\";\r\n Shader.TEXCOORDS = \"a_texCoords\";\r\n Shader.SAMPLER = \"u_texture\";\r\n\r\n // spine-webgl/src/Mesh.ts\r\n var Mesh = class {\r\n constructor(context, attributes, maxVertices, maxIndices) {\r\n this.attributes = attributes;\r\n this.verticesBuffer = null;\r\n this.verticesLength = 0;\r\n this.dirtyVertices = false;\r\n this.indicesBuffer = null;\r\n this.indicesLength = 0;\r\n this.dirtyIndices = false;\r\n this.elementsPerVertex = 0;\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n this.elementsPerVertex = 0;\r\n for (let i = 0; i < attributes.length; i++) {\r\n this.elementsPerVertex += attributes[i].numElements;\r\n }\r\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\r\n this.indices = new Uint16Array(maxIndices);\r\n this.context.addRestorable(this);\r\n }\r\n getAttributes() {\r\n return this.attributes;\r\n }\r\n maxVertices() {\r\n return this.vertices.length / this.elementsPerVertex;\r\n }\r\n numVertices() {\r\n return this.verticesLength / this.elementsPerVertex;\r\n }\r\n setVerticesLength(length) {\r\n this.dirtyVertices = true;\r\n this.verticesLength = length;\r\n }\r\n getVertices() {\r\n return this.vertices;\r\n }\r\n maxIndices() {\r\n return this.indices.length;\r\n }\r\n numIndices() {\r\n return this.indicesLength;\r\n }\r\n setIndicesLength(length) {\r\n this.dirtyIndices = true;\r\n this.indicesLength = length;\r\n }\r\n getIndices() {\r\n return this.indices;\r\n }\r\n getVertexSizeInFloats() {\r\n let size = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n let attribute = this.attributes[i];\r\n size += attribute.numElements;\r\n }\r\n return size;\r\n }\r\n setVertices(vertices) {\r\n this.dirtyVertices = true;\r\n if (vertices.length > this.vertices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\r\n this.vertices.set(vertices, 0);\r\n this.verticesLength = vertices.length;\r\n }\r\n setIndices(indices) {\r\n this.dirtyIndices = true;\r\n if (indices.length > this.indices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\r\n this.indices.set(indices, 0);\r\n this.indicesLength = indices.length;\r\n }\r\n draw(shader, primitiveType) {\r\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\r\n }\r\n drawWithOffset(shader, primitiveType, offset, count) {\r\n let gl = this.context.gl;\r\n if (this.dirtyVertices || this.dirtyIndices)\r\n this.update();\r\n this.bind(shader);\r\n if (this.indicesLength > 0) {\r\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\r\n } else {\r\n gl.drawArrays(primitiveType, offset, count);\r\n }\r\n this.unbind(shader);\r\n }\r\n bind(shader) {\r\n let gl = this.context.gl;\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n let offset = 0;\r\n for (let i = 0; i < this.attributes.length; i++) {\r\n let attrib = this.attributes[i];\r\n let location = shader.getAttributeLocation(attrib.name);\r\n gl.enableVertexAttribArray(location);\r\n gl.vertexAttribPointer(location, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\r\n offset += attrib.numElements;\r\n }\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n }\r\n unbind(shader) {\r\n let gl = this.context.gl;\r\n for (let i = 0; i < this.attributes.length; i++) {\r\n let attrib = this.attributes[i];\r\n let location = shader.getAttributeLocation(attrib.name);\r\n gl.disableVertexAttribArray(location);\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\r\n }\r\n update() {\r\n let gl = this.context.gl;\r\n if (this.dirtyVertices) {\r\n if (!this.verticesBuffer) {\r\n this.verticesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyVertices = false;\r\n }\r\n if (this.dirtyIndices) {\r\n if (!this.indicesBuffer) {\r\n this.indicesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyIndices = false;\r\n }\r\n }\r\n restore() {\r\n this.verticesBuffer = null;\r\n this.indicesBuffer = null;\r\n this.update();\r\n }\r\n dispose() {\r\n this.context.removeRestorable(this);\r\n let gl = this.context.gl;\r\n gl.deleteBuffer(this.verticesBuffer);\r\n gl.deleteBuffer(this.indicesBuffer);\r\n }\r\n };\r\n var VertexAttribute = class {\r\n constructor(name, type, numElements) {\r\n this.name = name;\r\n this.type = type;\r\n this.numElements = numElements;\r\n }\r\n };\r\n var Position2Attribute = class extends VertexAttribute {\r\n constructor() {\r\n super(Shader.POSITION, VertexAttributeType.Float, 2);\r\n }\r\n };\r\n var Position3Attribute = class extends VertexAttribute {\r\n constructor() {\r\n super(Shader.POSITION, VertexAttributeType.Float, 3);\r\n }\r\n };\r\n var TexCoordAttribute = class extends VertexAttribute {\r\n constructor(unit = 0) {\r\n super(Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2);\r\n }\r\n };\r\n var ColorAttribute = class extends VertexAttribute {\r\n constructor() {\r\n super(Shader.COLOR, VertexAttributeType.Float, 4);\r\n }\r\n };\r\n var Color2Attribute = class extends VertexAttribute {\r\n constructor() {\r\n super(Shader.COLOR2, VertexAttributeType.Float, 4);\r\n }\r\n };\r\n var VertexAttributeType = /* @__PURE__ */ ((VertexAttributeType2) => {\r\n VertexAttributeType2[VertexAttributeType2[\"Float\"] = 0] = \"Float\";\r\n return VertexAttributeType2;\r\n })(VertexAttributeType || {});\r\n\r\n // spine-webgl/src/PolygonBatcher.ts\r\n var _PolygonBatcher = class {\r\n constructor(context, twoColorTint = true, maxVertices = 10920) {\r\n this.drawCalls = 0;\r\n this.isDrawing = false;\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.cullWasEnabled = false;\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n let attributes = twoColorTint ? [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute(), new Color2Attribute()] : [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute()];\r\n this.mesh = new Mesh(context, attributes, maxVertices, maxVertices * 3);\r\n let gl = this.context.gl;\r\n this.srcColorBlend = gl.SRC_ALPHA;\r\n this.srcAlphaBlend = gl.ONE;\r\n this.dstBlend = gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n begin(shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\r\n this.drawCalls = 0;\r\n this.shader = shader;\r\n this.lastTexture = null;\r\n this.isDrawing = true;\r\n let gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFuncSeparate(this.srcColorBlend, this.dstBlend, this.srcAlphaBlend, this.dstBlend);\r\n this.cullWasEnabled = gl.isEnabled(gl.CULL_FACE);\r\n if (this.cullWasEnabled)\r\n gl.disable(gl.CULL_FACE);\r\n }\r\n setBlendMode(srcColorBlend, srcAlphaBlend, dstBlend) {\r\n if (this.srcColorBlend == srcColorBlend && this.srcAlphaBlend == srcAlphaBlend && this.dstBlend == dstBlend)\r\n return;\r\n this.srcColorBlend = srcColorBlend;\r\n this.srcAlphaBlend = srcAlphaBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n let gl = this.context.gl;\r\n gl.blendFuncSeparate(srcColorBlend, dstBlend, srcAlphaBlend, dstBlend);\r\n }\r\n }\r\n draw(texture, vertices, indices) {\r\n if (texture != this.lastTexture) {\r\n this.flush();\r\n this.lastTexture = texture;\r\n } else if (this.verticesLength + vertices.length > this.mesh.getVertices().length || this.indicesLength + indices.length > this.mesh.getIndices().length) {\r\n this.flush();\r\n }\r\n let indexStart = this.mesh.numVertices();\r\n this.mesh.getVertices().set(vertices, this.verticesLength);\r\n this.verticesLength += vertices.length;\r\n this.mesh.setVerticesLength(this.verticesLength);\r\n let indicesArray = this.mesh.getIndices();\r\n for (let i = this.indicesLength, j = 0; j < indices.length; i++, j++)\r\n indicesArray[i] = indices[j] + indexStart;\r\n this.indicesLength += indices.length;\r\n this.mesh.setIndicesLength(this.indicesLength);\r\n }\r\n flush() {\r\n if (this.verticesLength == 0)\r\n return;\r\n if (!this.lastTexture)\r\n throw new Error(\"No texture set.\");\r\n if (!this.shader)\r\n throw new Error(\"No shader set.\");\r\n this.lastTexture.bind();\r\n this.mesh.draw(this.shader, this.context.gl.TRIANGLES);\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.mesh.setVerticesLength(0);\r\n this.mesh.setIndicesLength(0);\r\n this.drawCalls++;\r\n _PolygonBatcher.globalDrawCalls++;\r\n }\r\n end() {\r\n if (!this.isDrawing)\r\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\r\n if (this.verticesLength > 0 || this.indicesLength > 0)\r\n this.flush();\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.isDrawing = false;\r\n let gl = this.context.gl;\r\n gl.disable(gl.BLEND);\r\n if (this.cullWasEnabled)\r\n gl.enable(gl.CULL_FACE);\r\n }\r\n getDrawCalls() {\r\n return this.drawCalls;\r\n }\r\n static getAndResetGlobalDrawCalls() {\r\n let result = _PolygonBatcher.globalDrawCalls;\r\n _PolygonBatcher.globalDrawCalls = 0;\r\n return result;\r\n }\r\n dispose() {\r\n this.mesh.dispose();\r\n }\r\n };\r\n var PolygonBatcher = _PolygonBatcher;\r\n PolygonBatcher.globalDrawCalls = 0;\r\n\r\n // spine-webgl/src/ShapeRenderer.ts\r\n var ShapeRenderer = class {\r\n constructor(context, maxVertices = 10920) {\r\n this.isDrawing = false;\r\n this.shapeType = ShapeType.Filled;\r\n this.color = new Color(1, 1, 1, 1);\r\n this.shader = null;\r\n this.vertexIndex = 0;\r\n this.tmp = new Vector2();\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n this.mesh = new Mesh(context, [new Position2Attribute(), new ColorAttribute()], maxVertices, 0);\r\n let gl = this.context.gl;\r\n this.srcColorBlend = gl.SRC_ALPHA;\r\n this.srcAlphaBlend = gl.ONE;\r\n this.dstBlend = gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n begin(shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has already been called\");\r\n this.shader = shader;\r\n this.vertexIndex = 0;\r\n this.isDrawing = true;\r\n let gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFuncSeparate(this.srcColorBlend, this.dstBlend, this.srcAlphaBlend, this.dstBlend);\r\n }\r\n setBlendMode(srcColorBlend, srcAlphaBlend, dstBlend) {\r\n this.srcColorBlend = srcColorBlend;\r\n this.srcAlphaBlend = srcAlphaBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n let gl = this.context.gl;\r\n gl.blendFuncSeparate(srcColorBlend, dstBlend, srcAlphaBlend, dstBlend);\r\n }\r\n }\r\n setColor(color) {\r\n this.color.setFromColor(color);\r\n }\r\n setColorWith(r, g, b, a) {\r\n this.color.set(r, g, b, a);\r\n }\r\n point(x, y, color) {\r\n this.check(ShapeType.Point, 1);\r\n if (!color)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n }\r\n line(x, y, x2, y2, color) {\r\n this.check(ShapeType.Line, 2);\r\n let vertices = this.mesh.getVertices();\r\n let idx = this.vertexIndex;\r\n if (!color)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n let vertices = this.mesh.getVertices();\r\n let idx = this.vertexIndex;\r\n if (!color)\r\n color = this.color;\r\n if (!color2)\r\n color2 = this.color;\r\n if (!color3)\r\n color3 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n } else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color);\r\n this.vertex(x3, y3, color2);\r\n this.vertex(x3, y3, color);\r\n this.vertex(x, y, color2);\r\n }\r\n }\r\n quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n let vertices = this.mesh.getVertices();\r\n let idx = this.vertexIndex;\r\n if (!color)\r\n color = this.color;\r\n if (!color2)\r\n color2 = this.color;\r\n if (!color3)\r\n color3 = this.color;\r\n if (!color4)\r\n color4 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n } else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n }\r\n rect(filled, x, y, width, height, color) {\r\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\r\n }\r\n rectLine(filled, x1, y1, x2, y2, width, color) {\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\r\n if (!color)\r\n color = this.color;\r\n let t = this.tmp.set(y2 - y1, x1 - x2);\r\n t.normalize();\r\n width *= 0.5;\r\n let tx = t.x * width;\r\n let ty = t.y * width;\r\n if (!filled) {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n } else {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n }\r\n x(x, y, size) {\r\n this.line(x - size, y - size, x + size, y + size);\r\n this.line(x - size, y + size, x + size, y - size);\r\n }\r\n polygon(polygonVertices, offset, count, color) {\r\n if (count < 3)\r\n throw new Error(\"Polygon must contain at least 3 vertices\");\r\n this.check(ShapeType.Line, count * 2);\r\n if (!color)\r\n color = this.color;\r\n let vertices = this.mesh.getVertices();\r\n let idx = this.vertexIndex;\r\n offset <<= 1;\r\n count <<= 1;\r\n let firstX = polygonVertices[offset];\r\n let firstY = polygonVertices[offset + 1];\r\n let last = offset + count;\r\n for (let i = offset, n = offset + count - 2; i < n; i += 2) {\r\n let x1 = polygonVertices[i];\r\n let y1 = polygonVertices[i + 1];\r\n let x2 = 0;\r\n let y2 = 0;\r\n if (i + 2 >= last) {\r\n x2 = firstX;\r\n y2 = firstY;\r\n } else {\r\n x2 = polygonVertices[i + 2];\r\n y2 = polygonVertices[i + 3];\r\n }\r\n this.vertex(x1, y1, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n }\r\n circle(filled, x, y, radius, color, segments = 0) {\r\n if (segments == 0)\r\n segments = Math.max(1, 6 * MathUtils.cbrt(radius) | 0);\r\n if (segments <= 0)\r\n throw new Error(\"segments must be > 0.\");\r\n if (!color)\r\n color = this.color;\r\n let angle = 2 * MathUtils.PI / segments;\r\n let cos = Math.cos(angle);\r\n let sin = Math.sin(angle);\r\n let cx = radius, cy = 0;\r\n if (!filled) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n for (let i = 0; i < segments; i++) {\r\n this.vertex(x + cx, y + cy, color);\r\n let temp2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x + cx, y + cy, color);\r\n } else {\r\n this.check(ShapeType.Filled, segments * 3 + 3);\r\n segments--;\r\n for (let i = 0; i < segments; i++) {\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n let temp2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n let temp = cx;\r\n cx = radius;\r\n cy = 0;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n if (!color)\r\n color = this.color;\r\n let subdiv_step = 1 / segments;\r\n let subdiv_step2 = subdiv_step * subdiv_step;\r\n let subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\r\n let pre1 = 3 * subdiv_step;\r\n let pre2 = 3 * subdiv_step2;\r\n let pre4 = 6 * subdiv_step2;\r\n let pre5 = 6 * subdiv_step3;\r\n let tmp1x = x1 - cx1 * 2 + cx2;\r\n let tmp1y = y1 - cy1 * 2 + cy2;\r\n let tmp2x = (cx1 - cx2) * 3 - x1 + x2;\r\n let tmp2y = (cy1 - cy2) * 3 - y1 + y2;\r\n let fx = x1;\r\n let fy = y1;\r\n let dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\r\n let dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\r\n let ddfx = tmp1x * pre4 + tmp2x * pre5;\r\n let ddfy = tmp1y * pre4 + tmp2y * pre5;\r\n let dddfx = tmp2x * pre5;\r\n let dddfy = tmp2y * pre5;\r\n while (segments-- > 0) {\r\n this.vertex(fx, fy, color);\r\n fx += dfx;\r\n fy += dfy;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n this.vertex(fx, fy, color);\r\n }\r\n this.vertex(fx, fy, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n vertex(x, y, color) {\r\n let idx = this.vertexIndex;\r\n let vertices = this.mesh.getVertices();\r\n vertices[idx++] = x;\r\n vertices[idx++] = y;\r\n vertices[idx++] = color.r;\r\n vertices[idx++] = color.g;\r\n vertices[idx++] = color.b;\r\n vertices[idx++] = color.a;\r\n this.vertexIndex = idx;\r\n }\r\n end() {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n this.flush();\r\n let gl = this.context.gl;\r\n gl.disable(gl.BLEND);\r\n this.isDrawing = false;\r\n }\r\n flush() {\r\n if (this.vertexIndex == 0)\r\n return;\r\n if (!this.shader)\r\n throw new Error(\"No shader set.\");\r\n this.mesh.setVerticesLength(this.vertexIndex);\r\n this.mesh.draw(this.shader, this.shapeType);\r\n this.vertexIndex = 0;\r\n }\r\n check(shapeType, numVertices) {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n if (this.shapeType == shapeType) {\r\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\r\n this.flush();\r\n else\r\n return;\r\n } else {\r\n this.flush();\r\n this.shapeType = shapeType;\r\n }\r\n }\r\n dispose() {\r\n this.mesh.dispose();\r\n }\r\n };\r\n var ShapeType = /* @__PURE__ */ ((ShapeType2) => {\r\n ShapeType2[ShapeType2[\"Point\"] = 0] = \"Point\";\r\n ShapeType2[ShapeType2[\"Line\"] = 1] = \"Line\";\r\n ShapeType2[ShapeType2[\"Filled\"] = 4] = \"Filled\";\r\n return ShapeType2;\r\n })(ShapeType || {});\r\n\r\n // spine-webgl/src/SkeletonDebugRenderer.ts\r\n var _SkeletonDebugRenderer = class {\r\n constructor(context) {\r\n this.boneLineColor = new Color(1, 0, 0, 1);\r\n this.boneOriginColor = new Color(0, 1, 0, 1);\r\n this.attachmentLineColor = new Color(0, 0, 1, 0.5);\r\n this.triangleLineColor = new Color(1, 0.64, 0, 0.5);\r\n this.pathColor = new Color().setFromString(\"FF7F00\");\r\n this.clipColor = new Color(0.8, 0, 0, 2);\r\n this.aabbColor = new Color(0, 1, 0, 0.5);\r\n this.drawBones = true;\r\n this.drawRegionAttachments = true;\r\n this.drawBoundingBoxes = true;\r\n this.drawMeshHull = true;\r\n this.drawMeshTriangles = true;\r\n this.drawPaths = true;\r\n this.drawSkeletonXY = false;\r\n this.drawClipping = true;\r\n this.premultipliedAlpha = false;\r\n this.scale = 1;\r\n this.boneWidth = 2;\r\n this.bounds = new SkeletonBounds();\r\n this.temp = new Array();\r\n this.vertices = Utils.newFloatArray(2 * 1024);\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n }\r\n draw(shapes, skeleton, ignoredBones) {\r\n let skeletonX = skeleton.x;\r\n let skeletonY = skeleton.y;\r\n let gl = this.context.gl;\r\n let srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\r\n shapes.setBlendMode(srcFunc, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\r\n let bones = skeleton.bones;\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneLineColor);\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n if (!bone.parent)\r\n continue;\r\n let x = bone.data.length * bone.a + bone.worldX;\r\n let y = bone.data.length * bone.c + bone.worldY;\r\n shapes.rectLine(true, bone.worldX, bone.worldY, x, y, this.boneWidth * this.scale);\r\n }\r\n if (this.drawSkeletonXY)\r\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\r\n }\r\n if (this.drawRegionAttachments) {\r\n shapes.setColor(this.attachmentLineColor);\r\n let slots = skeleton.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof RegionAttachment) {\r\n let regionAttachment = attachment;\r\n let vertices = this.vertices;\r\n regionAttachment.computeWorldVertices(slot, vertices, 0, 2);\r\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\r\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\r\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\r\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\r\n }\r\n }\r\n }\r\n if (this.drawMeshHull || this.drawMeshTriangles) {\r\n let slots = skeleton.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let attachment = slot.getAttachment();\r\n if (!(attachment instanceof MeshAttachment))\r\n continue;\r\n let mesh = attachment;\r\n let vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\r\n let triangles = mesh.triangles;\r\n let hullLength = mesh.hullLength;\r\n if (this.drawMeshTriangles) {\r\n shapes.setColor(this.triangleLineColor);\r\n for (let ii = 0, nn = triangles.length; ii < nn; ii += 3) {\r\n let v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\r\n shapes.triangle(\r\n false,\r\n vertices[v1],\r\n vertices[v1 + 1],\r\n vertices[v2],\r\n vertices[v2 + 1],\r\n vertices[v3],\r\n vertices[v3 + 1]\r\n );\r\n }\r\n }\r\n if (this.drawMeshHull && hullLength > 0) {\r\n shapes.setColor(this.attachmentLineColor);\r\n hullLength = (hullLength >> 1) * 2;\r\n let lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\r\n for (let ii = 0, nn = hullLength; ii < nn; ii += 2) {\r\n let x = vertices[ii], y = vertices[ii + 1];\r\n shapes.line(x, y, lastX, lastY);\r\n lastX = x;\r\n lastY = y;\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawBoundingBoxes) {\r\n let bounds = this.bounds;\r\n bounds.update(skeleton, true);\r\n shapes.setColor(this.aabbColor);\r\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\r\n let polygons = bounds.polygons;\r\n let boxes = bounds.boundingBoxes;\r\n for (let i = 0, n = polygons.length; i < n; i++) {\r\n let polygon = polygons[i];\r\n shapes.setColor(boxes[i].color);\r\n shapes.polygon(polygon, 0, polygon.length);\r\n }\r\n }\r\n if (this.drawPaths) {\r\n let slots = skeleton.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let attachment = slot.getAttachment();\r\n if (!(attachment instanceof PathAttachment))\r\n continue;\r\n let path = attachment;\r\n let nn = path.worldVerticesLength;\r\n let world = this.temp = Utils.setArraySize(this.temp, nn, 0);\r\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n let color = this.pathColor;\r\n let x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\r\n if (path.closed) {\r\n shapes.setColor(color);\r\n let cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\r\n x2 = world[nn - 4];\r\n y2 = world[nn - 3];\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(_SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n }\r\n nn -= 4;\r\n for (let ii = 4; ii < nn; ii += 6) {\r\n let cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\r\n x2 = world[ii + 4];\r\n y2 = world[ii + 5];\r\n shapes.setColor(color);\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(_SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n }\r\n }\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneOriginColor);\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n shapes.circle(true, bone.worldX, bone.worldY, 3 * this.scale, this.boneOriginColor, 8);\r\n }\r\n }\r\n if (this.drawClipping) {\r\n let slots = skeleton.slots;\r\n shapes.setColor(this.clipColor);\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let attachment = slot.getAttachment();\r\n if (!(attachment instanceof ClippingAttachment))\r\n continue;\r\n let clip = attachment;\r\n let nn = clip.worldVerticesLength;\r\n let world = this.temp = Utils.setArraySize(this.temp, nn, 0);\r\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n for (let i2 = 0, n2 = world.length; i2 < n2; i2 += 2) {\r\n let x = world[i2];\r\n let y = world[i2 + 1];\r\n let x2 = world[(i2 + 2) % world.length];\r\n let y2 = world[(i2 + 3) % world.length];\r\n shapes.line(x, y, x2, y2);\r\n }\r\n }\r\n }\r\n }\r\n dispose() {\r\n }\r\n };\r\n var SkeletonDebugRenderer = _SkeletonDebugRenderer;\r\n SkeletonDebugRenderer.LIGHT_GRAY = new Color(192 / 255, 192 / 255, 192 / 255, 1);\r\n SkeletonDebugRenderer.GREEN = new Color(0, 1, 0, 1);\r\n\r\n // spine-webgl/src/SkeletonRenderer.ts\r\n var Renderable = class {\r\n constructor(vertices, numVertices, numFloats) {\r\n this.vertices = vertices;\r\n this.numVertices = numVertices;\r\n this.numFloats = numFloats;\r\n }\r\n };\r\n var _SkeletonRenderer = class {\r\n constructor(context, twoColorTint = true) {\r\n this.premultipliedAlpha = false;\r\n this.tempColor = new Color();\r\n this.tempColor2 = new Color();\r\n this.vertexSize = 2 + 2 + 4;\r\n this.twoColorTint = false;\r\n this.renderable = new Renderable([], 0, 0);\r\n this.clipper = new SkeletonClipping();\r\n this.temp = new Vector2();\r\n this.temp2 = new Vector2();\r\n this.temp3 = new Color();\r\n this.temp4 = new Color();\r\n this.twoColorTint = twoColorTint;\r\n if (twoColorTint)\r\n this.vertexSize += 4;\r\n this.vertices = Utils.newFloatArray(this.vertexSize * 1024);\r\n }\r\n draw(batcher, skeleton, slotRangeStart = -1, slotRangeEnd = -1, transformer = null) {\r\n let clipper = this.clipper;\r\n let premultipliedAlpha = this.premultipliedAlpha;\r\n let twoColorTint = this.twoColorTint;\r\n let blendMode = null;\r\n let tempPos = this.temp;\r\n let tempUv = this.temp2;\r\n let tempLight = this.temp3;\r\n let tempDark = this.temp4;\r\n let renderable = this.renderable;\r\n let uvs;\r\n let triangles;\r\n let drawOrder = skeleton.drawOrder;\r\n let attachmentColor;\r\n let skeletonColor = skeleton.color;\r\n let vertexSize = twoColorTint ? 12 : 8;\r\n let inRange = false;\r\n if (slotRangeStart == -1)\r\n inRange = true;\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\r\n let slot = drawOrder[i];\r\n if (!slot.bone.active) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\r\n inRange = true;\r\n }\r\n if (!inRange) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\r\n inRange = false;\r\n }\r\n let attachment = slot.getAttachment();\r\n let texture;\r\n if (attachment instanceof RegionAttachment) {\r\n let region = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = 4;\r\n renderable.numFloats = clippedVertexSize << 2;\r\n region.computeWorldVertices(slot, renderable.vertices, 0, clippedVertexSize);\r\n triangles = _SkeletonRenderer.QUAD_TRIANGLES;\r\n uvs = region.uvs;\r\n texture = region.region.renderObject.page.texture;\r\n attachmentColor = region.color;\r\n } else if (attachment instanceof MeshAttachment) {\r\n let mesh = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = mesh.worldVerticesLength >> 1;\r\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\r\n if (renderable.numFloats > renderable.vertices.length) {\r\n renderable.vertices = this.vertices = Utils.newFloatArray(renderable.numFloats);\r\n }\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.page.texture;\r\n uvs = mesh.uvs;\r\n attachmentColor = mesh.color;\r\n } else if (attachment instanceof ClippingAttachment) {\r\n let clip = attachment;\r\n clipper.clipStart(slot, clip);\r\n continue;\r\n } else {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (texture) {\r\n let slotColor = slot.color;\r\n let finalColor = this.tempColor;\r\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\r\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\r\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\r\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n if (premultipliedAlpha) {\r\n finalColor.r *= finalColor.a;\r\n finalColor.g *= finalColor.a;\r\n finalColor.b *= finalColor.a;\r\n }\r\n let darkColor = this.tempColor2;\r\n if (!slot.darkColor)\r\n darkColor.set(0, 0, 0, 1);\r\n else {\r\n if (premultipliedAlpha) {\r\n darkColor.r = slot.darkColor.r * finalColor.a;\r\n darkColor.g = slot.darkColor.g * finalColor.a;\r\n darkColor.b = slot.darkColor.b * finalColor.a;\r\n } else {\r\n darkColor.setFromColor(slot.darkColor);\r\n }\r\n darkColor.a = premultipliedAlpha ? 1 : 0;\r\n }\r\n let slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n batcher.setBlendMode(\r\n WebGLBlendModeConverter.getSourceColorGLBlendMode(blendMode, premultipliedAlpha),\r\n WebGLBlendModeConverter.getSourceAlphaGLBlendMode(blendMode),\r\n WebGLBlendModeConverter.getDestGLBlendMode(blendMode)\r\n );\r\n }\r\n if (clipper.isClipping()) {\r\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\r\n let clippedVertices = new Float32Array(clipper.clippedVertices);\r\n let clippedTriangles = clipper.clippedTriangles;\r\n if (transformer)\r\n transformer(renderable.vertices, renderable.numFloats, vertexSize);\r\n batcher.draw(texture, clippedVertices, clippedTriangles);\r\n } else {\r\n let verts = renderable.vertices;\r\n if (!twoColorTint) {\r\n for (let v = 2, u = 0, n2 = renderable.numFloats; v < n2; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n }\r\n } else {\r\n for (let v = 2, u = 0, n2 = renderable.numFloats; v < n2; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n verts[v + 6] = darkColor.r;\r\n verts[v + 7] = darkColor.g;\r\n verts[v + 8] = darkColor.b;\r\n verts[v + 9] = darkColor.a;\r\n }\r\n }\r\n let view = renderable.vertices.subarray(0, renderable.numFloats);\r\n if (transformer)\r\n transformer(renderable.vertices, renderable.numFloats, vertexSize);\r\n batcher.draw(texture, view, triangles);\r\n }\r\n }\r\n clipper.clipEndWithSlot(slot);\r\n }\r\n clipper.clipEnd();\r\n }\r\n };\r\n var SkeletonRenderer = _SkeletonRenderer;\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n\r\n // spine-webgl/src/SceneRenderer.ts\r\n var quad = [\r\n 0,\r\n 0,\r\n 1,\r\n 1,\r\n 1,\r\n 1,\r\n 0,\r\n 0,\r\n 0,\r\n 0,\r\n 1,\r\n 1,\r\n 1,\r\n 1,\r\n 0,\r\n 0,\r\n 0,\r\n 0,\r\n 1,\r\n 1,\r\n 1,\r\n 1,\r\n 0,\r\n 0,\r\n 0,\r\n 0,\r\n 1,\r\n 1,\r\n 1,\r\n 1,\r\n 0,\r\n 0\r\n ];\r\n var QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n var WHITE = new Color(1, 1, 1, 1);\r\n var SceneRenderer = class {\r\n constructor(canvas, context, twoColorTint = true) {\r\n this.twoColorTint = false;\r\n this.activeRenderer = null;\r\n this.canvas = canvas;\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n this.twoColorTint = twoColorTint;\r\n this.camera = new OrthoCamera(canvas.width, canvas.height);\r\n this.batcherShader = twoColorTint ? Shader.newTwoColoredTextured(this.context) : Shader.newColoredTextured(this.context);\r\n this.batcher = new PolygonBatcher(this.context, twoColorTint);\r\n this.shapesShader = Shader.newColored(this.context);\r\n this.shapes = new ShapeRenderer(this.context);\r\n this.skeletonRenderer = new SkeletonRenderer(this.context, twoColorTint);\r\n this.skeletonDebugRenderer = new SkeletonDebugRenderer(this.context);\r\n }\r\n dispose() {\r\n this.batcher.dispose();\r\n this.batcherShader.dispose();\r\n this.shapes.dispose();\r\n this.shapesShader.dispose();\r\n this.skeletonDebugRenderer.dispose();\r\n }\r\n begin() {\r\n this.camera.update();\r\n this.enableRenderer(this.batcher);\r\n }\r\n drawSkeleton(skeleton, premultipliedAlpha = false, slotRangeStart = -1, slotRangeEnd = -1, transform = null) {\r\n this.enableRenderer(this.batcher);\r\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd, transform);\r\n }\r\n drawSkeletonDebug(skeleton, premultipliedAlpha = false, ignoredBones) {\r\n this.enableRenderer(this.shapes);\r\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\r\n }\r\n drawTexture(texture, x, y, width, height, color) {\r\n this.enableRenderer(this.batcher);\r\n if (!color)\r\n color = WHITE;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i] = 0;\r\n }\r\n this.batcher.draw(texture, quad, QUAD_TRIANGLES);\r\n }\r\n drawTextureUV(texture, x, y, width, height, u, v, u2, v2, color) {\r\n this.enableRenderer(this.batcher);\r\n if (!color)\r\n color = WHITE;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i] = 0;\r\n }\r\n this.batcher.draw(texture, quad, QUAD_TRIANGLES);\r\n }\r\n drawTextureRotated(texture, x, y, width, height, pivotX, pivotY, angle, color) {\r\n this.enableRenderer(this.batcher);\r\n if (!color)\r\n color = WHITE;\r\n let worldOriginX = x + pivotX;\r\n let worldOriginY = y + pivotY;\r\n let fx = -pivotX;\r\n let fy = -pivotY;\r\n let fx2 = width - pivotX;\r\n let fy2 = height - pivotY;\r\n let p1x = fx;\r\n let p1y = fy;\r\n let p2x = fx;\r\n let p2y = fy2;\r\n let p3x = fx2;\r\n let p3y = fy2;\r\n let p4x = fx2;\r\n let p4y = fy;\r\n let x1 = 0;\r\n let y1 = 0;\r\n let x2 = 0;\r\n let y2 = 0;\r\n let x3 = 0;\r\n let y3 = 0;\r\n let x4 = 0;\r\n let y4 = 0;\r\n if (angle != 0) {\r\n let cos = MathUtils.cosDeg(angle);\r\n let sin = MathUtils.sinDeg(angle);\r\n x1 = cos * p1x - sin * p1y;\r\n y1 = sin * p1x + cos * p1y;\r\n x4 = cos * p2x - sin * p2y;\r\n y4 = sin * p2x + cos * p2y;\r\n x3 = cos * p3x - sin * p3y;\r\n y3 = sin * p3x + cos * p3y;\r\n x2 = x3 + (x1 - x4);\r\n y2 = y3 + (y1 - y4);\r\n } else {\r\n x1 = p1x;\r\n y1 = p1y;\r\n x4 = p2x;\r\n y4 = p2y;\r\n x3 = p3x;\r\n y3 = p3y;\r\n x2 = p4x;\r\n y2 = p4y;\r\n }\r\n x1 += worldOriginX;\r\n y1 += worldOriginY;\r\n x2 += worldOriginX;\r\n y2 += worldOriginY;\r\n x3 += worldOriginX;\r\n y3 += worldOriginY;\r\n x4 += worldOriginX;\r\n y4 += worldOriginY;\r\n var i = 0;\r\n quad[i++] = x1;\r\n quad[i++] = y1;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x2;\r\n quad[i++] = y2;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x3;\r\n quad[i++] = y3;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x4;\r\n quad[i++] = y4;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i] = 0;\r\n }\r\n this.batcher.draw(texture, quad, QUAD_TRIANGLES);\r\n }\r\n drawRegion(region, x, y, width, height, color) {\r\n this.enableRenderer(this.batcher);\r\n if (!color)\r\n color = WHITE;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i] = 0;\r\n }\r\n this.batcher.draw(region.page.texture, quad, QUAD_TRIANGLES);\r\n }\r\n line(x, y, x2, y2, color, color2) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.line(x, y, x2, y2, color);\r\n }\r\n triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\r\n }\r\n quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\r\n }\r\n rect(filled, x, y, width, height, color) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rect(filled, x, y, width, height, color);\r\n }\r\n rectLine(filled, x1, y1, x2, y2, width, color) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\r\n }\r\n polygon(polygonVertices, offset, count, color) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.polygon(polygonVertices, offset, count, color);\r\n }\r\n circle(filled, x, y, radius, color, segments = 0) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.circle(filled, x, y, radius, color, segments);\r\n }\r\n curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\r\n }\r\n end() {\r\n if (this.activeRenderer === this.batcher)\r\n this.batcher.end();\r\n else if (this.activeRenderer === this.shapes)\r\n this.shapes.end();\r\n this.activeRenderer = null;\r\n }\r\n resize(resizeMode) {\r\n let canvas = this.canvas;\r\n var dpr = window.devicePixelRatio || 1;\r\n var w = Math.round(canvas.clientWidth * dpr);\r\n var h = Math.round(canvas.clientHeight * dpr);\r\n if (canvas.width != w || canvas.height != h) {\r\n canvas.width = w;\r\n canvas.height = h;\r\n }\r\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\r\n if (resizeMode === ResizeMode.Expand)\r\n this.camera.setViewport(w, h);\r\n else if (resizeMode === ResizeMode.Fit) {\r\n let sourceWidth = canvas.width, sourceHeight = canvas.height;\r\n let targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\r\n let targetRatio = targetHeight / targetWidth;\r\n let sourceRatio = sourceHeight / sourceWidth;\r\n let scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\r\n this.camera.setViewport(sourceWidth * scale, sourceHeight * scale);\r\n }\r\n this.camera.update();\r\n }\r\n enableRenderer(renderer) {\r\n if (this.activeRenderer === renderer)\r\n return;\r\n this.end();\r\n if (renderer instanceof PolygonBatcher) {\r\n this.batcherShader.bind();\r\n this.batcherShader.setUniform4x4f(Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.batcherShader.setUniformi(\"u_texture\", 0);\r\n this.batcher.begin(this.batcherShader);\r\n this.activeRenderer = this.batcher;\r\n } else if (renderer instanceof ShapeRenderer) {\r\n this.shapesShader.bind();\r\n this.shapesShader.setUniform4x4f(Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.shapes.begin(this.shapesShader);\r\n this.activeRenderer = this.shapes;\r\n } else\r\n this.activeRenderer = this.skeletonDebugRenderer;\r\n }\r\n };\r\n var ResizeMode = /* @__PURE__ */ ((ResizeMode2) => {\r\n ResizeMode2[ResizeMode2[\"Stretch\"] = 0] = \"Stretch\";\r\n ResizeMode2[ResizeMode2[\"Expand\"] = 1] = \"Expand\";\r\n ResizeMode2[ResizeMode2[\"Fit\"] = 2] = \"Fit\";\r\n return ResizeMode2;\r\n })(ResizeMode || {});\r\n\r\n // spine-webgl/src/LoadingScreen.ts\r\n var spinnerImage;\r\n var logoImage;\r\n var loaded = 0;\r\n var FADE_IN = 1;\r\n var FADE_OUT = 1;\r\n var logoWidth = 165;\r\n var logoHeight = 108;\r\n var spinnerSize = 163;\r\n var LoadingScreen = class {\r\n constructor(renderer) {\r\n this.logo = null;\r\n this.spinner = null;\r\n this.angle = 0;\r\n this.fadeOut = 0;\r\n this.fadeIn = 0;\r\n this.timeKeeper = new TimeKeeper();\r\n this.backgroundColor = new Color(0.135, 0.135, 0.135, 1);\r\n this.tempColor = new Color();\r\n this.renderer = renderer;\r\n this.timeKeeper.maxDelta = 9;\r\n if (!logoImage) {\r\n let isSafari = navigator.userAgent.indexOf(\"Safari\") > -1;\r\n let onload = () => loaded++;\r\n logoImage = new Image();\r\n logoImage.src = SPINE_LOGO_DATA;\r\n if (!isSafari)\r\n logoImage.crossOrigin = \"anonymous\";\r\n logoImage.onload = onload;\r\n spinnerImage = new Image();\r\n spinnerImage.src = SPINNER_DATA;\r\n if (!isSafari)\r\n spinnerImage.crossOrigin = \"anonymous\";\r\n spinnerImage.onload = onload;\r\n }\r\n }\r\n dispose() {\r\n var _a, _b;\r\n (_a = this.logo) == null ? void 0 : _a.dispose();\r\n (_b = this.spinner) == null ? void 0 : _b.dispose();\r\n }\r\n draw(complete = false) {\r\n if (loaded < 2 || complete && this.fadeOut > FADE_OUT)\r\n return;\r\n this.timeKeeper.update();\r\n let a = Math.abs(Math.sin(this.timeKeeper.totalTime + 0.25));\r\n this.angle -= this.timeKeeper.delta * 200 * (1 + 1.5 * Math.pow(a, 5));\r\n let tempColor = this.tempColor;\r\n let renderer = this.renderer;\r\n let canvas = renderer.canvas;\r\n let gl = renderer.context.gl;\r\n renderer.resize(1 /* Expand */);\r\n renderer.camera.position.set(canvas.width / 2, canvas.height / 2, 0);\r\n renderer.batcher.setBlendMode(gl.ONE, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\r\n if (complete) {\r\n this.fadeOut += this.timeKeeper.delta * (this.timeKeeper.totalTime < 1 ? 2 : 1);\r\n if (this.fadeOut > FADE_OUT)\r\n return;\r\n tempColor.setFromColor(this.backgroundColor);\r\n a = 1 - this.fadeOut / FADE_OUT;\r\n a = 1 - (a - 1) * (a - 1);\r\n tempColor.a *= a;\r\n if (tempColor.a > 0) {\r\n renderer.camera.zoom = 1;\r\n renderer.begin();\r\n renderer.quad(\r\n true,\r\n 0,\r\n 0,\r\n canvas.width,\r\n 0,\r\n canvas.width,\r\n canvas.height,\r\n 0,\r\n canvas.height,\r\n tempColor,\r\n tempColor,\r\n tempColor,\r\n tempColor\r\n );\r\n renderer.end();\r\n }\r\n } else {\r\n this.fadeIn += this.timeKeeper.delta;\r\n if (this.backgroundColor.a > 0) {\r\n gl.clearColor(this.backgroundColor.r, this.backgroundColor.g, this.backgroundColor.b, this.backgroundColor.a);\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n }\r\n a = 1;\r\n }\r\n a *= Math.min(this.fadeIn / FADE_IN, 1);\r\n tempColor.set(a, a, a, a);\r\n if (!this.logo) {\r\n this.logo = new GLTexture(renderer.context, logoImage);\r\n this.spinner = new GLTexture(renderer.context, spinnerImage);\r\n }\r\n renderer.camera.zoom = Math.max(1, spinnerSize / canvas.height);\r\n renderer.begin();\r\n renderer.drawTexture(this.logo, (canvas.width - logoWidth) / 2, (canvas.height - logoHeight) / 2, logoWidth, logoHeight, tempColor);\r\n if (this.spinner)\r\n renderer.drawTextureRotated(this.spinner, (canvas.width - spinnerSize) / 2, (canvas.height - spinnerSize) / 2, spinnerSize, spinnerSize, spinnerSize / 2, spinnerSize / 2, this.angle, tempColor);\r\n renderer.end();\r\n }\r\n };\r\n var SPINNER_DATA = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAACjCAYAAADmbK6AAAALKElEQVR42u2de2iW5R/GPzuqcwfnnKfNmafl5tTNHWzqNi3DEMQykcAoJSsySkspjSIk0iD/07Kf4R+FnVBDUTshZGpWUEJaaiWFgZlUFmXmIe3HNXthyebeZ77P9H13ffBG8Y8H7ut7vff93N/7fu4vGGPiFZiez/Qtw9lytJajfzfw9z/j+efPOv7cV8W+lUNY2a8T/ayTCRsWFLJA5rtUO1LLkV5p9LJeJizQiHeqnlOtmVFtdTGrrZkJCxYXsTgaI6r9MY4/UpNItW4mFDaXsTlaM6qVZlBq3UwofFrJp0HMWJ9DvXUzobCznJ1BzFjWlTLrZkJh/TDWBzFjTgo51s2EgnKI0Rrx+FiOWzNzVaym91Syx5qZsGBWb2ZFa0ZN6dbMhAWTcpkUrRmXD2K5NTNhgVbH0Zpxbl/mWjMTFvRIo0e0ZpzcncnWzISKtvmiMWNRJ4qslwmVXRXsas2Ix8ZwzFqZsGFREYtaM+Oaa1ljrUzYkJ9G/ok6TlzKjJWZVFor0y7c1Zu7WjLiqiGsskamXdHopyT4vALmzS9k/t19uHtKHlOSIMn6xAtARjIZ1sFcUSZ0Y4La+G6M18hS2IlCn4a+WoC0JNL0d/dUupdnUj40g6EJ2VEdMnhrOG/p5f/jUXz8SgmvaGU6KpNRNsLVQV0OdXf24s63h/P2gWoOrBjMCr2GJFQnnxnIM3q5P1PPmaYv+4ev4/C6UtbpV2gzXCkgL5W8Bwt48OIc6ul6Tp+s4+SyASxLiI4+PYCn1bHzDZxvaQW6vZzto7MYnQIpNkf7kp5EuozYUroqEjcNKHHd0Tl9mBPN1pk+hFeieGBnBtog7UXjsj9pWg+m6duecw2cay1OC/uxMC47KmP9OIYfoz1YoC20J/rzRG4quTZK2EAyJGs20qwUbYw0aNRmUxtvfUW/uEtNzc1NB1/X8LVyd15hh82F43AvD+VlXcsSJEZa1CQ3ejleAO7oxR3RDP0XN91X4+NXYb8nkv7UNTwV7e0YTdu7I3g33t7tuaEbNwSZpps2fSyvs4M2Tjhot+jb0Xzbltj8r5j/xVt/6Z1Ob93U1ZYO691EhhzchcHeXosVjcNZysyezLw4xRZt05R+fTeuj8vOj+zKyG0j2aZcVVs6v+QalnjrMFZASQYl2nBoSyz06e3j/Xk8rgWYmMvEICu2pm1HOTuc7okV8FgRj0XukwzanhvCc/F+72TjoQjdObN1OFuDLmh0xP+WHtxiI10ukJlCprb4guiv1fP+avZrS1C7NAkliHZjDtZwMMgqbukAltpMlwuMy2FcEBPqvfLLar5Uqi0hBdEwryy+Mv5n6zkbjTBa+dlMlwvUZFETZKGiFM7tvbhdJ3gSVRO0wzIjnxmvl/J6a6JsGMYGrahtpssFeqbR841S3mhN80OjOaSDEdqd6SjaMKgzgzRK7q1ib3PT9sYyNo7JZoyNFNvRcVMZmy7WOvIuryv/Zvdmdt90+nY0bRp3AvROohFwdwW7dTG7RFlbwlqdrbOBYg005NAQmZU0HWt1rXMBH1Xw0dQ8pmqzoaPmdhun7bHZjNVe9qP9eFQfO1VkUmHjhAVUZ1GtnKFSbjrkrPfy4i4UW5t/6ZxM54J0CqxFe81KpGsQyE4h23oYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjLna+bdOy+IiFquIpGq16Pb79cNYv3IIK/X/ugx+Ui6TVKvYVU9Nc8gX8od8Ir/IN/KPfCQ/yVfyl/6/pfJvLChkQdD6wyqntquCXYuKWJSfRr6D0dEAxV3xlw/khyD+kd/ku/88cHo+09tS3LBpO1HHCVUqcIA6CqB4K+6X6x35L/JM2loXurlWmUmlA5XogOIcK8/If5HncrSWo7F6cKIWPjT/RXGOlWfkv8hzaWsN4uaaysE6WIkOKM6x8oz8F3kusXqo2vxC5jtYiQ4ozrH0TeS5qIZcrB7qkrwdA8U5Vp6R/yLPZV8V+2L14Cl5THGwEh1QnGPlGfkv8lyUlIzFQ1cNYVVHrcjZ0VCcFe9Y+Eb+izy3ceclUl43aFN52DXXssYpnY6a4qFS8ZcP2uIf+e7inRh6pdFrdTGrm8uiHx/L8T2V7NGWzvJBLJ/bl7mTuzO5qBNFDoiJID/IF/KHfCK/yDfyT3O7d/KbfNfS80hNIrU0g9L6HOq1x5iTQo6FNpeLfCQ/yVfyl3xmXYwxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHNk9z4JwJ0SqKTdQkbyEwhU393T6V7zzR6pieR3tE1ITeVXImhe6BXDGZFdRbVeank2TBhcaEMr0rwbixj49IBLL2/L/ffmMuNHfqO9tFZjJYBd1ewO3Lx+IcVfKhqna5nHZYR6XFPH+5R3eeI5t9fx/fvjeC9Jdew5OKZKqFR/RDVKL6vL/f9PJafmyvHsL+a/ff24V6NmjZQbGchVbY6UM2BluqHv1rCqzVZ1KQlkZboepCdQvacPsz5bjTfXao+yMEaDt7Wk9tSIMVGig3TejCtJSM2bSpkPjWPqd1S6Zao+lORSYWmgkOjORRNwZqd5ezMSiHLRooNr5XwWjS6/1XHX9vL2T67N7M1iyXa9JCrYjVrS1gbpJyw6hBfsmiNCYT0P9/A+Wj1/6qGr5YNYFlJBiWJogEzezLz/ZG8/9s4fgtSyuvNYbyp1IONFBtu7sHNv4/j9yAxUHWrdaWsG9+N8XHd+YxkMpSy+aySz841cC5oXbmHCnnI74yxAgZ3YbDeB4PEQCOpBpFNZWwa2ZWRcdnxLsl00crtRB0n2lLg8JNRfDKoM4NsolgBSmw/UMADba1+qpmqfyf6x1u/0a/og3I+aEunP6/i86osqmygcGarF4p54dex/Bo0LqfqOfVwIQ/HW5/RSkwV1oN2WLlHTc82TljAwM4M1O5LWwYKZTjibYXNS0N5KcjKTe10PadfLObFuJwK4ozp+UzXDBTUjL+M5ZcBnRkQV53dMIwNQTu6bSTbVEzbi5awuVByd2E/FgaN0Tc1fKOzBHHV2aAdVSdv6s5NNkp7cSH/++xAng2yyHx+CM/H21YhfdPp+0U1X0TbSZnXx8faG9Aop0MS0cToh1p+iLcpOkLj9t/JOk5eqoPHxnDsyf486an5yqCDK7XZ1O4oZ4dWyy3FSXHUAYq47uyYbMZoGmhpG3DlEFb6uNiVBhpyaHhnBO8oJmfqOROJjzIiP43hJ8UxITqqX56S2Hur2KsOnq3nrE6PPNKPRwrSKbAZrjTQNZmuE7oxYXMZmxWbw9dxWFu4W4ezVedOE6qzI7oyYkY+M7TPeWsPbk2UX1qioSN+E3OZqOR2cReKE+qQRFN0Pi7y73g/UawU1KzezJpXwLz5hczX1ueUPKYkNb6GJQZ+j7/aAfRZREsv+quGsMoamXZBW2Gt5eU0alorEzYsKmJRa/m4NdeyxlqZsCGa84DKnVorEzboC7podis69DfIJmwufHMc7famvvmxZiYsKOtKWbRm1OcW1syEBboSJFozLh/EcmtmwgIluaM14/phrLdmJixYXMTiaM24p5I91syEBTphFOR7Y2tmwgJNvUFOr+tov3UzoaAv44KYUatv62ZCoemdhtG0+hzqrZsJBR08DWLG0gxKrZu50qvpxos3U5NItW4mFPp1ot+lPlpq2lYXs9qamVBZUMiC1ox4pJYjvlfStAu6GmTLcLboMtPIV4/6im5fFfuUi9QIap2MiWP+D96R1vPmsD/fAAAAAElFTkSuQmCC\";\r\n var SPINE_LOGO_DATA = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKUAAABsCAYAAAALzHKmAAAQ7klEQVR42u3da4xdVRUA4D0zd2Y6nZY59DVtZ1puS9+lzC0YAi2UQ8AAQczFpPgA9VIeIQbirRqJ0cBUBVGjDr/QCKSNRSMmpuODxAdxqhgwxkhFjf6Sxh/+UUNVNGJCzR7uTvas7LXX2q9zzp3em6y0gTN3Zu75utZe5+yztxC9V+/Ve5X9En1Vjd7J6SFbLNF7naPw+l2jh7YHMBWssqMHtlsRdim4qsLtIawaPiHEQOLoNrA9iIkQDnRrVA1qD2LZ8ISoxYqKo13sQAtBWBayQWZUAXGRQM9JjCngDVY0UqJNDbQrMcaGmArdUKpIjbYiQLsCZCyIMQBy8QwnilR4Q5AuCpxFYvRFmBLbEiwKwpsSaWycVQGZBKMrwBjA9BhxDe57u2L2hOoKNCbOrgAZitEVYUxoKSMErQvSxYIzCkguRg5EF4AUhqUlhy/YUKSxcRaKsioYOQhD4I0yYxkR3PcJBcuFysmgsXAWBTMJyBCMIQh9kGGxXIXvexCQXbHGAMrBWTbM2CCpMSMLIxehC77lSJwXGth7M0FzoVJIXXDWQnGmhOkL0ic7YhhtWdGGkAuPAjUWGoF4faCmwBkbZmyUqUCyMqMLRA4+E6IsdTjidUHKBYrh9CnpRcH0ypKxsyOGEYNIIeTCOz91OIJ1QYoB5eAMyZo+MFNnyVTZ0YiRC9EGEMOyAgshxErHsL2XK1gOUgwohtM1a5YNM7Rsu4K0ZkcbRm4mpPBRwFZ5hg9eCqkrUB+csWGGogzNkqEgrdnRhpGLkINudaLgwvVB6oqzCjCTZElb2Y4B0gUjBtEG0ARnDRLjjoG9DwcshtQGlIPTljVjwUySLWNkyRCQVHa0ZUUTRAwgF91a33BEy0VKAcVwwqwZC2bqbOlUurllOxQkJzNyINoAYqjWhYYjWg5SCiiG05Q1U8FMjTIoS8YE6YORi1BHtJ4KIcQEEtTXUWAxpK44YVlPBdO1jCdFWTZIE8bVGEYMIRPcZGBw4HKQcoBiOE1ZMzbMgVQwU6JMAdKEEcuIJogUvg1YCCE2gsCO42DlIIVAKZwpYJaSLVNnSU6XjYHUmxhTmXaFaMO3EYkLqMC+FsLlIoVAKZzMrEnBhJeLfLNlKMrYWRIDCbOkFSSVHbHM6AKRC6/ODUewNqQ+OLlZkxpjUmV8MBbMUJSxyzY3Q1IgTRgxiBRCHdem0KDAUkBh9sRwwjEnAXMMgTnKhFlUtiwkS5rGka4g9SaGgxFmRC7AzTCEEBcyA36dDSsXqAtOLkysjGMwY5XxVChjZ0kuSCo7YlkRQsQQYtDEFsegsLoCxUp7Kpgps2UslFGzJGccSYHUmxhOZqwzEZqAbfUMCisHKIZzgsCpl3MTzMwTpi1bYp2477gyFKUxS7qWbdjY2EBS2dGE0QQRA7gNCyHEdhjE8RhUDlBT9tzgmjWZMFNlSy+Urk1OzCyJlW0XkK4YOQh1cDtcgwBrQmoDWkdgboBZE8mYsJSHlnFbJ+5bwmOPJ7lZkirbC8aRsMvmgtTHjBhGE0QbwJ2egUE1ITVlUC5OmDVdYNrKuN70xM6WoShjlW4464dbtiFIWK6x7GjESEHUUe0iYncnbMdQSE0Z1ITTNOb0hRmjjLtmS9dmJ2rp1jtuKktyyrb6YLEMCUHq2dGG0QQRQ7f72kzc+cJecerne8Wvv7JNPHPvenEkz8Sh3UtFc92QyGt9Yko/HgOLAIUZlItTz5ouMF3KuE+2jFLCQ1D6lm6fLMkBacuOJowYRBUXyfjuHjF3NhdnsfjvAfH6E9vFt9XxKgikEKgJZyyYalzOLeMu2bLbULI6bh+QGwmQ+rgRlumdGEQAao+K56bEL2woVUwOiev0r8OAUjiJrMmFCbvykGxZRAmPitK1dHM7bohyMsuyi/I8f0+e57fJYIKEZXpXo9E4mOf5XTKyLLvCBLETF8uY2SKepkC+dpX4T02Ivepr4HvZcOZ5fmee54fyPL+DmTUhzAs6n4n8bN5dr9f3YdkSg8nsxG0lPBVKVpNjG0/aGhzfLDmRZdnumZmZp8+c+cdZPV555fSr7Xb7s0jJ3i5Pcue4MxKkPPkvvXTqz/B92u32l0wYOzG1fkhcd/py8Rcbyq/vFM/KY1WA95h/3zzP71bfU6JsNpsfgj+P/FlbrdaDGExYyuXvLz8H+DudODH700ajcSM3W6Yu4alQ1spCOTd38jcKocTZbh9+9NixY99XJ8AEUkcpo9W64yH197m5k7+bnZ19QT+J09NHntQhwji/Jg58qi6++ofLxJ8gSFneVw2Ka4QQDfh1Ok4dZavVmtZ/nrm5k7/Vf55O1tRhboUw5+ZOvqyOl5+R/FyOHj32PYVU/tloNG5IXcKrhJIzngwp3fNjomazea/64BuNxts646f50lWv169utw9/DmtqdJQyZFaSJVuV6nq9fqMEof5/vV6/CYBqgJDlee+yAbF/+4i4ZWqZeNfaIfHWzn+Hx0KcEuU9+s8jv3ej0bhVlXOZydX/k0iRMeb8P0D5e6tj8zy/Xb9UJIc56h/yqVOnXul8lmuZ2bJslKmbHG7XrbpCmCXFRLvdfqQD6jTS3Jiy5I4OykM6ADV+1Eu1DmV6evopBORexzDi1L+X/HnGxsb2w3Hm9PSRJ9QxWPOTZdmlKht2hi+w6dkox5bqffI8fye3hDteGqKaHVsHXihKl0tB+h0cY+lute54AGRKDCW89LNTRynHb7ChUWVVjetOnJh9EYBUyPZeNCoOtsbFQwdXi4/esELcd+tq8cCHJ8UXp+viy9efLz7AgamjlKXc1AA1m83DoIRDlFubzeb96hhZLVTlgJ24gttutx+ONa50bHZKRenaeTs1OfpAfnr6yOOdE7EZdNwmlKocntXLNkA5JTGq47Ds+Lf94lWsyfnXleLfnIwJUN4DOnNYwuUxh2A3Ln9XULrfK8t3J27Tu3BVwiOjXJqoAy8UZej1yclGo3GTLN+gu3w+z/P3YaWbQqk3Ne12e4ZC+c8rxWsYytcPiP9RpZxCqWDKnxOiBNlyAUpOnGsoh4tA2Rm8X9xqtT6md5wyZmYe+0YRKL+1S/wYQ3n8zctBl5SBUv5djivfjMOPduIzcizeiYfr9foVvUwZG+XCuzibZKnSceZ5/v4QlKp8y7ElhnJlTeTP7BI/kllRYfzrfvHqFy4UX1vaL/aVlSmROzwbwdS29T2UcEwZF+V8ozM2lu1VY812u/15akypGh3TmFJesJbHHD167IdUxz3YJy5bNySuX1mbvy55CbMLtzU6tjGlsdFptVqfUMc0Go23F4wy1l2dSnbfvpMwVPe9WWVLDsrOJaF9MFu2Wq1PqmNkGce67xiXhTjdNwdlvV6/BgxfbPfBfVCetxi6b9/rlCup65QzM48dl2OjLMv26CibzeZ96sTIzEFdpwQXz9U1yrtVlpR/Zll2Fec65Y6l4pbbx8XHH9kknvzJlPjlHy8Tp29eKT5ou0aJoIT3w3dBlLDzVpfAJEZ1XOdaJZxnOSlvPMjPzxFljIvng914RwebsjYO7uhMyHu46sOfnf3Oz2TXDW6vvYxdFoIXz3Wc8J5zs9n8iOn2IrxTc2BM3Glqdp7dI553uaOjxrhwcob+MyuUpjs6WZZdon8OcigjPx8V+u+GTWFTSWEx3WYcdJ225jNDSE4q0GHCzlueHOyujn6bUWYgeb9ZZUaQPe+GzQ+Gc8+oOGhC+c1d4gfI16n3XDAhQ7+9qE9l01E2Go132GYKyXE1NiFDTcpoNpv3LOYJGWXNErJNW9sEp63p2RKiVPMn1bS1DgxsyhoGdGpmizj+xtXiDYnx7/vFmce3iWdW1cTVGEY4hQ2ZW0nNq8Qm/M6XbXm3S100lwGedFybuvNOibLI+ZS2ceU4eAxiEuvCkfmU8ycToDxETe6FgCBQHeqyAbFvfEhcO7BwDuXFCEbTZF840XeHK0jYcbs2OIGle0mVJ/mmnClEPQqxyTY5I8/zFhif7fSZee4bnrPOU4AssnRXHaVTCTd14dRDY3UbTIiSeFhsN/aMjgnqthFx880rxX3yATL5p3y4LPXzOaBkUyBjZMlYpbtQlIOBD475ZEusjMNSvkXe6VEoJVDkeZ2dzIfIFsRzU+JF2OyM9M9fTC/6SUYOyFQPjQ2nWiUjxnPfw5EeHqMWIqAeIFsAU847lJM2JM6xsewt1OIDLs99P7ZFHNdB/upS8XtPiD7PfLuCXJNolYyyFiNI/Zit65ItrOVafFbHcFohY7hPTN21Tjz4uc3iqfsnxKdX1MTl1OoYRFaMsToGB6Trw2JFP/OdZC2hJZ7ZkrMoAbbSGmelDJ91hFKuJeS7jlBMkJnrAqqJlgMUZS/dArPlGHNdSg5M3xXXtvquuEatvIYtDRhpxbUJuIgqsU5lGWtUploK0KuEU9mSW8YpmFQ556xNuYW7NiW13B+FkMiKHIy+C6eGgBxJvMR0oSv5hi6+z4HJyZoU0M2RVvDlrOQbcxVfX5AhZbuqy0v7ZstYMLHlAVlLTF9ALLbvu9Y5Zylpn/XOsd0ibIvxr2KCLHpp6SCUIdnSZSF+WzfOhem6GD+1KwR3Z4jNjrtDpNoZwmWd8yrupZN6Hx3fbMmFSe0Swdq2ZIPjxk1112Duo8OBGLrBkw/IoncdK2XHsdC9dHz204m50xh3tzFq1zFqtzHXrfCw7OgDsqyNnZLszVijsmXgrmNcmGtS78lIoMX2aJz03fKO2sDJddPQSCDPiQ1DfWBycY6XtXstc2PQKuxgG2McmXTPb9/9vmuJYXKyJrWjbeg+3xPM4O73nWqvbyw7xgZZSJbEUBa157cNJjdr2vb+5iA1YV3HxYscj30PDCEHIgcjtfm8K8hSsmRotkwFk5s1TTghUAopB6xrjHMBBkI0YYTZ0dZlxwLpkiWDULpmy5gwqayZgZNkA7oKQQCxctByYg0XIIEQQuRitGVHblMTA2ShKGPDpC6wu+DEgJqg2rDGDBtAF4Q6RAojp1xXGmSMbImVcR+YWNY04eQCtUG1ofUJ2/uvcETIgUhhdAE5GAlkKShjwHTNmhhODKgJqQ2sC14uOgyfD0IbRF+MlQaZAiZWyn2yJsTJATqGnHQO2Jhh+xlsACFCG0QbRtdyzQFZCZSxYPpmTS7Q5cjJHYNBYIkZpu99HoUQ/o4QIYSIZUZfjJ4ZMjZI32wZBDMU5yhy8pZTULl4XYP5fagMyEVoy4oupTpGduwnkloSlKEwY+AcQU4MhRTD6ovXBRwFzwWgCSEF0QVjJUGmgEllTS5OLlCIlIN1mS9mx/cZ5eLDALpCTI2RAhkTZQqYoTgpoCPECbaBHQ2ETL3PUl98ECAXYijG0OyYAmQoTG7W5ODkAF1CnVgm2JQx4okPA+gCMTbGskBGgRmaOblAh5GTORIrfKFx4VH4EIAxIXIxlg2SBbMvECY3e7oApbDaIgQu5/2HmeEKEINYiwSRi7EQkLFgumZOCuggctKGI4ULZN/vMeSLj0AYMytWEqMLzFg4fYDaoKaC6wvOFR4FkIPQFaILxrJAOsHsc/zlfYDWXE8qF22s8Pz5KHxcgEVALBtjJXBSSEOwFhk1Zgy4hitCT4hVw+gFs8/zwxqIBbUgyK7fcyA0PD9XX4iVxhiC0xdof6STWCsoBmKF7+cVCWFXQYyBMxRpf+STX1b0x45AhN0OMSrOGEirhrY/dfQAdjvS7oy+WCF6r1RIFxXWvlTRg1YVqFWBmxZbD99ig9pt0YPQw9rD1nstVri9V+/Ve3XrS/wfim4P5fIFxLoAAAAASUVORK5CYII=\";\r\n\r\n // spine-webgl/src/SpineCanvas.ts\r\n var SpineCanvas = class {\r\n constructor(canvas, config) {\r\n this.time = new TimeKeeper();\r\n if (!config.pathPrefix)\r\n config.pathPrefix = \"\";\r\n if (!config.app)\r\n config.app = {\r\n loadAssets: () => {\r\n },\r\n initialize: () => {\r\n },\r\n update: () => {\r\n },\r\n render: () => {\r\n },\r\n error: () => {\r\n }\r\n };\r\n if (config.webglConfig)\r\n config.webglConfig = { alpha: true };\r\n this.htmlCanvas = canvas;\r\n this.context = new ManagedWebGLRenderingContext(canvas, config.webglConfig);\r\n this.renderer = new SceneRenderer(canvas, this.context);\r\n this.gl = this.context.gl;\r\n this.assetManager = new AssetManager(this.context, config.pathPrefix);\r\n this.input = new Input(canvas);\r\n if (config.app.loadAssets)\r\n config.app.loadAssets(this);\r\n let loop = () => {\r\n requestAnimationFrame(loop);\r\n this.time.update();\r\n if (config.app.update)\r\n config.app.update(this, this.time.delta);\r\n if (config.app.render)\r\n config.app.render(this);\r\n };\r\n let waitForAssets = () => {\r\n if (this.assetManager.isLoadingComplete()) {\r\n if (this.assetManager.hasErrors()) {\r\n if (config.app.error)\r\n config.app.error(this, this.assetManager.getErrors());\r\n } else {\r\n if (config.app.initialize)\r\n config.app.initialize(this);\r\n loop();\r\n }\r\n return;\r\n }\r\n requestAnimationFrame(waitForAssets);\r\n };\r\n requestAnimationFrame(waitForAssets);\r\n }\r\n clear(r, g, b, a) {\r\n this.gl.clearColor(r, g, b, a);\r\n this.gl.clear(this.gl.COLOR_BUFFER_BIT);\r\n }\r\n };\r\n return __toCommonJS(src_exports);\r\n})();\r\n//# sourceMappingURL=spine-webgl.js.map\r\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\r\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\r\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\r\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\r\nvar MultiFile = require('../../../src/loader/MultiFile.js');\r\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\r\n\r\n/**\r\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\r\n *\r\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Spine File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\r\n *\r\n * @class SpineFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar SpineFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\r\n {\r\n var i;\r\n var json;\r\n var atlas;\r\n var files = [];\r\n var cache = loader.cacheManager.custom.spine;\r\n\r\n // atlas can be an array of atlas files, not just a single one\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n json = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'jsonURL'),\r\n extension: GetFastValue(config, 'jsonExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\r\n });\r\n\r\n atlasURL = GetFastValue(config, 'atlasURL');\r\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, {\r\n key: key + '!' + i,\r\n url: atlasURL[i],\r\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n else\r\n {\r\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, key + '!' + i, atlasURL[i], atlasXhrSettings);\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n\r\n files.unshift(json);\r\n\r\n MultiFile.call(this, loader, 'spine', key, files);\r\n\r\n this.config.preMultipliedAlpha = preMultipliedAlpha;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'text')\r\n {\r\n // Inspect the data for the files to now load\r\n var content = file.data.split('\\n');\r\n\r\n // Extract the textures\r\n var textures = [ content[0] ];\r\n\r\n for (var t = 0; t < content.length; t++)\r\n {\r\n var line = content[t];\r\n\r\n if (line.trim() === '' && t < content.length - 1)\r\n {\r\n line = content[t + 1];\r\n\r\n textures.push(line);\r\n }\r\n }\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\r\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\r\n var prefix = GetFastValue(config, 'prefix', this.prefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n var textureURL = textures[i];\r\n\r\n var key = textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n if (!loader.keyExists(image))\r\n {\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\r\n * @since 3.19.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var atlasCache;\r\n var atlasKey = '';\r\n var combinedAtlasData = '';\r\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\r\n var textureManager = this.loader.textureManager;\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'text')\r\n {\r\n atlasKey = file.key.replace(/![\\d]$/, '');\r\n\r\n atlasCache = file.cache;\r\n\r\n combinedAtlasData = combinedAtlasData.concat(file.data);\r\n }\r\n else\r\n {\r\n var src = file.key.trim();\r\n var pos = src.indexOf('!');\r\n var key = src.substr(pos + 1);\r\n\r\n if (!textureManager.exists(key))\r\n {\r\n textureManager.addImage(key, file.data);\r\n }\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetValue = require('../../../src/utils/object/GetValue');\r\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\r\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\r\nvar SpineCanvas = require('SpineCanvas');\r\nvar SpineWebgl = require('SpineWebgl');\r\nvar Spine = {\r\n canvas: SpineCanvas,\r\n webgl: SpineWebgl\r\n};\r\nvar SpineFile = require('./SpineFile');\r\nvar SpineGameObject = require('./gameobject/SpineGameObject');\r\nvar SpineContainer = require('./container/SpineContainer');\r\nvar NOOP = require('../../../src/utils/NOOP');\r\n\r\n/**\r\n * @classdesc\r\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\r\n *\r\n * Find more details about Spine itself at http://esotericsoftware.com/.\r\n *\r\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\r\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\r\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\r\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\r\n *\r\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\r\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\r\n *\r\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\r\n *\r\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\r\n *\r\n * ```javascript\r\n * import * as SpinePlugin from './SpinePlugin.js';\r\n * ```\r\n *\r\n * and then adding it to your Phaser Game configuration:\r\n *\r\n * ```javascript\r\n * plugins: {\r\n * scene: [\r\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\r\n * ]\r\n * }\r\n * ```\r\n *\r\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\r\n * Game Configuration object, like this:\r\n *\r\n * ```javascript\r\n * scene: {\r\n * preload: preload,\r\n * create: create,\r\n * pack: {\r\n * files: [\r\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\r\n * ]\r\n * }\r\n * }\r\n * ```\r\n *\r\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\r\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\r\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\r\n * subsequent Scenes.\r\n *\r\n * ## A note about inlined data:\r\n *\r\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\r\n * at all. Instead, call the functions directly as required:\r\n *\r\n * scene.cache.json.add\r\n * scene.cache.custom.spine.add\r\n * scene.textures.addBase64\r\n *\r\n * ## Using the plugin\r\n *\r\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\r\n *\r\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\r\n * Spine files directly, i.e.:\r\n *\r\n * ```javascript\r\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\r\n * ```\r\n *\r\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\r\n * and Spine Containers:\r\n *\r\n * ```javascript\r\n * const man = this.add.spine(512, 650, 'stretchyman');\r\n *\r\n * const container = this.add.spineContainer();\r\n *\r\n * container.add(man);\r\n * ```\r\n *\r\n * The first argument is the key which you used when importing the Spine data. There are lots of\r\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\r\n * see the respective documentation and examples for further details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\r\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\r\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\r\n * load arguments, or you may see black outlines around skeleton textures.\r\n *\r\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\r\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\r\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\r\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\r\n * game, regardless if the Scene loaded the Spine data or not.\r\n *\r\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\r\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\r\n *\r\n * ```javascript\r\n * this.plugins.removeScenePlugin('SpinePlugin');\r\n * ```\r\n *\r\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\r\n *\r\n * @class SpinePlugin\r\n * @extends Phaser.Plugins.ScenePlugin\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar SpinePlugin = new Class({\r\n\r\n Extends: ScenePlugin,\r\n\r\n initialize:\r\n\r\n function SpinePlugin (scene, pluginManager, pluginKey)\r\n {\r\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\r\n\r\n var game = pluginManager.game;\r\n\r\n /**\r\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\r\n *\r\n * @name SpinePlugin#isWebGL\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isWebGL = (game.config.renderType === 2);\r\n\r\n /**\r\n * A custom cache that stores the Spine atlas data.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.cache = game.cache.addCustom('spine');\r\n\r\n /**\r\n * A custom cache that stores the Spine Textures.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#spineTextures\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.spineTextures = game.cache.addCustom('spineTextures');\r\n\r\n /**\r\n * A reference to the global JSON Cache.\r\n *\r\n * @name SpinePlugin#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.json = game.cache.json;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name SpinePlugin#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.19.0\r\n */\r\n this.textures = game.textures;\r\n\r\n /**\r\n * A flag that sets if the Skeleton Renderers will render debug information over the top\r\n * of the skeleton or not.\r\n *\r\n * @name SpinePlugin#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The underlying WebGL context of the Phaser renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.19.0\r\n */\r\n this.gl;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name SpinePlugin#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.renderer;\r\n\r\n /**\r\n * An instance of the Spine WebGL Scene Renderer.\r\n *\r\n * There is only one instance of the Scene Renderer shared across the whole plugin.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#sceneRenderer\r\n * @type {spine.webgl.SceneRenderer}\r\n * @since 3.19.0\r\n */\r\n this.sceneRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Renderer.\r\n *\r\n * @name SpinePlugin#skeletonRenderer\r\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.skeletonRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Debug Renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#skeletonDebugRenderer\r\n * @type {spine.webgl.skeletonDebugRenderer}\r\n * @since 3.19.0\r\n */\r\n this.skeletonDebugRenderer;\r\n\r\n /**\r\n * A reference to the Spine runtime.\r\n * This is the runtime created by Esoteric Software.\r\n *\r\n * @name SpinePlugin#plugin\r\n * @type {spine}\r\n * @since 3.19.0\r\n */\r\n this.plugin = Spine;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp1\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp1;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp2\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp2;\r\n\r\n if (this.isWebGL)\r\n {\r\n this.runtime = Spine.webgl;\r\n\r\n this.renderer = game.renderer;\r\n this.gl = game.renderer.gl;\r\n\r\n this.getAtlas = this.getAtlasWebGL;\r\n }\r\n else\r\n {\r\n this.runtime = Spine.canvas;\r\n\r\n this.renderer = game.renderer;\r\n\r\n this.getAtlas = this.getAtlasCanvas;\r\n }\r\n\r\n // Headless mode?\r\n if (!this.renderer)\r\n {\r\n this.renderer = {\r\n width: game.scale.width,\r\n height: game.scale.height,\r\n preRender: NOOP,\r\n postRender: NOOP,\r\n render: NOOP,\r\n destroy: NOOP\r\n };\r\n }\r\n\r\n var add = function (x, y, key, animationName, loop)\r\n {\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, x, y, key, animationName, loop);\r\n\r\n this.displayList.add(spineGO);\r\n this.updateList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var make = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetValue(config, 'key', null);\r\n var animationName = GetValue(config, 'animationName', null);\r\n var loop = GetValue(config, 'loop', false);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 0, 0, key, animationName, loop);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, spineGO, config);\r\n\r\n // Spine specific\r\n var skinName = GetValue(config, 'skinName', false);\r\n\r\n if (skinName)\r\n {\r\n spineGO.setSkinByName(skinName);\r\n }\r\n\r\n var slotName = GetValue(config, 'slotName', false);\r\n var attachmentName = GetValue(config, 'attachmentName', null);\r\n\r\n if (slotName)\r\n {\r\n spineGO.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return spineGO.refresh();\r\n };\r\n\r\n var addContainer = function (x, y, children)\r\n {\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n this.displayList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var makeContainer = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetValue(config, 'x', 0);\r\n var y = GetValue(config, 'y', 0);\r\n var children = GetValue(config, 'children', null);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var container = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n\r\n return container;\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\r\n },\r\n\r\n /**\r\n * Internal boot handler.\r\n *\r\n * @method SpinePlugin#boot\r\n * @private\r\n * @since 3.19.0\r\n */\r\n boot: function ()\r\n {\r\n if (this.isWebGL)\r\n {\r\n this.bootWebGL();\r\n this.onResize();\r\n this.game.scale.on(ResizeEvent, this.onResize, this);\r\n }\r\n else\r\n {\r\n this.bootCanvas();\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n eventEmitter.once('destroy', this.destroy, this);\r\n\r\n this.game.events.once('destroy', this.gameDestroy, this);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the Canvas Renderer.\r\n *\r\n * @method SpinePlugin#bootCanvas\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootCanvas: function ()\r\n {\r\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the WebGL Renderer.\r\n *\r\n * @method SpinePlugin#bootWebGL\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootWebGL: function ()\r\n {\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (!sceneRenderer)\r\n {\r\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n\r\n this.renderer.spineSceneRenderer = sceneRenderer;\r\n }\r\n\r\n // All scene share the same instance\r\n this.sceneRenderer = sceneRenderer;\r\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer;\r\n\r\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\r\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasCanvas\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasCanvas: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n atlas = new this.runtime.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage());\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasWebGL\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasWebGL: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n var gl = this.sceneRenderer.context.gl;\r\n\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n\r\n atlas = new this.runtime.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false);\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\r\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\r\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\r\n * outlines around skeleton textures.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\r\n * Loading a file using a key that is already taken will result in a warning.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.spine({\r\n * key: 'mainmenu',\r\n * jsonURL: 'boy.json',\r\n * atlasURL: 'boy.atlas',\r\n * preMultipliedAlpha: true\r\n * });\r\n * ```\r\n *\r\n * If you need to load multiple Spine atlas files, provide them as an array:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\r\n * }\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the data from the Spine plugin.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spine\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.19.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {object} [settings] - An external Settings configuration object { prefix: '' }\r\n * \r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\r\n {\r\n var multifile;\r\n settings = settings || {};\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new SpineFile(this, key[i]);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n \r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n \r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#worldToLocal\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The screen space x coordinate to convert.\r\n * @param {number} y - The screen space y coordinate to convert.\r\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\r\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\r\n *\r\n * @return {spine.Vector2} A Vector2 containing the translated point.\r\n */\r\n worldToLocal: function (x, y, skeleton, bone)\r\n {\r\n var temp1 = this.temp1;\r\n var temp2 = this.temp2;\r\n var camera = this.sceneRenderer.camera;\r\n\r\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\r\n\r\n var width = camera.viewportWidth;\r\n var height = camera.viewportHeight;\r\n\r\n camera.screenToWorld(temp1, width, height);\r\n\r\n if (bone && bone.parent !== null)\r\n {\r\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\r\n\r\n return new this.runtime.Vector2(temp2.x, temp2.y);\r\n }\r\n else if (bone)\r\n {\r\n return new this.runtime.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\r\n }\r\n else\r\n {\r\n return new this.runtime.Vector2(temp1.x, temp1.y);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x and y values.\r\n *\r\n * @method SpinePlugin#getVector2\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector2: function (x, y)\r\n {\r\n return new this.runtime.Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x, y and z values.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#getVector3\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n * @param {number} z - The Vector z value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector3: function (x, y, z)\r\n {\r\n return new Spine.webgl.Vector3(x, y, z);\r\n },\r\n\r\n /**\r\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBones\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBones: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBones = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugRegionAttachments\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugRegionAttachments: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawRegionAttachments = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBoundingBoxes\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBoundingBoxes: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshHull\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshHull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshHull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshTriangles\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshTriangles: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshTriangles = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugPaths\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugPaths: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawPaths = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugSkeletonXY\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugSkeletonXY: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawSkeletonXY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugClipping\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugClipping: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawClipping = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the given vertex effect on the Spine Skeleton Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setEffect\r\n * @since 3.19.0\r\n *\r\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setEffect: function (effect)\r\n {\r\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\r\n *\r\n * The Skeleton data should have already been loaded before calling this method.\r\n *\r\n * @method SpinePlugin#createSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\r\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\r\n *\r\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\r\n */\r\n createSkeleton: function (key, skeletonJSON)\r\n {\r\n var atlasKey = key;\r\n var jsonKey = key;\r\n var split = (key.indexOf('.') !== -1);\r\n\r\n if (split)\r\n {\r\n var parts = key.split('.');\r\n\r\n atlasKey = parts.shift();\r\n jsonKey = parts.join('.');\r\n }\r\n\r\n var atlasData = this.cache.get(atlasKey);\r\n var atlas = this.getAtlas(atlasKey);\r\n\r\n if (!atlas)\r\n {\r\n return null;\r\n }\r\n\r\n if (!this.spineTextures.has(atlasKey))\r\n {\r\n var gl = this.gl;\r\n var i;\r\n var atlasPage;\r\n var realTextureKey;\r\n\r\n if (this.isWebGL)\r\n {\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n }\r\n\r\n for (i = 0; i < atlas.pages.length; i ++)\r\n {\r\n atlasPage = atlas.pages[i];\r\n realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;\r\n if (this.isWebGL)\r\n {\r\n atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));\r\n }\r\n else\r\n {\r\n atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));\r\n }\r\n }\r\n \r\n this.spineTextures.add(atlasKey, atlas);\r\n }\r\n\r\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\r\n\r\n var atlasLoader = new this.runtime.AtlasAttachmentLoader(atlas);\r\n\r\n var skeletonJson = new this.runtime.SkeletonJson(atlasLoader);\r\n\r\n var data;\r\n\r\n if (skeletonJSON)\r\n {\r\n data = skeletonJSON;\r\n }\r\n else\r\n {\r\n var json = this.json.get(atlasKey);\r\n\r\n data = (split) ? GetValue(json, jsonKey) : json;\r\n }\r\n\r\n if (data)\r\n {\r\n var skeletonData = skeletonJson.readSkeletonData(data);\r\n\r\n var skeleton = new this.runtime.Skeleton(skeletonData);\r\n\r\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Animation State and Animation State Data for the given skeleton.\r\n *\r\n * The returned object contains two properties: `state` and `stateData` respectively.\r\n *\r\n * @method SpinePlugin#createAnimationState\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\r\n *\r\n * @return {any} An object containing the Animation State and Animation State Data instances.\r\n */\r\n createAnimationState: function (skeleton)\r\n {\r\n var stateData = new this.runtime.AnimationStateData(skeleton.data);\r\n\r\n var state = new this.runtime.AnimationState(stateData);\r\n\r\n return { stateData: stateData, state: state };\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpinePlugin#getBounds\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function (skeleton)\r\n {\r\n var offset = new this.runtime.Vector2();\r\n var size = new this.runtime.Vector2();\r\n\r\n skeleton.getBounds(offset, size, []);\r\n\r\n return { offset: offset, size: size };\r\n },\r\n\r\n /**\r\n * Internal handler for when the renderer resizes.\r\n *\r\n * Only called if running in WebGL.\r\n *\r\n * @method SpinePlugin#onResize\r\n * @since 3.19.0\r\n */\r\n onResize: function ()\r\n {\r\n var renderer = this.renderer;\r\n var sceneRenderer = this.sceneRenderer;\r\n\r\n var viewportWidth = renderer.width;\r\n var viewportHeight = renderer.height;\r\n\r\n sceneRenderer.camera.position.x = viewportWidth / 2;\r\n sceneRenderer.camera.position.y = viewportHeight / 2;\r\n\r\n sceneRenderer.camera.setViewport(viewportWidth, viewportHeight);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n *\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method SpinePlugin#shutdown\r\n * @private\r\n * @since 3.19.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n if (this.isWebGL)\r\n {\r\n this.game.scale.off(ResizeEvent, this.onResize, this);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n *\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method SpinePlugin#destroy\r\n * @private\r\n * @since 3.19.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.cache = null;\r\n this.spineTextures = null;\r\n this.json = null;\r\n this.textures = null;\r\n this.skeletonRenderer = null;\r\n this.gl = null;\r\n },\r\n\r\n /**\r\n * The Game that owns this plugin is being destroyed.\r\n *\r\n * Dispose of the Scene Renderer and remove the Game Objects.\r\n *\r\n * @method SpinePlugin#gameDestroy\r\n * @private\r\n * @since 3.50.0\r\n */\r\n gameDestroy: function ()\r\n {\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n this.pluginManager.removeGameObject('spineContainer', true, true);\r\n\r\n this.pluginManager = null;\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (sceneRenderer)\r\n {\r\n sceneRenderer.dispose();\r\n }\r\n\r\n this.renderer.spineSceneRenderer = null;\r\n this.sceneRenderer = null;\r\n }\r\n\r\n});\r\n\r\nSpinePlugin.SpineGameObject = SpineGameObject;\r\nSpinePlugin.SpineContainer = SpineContainer;\r\n\r\n/**\r\n * Creates a new Spine Game Object and adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\r\n *\r\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\r\n *\r\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\r\n * name, then use `SpinePlugin.make` instead.\r\n *\r\n * @method SpinePlugin#add\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\n/**\r\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 500, y: 500, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-idle', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * @method SpinePlugin#make\r\n * @since 3.19.0\r\n *\r\n * @param {any} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\nmodule.exports = SpinePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../../src/utils/Class');\r\nvar Container = require('../../../../src/gameobjects/container/Container');\r\nvar SpineContainerRender = require('./SpineContainerRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\r\n *\r\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\r\n * for Spine Game Objects. You must only add ever Spine Game Objects, or other Spine Containers, to this type of Container.\r\n * Although Phaser will not prevent you from adding other types, they will not render and are likely to throw runtime errors.\r\n *\r\n * To create one in a Scene, use the factory methods:\r\n *\r\n * ```javascript\r\n * this.add.spineContainer();\r\n * ```\r\n *\r\n * or\r\n *\r\n * ```javascript\r\n * this.make.spineContainer();\r\n * ```\r\n *\r\n * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\r\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\r\n * Spine Containers. In short, if you need masking, don't mix and match the types.\r\n *\r\n * See the Container documentation for further details about what Containers can do.\r\n *\r\n * @class SpineContainer\r\n * @extends Phaser.GameObjects.Container\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\r\n */\r\nvar SpineContainer = new Class({\r\n\r\n Extends: Container,\r\n\r\n Mixins: [\r\n SpineContainerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineContainer (scene, plugin, x, y, children)\r\n {\r\n Container.call(this, scene, x, y, children);\r\n\r\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\r\n this.type = 'Spine';\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineContainer#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.50.0\r\n */\r\n this.plugin = plugin;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineContainer#preDestroy\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineContainer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n camera.addToRenderList(container);\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n if (container.mask)\r\n {\r\n container.mask.preRenderCanvas(renderer, null, camera);\r\n }\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n }\r\n\r\n if (container.mask)\r\n {\r\n container.mask.postRenderCanvas(renderer);\r\n }\r\n};\r\n\r\nmodule.exports = SpineContainerCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = require('../../../../src/utils/NOOP');\r\nvar renderCanvas = require('../../../../src/utils/NOOP');\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./SpineContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./SpineContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineContainerWebGLRenderer#renderWebGL\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineContainer} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n var plugin = container.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n }\r\n\r\n return;\r\n }\r\n\r\n camera.addToRenderList(container);\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var rendererNextType = renderer.nextTypeMatch;\r\n\r\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\r\n renderer.nextTypeMatch = true;\r\n renderer.newType = false;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (child.willRender(camera, container))\r\n {\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.preRenderWebGL(renderer, child, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.postRenderWebGL(renderer, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n }\r\n }\r\n\r\n renderer.nextTypeMatch = rendererNextType;\r\n\r\n if (!rendererNextType)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineContainerWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Complete Event.\r\n *\r\n * @event SpinePluginEvents#COMPLETE\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Dispose Event.\r\n *\r\n * @event SpinePluginEvents#DISPOSE\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'dispose';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The End Event.\r\n *\r\n * @event SpinePluginEvents#END\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'end';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Custom Event Event.\r\n *\r\n * @event SpinePluginEvents#EVENT\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'event';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Interrupted Event.\r\n *\r\n * @event SpinePluginEvents#INTERRUPTED\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'interrupted';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Start Event.\r\n *\r\n * @event SpinePluginEvents#START\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace SpinePluginEvents\r\n */\r\n\r\nmodule.exports = {\r\n\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n DISPOSE: require('./DISPOSE_EVENT'),\r\n END: require('./END_EVENT'),\r\n EVENT: require('./EVENT_EVENT'),\r\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AngleBetween = require('../../../../src/math/angle/Between');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar Class = require('../../../../src/utils/Class');\r\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\r\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\r\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\r\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\r\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\r\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar DegToRad = require('../../../../src/math/DegToRad');\r\nvar GameObject = require('../../../../src/gameobjects/GameObject');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar SpineEvents = require('../events/');\r\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\r\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\r\n * easily change the skin, slot attachment, bone positions and more.\r\n *\r\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\r\n * You can only create them if the Spine plugin has been loaded into Phaser.\r\n *\r\n * The quickest way is the Game Object Factory:\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\r\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\r\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\r\n * animation to loop. Look at the documentation for further details on each of these options.\r\n *\r\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\r\n * Configuration object:\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 512, y: 550, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-think', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\r\n * overall scale.\r\n *\r\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\r\n * update and render, it must be added to the display and update lists of your Scene:\r\n *\r\n * ```javascript\r\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\r\n * this.sys.displayList.add(jelly);\r\n * this.sys.updateList.add(jelly);\r\n * ```\r\n *\r\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\r\n * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup\r\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\r\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\r\n * input shape being created. If it's not suitable, provide your own shape to the `setInteractive` method.\r\n *\r\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\r\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\r\n * Object position with it. See the examples for further details.\r\n *\r\n * If your Spine Game Object has black outlines around the different parts of the texture when it\r\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\r\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\r\n *\r\n * @class SpineGameObject\r\n * @extends Phaser.GameObjects.GameObject\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n */\r\nvar SpineGameObject = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsComputedSize,\r\n ComponentsDepth,\r\n ComponentsFlip,\r\n ComponentsScrollFactor,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n SpineGameObjectRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\r\n {\r\n GameObject.call(this, scene, 'Spine');\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineGameObject#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.19.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The Spine Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeleton\r\n * @type {spine.Skeleton}\r\n * @since 3.19.0\r\n */\r\n this.skeleton = null;\r\n\r\n /**\r\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeletonData\r\n * @type {spine.SkeletonData}\r\n * @since 3.19.0\r\n */\r\n this.skeletonData = null;\r\n\r\n /**\r\n * The Spine Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#state\r\n * @type {spine.AnimationState}\r\n * @since 3.19.0\r\n */\r\n this.state = null;\r\n\r\n /**\r\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#stateData\r\n * @type {spine.AnimationStateData}\r\n * @since 3.19.0\r\n */\r\n this.stateData = null;\r\n\r\n /**\r\n * A reference to the root bone of the Skeleton.\r\n *\r\n * @name SpineGameObject#root\r\n * @type {spine.Bone}\r\n * @since 3.19.0\r\n */\r\n this.root = null;\r\n\r\n /**\r\n * This object holds the calculated bounds of the current\r\n * pose, as set when a new Skeleton is applied.\r\n *\r\n * @name SpineGameObject#bounds\r\n * @type {any}\r\n * @since 3.19.0\r\n */\r\n this.bounds = null;\r\n\r\n /**\r\n * A Game Object level flag that allows you to enable debug drawing\r\n * to the Skeleton Debug Renderer by toggling it.\r\n *\r\n * @name SpineGameObject#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The factor to scale the Animation update time by.\r\n *\r\n * @name SpineGameObject#timeScale\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginX\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginY\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * A flag that stores if the texture associated with the current\r\n * Skin being used by this Game Object, has its alpha pre-multiplied\r\n * into it, or not.\r\n *\r\n * @name SpineGameObject#preMultipliedAlpha\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.preMultipliedAlpha = false;\r\n\r\n /**\r\n * A default Blend Mode. You cannot change the blend mode of a\r\n * Spine Game Object.\r\n *\r\n * @name SpineGameObject#blendMode\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.blendMode = -1;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key)\r\n {\r\n this.setSkeleton(key, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Returns `true` if this Spine Game Object both has a skeleton and\r\n * also passes the render tests for the given Camera.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n *\r\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function (camera, container)\r\n {\r\n var GameObjectRenderMask = 15;\r\n\r\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\r\n\r\n if (!container && !result && this.parentContainer)\r\n {\r\n var plugin = this.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\r\n {\r\n sceneRenderer.end();\r\n\r\n plugin.renderer.pipelines.rebind();\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Set the Alpha level for the whole Skeleton of this Game Object.\r\n *\r\n * The alpha controls the opacity of the Game Object as it renders.\r\n *\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method SpineGameObject#setAlpha\r\n * @since 3.19.0\r\n *\r\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value, slotName)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n slot.color.a = Clamp(value, 0, 1);\r\n }\r\n }\r\n else\r\n {\r\n this.alpha = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#alpha\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.a = v;\r\n }\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~2;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 2;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of red used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#red\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.r = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of green used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#green\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.g = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of blue used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#blue\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.b = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\r\n *\r\n * @method SpineGameObject#setColor\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\r\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setColor: function (color, slotName)\r\n {\r\n if (color === undefined) { color = 0xffffff; }\r\n\r\n var red = (color >> 16 & 0xFF) / 255;\r\n var green = (color >> 8 & 0xFF) / 255;\r\n var blue = (color & 0xFF) / 255;\r\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\r\n\r\n var target = this.skeleton;\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n target = slot;\r\n }\r\n }\r\n\r\n target.color.r = red;\r\n target.color.g = green;\r\n target.color.b = blue;\r\n\r\n if (alpha !== null)\r\n {\r\n target.color.a = alpha;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\r\n * that contains the Skeleton data.\r\n *\r\n * @method SpineGameObject#setSkeletonFromJSON\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\r\n {\r\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on its cache key.\r\n *\r\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\r\n * or slot attachment, or any other property to adjust it.\r\n *\r\n * @method SpineGameObject#setSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\r\n\r\n this.skeletonData = data.skeletonData;\r\n\r\n this.preMultipliedAlpha = data.preMultipliedAlpha;\r\n\r\n var skeleton = data.skeleton;\r\n\r\n skeleton.setSkin();\r\n skeleton.setToSetupPose();\r\n\r\n this.skeleton = skeleton;\r\n\r\n // AnimationState\r\n data = this.plugin.createAnimationState(skeleton);\r\n\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.state = data.state;\r\n this.stateData = data.stateData;\r\n\r\n this.state.addListener({\r\n event: this.onEvent.bind(this),\r\n complete: this.onComplete.bind(this),\r\n start: this.onStart.bind(this),\r\n end: this.onEnd.bind(this),\r\n dispose: this.onDispose.bind(this),\r\n interrupted: this.onInterrupted.bind(this)\r\n });\r\n\r\n if (animationName)\r\n {\r\n this.setAnimation(0, animationName, loop);\r\n }\r\n\r\n this.root = this.getRootBone();\r\n\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.state.apply(skeleton);\r\n\r\n skeleton.updateCache();\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onComplete event via this Game Object.\r\n *\r\n * @method SpineGameObject#onComplete\r\n * @fires SpinePluginEvents#COMPLETE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onComplete: function (entry)\r\n {\r\n this.emit(SpineEvents.COMPLETE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onDispose event via this Game Object.\r\n *\r\n * @method SpineGameObject#onDispose\r\n * @fires SpinePluginEvents#DISPOSE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onDispose: function (entry)\r\n {\r\n this.emit(SpineEvents.DISPOSE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onEnd event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEnd\r\n * @fires SpinePluginEvents#END\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onEnd: function (entry)\r\n {\r\n this.emit(SpineEvents.END, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine Event event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEvent\r\n * @fires SpinePluginEvents#EVENT\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n * @param {spine.Event} event - The Spine event.\r\n */\r\n onEvent: function (entry, event)\r\n {\r\n this.emit(SpineEvents.EVENT, entry, event);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\r\n *\r\n * @method SpineGameObject#onInterrupted\r\n * @fires SpinePluginEvents#INTERRUPTED\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onInterrupted: function (entry)\r\n {\r\n this.emit(SpineEvents.INTERRUPTED, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onStart event via this Game Object.\r\n *\r\n * @method SpineGameObject#onStart\r\n * @fires SpinePluginEvents#START\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onStart: function (entry)\r\n {\r\n this.emit(SpineEvents.START, entry);\r\n },\r\n\r\n /**\r\n * Refreshes the data about the current Skeleton.\r\n *\r\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\r\n *\r\n * Call this method if you need to access the Skeleton data directly, and it may have changed\r\n * recently.\r\n *\r\n * @method SpineGameObject#refresh\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n refresh: function ()\r\n {\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.updateSize();\r\n\r\n this.skeleton.updateCache();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n *\r\n * If no arguments are given it uses the current skeleton data dimensions.\r\n *\r\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\r\n * when the skeleton data doesn't match what is required in-game.\r\n *\r\n * @method SpineGameObject#setSize\r\n * @since 3.19.0\r\n *\r\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\r\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSize: function (width, height, offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (width === undefined) { width = skeleton.data.width; }\r\n if (height === undefined) { height = skeleton.data.height; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of this Game Object from the Skeleton position.\r\n *\r\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\r\n *\r\n * @method SpineGameObject#setOffset\r\n * @since 3.19.0\r\n *\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setOffset: function (offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\r\n * It then syncs the skeleton bounds back to this Game Object.\r\n *\r\n * This method is called automatically as needed internally, however, it's also exposed should\r\n * you require overriding the size settings.\r\n *\r\n * @method SpineGameObject#updateSize\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n updateSize: function ()\r\n {\r\n var skeleton = this.skeleton;\r\n var renderer = this.plugin.renderer;\r\n\r\n var height = renderer.height;\r\n\r\n var oldScaleX = this.scaleX;\r\n var oldScaleY = this.scaleY;\r\n\r\n skeleton.x = this.x;\r\n skeleton.y = height - this.y;\r\n skeleton.scaleX = 1;\r\n skeleton.scaleY = 1;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n var bounds = this.getBounds();\r\n\r\n this.width = bounds.size.x;\r\n this.height = bounds.size.y;\r\n\r\n this.displayOriginX = this.x - bounds.offset.x;\r\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\r\n\r\n skeleton.scaleX = oldScaleX;\r\n skeleton.scaleY = oldScaleY;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the bones in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getBoneList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\r\n */\r\n getBoneList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.bones.length; i++)\r\n {\r\n output.push(skeletonData.bones[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the skins in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getSkinList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\r\n */\r\n getSkinList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.skins.length; i++)\r\n {\r\n output.push(skeletonData.skins[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the slots in the Skeleton.\r\n *\r\n * @method SpineGameObject#getSlotList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\r\n */\r\n getSlotList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeleton = this.skeleton;\r\n\r\n for (var i = 0; i < skeleton.slots.length; i++)\r\n {\r\n output.push(skeleton.slots[i].data.name);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the animations in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getAnimationList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\r\n */\r\n getAnimationList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.animations.length; i++)\r\n {\r\n output.push(skeletonData.animations[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the current animation being played on the given track, if any.\r\n *\r\n * @method SpineGameObject#getCurrentAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\r\n *\r\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\r\n */\r\n getCurrentAnimation: function (trackIndex)\r\n {\r\n if (trackIndex === undefined) { trackIndex = 0; }\r\n\r\n var current = this.state.getCurrent(trackIndex);\r\n\r\n if (current)\r\n {\r\n return current.animation;\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#play\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\r\n */\r\n play: function (animationName, loop, ignoreIfPlaying)\r\n {\r\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#setAnimation\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to play the animation on.\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n\r\n if (ignoreIfPlaying && this.state)\r\n {\r\n var currentTrack = this.state.getCurrent(trackIndex);\r\n\r\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (this.findAnimation(animationName))\r\n {\r\n return this.state.setAnimation(trackIndex, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an animation to be played after the current or last queued animation for a track.\r\n * If the track is empty, it is equivalent to calling setAnimation.\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\r\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\r\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\r\n * If the previous entry is looping, its next loop completion is used instead of its duration.\r\n *\r\n * @method SpineGameObject#addAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {string} animationName - The string-based key of the animation to add.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n addAnimation: function (trackIndex, animationName, loop, delay)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (delay === undefined) { delay = 0; }\r\n\r\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\r\n },\r\n\r\n /**\r\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\r\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n *\r\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\r\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\r\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\r\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\r\n * A mix duration of 0 still mixes out over one frame.\r\n *\r\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\r\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\r\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\r\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\r\n * property to the value keyed in the new animation.\r\n *\r\n * @method SpineGameObject#setEmptyAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {spine.TrackEntry} The returned Track Entry.\r\n */\r\n setEmptyAnimation: function (trackIndex, mixDuration)\r\n {\r\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\r\n },\r\n\r\n /**\r\n * Removes all animations from the track, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTrack\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTrack: function (trackIndex)\r\n {\r\n this.state.clearTrack(trackIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all animations from all tracks, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTracks\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTracks: function ()\r\n {\r\n this.state.clearTracks();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkinByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to set.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkinByName: function (skinName)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkinByName(skinName);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkin\r\n * @since 3.19.0\r\n *\r\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkin: function (newSkin)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkin(newSkin);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mix duration when changing from the specified animation to the other.\r\n *\r\n * @method SpineGameObject#setMix\r\n * @since 3.19.0\r\n *\r\n * @param {string} fromName - The animation to mix from.\r\n * @param {string} toName - The animation to mix to.\r\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMix: function (fromName, toName, duration)\r\n {\r\n this.stateData.setMix(fromName, toName, duration);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot\r\n * index and attachment name. First the skin is checked and if the attachment was not found,\r\n * the default skin is checked.\r\n *\r\n * @method SpineGameObject#getAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {integer} slotIndex - The slot index to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachment: function (slotIndex, attachmentName)\r\n {\r\n return this.skeleton.getAttachment(slotIndex, attachmentName);\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\r\n *\r\n * @method SpineGameObject#getAttachmentByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachmentByName: function (slotName, attachmentName)\r\n {\r\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n },\r\n\r\n /**\r\n * A convenience method to set an attachment by finding the slot with findSlot,\r\n * finding the attachment with getAttachment, then setting the slot's attachment.\r\n *\r\n * @method SpineGameObject#setAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to add the attachment to.\r\n * @param {string} attachmentName - The attachment name to add.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAttachment: function (slotName, attachmentName)\r\n {\r\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\r\n {\r\n for (var i = 0; i < slotName.length; i++)\r\n {\r\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\r\n }\r\n }\r\n else\r\n {\r\n this.skeleton.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setToSetupPose: function ()\r\n {\r\n this.skeleton.setToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the slots and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setSlotsToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSlotsToSetupPose: function ()\r\n {\r\n this.skeleton.setSlotsToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones and constraints to their setup pose values.\r\n *\r\n * @method SpineGameObject#setBonesToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBonesToSetupPose: function ()\r\n {\r\n this.skeleton.setBonesToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the root bone, or null.\r\n *\r\n * @method SpineGameObject#getRootBone\r\n * @since 3.19.0\r\n *\r\n * @return {spine.Bone} The root bone, or null.\r\n */\r\n getRootBone: function ()\r\n {\r\n return this.skeleton.getRootBone();\r\n },\r\n\r\n /**\r\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\r\n * towards the given position. You can set an optional angle offset, should the bone be\r\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\r\n *\r\n * @method SpineGameObject#angleBoneToXY\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\r\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\r\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\r\n * @param {number} [offset=0] - An offset to add to the rotation angle.\r\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\r\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n if (minAngle === undefined) { minAngle = 0; }\r\n if (maxAngle === undefined) { maxAngle = 360; }\r\n\r\n var renderer = this.plugin.renderer;\r\n var height = renderer.height;\r\n\r\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\r\n\r\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBone\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {spine.Bone} The bone, or null.\r\n */\r\n findBone: function (boneName)\r\n {\r\n return this.skeleton.findBone(boneName);\r\n },\r\n\r\n /**\r\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBoneIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {integer} The bone index. Or -1 if the bone was not found.\r\n */\r\n findBoneIndex: function (boneName)\r\n {\r\n return this.skeleton.findBoneIndex(boneName);\r\n },\r\n\r\n /**\r\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlot\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {spine.Slot} The Slot. May be null.\r\n */\r\n findSlot: function (slotName)\r\n {\r\n return this.skeleton.findSlot(slotName);\r\n },\r\n\r\n /**\r\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlotIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {integer} The slot index. Or -1 if the Slot was not found.\r\n */\r\n findSlotIndex: function (slotName)\r\n {\r\n return this.skeleton.findSlotIndex(slotName);\r\n },\r\n\r\n /**\r\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\r\n * this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSkin\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to find.\r\n *\r\n * @return {spine.Skin} The Skin. May be null.\r\n */\r\n findSkin: function (skinName)\r\n {\r\n return this.skeletonData.findSkin(skinName);\r\n },\r\n\r\n /**\r\n * Finds an event by comparing each events's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findEvent\r\n * @since 3.19.0\r\n *\r\n * @param {string} eventDataName - The name of the event to find.\r\n *\r\n * @return {spine.EventData} The Event Data. May be null.\r\n */\r\n findEvent: function (eventDataName)\r\n {\r\n return this.skeletonData.findEvent(eventDataName);\r\n },\r\n\r\n /**\r\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The name of the animation to find.\r\n *\r\n * @return {spine.Animation} The Animation. May be null.\r\n */\r\n findAnimation: function (animationName)\r\n {\r\n return this.skeletonData.findAnimation(animationName);\r\n },\r\n\r\n /**\r\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findIkConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.IkConstraintData} The IK constraint. May be null.\r\n */\r\n findIkConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findIkConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds an transform constraint by comparing each transform constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findTransformConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\r\n */\r\n findTransformConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findTransformConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.PathConstraintData} The path constraint. May be null.\r\n */\r\n findPathConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds the index of a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraintIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\r\n */\r\n findPathConstraintIndex: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraintIndex(constraintName);\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpineGameObject#getBounds\r\n * @since 3.19.0\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function ()\r\n {\r\n return this.plugin.getBounds(this.skeleton);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method SpineGameObject#preUpdate\r\n * @protected\r\n * @since 3.19.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n this.state.update((delta / 1000) * this.timeScale);\r\n\r\n this.state.apply(skeleton);\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineGameObject#preDestroy\r\n * @protected\r\n * @since 3.19.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.plugin = null;\r\n\r\n this.skeleton = null;\r\n this.skeletonData = null;\r\n\r\n this.state = null;\r\n this.stateData = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderCanvas\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatrix)\r\n{\r\n var context = renderer.currentContext;\r\n\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var skeletonRenderer = plugin.skeletonRenderer;\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n camera.addToRenderList(src);\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n\r\n // Inverse or we get upside-down skeletons\r\n skeleton.scaleY = calcMatrix.scaleY * -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n if (camera.renderToTexture)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n skeletonRenderer.ctx = context;\r\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\r\n\r\n context.save();\r\n\r\n skeletonRenderer.draw(skeleton);\r\n\r\n context.restore();\r\n};\r\n\r\nmodule.exports = SpineGameObjectCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar renderWebGL = require('../../../../src/utils/NOOP');\r\nvar renderCanvas = require('../../../../src/utils/NOOP');\r\nvar renderDirect = require('../../../../src/utils/NOOP');\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\r\n renderDirect = require('./SpineGameObjectWebGLDirect');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas,\r\n renderDirect: renderDirect\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Directly renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderDirect\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n }\r\n\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLDirect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderWebGL\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n }\r\n\r\n if (!renderer.nextTypeMatch)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Global constants.\r\n *\r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Phaser Release Version\r\n *\r\n * @name Phaser.VERSION\r\n * @const\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n VERSION: '3.60.0',\r\n\r\n BlendModes: require('./renderer/BlendModes'),\r\n\r\n ScaleModes: require('./renderer/ScaleModes'),\r\n\r\n /**\r\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\r\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\r\n *\r\n * @name Phaser.AUTO\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n AUTO: 0,\r\n\r\n /**\r\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\r\n * WebGL or not.\r\n *\r\n * @name Phaser.CANVAS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n CANVAS: 1,\r\n\r\n /**\r\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\r\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\r\n * message to the user.\r\n *\r\n * @name Phaser.WEBGL\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n WEBGL: 2,\r\n\r\n /**\r\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\r\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\r\n * not for running Phaser on the server, which is something you really shouldn't do.\r\n *\r\n * @name Phaser.HEADLESS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n HEADLESS: 3,\r\n\r\n /**\r\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\r\n * to help you remember what the value is doing in your code.\r\n *\r\n * @name Phaser.FOREVER\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FOREVER: -1,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.NONE\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n NONE: 4,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.UP\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n UP: 5,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.DOWN\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DOWN: 6,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.LEFT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LEFT: 7,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.RIGHT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 8\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n *\r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once(Events.DESTROY, this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n *\r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {number} [data=1] - The amount to increase the given key by. Pass a negative value to decrease the key.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n\r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n *\r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n *\r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n *\r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.on('changedata', listener)`.\r\n *\r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Data Manager Destroy Event.\r\n *\r\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\r\n *\r\n * @event Phaser.Data.Events#DESTROY\r\n * @type {string}\r\n * @since 3.50.0\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.audio` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Audio\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} audioData - Can this device play HTML Audio tags?\r\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\r\n * @property {boolean} m4a - Can this device can play m4a files.\r\n * @property {boolean} aac - Can this device can play aac files.\r\n * @property {boolean} flac - Can this device can play flac files.\r\n * @property {boolean} mp3 - Can this device play mp3 files?\r\n * @property {boolean} ogg - Can this device play ogg files?\r\n * @property {boolean} opus - Can this device play opus files?\r\n * @property {boolean} wav - Can this device play wav files?\r\n * @property {boolean} webAudio - Does this device have the Web Audio API?\r\n * @property {boolean} webm - Can this device play webm files?\r\n */\r\nvar Audio = {\r\n\r\n flac: false,\r\n aac: false,\r\n audioData: false,\r\n dolby: false,\r\n m4a: false,\r\n mp3: false,\r\n ogg: false,\r\n opus: false,\r\n wav: false,\r\n webAudio: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Audio;\r\n }\r\n\r\n Audio.audioData = !!(window['Audio']);\r\n\r\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\r\n\r\n var audioElement = document.createElement('audio');\r\n var result = !!audioElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n var CanPlay = function (type1, type2)\r\n {\r\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\r\n\r\n if (type2)\r\n {\r\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\r\n }\r\n else\r\n {\r\n return Boolean(canPlayType1);\r\n }\r\n };\r\n\r\n // wav Mimetypes accepted:\r\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\r\n\r\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\r\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\r\n Audio.mp3 = CanPlay('mpeg');\r\n Audio.wav = CanPlay('wav');\r\n Audio.m4a = CanPlay('x-m4a');\r\n Audio.aac = CanPlay('aac');\r\n Audio.flac = CanPlay('flac', 'x-flac');\r\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\r\n\r\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\r\n {\r\n if (Browser.edge)\r\n {\r\n Audio.dolby = true;\r\n }\r\n else if (Browser.safari && Browser.safariVersion >= 9)\r\n {\r\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\r\n {\r\n var major = parseInt(RegExp.$1, 10);\r\n var minor = parseInt(RegExp.$2, 10);\r\n\r\n if ((major === 10 && minor >= 11) || major > 10)\r\n {\r\n Audio.dolby = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do here\r\n }\r\n\r\n return Audio;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\n\r\n/**\r\n * Determines the browser type and version running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.browser` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Browser\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} chrome - Set to true if running in Chrome.\r\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\r\n * @property {boolean} firefox - Set to true if running in Firefox.\r\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\r\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\r\n * @property {boolean} opera - Set to true if running in Opera.\r\n * @property {boolean} safari - Set to true if running in Safari.\r\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\r\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\r\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\r\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\r\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\r\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\r\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\r\n */\r\nvar Browser = {\r\n\r\n chrome: false,\r\n chromeVersion: 0,\r\n edge: false,\r\n firefox: false,\r\n firefoxVersion: 0,\r\n ie: false,\r\n ieVersion: 0,\r\n mobileSafari: false,\r\n opera: false,\r\n safari: false,\r\n safariVersion: 0,\r\n silk: false,\r\n trident: false,\r\n tridentVersion: 0,\r\n es2019: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Edg\\/\\d+/).test(ua))\r\n {\r\n Browser.edge = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/OPR/).test(ua))\r\n {\r\n Browser.opera = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.chrome = true;\r\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.chromeVersion > 69);\r\n }\r\n else if ((/Firefox\\D+(\\d+)/).test(ua))\r\n {\r\n Browser.firefox = true;\r\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.firefoxVersion > 10);\r\n }\r\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\r\n {\r\n Browser.mobileSafari = true;\r\n }\r\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.ieVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.safari = true;\r\n Browser.safariVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.safariVersion > 10);\r\n }\r\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.trident = true;\r\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\r\n Browser.ieVersion = parseInt(RegExp.$3, 10);\r\n }\r\n\r\n // Silk gets its own if clause because its ua also contains 'Safari'\r\n if ((/Silk/).test(ua))\r\n {\r\n Browser.silk = true;\r\n }\r\n\r\n return Browser;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the canvas features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.CanvasFeatures\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\r\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\r\n */\r\nvar CanvasFeatures = {\r\n\r\n supportInverseAlpha: false,\r\n supportNewBlendModes: false\r\n\r\n};\r\n\r\nfunction checkBlendMode ()\r\n{\r\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\r\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\r\n\r\n var magenta = new Image();\r\n\r\n magenta.onload = function ()\r\n {\r\n var yellow = new Image();\r\n\r\n yellow.onload = function ()\r\n {\r\n var canvas = CanvasPool.create2D(yellow, 6);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.globalCompositeOperation = 'multiply';\r\n\r\n context.drawImage(magenta, 0, 0);\r\n context.drawImage(yellow, 2, 0);\r\n\r\n if (!context.getImageData(2, 0, 1, 1))\r\n {\r\n return false;\r\n }\r\n\r\n var data = context.getImageData(2, 0, 1, 1).data;\r\n\r\n CanvasPool.remove(yellow);\r\n\r\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\r\n };\r\n\r\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\r\n };\r\n\r\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\r\n\r\n return false;\r\n}\r\n\r\nfunction checkInverseAlpha ()\r\n{\r\n var canvas = CanvasPool.create2D(this, 2);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\r\n\r\n // Draw a single pixel\r\n context.fillRect(0, 0, 1, 1);\r\n\r\n // Get the color values\r\n var s1 = context.getImageData(0, 0, 1, 1);\r\n\r\n if (s1 === null)\r\n {\r\n return false;\r\n }\r\n\r\n // Plot them to x2\r\n context.putImageData(s1, 1, 0);\r\n\r\n // Get those values\r\n var s2 = context.getImageData(1, 0, 1, 1);\r\n\r\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\r\n\r\n CanvasPool.remove(this);\r\n\r\n // Compare and return\r\n return result;\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts !== 'function' && document !== undefined)\r\n {\r\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\r\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\r\n }\r\n\r\n return CanvasFeatures;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\nvar Browser = require('./Browser');\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.features` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Features\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} canvas - Is canvas available?\r\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\r\n * @property {boolean} file - Is file available?\r\n * @property {boolean} fileSystem - Is fileSystem available?\r\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\r\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\r\n * @property {boolean} localStorage - Is localStorage available?\r\n * @property {boolean} pointerLock - Is Pointer Lock available?\r\n * @property {boolean} stableSort - Is Array.sort stable?\r\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\r\n * @property {boolean} vibration - Does the device support the Vibration API?\r\n * @property {boolean} webGL - Is webGL available?\r\n * @property {boolean} worker - Is worker available?\r\n */\r\nvar Features = {\r\n\r\n canvas: false,\r\n canvasBitBltShift: null,\r\n file: false,\r\n fileSystem: false,\r\n getUserMedia: true,\r\n littleEndian: false,\r\n localStorage: false,\r\n pointerLock: false,\r\n stableSort: false,\r\n support32bit: false,\r\n vibration: false,\r\n webGL: false,\r\n worker: false\r\n\r\n};\r\n\r\n// Check Little or Big Endian system.\r\n// @author Matt DesLauriers (@mattdesl)\r\nfunction checkIsLittleEndian ()\r\n{\r\n var a = new ArrayBuffer(4);\r\n var b = new Uint8Array(a);\r\n var c = new Uint32Array(a);\r\n\r\n b[0] = 0xa1;\r\n b[1] = 0xb2;\r\n b[2] = 0xc3;\r\n b[3] = 0xd4;\r\n\r\n if (c[0] === 0xd4c3b2a1)\r\n {\r\n return true;\r\n }\r\n\r\n if (c[0] === 0xa1b2c3d4)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n // Could not determine endianness\r\n return null;\r\n }\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Features;\r\n }\r\n\r\n Features.canvas = !!window['CanvasRenderingContext2D'];\r\n\r\n try\r\n {\r\n Features.localStorage = !!localStorage.getItem;\r\n }\r\n catch (error)\r\n {\r\n Features.localStorage = false;\r\n }\r\n\r\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\r\n Features.fileSystem = !!window['requestFileSystem'];\r\n\r\n var isUint8 = false;\r\n\r\n var testWebGL = function ()\r\n {\r\n if (window['WebGLRenderingContext'])\r\n {\r\n try\r\n {\r\n var canvas = CanvasPool.createWebGL(this);\r\n\r\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\r\n\r\n var canvas2D = CanvasPool.create2D(this);\r\n\r\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\r\n\r\n // Can't be done on a webgl context\r\n var image = ctx2D.createImageData(1, 1);\r\n\r\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\r\n // @author Matt DesLauriers (@mattdesl)\r\n isUint8 = image.data instanceof Uint8ClampedArray;\r\n\r\n CanvasPool.remove(canvas);\r\n CanvasPool.remove(canvas2D);\r\n\r\n return !!ctx;\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n Features.webGL = testWebGL();\r\n\r\n Features.worker = !!window['Worker'];\r\n\r\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\r\n\r\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\r\n\r\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\r\n\r\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\r\n\r\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\r\n if (Browser.firefox && Browser.firefoxVersion < 21)\r\n {\r\n Features.getUserMedia = false;\r\n }\r\n\r\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\r\n // is safer to not try and use the fast copy-over method.\r\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\r\n {\r\n Features.canvasBitBltShift = true;\r\n }\r\n\r\n // Known not to work\r\n if (Browser.safari || Browser.mobileSafari)\r\n {\r\n Features.canvasBitBltShift = false;\r\n }\r\n\r\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\r\n\r\n if (navigator.vibrate)\r\n {\r\n Features.vibration = true;\r\n }\r\n\r\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\r\n {\r\n Features.littleEndian = checkIsLittleEndian();\r\n }\r\n\r\n Features.support32bit = (\r\n typeof ArrayBuffer !== 'undefined' &&\r\n typeof Uint8ClampedArray !== 'undefined' &&\r\n typeof Int32Array !== 'undefined' &&\r\n Features.littleEndian !== null &&\r\n isUint8\r\n );\r\n\r\n return Features;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the full screen support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.fullscreen` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Fullscreen\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} available - Does the browser support the Full Screen API?\r\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\r\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\r\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\r\n */\r\nvar Fullscreen = {\r\n\r\n available: false,\r\n cancel: '',\r\n keyboard: false,\r\n request: ''\r\n\r\n};\r\n\r\n/**\r\n* Checks for support of the Full Screen API.\r\n*\r\n* @ignore\r\n*/\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Fullscreen;\r\n }\r\n\r\n var i;\r\n\r\n var suffix1 = 'Fullscreen';\r\n var suffix2 = 'FullScreen';\r\n\r\n var fs = [\r\n 'request' + suffix1,\r\n 'request' + suffix2,\r\n 'webkitRequest' + suffix1,\r\n 'webkitRequest' + suffix2,\r\n 'msRequest' + suffix1,\r\n 'msRequest' + suffix2,\r\n 'mozRequest' + suffix2,\r\n 'mozRequest' + suffix1\r\n ];\r\n\r\n for (i = 0; i < fs.length; i++)\r\n {\r\n if (document.documentElement[fs[i]])\r\n {\r\n Fullscreen.available = true;\r\n Fullscreen.request = fs[i];\r\n break;\r\n }\r\n }\r\n\r\n var cfs = [\r\n 'cancel' + suffix2,\r\n 'exit' + suffix1,\r\n 'webkitCancel' + suffix2,\r\n 'webkitExit' + suffix1,\r\n 'msCancel' + suffix2,\r\n 'msExit' + suffix1,\r\n 'mozCancel' + suffix2,\r\n 'mozExit' + suffix1\r\n ];\r\n\r\n if (Fullscreen.available)\r\n {\r\n for (i = 0; i < cfs.length; i++)\r\n {\r\n if (document[cfs[i]])\r\n {\r\n Fullscreen.cancel = cfs[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Keyboard Input?\r\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\r\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\r\n {\r\n Fullscreen.keyboard = true;\r\n }\r\n\r\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\r\n\r\n return Fullscreen;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the input support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.input` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Input\r\n * @since 3.0.0\r\n *\r\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\r\n * @property {boolean} gamepads - Is navigator.getGamepads available?\r\n * @property {boolean} mspointer - Is mspointer available?\r\n * @property {boolean} touch - Is touch available?\r\n */\r\nvar Input = {\r\n\r\n gamepads: false,\r\n mspointer: false,\r\n touch: false,\r\n wheelEvent: null\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Input;\r\n }\r\n\r\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\r\n {\r\n Input.touch = true;\r\n }\r\n\r\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\r\n {\r\n Input.mspointer = true;\r\n }\r\n\r\n if (navigator.getGamepads)\r\n {\r\n Input.gamepads = true;\r\n }\r\n\r\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\r\n {\r\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\r\n Input.wheelEvent = 'wheel';\r\n }\r\n else if ('onmousewheel' in window)\r\n {\r\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\r\n Input.wheelEvent = 'mousewheel';\r\n }\r\n else if (Browser.firefox && 'MouseScrollEvent' in window)\r\n {\r\n // FF prior to 17. This should probably be scrubbed.\r\n Input.wheelEvent = 'DOMMouseScroll';\r\n }\r\n\r\n return Input;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the operating system of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.os` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.OS\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} android - Is running on android?\r\n * @property {boolean} chromeOS - Is running on chromeOS?\r\n * @property {boolean} cordova - Is the game running under Apache Cordova?\r\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\r\n * @property {boolean} desktop - Is running on a desktop?\r\n * @property {boolean} ejecta - Is the game running under Ejecta?\r\n * @property {boolean} electron - Is the game running under GitHub Electron?\r\n * @property {boolean} iOS - Is running on iOS?\r\n * @property {boolean} iPad - Is running on iPad?\r\n * @property {boolean} iPhone - Is running on iPhone?\r\n * @property {boolean} kindle - Is running on an Amazon Kindle?\r\n * @property {boolean} linux - Is running on linux?\r\n * @property {boolean} macOS - Is running on macOS?\r\n * @property {boolean} node - Is the game running under Node.js?\r\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\r\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\r\n * @property {boolean} windows - Is running on windows?\r\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\r\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\r\n * @property {number} pixelRatio - PixelRatio of the host device?\r\n */\r\nvar OS = {\r\n\r\n android: false,\r\n chromeOS: false,\r\n cordova: false,\r\n crosswalk: false,\r\n desktop: false,\r\n ejecta: false,\r\n electron: false,\r\n iOS: false,\r\n iOSVersion: 0,\r\n iPad: false,\r\n iPhone: false,\r\n kindle: false,\r\n linux: false,\r\n macOS: false,\r\n node: false,\r\n nodeWebkit: false,\r\n pixelRatio: 1,\r\n webApp: false,\r\n windows: false,\r\n windowsPhone: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return OS;\r\n }\r\n\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Windows/).test(ua))\r\n {\r\n OS.windows = true;\r\n }\r\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\r\n {\r\n // Because iOS 13 identifies as Mac OS:\r\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\r\n {\r\n OS.iOS = true;\r\n OS.iPad = true;\r\n\r\n (navigator.appVersion).match(/Version\\/(\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else\r\n {\r\n OS.macOS = true;\r\n }\r\n }\r\n else if ((/Android/).test(ua))\r\n {\r\n OS.android = true;\r\n }\r\n else if ((/Linux/).test(ua))\r\n {\r\n OS.linux = true;\r\n }\r\n else if ((/iP[ao]d|iPhone/i).test(ua))\r\n {\r\n OS.iOS = true;\r\n\r\n (navigator.appVersion).match(/OS (\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n\r\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\r\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\r\n }\r\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\r\n {\r\n OS.kindle = true;\r\n\r\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\r\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\r\n }\r\n else if ((/CrOS/).test(ua))\r\n {\r\n OS.chromeOS = true;\r\n }\r\n\r\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\r\n {\r\n OS.android = false;\r\n OS.iOS = false;\r\n OS.macOS = false;\r\n OS.windows = true;\r\n OS.windowsPhone = true;\r\n }\r\n\r\n var silk = (/Silk/).test(ua);\r\n\r\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\r\n {\r\n OS.desktop = true;\r\n }\r\n\r\n // Windows Phone / Table reset\r\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\r\n {\r\n OS.desktop = false;\r\n }\r\n\r\n // WebApp mode in iOS\r\n if (navigator.standalone)\r\n {\r\n OS.webApp = true;\r\n }\r\n\r\n if (typeof importScripts !== 'function')\r\n {\r\n if (window.cordova !== undefined)\r\n {\r\n OS.cordova = true;\r\n }\r\n\r\n if (window.ejecta !== undefined)\r\n {\r\n OS.ejecta = true;\r\n }\r\n }\r\n\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\r\n {\r\n OS.node = true;\r\n }\r\n\r\n if (OS.node && typeof process.versions === 'object')\r\n {\r\n OS.nodeWebkit = !!process.versions['node-webkit'];\r\n\r\n OS.electron = !!process.versions.electron;\r\n }\r\n\r\n if ((/Crosswalk/).test(ua))\r\n {\r\n OS.crosswalk = true;\r\n }\r\n\r\n OS.pixelRatio = window['devicePixelRatio'] || 1;\r\n\r\n return OS;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\n\r\n/**\r\n * Determines the video support of the browser running this Phaser Game instance.\r\n *\r\n * These values are read-only and populated during the boot sequence of the game.\r\n *\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.video` from within any Scene.\r\n *\r\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\r\n *\r\n * @typedef {object} Phaser.Device.Video\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\r\n * @property {boolean} hls - Can this device play hls video files?\r\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\r\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\r\n * @property {boolean} ogg - Can this device play ogg video files?\r\n * @property {boolean} vp9 - Can this device play vp9 video files?\r\n * @property {boolean} webm - Can this device play webm video files?\r\n * @property {function} getVideoURL - Returns the first video URL that can be played by this browser.\r\n */\r\nvar Video = {\r\n\r\n h264: false,\r\n hls: false,\r\n mp4: false,\r\n m4v: false,\r\n ogg: false,\r\n vp9: false,\r\n webm: false,\r\n hasRequestVideoFrame: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Video;\r\n }\r\n\r\n var videoElement = document.createElement('video');\r\n var result = !!videoElement.canPlayType;\r\n var no = /^no$/;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\r\n {\r\n Video.ogg = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\r\n Video.h264 = true;\r\n Video.mp4 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\r\n {\r\n Video.m4v = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\r\n {\r\n Video.webm = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\r\n {\r\n Video.vp9 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n Video.hls = true;\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do\r\n }\r\n\r\n if (videoElement.parentNode)\r\n {\r\n videoElement.parentNode.removeChild(videoElement);\r\n }\r\n\r\n Video.getVideoURL = function (urls)\r\n {\r\n if (!Array.isArray(urls))\r\n {\r\n urls = [ urls ];\r\n }\r\n\r\n for (var i = 0; i < urls.length; i++)\r\n {\r\n var url = GetFastValue(urls[i], 'url', urls[i]);\r\n\r\n if (url.indexOf('blob:') === 0)\r\n {\r\n return {\r\n url: url,\r\n type: ''\r\n };\r\n }\r\n\r\n var videoType;\r\n\r\n if (url.indexOf('data:') === 0)\r\n {\r\n videoType = url.split(',')[0].match(/\\/(.*?);/);\r\n }\r\n else\r\n {\r\n videoType = url.match(/\\.([a-zA-Z0-9]+)($|\\?)/);\r\n }\r\n\r\n videoType = GetFastValue(urls[i], 'type', (videoType) ? videoType[1] : '').toLowerCase();\r\n\r\n if (Video[videoType])\r\n {\r\n return {\r\n url: url,\r\n type: videoType\r\n };\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n return Video;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// This singleton is instantiated as soon as Phaser loads,\r\n// before a Phaser.Game instance has even been created.\r\n// Which means all instances of Phaser Games can share it,\r\n// without having to re-poll the device all over again\r\n\r\n/**\r\n * @namespace Phaser.Device\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.DeviceConf\r\n *\r\n * @property {Phaser.Device.OS} os - The OS Device functions.\r\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\r\n * @property {Phaser.Device.Features} features - The Features Device functions.\r\n * @property {Phaser.Device.Input} input - The Input Device functions.\r\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\r\n * @property {Phaser.Device.Video} video - The Video Device functions.\r\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\r\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\r\n */\r\n\r\nmodule.exports = {\r\n\r\n os: require('./OS'),\r\n browser: require('./Browser'),\r\n features: require('./Features'),\r\n input: require('./Input'),\r\n audio: require('./Audio'),\r\n video: require('./Video'),\r\n fullscreen: require('./Fullscreen'),\r\n canvasFeatures: require('./CanvasFeatures')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar tempMatrix = new Float32Array(20);\r\n\r\n/**\r\n * @classdesc\r\n * The ColorMatrix class creates a 5x4 matrix that can be used in shaders and graphics\r\n * operations. It provides methods required to modify the color values, such as adjusting\r\n * the brightness, setting a sepia tone, hue rotation and more.\r\n *\r\n * Use the method `getData` to return a Float32Array containing the current color values.\r\n *\r\n * @class ColorMatrix\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.50.0\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function ColorMatrix ()\r\n {\r\n /**\r\n * Internal ColorMatrix array.\r\n *\r\n * @name Phaser.Display.ColorMatrix#_matrix\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._matrix = new Float32Array(20);\r\n\r\n /**\r\n * The value that determines how much of the original color is used\r\n * when mixing the colors. A value between 0 (all original) and 1 (all final)\r\n *\r\n * @name Phaser.Display.ColorMatrix#alpha\r\n * @type {number}\r\n * @since 3.50.0\r\n */\r\n this.alpha = 1;\r\n\r\n /**\r\n * Is the ColorMatrix array dirty?\r\n *\r\n * @name Phaser.Display.ColorMatrix#_dirty\r\n * @type {boolean}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._dirty = true;\r\n\r\n /**\r\n * The matrix data as a Float32Array.\r\n *\r\n * Returned by the `getData` method.\r\n *\r\n * @name Phaser.Display.ColorMatrix#data\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._data = new Float32Array(20);\r\n\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix from the given array of color values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#set\r\n * @since 3.50.0\r\n *\r\n * @param {(number[]|Float32Array)} value - The ColorMatrix values to set. Must have 20 elements.\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n set: function (value)\r\n {\r\n this._matrix.set(value);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the ColorMatrix to default values and also resets\r\n * the `alpha` property back to 1.\r\n *\r\n * @method Phaser.Display.ColorMatrix#reset\r\n * @since 3.50.0\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n reset: function ()\r\n {\r\n var m = this._matrix;\r\n\r\n m.fill(0);\r\n\r\n m[0] = 1;\r\n m[6] = 1;\r\n m[12] = 1;\r\n m[18] = 1;\r\n\r\n this.alpha = 1;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the ColorMatrix as a Float32Array.\r\n *\r\n * Can be used directly as a 1fv shader uniform value.\r\n *\r\n * @method Phaser.Display.ColorMatrix#getData\r\n * @since 3.50.0\r\n *\r\n * @return {Float32Array} The ColorMatrix as a Float32Array.\r\n */\r\n getData: function ()\r\n {\r\n var data = this._data;\r\n\r\n if (this._dirty)\r\n {\r\n data.set(this._matrix);\r\n\r\n data[4] /= 255;\r\n data[9] /= 255;\r\n data[14] /= 255;\r\n data[19] /= 255;\r\n\r\n this._dirty = false;\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Changes the brightness of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brightness\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of brightness to apply to this ColorMatrix. Between 0 (black) and 1.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brightness: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var b = value;\r\n\r\n return this.multiply([\r\n b, 0, 0, 0, 0,\r\n 0, b, 0, 0, 0,\r\n 0, 0, b, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Changes the saturation of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturate\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of saturation to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n saturate: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var x = (value * 2 / 3) + 1;\r\n var y = ((x - 1) * -0.5);\r\n\r\n return this.multiply([\r\n x, y, y, 0, 0,\r\n y, x, y, 0, 0,\r\n y, y, x, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Desaturates this ColorMatrix (removes color from it).\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturation\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturate: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-1, multiply);\r\n },\r\n\r\n /**\r\n * Rotates the hues of this ColorMatrix by the value given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#hue\r\n * @since 3.50.0\r\n *\r\n * @param {number} [rotation=0] - The amount of hue rotation to apply to this ColorMatrix, in degrees.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n hue: function (rotation, multiply)\r\n {\r\n if (rotation === undefined) { rotation = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n rotation = rotation / 180 * Math.PI;\r\n\r\n var cos = Math.cos(rotation);\r\n var sin = Math.sin(rotation);\r\n var lumR = 0.213;\r\n var lumG = 0.715;\r\n var lumB = 0.072;\r\n\r\n return this.multiply([\r\n lumR + cos * (1 - lumR) + sin * (-lumR),lumG + cos * (-lumG) + sin * (-lumG),lumB + cos * (-lumB) + sin * (1 - lumB), 0, 0,\r\n lumR + cos * (-lumR) + sin * (0.143),lumG + cos * (1 - lumG) + sin * (0.140),lumB + cos * (-lumB) + sin * (-0.283), 0, 0,\r\n lumR + cos * (-lumR) + sin * (-(1 - lumR)),lumG + cos * (-lumG) + sin * (lumG),lumB + cos * (1 - lumB) + sin * (lumB), 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be grayscale.\r\n *\r\n * @method Phaser.Display.ColorMatrix#grayscale\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=1] - The grayscale scale (0 is black).\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n grayscale: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-value, multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be black and white.\r\n *\r\n * @method Phaser.Display.ColorMatrix#blackWhite\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n blackWhite: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BLACK_WHITE, multiply);\r\n },\r\n\r\n /**\r\n * Change the contrast of this ColorMatrix by the amount given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#contrast\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of contrast to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n contrast: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var v = value + 1;\r\n var o = -0.5 * (v - 1);\r\n\r\n return this.multiply([\r\n v, 0, 0, 0, o,\r\n 0, v, 0, 0, o,\r\n 0, 0, v, 0, o,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Converts this ColorMatrix to have negative values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#negative\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n negative: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.NEGATIVE, multiply);\r\n },\r\n\r\n /**\r\n * Apply a desaturated luminance to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#desaturateLuminance\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturateLuminance: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.DESATURATE_LUMINANCE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a sepia tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#sepia\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n sepia: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SEPIA, multiply);\r\n },\r\n\r\n /**\r\n * Applies a night vision tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#night\r\n * @since 3.50.0\r\n *\r\n * @param {number} [intensity=0.1] - The intensity of this effect.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n night: function (intensity, multiply)\r\n {\r\n if (intensity === undefined) { intensity = 0.1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply([\r\n intensity * (-2.0), -intensity, 0, 0, 0,\r\n -intensity, 0, intensity, 0, 0,\r\n 0, intensity, intensity * 2.0, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Applies a trippy color tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#lsd\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n lsd: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.LSD, multiply);\r\n },\r\n\r\n /**\r\n * Applies a brown tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brown\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brown: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BROWN, multiply);\r\n },\r\n\r\n /**\r\n * Applies a vintage pinhole color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#vintagePinhole\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n vintagePinhole: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.VINTAGE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a kodachrome color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#kodachrome\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n kodachrome: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.KODACHROME, multiply);\r\n },\r\n\r\n /**\r\n * Applies a technicolor color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#technicolor\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n technicolor: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.TECHNICOLOR, multiply);\r\n },\r\n\r\n /**\r\n * Applies a polaroid color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#polaroid\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n polaroid: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.POLAROID, multiply);\r\n },\r\n\r\n /**\r\n * Shifts the values of this ColorMatrix into BGR order.\r\n *\r\n * @method Phaser.Display.ColorMatrix#shiftToBGR\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n shiftToBGR: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SHIFT_BGR, multiply);\r\n },\r\n\r\n /**\r\n * Multiplies the two given matrices.\r\n *\r\n * @method Phaser.Display.ColorMatrix#multiply\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} a - The 5x4 array to multiply with ColorMatrix._matrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n multiply: function (a, multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n // Duplicate _matrix into c\r\n\r\n if (!multiply)\r\n {\r\n this.reset();\r\n }\r\n\r\n var m = this._matrix;\r\n var c = tempMatrix;\r\n\r\n // copy _matrix to tempMatrox\r\n c.set(m);\r\n\r\n m.set([\r\n // R\r\n (c[0] * a[0]) + (c[1] * a[5]) + (c[2] * a[10]) + (c[3] * a[15]),\r\n (c[0] * a[1]) + (c[1] * a[6]) + (c[2] * a[11]) + (c[3] * a[16]),\r\n (c[0] * a[2]) + (c[1] * a[7]) + (c[2] * a[12]) + (c[3] * a[17]),\r\n (c[0] * a[3]) + (c[1] * a[8]) + (c[2] * a[13]) + (c[3] * a[18]),\r\n (c[0] * a[4]) + (c[1] * a[9]) + (c[2] * a[14]) + (c[3] * a[19]) + c[4],\r\n\r\n // G\r\n (c[5] * a[0]) + (c[6] * a[5]) + (c[7] * a[10]) + (c[8] * a[15]),\r\n (c[5] * a[1]) + (c[6] * a[6]) + (c[7] * a[11]) + (c[8] * a[16]),\r\n (c[5] * a[2]) + (c[6] * a[7]) + (c[7] * a[12]) + (c[8] * a[17]),\r\n (c[5] * a[3]) + (c[6] * a[8]) + (c[7] * a[13]) + (c[8] * a[18]),\r\n (c[5] * a[4]) + (c[6] * a[9]) + (c[7] * a[14]) + (c[8] * a[19]) + c[9],\r\n\r\n // B\r\n (c[10] * a[0]) + (c[11] * a[5]) + (c[12] * a[10]) + (c[13] * a[15]),\r\n (c[10] * a[1]) + (c[11] * a[6]) + (c[12] * a[11]) + (c[13] * a[16]),\r\n (c[10] * a[2]) + (c[11] * a[7]) + (c[12] * a[12]) + (c[13] * a[17]),\r\n (c[10] * a[3]) + (c[11] * a[8]) + (c[12] * a[13]) + (c[13] * a[18]),\r\n (c[10] * a[4]) + (c[11] * a[9]) + (c[12] * a[14]) + (c[13] * a[19]) + c[14],\r\n\r\n // A\r\n (c[15] * a[0]) + (c[16] * a[5]) + (c[17] * a[10]) + (c[18] * a[15]),\r\n (c[15] * a[1]) + (c[16] * a[6]) + (c[17] * a[11]) + (c[18] * a[16]),\r\n (c[15] * a[2]) + (c[16] * a[7]) + (c[17] * a[12]) + (c[18] * a[17]),\r\n (c[15] * a[3]) + (c[16] * a[8]) + (c[17] * a[13]) + (c[18] * a[18]),\r\n (c[15] * a[4]) + (c[16] * a[9]) + (c[17] * a[14]) + (c[18] * a[19]) + c[19]\r\n\r\n ]);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for black_white operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BLACK_WHITE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BLACK_WHITE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for negative operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.NEGATIVE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.NEGATIVE = [ -1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for desatured luminance operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.DESATURATE_LUMINANCE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.DESATURATE_LUMINANCE = [ 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for sepia operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SEPIA\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SEPIA = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for lsd operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.LSD\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.LSD = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for brown operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BROWN\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BROWN = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for vintage pinhole operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.VINTAGE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.VINTAGE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for kodachrome operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.KODACHROME\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.KODACHROME = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for technicolor operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.TECHNICOLOR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.TECHNICOLOR = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for polaroid shift operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.POLAROID\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.POLAROID = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for shift BGR operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SHIFT_BGR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SHIFT_BGR = [ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0 ];\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../../const');\r\nvar Smoothing = require('./Smoothing');\r\n\r\n// The pool into which the canvas elements are placed.\r\nvar pool = [];\r\n\r\n// Automatically apply smoothing(false) to created Canvas elements\r\nvar _disableContextSmoothing = false;\r\n\r\n/**\r\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\r\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\r\n * which is useless for some of the Phaser pipelines / renderer.\r\n *\r\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\r\n * Which means all instances of Phaser Games on the same page can share the one single pool.\r\n *\r\n * @namespace Phaser.Display.Canvas.CanvasPool\r\n * @since 3.0.0\r\n */\r\nvar CanvasPool = function ()\r\n{\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\r\n *\r\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\r\n */\r\n var create = function (parent, width, height, canvasType, selfParent)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = 1; }\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n if (selfParent === undefined) { selfParent = false; }\r\n\r\n var canvas;\r\n var container = first(canvasType);\r\n\r\n if (container === null)\r\n {\r\n container = {\r\n parent: parent,\r\n canvas: document.createElement('canvas'),\r\n type: canvasType\r\n };\r\n\r\n if (canvasType === CONST.CANVAS)\r\n {\r\n pool.push(container);\r\n }\r\n\r\n canvas = container.canvas;\r\n }\r\n else\r\n {\r\n container.parent = parent;\r\n\r\n canvas = container.canvas;\r\n }\r\n\r\n if (selfParent)\r\n {\r\n container.parent = canvas;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\r\n {\r\n Smoothing.disable(canvas.getContext('2d', { willReadFrequently: false }));\r\n }\r\n\r\n return canvas;\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create2D\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created canvas.\r\n */\r\n var create2D = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.CANVAS);\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created WebGL canvas.\r\n */\r\n var createWebGL = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.WEBGL);\r\n };\r\n\r\n /**\r\n * Gets the first free canvas index from the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.first\r\n * @since 3.0.0\r\n *\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n *\r\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\r\n */\r\n var first = function (canvasType)\r\n {\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n\r\n if (canvasType === CONST.WEBGL)\r\n {\r\n return null;\r\n }\r\n\r\n for (var i = 0; i < pool.length; i++)\r\n {\r\n var container = pool[i];\r\n\r\n if (!container.parent && container.type === canvasType)\r\n {\r\n return container;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\r\n * The canvas has its width and height set to 1, and its parent attribute nulled.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.remove\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The canvas or the parent of the canvas to free.\r\n */\r\n var remove = function (parent)\r\n {\r\n // Check to see if the parent is a canvas object\r\n var isCanvas = parent instanceof HTMLCanvasElement;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\r\n {\r\n container.parent = null;\r\n container.canvas.width = 1;\r\n container.canvas.height = 1;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the total number of used canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.total\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of used canvases.\r\n */\r\n var total = function ()\r\n {\r\n var c = 0;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if (container.parent)\r\n {\r\n c++;\r\n }\r\n });\r\n\r\n return c;\r\n };\r\n\r\n /**\r\n * Gets the total number of free canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.free\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of free canvases.\r\n */\r\n var free = function ()\r\n {\r\n return pool.length - total();\r\n };\r\n\r\n /**\r\n * Disable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\r\n * @since 3.0.0\r\n */\r\n var disableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = true;\r\n };\r\n\r\n /**\r\n * Enable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\r\n * @since 3.0.0\r\n */\r\n var enableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = false;\r\n };\r\n\r\n return {\r\n create2D: create2D,\r\n create: create,\r\n createWebGL: createWebGL,\r\n disableSmoothing: disableSmoothing,\r\n enableSmoothing: enableSmoothing,\r\n first: first,\r\n free: free,\r\n pool: pool,\r\n remove: remove,\r\n total: total\r\n };\r\n};\r\n\r\n// If we export the called function here, it'll only be invoked once (not every time it's required).\r\nmodule.exports = CanvasPool();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Browser specific prefix, so not going to change between contexts, only between browsers\r\nvar prefix = '';\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.Smoothing\r\n * @since 3.0.0\r\n */\r\nvar Smoothing = function ()\r\n{\r\n /**\r\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\r\n *\r\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\r\n */\r\n var getPrefix = function (context)\r\n {\r\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\r\n\r\n for (var i = 0; i < vendors.length; i++)\r\n {\r\n var s = vendors[i] + 'mageSmoothingEnabled';\r\n\r\n if (s in context)\r\n {\r\n return s;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.enable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var enable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = true;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.disable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var disable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = false;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\r\n * Returns null if no smoothing prefix is available.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\r\n *\r\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\r\n */\r\n var isEnabled = function (context)\r\n {\r\n return (prefix !== null) ? context[prefix] : null;\r\n };\r\n\r\n return {\r\n disable: disable,\r\n enable: enable,\r\n getPrefix: getPrefix,\r\n isEnabled: isEnabled\r\n };\r\n\r\n};\r\n\r\nmodule.exports = Smoothing();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object or Dynamic Texture to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects.\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this mask is being added.\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, maskObject, x, y, texture, frame)\r\n {\r\n if (!maskObject)\r\n {\r\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\r\n }\r\n\r\n /**\r\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = maskObject;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel.\r\n *\r\n * Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask? This is false by default and should not be changed.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n },\r\n\r\n /**\r\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\r\n *\r\n * If a Game Object it must have a texture, such as a Sprite.\r\n *\r\n * You can update the source of the mask as often as you like.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\r\n */\r\n setBitmap: function (maskObject)\r\n {\r\n this.bitmapMask = maskObject;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\r\n */\r\n postRenderWebGL: function (renderer, camera, renderTarget)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object, or Dynamic Texture, to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\r\n * @since 3.60.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\r\n */\r\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\r\n{\r\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level. This can change dynamically at runtime\r\n * and is set in the applyStencil method.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n *\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n var mask = 0xff;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n\r\n // Do this _after_ we set the stencilFunc\r\n level++;\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n this.level = level;\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, mask);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var current = renderer.currentMask;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n current.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n current.mask = prev.mask;\r\n current.camera = prev.camera;\r\n }\r\n else\r\n {\r\n current.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Barrel FX Controller.\r\n *\r\n * This FX controller manages the barrel distortion effect for a Game Object.\r\n *\r\n * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to\r\n * a Game Object. The amount of the effect can be modified in real-time.\r\n *\r\n * A Barrel effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBarrel();\r\n * sprite.postFX.addBarrel();\r\n * ```\r\n *\r\n * @class Barrel\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n */\r\nvar Barrel = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Barrel (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.BARREL, gameObject);\r\n\r\n /**\r\n * The amount of distortion applied to the barrel effect.\r\n *\r\n * Typically keep this within the range 1 (no distortion) to +- 1.\r\n *\r\n * @name Phaser.FX.Barrel#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Barrel;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Bloom FX Controller.\r\n *\r\n * This FX controller manages the bloom effect for a Game Object.\r\n *\r\n * Bloom is an effect used to reproduce an imaging artifact of real-world cameras.\r\n * The effect produces fringes of light extending from the borders of bright areas in an image,\r\n * contributing to the illusion of an extremely bright light overwhelming the\r\n * camera or eye capturing the scene.\r\n *\r\n * A Bloom effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBloom();\r\n * sprite.postFX.addBloom();\r\n * ```\r\n *\r\n * @class Bloom\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color=0xffffff] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n */\r\nvar Bloom = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bloom (gameObject, color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n if (offsetX === undefined) { offsetX = 1; }\r\n if (offsetY === undefined) { offsetY = 1; }\r\n if (blurStrength === undefined) { blurStrength = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLOOM, gameObject);\r\n\r\n /**\r\n * The number of steps to run the Bloom effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the Bloom,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Bloom#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The horizontal offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetX = offsetX;\r\n\r\n /**\r\n * The vertical offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetY = offsetY;\r\n\r\n /**\r\n * The strength of the blur process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#blurStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurStrength = blurStrength;\r\n\r\n /**\r\n * The strength of the blend process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Bloom#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the bloom as a number value.\r\n *\r\n * @name Phaser.FX.Bloom#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bloom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Blur FX Controller.\r\n *\r\n * This FX controller manages the blur effect for a Game Object.\r\n *\r\n * A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect,\r\n * typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a\r\n * smooth blur resembling that of viewing the image through a translucent screen, distinctly different\r\n * from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.\r\n *\r\n * A Blur effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBlur();\r\n * sprite.postFX.addBlur();\r\n * ```\r\n *\r\n * @class Blur\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n */\r\nvar Blur = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Blur (gameObject, quality, x, y, strength, color, steps)\r\n {\r\n if (quality === undefined) { quality = 0; }\r\n if (x === undefined) { x = 2; }\r\n if (y === undefined) { y = 2; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLUR, gameObject);\r\n\r\n /**\r\n * The quality of the blur effect.\r\n *\r\n * This can be:\r\n *\r\n * 0 for Low Quality\r\n * 1 for Medium Quality\r\n * 2 for High Quality\r\n *\r\n * The higher the quality, the more complex shader is used\r\n * and the more processing time is spent on the GPU calculating\r\n * the final blur. This value is used in conjunction with the\r\n * `steps` value, as one has a direct impact on the other.\r\n *\r\n * Keep this value as low as you can, while still achieving the\r\n * desired effect you need for your game.\r\n *\r\n * @name Phaser.FX.Blur#quality\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.quality = 0;\r\n\r\n /**\r\n * The horizontal offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The number of steps to run the Blur effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the blur,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Blur#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The strength of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Blur#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the blur as a number value.\r\n *\r\n * @name Phaser.FX.Blur#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Blur;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Bokeh FX Controller.\r\n *\r\n * This FX controller manages the bokeh effect for a Game Object.\r\n *\r\n * Bokeh refers to a visual effect that mimics the photographic technique of creating a shallow depth of field.\r\n * This effect is used to emphasize the game's main subject or action, by blurring the background or foreground\r\n * elements, resulting in a more immersive and visually appealing experience. It is achieved through rendering\r\n * techniques that simulate the out-of-focus areas, giving a sense of depth and realism to the game's graphics.\r\n *\r\n * This effect can also be used to generate a Tilt Shift effect, which is a technique used to create a miniature\r\n * effect by blurring everything except a small area of the image. This effect is achieved by blurring the\r\n * top and bottom elements, while keeping the center area in focus.\r\n *\r\n * A Bokeh effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBokeh();\r\n * sprite.postFX.addBokeh();\r\n * ```\r\n *\r\n * @class Bokeh\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {boolean} [isTiltShift=false] - Is this a bokeh or Tile Shift effect?\r\n * @param {number} [blurX=1] - If Tilt Shift, the amount of horizontal blur.\r\n * @param {number} [blurY=1] - If Tilt Shift, the amount of vertical blur.\r\n * @param {number} [strength=1] - If Tilt Shift, the strength of the blur.\r\n */\r\nvar Bokeh = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bokeh (gameObject, radius, amount, contrast, isTiltShift, blurX, blurY, strength)\r\n {\r\n if (radius === undefined) { radius = 0.5; }\r\n if (amount === undefined) { amount = 1; }\r\n if (contrast === undefined) { contrast = 0.2; }\r\n if (isTiltShift === undefined) { isTiltShift = false; }\r\n if (blurX === undefined) { blurX = 1; }\r\n if (blurY === undefined) { blurY = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n\r\n Controller.call(this, FX_CONST.BOKEH, gameObject);\r\n\r\n /**\r\n * The radius of the bokeh effect.\r\n *\r\n * This is a float value, where a radius of 0 will result in no effect being applied,\r\n * and a radius of 1 will result in a strong bokeh. However, you can exceed this value\r\n * for even stronger effects.\r\n *\r\n * @name Phaser.FX.Bokeh#radius\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The amount, or strength, of the bokeh effect. Defaults to 1.\r\n *\r\n * @name Phaser.FX.Bokeh#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n\r\n /**\r\n * The color contrast, or brightness, of the bokeh effect. Defaults to 0.2.\r\n *\r\n * @name Phaser.FX.Bokeh#contrast\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.contrast = contrast;\r\n\r\n /**\r\n * Is this a Tilt Shift effect or a standard bokeh effect?\r\n *\r\n * @name Phaser.FX.Bokeh#isTiltShift\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.isTiltShift = isTiltShift;\r\n\r\n /**\r\n * If a Tilt Shift effect this controls the strength of the blur.\r\n *\r\n * Setting this value on a non-Tilt Shift effect will have no effect.\r\n *\r\n * @name Phaser.FX.Bokeh#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * If a Tilt Shift effect this controls the amount of horizontal blur.\r\n *\r\n * Setting this value on a non-Tilt Shift effect will have no effect.\r\n *\r\n * @name Phaser.FX.Bokeh#blurX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurX = blurX;\r\n\r\n /**\r\n * If a Tilt Shift effect this controls the amount of vertical blur.\r\n *\r\n * Setting this value on a non-Tilt Shift effect will have no effect.\r\n *\r\n * @name Phaser.FX.Bokeh#blurY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurY = blurY;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bokeh;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Circle FX Controller.\r\n *\r\n * This FX controller manages the circle effect for a Game Object.\r\n *\r\n * This effect will draw a circle around the texture of the Game Object, effectively masking off\r\n * any area outside of the circle without the need for an actual mask. You can control the thickness\r\n * of the circle, the color of the circle and the color of the background, should the texture be\r\n * transparent. You can also control the feathering applied to the circle, allowing for a harsh or soft edge.\r\n *\r\n * Please note that adding this effect to a Game Object will not change the input area or physics body of\r\n * the Game Object, should it have one.\r\n *\r\n * A Circle effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addCircle();\r\n * sprite.postFX.addCircle();\r\n * ```\r\n *\r\n * @class Circle\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=0xfeedb6] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n */\r\nvar Circle = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Circle (gameObject, thickness, color, backgroundColor, scale, feather)\r\n {\r\n if (thickness === undefined) { thickness = 8; }\r\n if (scale === undefined) { scale = 1; }\r\n if (feather === undefined) { feather = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.CIRCLE, gameObject);\r\n\r\n /**\r\n * The scale of the circle. The default scale is 1, which is a circle\r\n * the full size of the underlying texture. Reduce this value to create\r\n * a smaller circle, or increase it to create a circle that extends off\r\n * the edges of the texture.\r\n *\r\n * @name Phaser.FX.Circle#scale\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.scale = scale;\r\n\r\n /**\r\n * The amount of feathering to apply to the circle from the ring,\r\n * extending into the middle of the circle. The default is 0.005,\r\n * which is a very low amount of feathering just making sure the ring\r\n * has a smooth edge. Increase this amount to a value such as 0.5\r\n * or 0.025 for larger amounts of feathering.\r\n *\r\n * @name Phaser.FX.Circle#feather\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.feather = feather;\r\n\r\n /**\r\n * The width of the circle around the texture, in pixels. This value\r\n * doesn't factor in the feather, which can extend the thickness\r\n * internally depending on its value.\r\n *\r\n * @name Phaser.FX.Circle#thickness\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.thickness = thickness;\r\n\r\n /**\r\n * The internal gl color array for the ring color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 0.2, 0.7 ];\r\n\r\n /**\r\n * The internal gl color array for the background color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 1, 0, 0, 0.4 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n\r\n if (backgroundColor !== undefined && backgroundColor !== null)\r\n {\r\n this.backgroundColor = backgroundColor;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the circular ring, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of the background, behind the texture, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#backgroundColor\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n backgroundColor: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Circle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar BaseColorMatrix = require('../display/ColorMatrix');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The ColorMatrix FX Controller.\r\n *\r\n * This FX controller manages the color matrix effect for a Game Object.\r\n *\r\n * The color matrix effect is a visual technique that involves manipulating the colors of an image\r\n * or scene using a mathematical matrix. This process can adjust hue, saturation, brightness, and contrast,\r\n * allowing developers to create various stylistic appearances or mood settings within the game.\r\n * Common applications include simulating different lighting conditions, applying color filters,\r\n * or achieving a specific visual style.\r\n *\r\n * A ColorMatrix effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addColorMatrix();\r\n * sprite.postFX.addColorMatrix();\r\n * ```\r\n *\r\n * @class ColorMatrix\r\n * @extends Phaser.Display.ColorMatrix\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n Extends: BaseColorMatrix,\r\n\r\n initialize:\r\n\r\n function ColorMatrix (gameObject)\r\n {\r\n BaseColorMatrix.call(this);\r\n\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = FX_CONST.COLOR_MATRIX;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * @name Phaser.FX.ColorMatrix#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this._matrix = null;\r\n this._data = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * FX Controller is the base class that all built-in FX use.\r\n *\r\n * You should not normally create an instance of this class directly, but instead use one of the built-in FX that extend it.\r\n *\r\n * @class Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {number} type - The FX Type constant.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar Controller = new Class({\r\n\r\n initialize:\r\n\r\n function Controller (type, gameObject)\r\n {\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.Controller#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.Controller#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * Only works for Pre FX.\r\n *\r\n * Post FX are always active.\r\n *\r\n * @name Phaser.FX.Controller#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n /**\r\n * Sets the active state of this FX Controller.\r\n *\r\n * A disabled FX Controller will not be updated.\r\n *\r\n * @method Phaser.FX.Controller#setActive\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} value - `true` to enable this FX Controller, or `false` to disable it.\r\n *\r\n * @return {this} This FX Controller instance.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this FX Controller.\r\n *\r\n * @method Phaser.FX.Controller#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this.active = false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Controller;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Displacement FX Controller.\r\n *\r\n * This FX controller manages the displacement effect for a Game Object.\r\n *\r\n * The displacement effect is a visual technique that alters the position of pixels in an image\r\n * or texture based on the values of a displacement map. This effect is used to create the illusion\r\n * of depth, surface irregularities, or distortion in otherwise flat elements. It can be applied to\r\n * characters, objects, or backgrounds to enhance realism, convey movement, or achieve various\r\n * stylistic appearances.\r\n *\r\n * A Displacement effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addDisplacement();\r\n * sprite.postFX.addDisplacement();\r\n * ```\r\n *\r\n * @class Displacement\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply. A very small float number, such as 0.005.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply. A very small float number, such as 0.005.\r\n */\r\nvar Displacement = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Displacement (gameObject, texture, x, y)\r\n {\r\n if (texture === undefined) { texture = '__WHITE'; }\r\n if (x === undefined) { x = 0.005; }\r\n if (y === undefined) { y = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.DISPLACEMENT, gameObject);\r\n\r\n /**\r\n * The amount of horizontal displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The amount of vertical displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The underlying WebGLTexture used for displacement.\r\n *\r\n * @name Phaser.FX.Displacement#glTexture\r\n * @type {WebGLTexture}\r\n * @since 3.60.0\r\n */\r\n this.glTexture;\r\n\r\n this.setTexture(texture);\r\n },\r\n\r\n /**\r\n * Sets the Texture to be used for the displacement effect.\r\n *\r\n * You can only use a whole texture, not a frame from a texture atlas or sprite sheet.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setTexture\r\n * @since 3.60.0\r\n *\r\n * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n *\r\n * @return {this} This FX Controller.\r\n */\r\n setTexture: function (texture)\r\n {\r\n var phaserTexture = this.gameObject.scene.sys.textures.getFrame(texture);\r\n\r\n if (phaserTexture)\r\n {\r\n this.glTexture = phaserTexture.glTexture;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Displacement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Glow FX Controller.\r\n *\r\n * This FX controller manages the glow effect for a Game Object.\r\n *\r\n * The glow effect is a visual technique that creates a soft, luminous halo around game objects,\r\n * characters, or UI elements. This effect is used to emphasize importance, enhance visual appeal,\r\n * or convey a sense of energy, magic, or otherworldly presence. The effect can also be set on\r\n * the inside of the Game Object. The color and strength of the glow can be modified.\r\n *\r\n * A Glow effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addGlow();\r\n * sprite.postFX.addGlow();\r\n * ```\r\n *\r\n * @class Glow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n */\r\nvar Glow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Glow (gameObject, color, outerStrength, innerStrength, knockout)\r\n {\r\n if (outerStrength === undefined) { outerStrength = 4; }\r\n if (innerStrength === undefined) { innerStrength = 0; }\r\n if (knockout === undefined) { knockout = false; }\r\n\r\n Controller.call(this, FX_CONST.GLOW, gameObject);\r\n\r\n /**\r\n * The strength of the glow outward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#outerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.outerStrength = outerStrength;\r\n\r\n /**\r\n * The strength of the glow inward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#innerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.innerStrength = innerStrength;\r\n\r\n /**\r\n * If `true` only the glow is drawn, not the texture itself.\r\n *\r\n * @name Phaser.FX.Glow#knockout\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.knockout = knockout;\r\n\r\n /**\r\n * A 4 element array of gl color values.\r\n *\r\n * @name Phaser.FX.Glow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1, 1 ];\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the glow as a number value.\r\n *\r\n * @name Phaser.FX.Glow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Glow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Gradient FX Controller.\r\n *\r\n * This FX controller manages the gradient effect for a Game Object.\r\n *\r\n * The gradient overlay effect is a visual technique where a smooth color transition is applied over Game Objects,\r\n * such as sprites or UI components. This effect is used to enhance visual appeal, emphasize depth, or create\r\n * stylistic and atmospheric variations. It can also be utilized to convey information, such as representing\r\n * progress or health status through color changes.\r\n *\r\n * A Gradient effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addGradient();\r\n * sprite.postFX.addGradient();\r\n * ```\r\n *\r\n * @class Gradient\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n */\r\nvar Gradient = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Gradient (gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n if (alpha === undefined) { alpha = 0.2; }\r\n if (fromX === undefined) { fromX = 0; }\r\n if (fromY === undefined) { fromY = 0; }\r\n if (toX === undefined) { toX = 0; }\r\n if (toY === undefined) { toY = 1; }\r\n if (size === undefined) { size = 0; }\r\n\r\n Controller.call(this, FX_CONST.GRADIENT, gameObject);\r\n\r\n /**\r\n * The alpha value of the gradient effect.\r\n *\r\n * @name Phaser.FX.Gradient#alpha\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.alpha = alpha;\r\n\r\n /**\r\n * Sets how many 'chunks' the gradient is divided in to, as spread over the\r\n * entire height of the texture. Leave this at zero for a smooth gradient,\r\n * or set to a higher number to split the gradient into that many sections, giving\r\n * a more banded 'retro' effect.\r\n *\r\n * @name Phaser.FX.Gradient#size\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.size = size;\r\n\r\n /**\r\n * The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromX = fromX;\r\n\r\n /**\r\n * The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromY = fromY;\r\n\r\n /**\r\n * The horizontal position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toX = toX;\r\n\r\n /**\r\n * The vertical position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toY = toY;\r\n\r\n /**\r\n * The internal gl color array for the starting color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor1\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor1 = [ 255, 0, 0 ];\r\n\r\n /**\r\n * The internal gl color array for the ending color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 0, 255, 0 ];\r\n\r\n if (color1 !== undefined && color1 !== null)\r\n {\r\n this.color1 = color1;\r\n }\r\n\r\n if (color2 !== undefined && color2 !== null)\r\n {\r\n this.color2 = color2;\r\n }\r\n },\r\n\r\n /**\r\n * The first gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color1\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color1: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor1;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor1;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The second gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color2\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color2: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Gradient;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Pixelate FX Controller.\r\n *\r\n * This FX controller manages the pixelate effect for a Game Object.\r\n *\r\n * The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image,\r\n * creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic\r\n * purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as\r\n * during a transition or to censor specific content.\r\n *\r\n * A Pixelate effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addPixelate();\r\n * sprite.postFX.addPixelate();\r\n * ```\r\n *\r\n * @class Pixelate\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n */\r\nvar Pixelate = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Pixelate (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.PIXELATE, gameObject);\r\n\r\n /**\r\n * The amount of pixelation to apply.\r\n *\r\n * @name Phaser.FX.Pixelate#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pixelate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Shadow FX Controller.\r\n *\r\n * This FX controller manages the shadow effect for a Game Object.\r\n *\r\n * The shadow effect is a visual technique used to create the illusion of depth and realism by adding darker,\r\n * offset silhouettes or shapes beneath game objects, characters, or environments. These simulated shadows\r\n * help to enhance the visual appeal and immersion, making the 2D game world appear more dynamic and three-dimensional.\r\n *\r\n * A Shadow effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addShadow();\r\n * sprite.postFX.addShadow();\r\n * ```\r\n *\r\n * @class Shadow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n */\r\nvar Shadow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shadow (gameObject, x, y, decay, power, color, samples, intensity)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (decay === undefined) { decay = 0.1; }\r\n if (power === undefined) { power = 1; }\r\n if (samples === undefined) { samples = 6; }\r\n if (intensity === undefined) { intensity = 1; }\r\n\r\n Controller.call(this, FX_CONST.SHADOW, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The amount of decay for the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#decay\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.decay = decay;\r\n\r\n /**\r\n * The power of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#power\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.power = power;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Shadow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 0, 0, 0, 1 ];\r\n\r\n /**\r\n * The number of samples that the shadow effect will run for.\r\n *\r\n * This should be an integer with a minimum value of 1 and a maximum of 12.\r\n *\r\n * @name Phaser.FX.Shadow#samples\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.samples = samples;\r\n\r\n /**\r\n * The intensity of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#intensity\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.intensity = intensity;\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the shadow.\r\n *\r\n * @name Phaser.FX.Shadow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shadow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Shine FX Controller.\r\n *\r\n * This FX controller manages the shift effect for a Game Object.\r\n *\r\n * The shine effect is a visual technique that simulates the appearance of reflective\r\n * or glossy surfaces by passing a light beam across a Game Object. This effect is used to\r\n * enhance visual appeal, emphasize certain features, and create a sense of depth or\r\n * material properties.\r\n *\r\n * A Shine effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addShine();\r\n * sprite.postFX.addShine();\r\n * ```\r\n *\r\n * @class Shine\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n */\r\nvar Shine = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shine (gameObject, speed, lineWidth, gradient, reveal)\r\n {\r\n if (speed === undefined) { speed = 0.5; }\r\n if (lineWidth === undefined) { lineWidth = 0.5; }\r\n if (gradient === undefined) { gradient = 3; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.SHINE, gameObject);\r\n\r\n /**\r\n * The speed of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#speed\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.speed = speed;\r\n\r\n /**\r\n * The line width of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#lineWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.lineWidth = lineWidth;\r\n\r\n /**\r\n * The gradient of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#gradient\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.gradient = gradient;\r\n\r\n /**\r\n * Does this Shine effect reveal or get added to its target?\r\n *\r\n * @name Phaser.FX.Shine#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shine;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Vignette FX Controller.\r\n *\r\n * This FX controller manages the vignette effect for a Game Object.\r\n *\r\n * The vignette effect is a visual technique where the edges of the screen, or a Game Object, gradually darken or blur,\r\n * creating a frame-like appearance. This effect is used to draw the player's focus towards the central action or subject,\r\n * enhance immersion, and provide a cinematic or artistic quality to the game's visuals.\r\n *\r\n * A Vignette effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addVignette();\r\n * sprite.postFX.addVignette();\r\n * ```\r\n *\r\n * @class Vignette\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n */\r\nvar Vignette = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Vignette (gameObject, x, y, radius, strength)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = 0.5; }\r\n if (radius === undefined) { radius = 0.5; }\r\n if (strength === undefined) { strength = 0.5; }\r\n\r\n Controller.call(this, FX_CONST.VIGNETTE, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#radius\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The strength of the vignette effect.\r\n *\r\n * @name Phaser.FX.Vignette#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Vignette;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Wipe FX Controller.\r\n *\r\n * This FX controller manages the wipe effect for a Game Object.\r\n *\r\n * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements\r\n * in the game, such as images, text, or scene transitions. This effect is often used to create\r\n * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition\r\n * between game states.\r\n *\r\n * You can set both the direction and the axis of the wipe effect. The following combinations are possible:\r\n *\r\n * * left to right: direction 0, axis 0\r\n * * right to left: direction 1, axis 0\r\n * * top to bottom: direction 1, axis 1\r\n * * bottom to top: direction 1, axis 0\r\n *\r\n * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect.\r\n *\r\n * A Wipe effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addWipe();\r\n * sprite.postFX.addWipe();\r\n * sprite.preFX.addReveal();\r\n * sprite.postFX.addReveal();\r\n * ```\r\n *\r\n * @class Wipe\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n * @param {boolean} [reveal=false] - Is this a reveal (true) or a fade (false) effect?\r\n */\r\nvar Wipe = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Wipe (gameObject, wipeWidth, direction, axis, reveal)\r\n {\r\n if (wipeWidth === undefined) { wipeWidth = 0.1; }\r\n if (direction === undefined) { direction = 0; }\r\n if (axis === undefined) { axis = 0; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.WIPE, gameObject);\r\n\r\n /**\r\n * The progress of the Wipe effect. This value is normalized to the range 0 to 1.\r\n *\r\n * Adjust this value to make the wipe transition (i.e. via a Tween)\r\n *\r\n * @name Phaser.FX.Wipe#progress\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Wipe#wipeWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.wipeWidth = wipeWidth;\r\n\r\n /**\r\n * The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n *\r\n * @name Phaser.FX.Wipe#direction\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.direction = direction;\r\n\r\n /**\r\n * The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @name Phaser.FX.Wipe#axis\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.axis = axis;\r\n\r\n /**\r\n * Is this a reveal (true) or a fade (false) effect?\r\n *\r\n * @name Phaser.FX.Wipe#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Wipe;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FX_CONST = {\r\n\r\n /**\r\n * The Glow FX.\r\n *\r\n * @name Phaser.FX.GLOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GLOW: 4,\r\n\r\n /**\r\n * The Shadow FX.\r\n *\r\n * @name Phaser.FX.SHADOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHADOW: 5,\r\n\r\n /**\r\n * The Pixelate FX.\r\n *\r\n * @name Phaser.FX.PIXELATE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n PIXELATE: 6,\r\n\r\n /**\r\n * The Vignette FX.\r\n *\r\n * @name Phaser.FX.VIGNETTE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n VIGNETTE: 7,\r\n\r\n /**\r\n * The Shine FX.\r\n *\r\n * @name Phaser.FX.SHINE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHINE: 8,\r\n\r\n /**\r\n * The Blur FX.\r\n *\r\n * @name Phaser.FX.BLUR\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLUR: 9, // uses 3 shaders, slots 9, 10 and 11\r\n\r\n /**\r\n * The Gradient FX.\r\n *\r\n * @name Phaser.FX.GRADIENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GRADIENT: 12,\r\n\r\n /**\r\n * The Bloom FX.\r\n *\r\n * @name Phaser.FX.BLOOM\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLOOM: 13,\r\n\r\n /**\r\n * The Color Matrix FX.\r\n *\r\n * @name Phaser.FX.COLOR_MATRIX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n COLOR_MATRIX: 14,\r\n\r\n /**\r\n * The Circle FX.\r\n *\r\n * @name Phaser.FX.CIRCLE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n CIRCLE: 15,\r\n\r\n /**\r\n * The Barrel FX.\r\n *\r\n * @name Phaser.FX.BARREL\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BARREL: 16,\r\n\r\n /**\r\n * The Displacement FX.\r\n *\r\n * @name Phaser.FX.DISPLACEMENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DISPLACEMENT: 17,\r\n\r\n /**\r\n * The Wipe FX.\r\n *\r\n * @name Phaser.FX.WIPE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n WIPE: 18,\r\n\r\n /**\r\n * The Bokeh and Tilt Shift FX.\r\n *\r\n * @name Phaser.FX.BOKEH\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BOKEH: 19\r\n\r\n};\r\n\r\nmodule.exports = FX_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @namespace Phaser.FX\r\n */\r\n\r\nvar FX = {\r\n\r\n Barrel: require('./Barrel'),\r\n Controller: require('./Controller'),\r\n Bloom: require('./Bloom'),\r\n Blur: require('./Blur'),\r\n Bokeh: require('./Bokeh'),\r\n Circle: require('./Circle'),\r\n ColorMatrix: require('./ColorMatrix'),\r\n Displacement: require('./Displacement'),\r\n Glow: require('./Glow'),\r\n Gradient: require('./Gradient'),\r\n Pixelate: require('./Pixelate'),\r\n Shadow: require('./Shadow'),\r\n Shine: require('./Shine'),\r\n Vignette: require('./Vignette'),\r\n Wipe: require('./Wipe')\r\n\r\n};\r\n\r\nFX = Extend(false, FX, FX_CONST);\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar ComponentsToJSON = require('./components/ToJSON');\r\nvar DataManager = require('../data/DataManager');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The base class that all Game Objects extend.\r\n * You don't create GameObjects directly and they cannot be added to the display list.\r\n * Instead, use them as the base for your own custom classes.\r\n *\r\n * @class GameObject\r\n * @memberof Phaser.GameObjects\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\r\n */\r\nvar GameObject = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GameObject (scene, type)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene to which this Game Object belongs.\r\n *\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * You should consider this property as being read-only. You cannot move a\r\n * Game Object to another Scene by simply changing it.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Holds a reference to the Display List that contains this Game Object.\r\n *\r\n * This is set automatically when this Game Object is added to a Scene or Layer.\r\n *\r\n * You should treat this property as being read-only.\r\n *\r\n * @name Phaser.GameObjects.GameObject#displayList\r\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\r\n * @default null\r\n * @since 3.50.0\r\n */\r\n this.displayList = null;\r\n\r\n /**\r\n * A textual representation of this Game Object, i.e. `sprite`.\r\n * Used internally by Phaser but is available for your own custom classes to populate.\r\n *\r\n * @name Phaser.GameObjects.GameObject#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The current state of this Game Object.\r\n *\r\n * Phaser itself will never modify this value, although plugins may do so.\r\n *\r\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\r\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\r\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @name Phaser.GameObjects.GameObject#state\r\n * @type {(number|string)}\r\n * @since 3.16.0\r\n */\r\n this.state = 0;\r\n\r\n /**\r\n * The parent Container of this Game Object, if it has one.\r\n *\r\n * @name Phaser.GameObjects.GameObject#parentContainer\r\n * @type {Phaser.GameObjects.Container}\r\n * @since 3.4.0\r\n */\r\n this.parentContainer = null;\r\n\r\n /**\r\n * The name of this Game Object.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.GameObject#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The active state of this Game Object.\r\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\r\n * An active object is one which is having its logic and internal systems updated.\r\n *\r\n * @name Phaser.GameObjects.GameObject#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The Tab Index of the Game Object.\r\n * Reserved for future use by plugins and the Input Manager.\r\n *\r\n * @name Phaser.GameObjects.GameObject#tabIndex\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.tabIndex = -1;\r\n\r\n /**\r\n * A Data Manager.\r\n * It allows you to store, query and get key/value paired information specific to this Game Object.\r\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#data\r\n * @type {Phaser.Data.DataManager}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.data = null;\r\n\r\n /**\r\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\r\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\r\n * If those components are not used by your custom class then you can use this bitmask as you wish.\r\n *\r\n * @name Phaser.GameObjects.GameObject#renderFlags\r\n * @type {number}\r\n * @default 15\r\n * @since 3.0.0\r\n */\r\n this.renderFlags = 15;\r\n\r\n /**\r\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\r\n * Not usually set directly, instead call `Camera.ignore`, however you can\r\n * set this property directly using the Camera.id property:\r\n *\r\n * @example\r\n * this.cameraFilter |= camera.id\r\n *\r\n * @name Phaser.GameObjects.GameObject#cameraFilter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cameraFilter = 0;\r\n\r\n /**\r\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\r\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#input\r\n * @type {?Phaser.Types.Input.InteractiveObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.input = null;\r\n\r\n /**\r\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\r\n * This includes calls that may come from a Group, Container or the Scene itself.\r\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\r\n * responsible for managing references to and from this Game Object.\r\n *\r\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.ignoreDestroy = false;\r\n\r\n this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\r\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\r\n\r\n // Tell the Scene to re-sort the children\r\n scene.sys.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\r\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\r\n * The `name` property is not populated by Phaser and is presented for your own use.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The name to be given to this Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setName: function (value)\r\n {\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current state of this Game Object.\r\n *\r\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\r\n *\r\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\r\n * The state value should typically be an integer (ideally mapped to a constant\r\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setState\r\n * @since 3.16.0\r\n *\r\n * @param {(number|string)} value - The state of the Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setState: function (value)\r\n {\r\n this.state = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a Data Manager component to this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setDataEnabled\r\n * @since 3.0.0\r\n * @see Phaser.Data.DataManager\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setDataEnabled: function ()\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Allows you to store a key value pair within this Game Objects Data Manager.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * sprite.setData('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `getData`:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setData\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.set(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#incData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n incData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.inc(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toggleData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n toggleData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.toggle(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * sprite.getData([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n getData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this.data.get(key);\r\n },\r\n\r\n /**\r\n * Pass this Game Object to the Input Manager to enable it for Input.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @example\r\n * sprite.setInteractive();\r\n *\r\n * @example\r\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\r\n *\r\n * @example\r\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\r\n *\r\n * @method Phaser.GameObjects.GameObject#setInteractive\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\r\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will disable it.\r\n *\r\n * An object that is disabled for input stops processing or being considered for\r\n * input events, but can be turned back on again at any time by simply calling\r\n * `setInteractive()` with no arguments provided.\r\n *\r\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#disableInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n disableInteractive: function ()\r\n {\r\n this.scene.sys.input.disable(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will queue it\r\n * for removal, causing it to no longer be interactive. The removal happens on\r\n * the next game step, it is not immediate.\r\n *\r\n * The Interactive Object that was assigned to this Game Object will be destroyed,\r\n * removed from the Input Manager and cleared from this Game Object.\r\n *\r\n * If you wish to re-enable this Game Object at a later date you will need to\r\n * re-create its InteractiveObject by calling `setInteractive` again.\r\n *\r\n * If you wish to only temporarily stop an object from receiving input then use\r\n * `disableInteractive` instead, as that toggles the interactive state, where-as\r\n * this erases it completely.\r\n *\r\n * If you wish to resize a hit area, don't remove and then set it as being\r\n * interactive. Instead, access the hitarea object directly and resize the shape\r\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\r\n * shape is a Rectangle, which it is by default.)\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n removeInteractive: function ()\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is added to a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to add themselves into the Update List.\r\n *\r\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addedToScene\r\n * @since 3.50.0\r\n */\r\n addedToScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is removed from a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to removed themselves from the Update List.\r\n *\r\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removedFromScene\r\n * @since 3.50.0\r\n */\r\n removedFromScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\r\n *\r\n * @method Phaser.GameObjects.GameObject#update\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - args\r\n */\r\n update: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Returns a JSON representation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n return ComponentsToJSON(this);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.GameObject#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\r\n\r\n return !(!listWillRender || GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n },\r\n\r\n /**\r\n * Returns an array containing the display list index of either this Game Object, or if it has one,\r\n * its parent Container. It then iterates up through all of the parent containers until it hits the\r\n * root of the display list (which is index 0 in the returned array).\r\n *\r\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\r\n * this Game Object and all of its ancestors.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getIndexList\r\n * @since 3.4.0\r\n *\r\n * @return {number[]} An array of display list position indexes.\r\n */\r\n getIndexList: function ()\r\n {\r\n // eslint-disable-next-line consistent-this\r\n var child = this;\r\n var parent = this.parentContainer;\r\n\r\n var indexes = [];\r\n\r\n while (parent)\r\n {\r\n indexes.unshift(parent.getIndex(child));\r\n\r\n child = parent;\r\n\r\n if (!parent.parentContainer)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n parent = parent.parentContainer;\r\n }\r\n }\r\n\r\n if (this.displayList)\r\n {\r\n indexes.unshift(this.displayList.getIndex(child));\r\n }\r\n else\r\n {\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n }\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the given Display List.\r\n *\r\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\r\n * this Game Object belongs.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\r\n *\r\n * If this Game Object is already on another Display List when this method is called, it will first\r\n * be removed from it, before being added to the new list.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToDisplayList\r\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToDisplayList: function (displayList)\r\n {\r\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\r\n\r\n if (this.displayList && this.displayList !== displayList)\r\n {\r\n this.removeFromDisplayList();\r\n }\r\n\r\n // Don't repeat if it's already on this list\r\n if (!displayList.exists(this))\r\n {\r\n this.displayList = displayList;\r\n\r\n displayList.add(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the Update List belonging to the Scene.\r\n *\r\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\r\n * every game frame. This method is passed two parameters: `delta` and `time`.\r\n *\r\n * If you wish to run your own logic within `preUpdate` then you should always call\r\n * `super.preUpdate(delta, time)` within it, or it may fail to process required operations,\r\n * such as Sprite animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Display List it is currently on.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\r\n * and added back at a later stage.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\r\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromDisplayList: function ()\r\n {\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n if (displayList && displayList.exists(this))\r\n {\r\n displayList.remove(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.displayList = null;\r\n\r\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Scene's Update List.\r\n *\r\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\r\n * every game frame. Calling this method will remove it from the list, preventing this.\r\n *\r\n * Removing a Game Object from the Update List will stop most internal functions working.\r\n * For example, removing a Sprite from the Update List will prevent it from being able to\r\n * run animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.remove(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Game Object removing it from the Display List and Update List and\r\n * severing all ties to parent resources.\r\n *\r\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\r\n *\r\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\r\n * As long as no reference to it exists within your own code it should become free for\r\n * garbage collection by the browser.\r\n *\r\n * If you just want to temporarily disable an object then look at using the\r\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\r\n *\r\n * @method Phaser.GameObjects.GameObject#destroy\r\n * @fires Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [fromScene=false] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\n destroy: function (fromScene)\r\n {\r\n // This Game Object has already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n if (fromScene === undefined) { fromScene = false; }\r\n\r\n if (this.preDestroy)\r\n {\r\n this.preDestroy.call(this);\r\n }\r\n\r\n this.emit(Events.DESTROY, this, fromScene);\r\n\r\n this.removeAllListeners();\r\n\r\n if (this.postPipelines)\r\n {\r\n this.resetPostPipeline(true);\r\n }\r\n\r\n this.removeFromDisplayList();\r\n this.removeFromUpdateList();\r\n\r\n if (this.input)\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n }\r\n\r\n if (this.data)\r\n {\r\n this.data.destroy();\r\n\r\n this.data = undefined;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.body.destroy();\r\n\r\n this.body = undefined;\r\n }\r\n\r\n if (this.preFX)\r\n {\r\n this.preFX.destroy();\r\n\r\n this.preFX = undefined;\r\n }\r\n\r\n if (this.postFX)\r\n {\r\n this.postFX.destroy();\r\n\r\n this.postFX = undefined;\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n this.parentContainer = undefined;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\r\n *\r\n * @constant {number} RENDER_MASK\r\n * @memberof Phaser.GameObjects.GameObject\r\n * @default\r\n */\r\nGameObject.RENDER_MASK = 15;\r\n\r\nmodule.exports = GameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar PluginCache = require('../plugins/PluginCache');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and have them automatically registered with the Scene.\r\n *\r\n * Game Objects directly register themselves with the Factory and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectFactory\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectFactory = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectFactory (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Factory belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n this.events = scene.sys.events;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n this.events.once(SceneEvents.BOOT, this.boot, this);\r\n this.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Game Object to this Scene.\r\n *\r\n * If the Game Object renders, it will be added to the Display List.\r\n * If it has a `preUpdate` method, it will be added to the Update List.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#existing\r\n * @since 3.0.0\r\n *\r\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\r\n */\r\n existing: function (child)\r\n {\r\n if (child.renderCanvas || child.renderWebGL)\r\n {\r\n this.displayList.add(child);\r\n }\r\n\r\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\r\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\r\n if (child.preUpdate)\r\n {\r\n this.updateList.add(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.events = null;\r\n\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\r\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\r\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.register\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\r\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\r\n */\r\nGameObjectFactory.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectFactory.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\r\n * providing a its `factoryType`.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.remove\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\r\n */\r\nGameObjectFactory.remove = function (factoryType)\r\n{\r\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectFactory.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\r\n\r\nmodule.exports = GameObjectFactory;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TransformMatrix = require('./components/TransformMatrix');\r\n\r\nvar tempMatrix1 = new TransformMatrix();\r\nvar tempMatrix2 = new TransformMatrix();\r\nvar tempMatrix3 = new TransformMatrix();\r\n\r\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\r\n\r\n/**\r\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\r\n * the parent matrix if provided.\r\n *\r\n * Note that the object this results contains _references_ to the Transform Matrices,\r\n * not new instances of them. Therefore, you should use their values immediately, or\r\n * copy them to your own matrix, as they will be replaced as soon as another Game\r\n * Object is rendered.\r\n *\r\n * @function Phaser.GameObjects.GetCalcMatrix\r\n * @memberof Phaser.GameObjects\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\r\n *\r\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\r\n */\r\nvar GetCalcMatrix = function (src, camera, parentMatrix)\r\n{\r\n var camMatrix = tempMatrix1;\r\n var spriteMatrix = tempMatrix2;\r\n var calcMatrix = tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = GetCalcMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha property of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.AlphaSingle\r\n * @since 3.22.0\r\n */\r\n\r\nvar AlphaSingle = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = AlphaSingle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../../renderer/BlendModes');\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string|number)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.displayList)\r\n {\r\n this.displayList.queueDepthSort();\r\n }\r\n\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Effects = require('../../fx/');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * @classdesc\r\n * The FX Component features a set of methods used for applying a range of special built-in effects to a Game Object.\r\n *\r\n * The effects include the following:\r\n *\r\n * * Barrel Distortion\r\n * * Bloom\r\n * * Blur\r\n * * Bokeh / Tilt Shift\r\n * * Circle Outline\r\n * * Color Matrix\r\n * * Glow\r\n * * Displacement\r\n * * Gradient\r\n * * Pixelate\r\n * * Shine\r\n * * Shadow\r\n * * Vignette\r\n * * Wipe / Reveal\r\n *\r\n * All Game Objects support Post FX. These are effects applied after the Game Object has been rendered.\r\n *\r\n * Texture-based Game Objects also support Pre FX, including:\r\n *\r\n * * Image\r\n * * Sprite\r\n * * TileSprite\r\n * * Text\r\n * * RenderTexture\r\n * * Video\r\n *\r\n * And any Game Object that extends the above.\r\n *\r\n * The difference between Pre FX and Post FX are that all Post FX take place in a canvas (renderer) sized frame buffer,\r\n * after the Game Object has been rendered. Pre FX, however, take place in a texture sized frame buffer, which is sized\r\n * based on the Game Object itself. The end result is then composited back to the main game canvas. For intensive effects,\r\n * such as blur, bloom or glow, which can require many iterations, this is a much more efficient way to apply the effect,\r\n * as only it only has to work on a Game Object sized texture and not all pixels in the canvas.\r\n *\r\n * In short, you should always try and use a Pre FX if you can.\r\n *\r\n * Due to the way that FX work they can be stacked-up. For example, you can apply a blur to a Game Object, then apply\r\n * a bloom effect to the same Game Object. The bloom effect will be applied to the blurred texture, not the original.\r\n * Keep the order in mind when stacking effects.\r\n *\r\n * All effects are WebGL only and do not have canvas counterparts.\r\n *\r\n * As you can appreciate, some effects are more expensive than others. For example, a bloom effect is going to be more\r\n * expensive than a simple color matrix effect, so please consider using them wisely and performance test your target\r\n * platforms early on in production.\r\n *\r\n * This component is created automatically by the `PostPipeline` class and does not need to be instantiated directly.\r\n *\r\n * @class FX\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.60.0\r\n * @webglOnly\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that owns this FX Component.\r\n * @param {boolean} isPost - Is this a Pre or Post FX Component?\r\n */\r\nvar FX = new Class({\r\n\r\n initialize:\r\n\r\n function FX (gameObject, isPost)\r\n {\r\n /**\r\n * A reference to the Game Object that owns this FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Is this a Post FX Controller? or a Pre FX Controller?\r\n *\r\n * @name Phaser.GameObjects.Components.FX#isPost\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.60.0\r\n */\r\n this.isPost = isPost;\r\n\r\n /**\r\n * Has this FX Component been enabled?\r\n *\r\n * You should treat this property as read-only, although it is toggled\r\n * automaticaly during internal use.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#enabled\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * An array containing all of the Pre FX Controllers that\r\n * have been added to this FX Component. They are processed in\r\n * the order they are added.\r\n *\r\n * This array is empty if this is a Post FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#list\r\n * @type {Phaser.FX.Controller[]}\r\n * @since 3.60.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * The amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * You do not need to set this if you're only using Post FX.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#padding\r\n * @type {number}\r\n * @default 0\r\n * @since 3.60.0\r\n */\r\n this.padding = 0;\r\n },\r\n\r\n /**\r\n * Sets the amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * You do not need to set this if you're only using Post FX.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setPadding\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPadding: function (padding)\r\n {\r\n if (padding === undefined) { padding = 0; }\r\n\r\n this.padding = padding;\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is copied by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `copySprite` method.\r\n *\r\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFXCopy\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFXCopy: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is rendered by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `drawSprite` method.\r\n *\r\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFX\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFX: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Enables this FX Component and applies the FXPipeline to the parent Game Object.\r\n *\r\n * This is called automatically whenever you call a method such as `addBloom`, etc.\r\n *\r\n * You can check the `enabled` property to see if the Game Object is already enabled, or not.\r\n *\r\n * This only applies to Pre FX. Post FX are always enabled.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#enable\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n */\r\n enable: function (padding)\r\n {\r\n if (this.isPost)\r\n {\r\n return;\r\n }\r\n\r\n var renderer = this.gameObject.scene.sys.renderer;\r\n\r\n if (renderer && renderer.pipelines)\r\n {\r\n this.gameObject.pipeline = renderer.pipelines.FX_PIPELINE;\r\n\r\n if (padding !== undefined)\r\n {\r\n this.padding = padding;\r\n }\r\n\r\n this.enabled = true;\r\n }\r\n else\r\n {\r\n this.enabled = false;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys and removes all FX Controllers that are part of this FX Component,\r\n * then disables it.\r\n *\r\n * If this is a Pre FX Component it will only remove Pre FX.\r\n * If this is a Post FX Component it will only remove Post FX.\r\n *\r\n * To remove both at once use the `GameObject.clearFX` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#clear\r\n * @since 3.60.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clear: function ()\r\n {\r\n if (this.isPost)\r\n {\r\n this.gameObject.resetPostPipeline(true);\r\n }\r\n else\r\n {\r\n var list = this.list;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].destroy();\r\n }\r\n\r\n this.list = [];\r\n }\r\n\r\n this.enabled = false;\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * Searches for the given FX Controller within this FX Component.\r\n *\r\n * If found, the controller is removed from this component and then destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#remove\r\n * @since 3.60.0\r\n *\r\n * @generic {Phaser.FX.Controller} T\r\n * @genericUse {T} - [fx]\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX Component.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n remove: function (fx)\r\n {\r\n var i;\r\n\r\n if (this.isPost)\r\n {\r\n var pipelines = this.gameObject.getPostPipeline(String(fx.type));\r\n\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (i = 0; i < pipelines.length; i++)\r\n {\r\n var pipeline = pipelines[i];\r\n\r\n if (pipeline.controller === fx)\r\n {\r\n this.gameObject.removePostPipeline(pipeline);\r\n\r\n fx.destroy();\r\n\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n var list = this.list;\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n if (list[i] === fx)\r\n {\r\n SpliceOne(list, i);\r\n\r\n fx.destroy();\r\n }\r\n }\r\n }\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * Disables this FX Component.\r\n *\r\n * This will reset the pipeline on the Game Object that owns this component back to its\r\n * default and flag this component as disabled.\r\n *\r\n * You can re-enable it again by calling `enable` for Pre FX or by adding an FX for Post FX.\r\n *\r\n * Optionally, set `clear` to destroy all current FX Controllers.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#disable\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [clear=false] - Destroy and remove all FX Controllers that are part of this component.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n disable: function (clear)\r\n {\r\n if (clear === undefined) { clear = false; }\r\n\r\n if (!this.isPost)\r\n {\r\n this.gameObject.resetPipeline();\r\n }\r\n\r\n this.enabled = false;\r\n\r\n if (clear)\r\n {\r\n this.clear();\r\n }\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * Adds the given FX Controler to this FX Component.\r\n *\r\n * Note that adding an FX Controller does not remove any existing FX. They all stack-up\r\n * on-top of each other. If you don't want this, make sure to call either `remove` or\r\n * `clear` first.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#add\r\n * @since 3.60.0\r\n *\r\n * @generic {Phaser.FX.Controller} T\r\n * @genericUse {T} - [fx]\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX Component.\r\n * @param {object} [config] - Optional configuration object that is passed to the pipeline during instantiation.\r\n *\r\n * @return {Phaser.FX.Controller} The FX Controller.\r\n */\r\n add: function (fx, config)\r\n {\r\n if (this.isPost)\r\n {\r\n var type = String(fx.type);\r\n\r\n this.gameObject.setPostPipeline(type, config);\r\n\r\n var pipeline = this.gameObject.getPostPipeline(type);\r\n\r\n if (pipeline)\r\n {\r\n if (Array.isArray(pipeline))\r\n {\r\n pipeline = pipeline.pop();\r\n }\r\n\r\n if (pipeline) pipeline.controller = fx;\r\n\r\n return fx;\r\n }\r\n }\r\n else\r\n {\r\n if (!this.enabled)\r\n {\r\n this.enable();\r\n }\r\n\r\n this.list.push(fx);\r\n\r\n return fx;\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Glow effect.\r\n *\r\n * The glow effect is a visual technique that creates a soft, luminous halo around game objects,\r\n * characters, or UI elements. This effect is used to emphasize importance, enhance visual appeal,\r\n * or convey a sense of energy, magic, or otherworldly presence. The effect can also be set on\r\n * the inside of the Game Object. The color and strength of the glow can be modified.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGlow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n * @param {number} [quality=0.1] - Only available for PostFX. Sets the quality of this Glow effect. Default is 0.1. Cannot be changed post-creation.\r\n * @param {number} [distance=10] - Only available for PostFX. Sets the distance of this Glow effect. Default is 10. Cannot be changed post-creation.\r\n *\r\n * @return {Phaser.FX.Glow} The Glow FX Controller.\r\n */\r\n addGlow: function (color, outerStrength, innerStrength, knockout, quality, distance)\r\n {\r\n return this.add(new Effects.Glow(this.gameObject, color, outerStrength, innerStrength, knockout), { quality: quality, distance: distance });\r\n },\r\n\r\n /**\r\n * Adds a Shadow effect.\r\n *\r\n * The shadow effect is a visual technique used to create the illusion of depth and realism by adding darker,\r\n * offset silhouettes or shapes beneath game objects, characters, or environments. These simulated shadows\r\n * help to enhance the visual appeal and immersion, making the 2D game world appear more dynamic and three-dimensional.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShadow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n *\r\n * @return {Phaser.FX.Shadow} The Shadow FX Controller.\r\n */\r\n addShadow: function (x, y, decay, power, color, samples, intensity)\r\n {\r\n return this.add(new Effects.Shadow(this.gameObject, x, y, decay, power, color, samples, intensity));\r\n },\r\n\r\n /**\r\n * Adds a Pixelate effect.\r\n *\r\n * The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image,\r\n * creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic\r\n * purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as\r\n * during a transition or to censor specific content.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addPixelate\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n *\r\n * @return {Phaser.FX.Pixelate} The Pixelate FX Controller.\r\n */\r\n addPixelate: function (amount)\r\n {\r\n return this.add(new Effects.Pixelate(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Vignette effect.\r\n *\r\n * The vignette effect is a visual technique where the edges of the screen, or a Game Object, gradually darken or blur,\r\n * creating a frame-like appearance. This effect is used to draw the player's focus towards the central action or subject,\r\n * enhance immersion, and provide a cinematic or artistic quality to the game's visuals.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addVignette\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n *\r\n * @return {Phaser.FX.Vignette} The Vignette FX Controller.\r\n */\r\n addVignette: function (x, y, radius, strength)\r\n {\r\n return this.add(new Effects.Vignette(this.gameObject, x, y, radius, strength));\r\n },\r\n\r\n /**\r\n * Adds a Shine effect.\r\n *\r\n * The shine effect is a visual technique that simulates the appearance of reflective\r\n * or glossy surfaces by passing a light beam across a Game Object. This effect is used to\r\n * enhance visual appeal, emphasize certain features, and create a sense of depth or\r\n * material properties.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShine\r\n * @since 3.60.0\r\n *\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n *\r\n * @return {Phaser.FX.Shine} The Shine FX Controller.\r\n */\r\n addShine: function (speed, lineWidth, gradient, reveal)\r\n {\r\n return this.add(new Effects.Shine(this.gameObject, speed, lineWidth, gradient, reveal));\r\n },\r\n\r\n /**\r\n * Adds a Blur effect.\r\n *\r\n * A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect,\r\n * typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a\r\n * smooth blur resembling that of viewing the image through a translucent screen, distinctly different\r\n * from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBlur\r\n * @since 3.60.0\r\n *\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Blur} The Blur FX Controller.\r\n */\r\n addBlur: function (quality, x, y, strength, color, steps)\r\n {\r\n return this.add(new Effects.Blur(this.gameObject, quality, x, y, strength, color, steps));\r\n },\r\n\r\n /**\r\n * Adds a Gradient effect.\r\n *\r\n * The gradient overlay effect is a visual technique where a smooth color transition is applied over Game Objects,\r\n * such as sprites or UI components. This effect is used to enhance visual appeal, emphasize depth, or create\r\n * stylistic and atmospheric variations. It can also be utilized to convey information, such as representing\r\n * progress or health status through color changes.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGradient\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n *\r\n * @return {Phaser.FX.Gradient} The Gradient FX Controller.\r\n */\r\n addGradient: function (color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n return this.add(new Effects.Gradient(this.gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size));\r\n },\r\n\r\n /**\r\n * Adds a Bloom effect.\r\n *\r\n * Bloom is an effect used to reproduce an imaging artifact of real-world cameras.\r\n * The effect produces fringes of light extending from the borders of bright areas in an image,\r\n * contributing to the illusion of an extremely bright light overwhelming the\r\n * camera or eye capturing the scene.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBloom\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Bloom} The Bloom FX Controller.\r\n */\r\n addBloom: function (color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n return this.add(new Effects.Bloom(this.gameObject, color, offsetX, offsetY, blurStrength, strength, steps));\r\n },\r\n\r\n /**\r\n * Adds a ColorMatrix effect.\r\n *\r\n * The color matrix effect is a visual technique that involves manipulating the colors of an image\r\n * or scene using a mathematical matrix. This process can adjust hue, saturation, brightness, and contrast,\r\n * allowing developers to create various stylistic appearances or mood settings within the game.\r\n * Common applications include simulating different lighting conditions, applying color filters,\r\n * or achieving a specific visual style.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addColorMatrix\r\n * @since 3.60.0\r\n *\r\n * @return {Phaser.FX.ColorMatrix} The ColorMatrix FX Controller.\r\n */\r\n addColorMatrix: function ()\r\n {\r\n return this.add(new Effects.ColorMatrix(this.gameObject));\r\n },\r\n\r\n /**\r\n * Adds a Circle effect.\r\n *\r\n * This effect will draw a circle around the texture of the Game Object, effectively masking off\r\n * any area outside of the circle without the need for an actual mask. You can control the thickness\r\n * of the circle, the color of the circle and the color of the background, should the texture be\r\n * transparent. You can also control the feathering applied to the circle, allowing for a harsh or soft edge.\r\n *\r\n * Please note that adding this effect to a Game Object will not change the input area or physics body of\r\n * the Game Object, should it have one.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addCircle\r\n * @since 3.60.0\r\n *\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=0xfeedb6] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n *\r\n * @return {Phaser.FX.Circle} The Circle FX Controller.\r\n */\r\n addCircle: function (thickness, color, backgroundColor, scale, feather)\r\n {\r\n return this.add(new Effects.Circle(this.gameObject, thickness, color, backgroundColor, scale, feather));\r\n },\r\n\r\n /**\r\n * Adds a Barrel effect.\r\n *\r\n * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to\r\n * a Game Object. The amount of the effect can be modified in real-time.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBarrel\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n *\r\n * @return {Phaser.FX.Barrel} The Barrel FX Controller.\r\n */\r\n addBarrel: function (amount)\r\n {\r\n return this.add(new Effects.Barrel(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Displacement effect.\r\n *\r\n * The displacement effect is a visual technique that alters the position of pixels in an image\r\n * or texture based on the values of a displacement map. This effect is used to create the illusion\r\n * of depth, surface irregularities, or distortion in otherwise flat elements. It can be applied to\r\n * characters, objects, or backgrounds to enhance realism, convey movement, or achieve various\r\n * stylistic appearances.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addDisplacement\r\n * @since 3.60.0\r\n *\r\n * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply. A very small float number, such as 0.005.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply. A very small float number, such as 0.005.\r\n *\r\n * @return {Phaser.FX.Displacement} The Displacement FX Controller.\r\n */\r\n addDisplacement: function (texture, x, y)\r\n {\r\n return this.add(new Effects.Displacement(this.gameObject, texture, x, y));\r\n },\r\n\r\n /**\r\n * Adds a Wipe effect.\r\n *\r\n * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements\r\n * in the game, such as images, text, or scene transitions. This effect is often used to create\r\n * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition\r\n * between game states.\r\n *\r\n * You can set both the direction and the axis of the wipe effect. The following combinations are possible:\r\n *\r\n * * left to right: direction 0, axis 0\r\n * * right to left: direction 1, axis 0\r\n * * top to bottom: direction 1, axis 1\r\n * * bottom to top: direction 1, axis 0\r\n *\r\n * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addWipe\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addWipe: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis));\r\n },\r\n\r\n /**\r\n * Adds a Reveal Wipe effect.\r\n *\r\n * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements\r\n * in the game, such as images, text, or scene transitions. This effect is often used to create\r\n * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition\r\n * between game states.\r\n *\r\n * You can set both the direction and the axis of the wipe effect. The following combinations are possible:\r\n *\r\n * * left to right: direction 0, axis 0\r\n * * right to left: direction 1, axis 0\r\n * * top to bottom: direction 1, axis 1\r\n * * bottom to top: direction 1, axis 0\r\n *\r\n * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addReveal\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addReveal: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis, true));\r\n },\r\n\r\n /**\r\n * Adds a Bokeh effect.\r\n *\r\n * Bokeh refers to a visual effect that mimics the photographic technique of creating a shallow depth of field.\r\n * This effect is used to emphasize the game's main subject or action, by blurring the background or foreground\r\n * elements, resulting in a more immersive and visually appealing experience. It is achieved through rendering\r\n * techniques that simulate the out-of-focus areas, giving a sense of depth and realism to the game's graphics.\r\n *\r\n * See also Tilt Shift.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBokeh\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh FX Controller.\r\n */\r\n addBokeh: function (radius, amount, contrast)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast));\r\n },\r\n\r\n /**\r\n * Adds a Tilt Shift effect.\r\n *\r\n * This Bokeh effect can also be used to generate a Tilt Shift effect, which is a technique used to create a miniature\r\n * effect by blurring everything except a small area of the image. This effect is achieved by blurring the\r\n * top and bottom elements, while keeping the center area in focus.\r\n *\r\n * See also Bokeh.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addTiltShift\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {number} [blurX=1] - The amount of horizontal blur.\r\n * @param {number} [blurY=1] - The amount of vertical blur.\r\n * @param {number} [strength=1] - The strength of the blur.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh TiltShift FX Controller.\r\n */\r\n addTiltShift: function (radius, amount, contrast, blurX, blurY, strength)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast, true, blurX, blurY, strength));\r\n },\r\n\r\n /**\r\n * Destroys this FX Component.\r\n *\r\n * Called automatically when Game Objects are destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.clear();\r\n\r\n this.gameObject = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar RotateAround = require('../../math/RotateAround');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getCenter: function (output, includeParent)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n *\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is\r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = require('../../display/mask/BitmapMask');\r\nvar GeometryMask = require('../../display/mask/GeometryMask');\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n *\r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n *\r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one, or a Dynamic Texture.\r\n *\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable texture-based Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G\r\n * @generic {Phaser.Textures.DynamicTexture} T\r\n * @genericUse {(G|T|null)} [maskObject]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (maskObject, x, y, texture, frame)\r\n {\r\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n maskObject = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n *\r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G\r\n * @generic {Phaser.GameObjects.Shape} S\r\n * @genericUse {(G|S)} [graphics]\r\n *\r\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && (this.type === 'Graphics' || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = require('../../math/DegToRad');\r\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar TWEEN_CONST = require('../../tweens/tween/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The distance the follower has traveled from the previous point to the current one, at the last update.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathDelta\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.23.0\r\n */\r\n pathDelta: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.setTargetValue();\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n if (!this.pathDelta)\r\n {\r\n this.pathDelta = new Vector2();\r\n }\r\n\r\n this.pathDelta.reset();\r\n\r\n config.persist = true;\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n var pathDelta = this.pathDelta;\r\n var pathVector = this.pathVector;\r\n\r\n pathDelta.copy(pathVector).negate();\r\n\r\n if (tweenData.state === TWEEN_CONST.COMPLETE)\r\n {\r\n this.path.getPoint(tweenData.end, pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n return;\r\n }\r\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n pipelineData: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n *\r\n * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipeline)\r\n {\r\n this.pipelineData = {};\r\n\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return false;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n if (pipeline === undefined)\r\n {\r\n pipeline = pipelines.default;\r\n }\r\n\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.defaultPipeline = instance;\r\n this.pipeline = instance;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the main WebGL Pipeline of this Game Object.\r\n *\r\n * Also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipeline, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.pipeline = instance;\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipelineData: function (key, value)\r\n {\r\n var data = this.pipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n *\r\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\r\n */\r\n resetPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n this.pipeline = this.defaultPipeline;\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\nvar FX = require('../components/FX');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering post pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n\r\nvar PostPipeline = {\r\n\r\n /**\r\n * Does this Game Object have any Post Pipelines set?\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#hasPostPipeline\r\n * @type {boolean}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n hasPostPipeline: false,\r\n\r\n /**\r\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\r\n *\r\n * The pipelines are processed in the order in which they appear in this array.\r\n *\r\n * If you modify this array directly, be sure to set the\r\n * `hasPostPipeline` property accordingly.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelines\r\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelines: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelineData: null,\r\n\r\n /**\r\n * The Pre FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.preFX.addBloom();\r\n * ```\r\n *\r\n * Only the following Game Objects support Pre FX:\r\n *\r\n * * Image\r\n * * Sprite\r\n * * TileSprite\r\n * * Text\r\n * * RenderTexture\r\n * * Video\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#preFX\r\n * @type {?Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n preFX: null,\r\n\r\n /**\r\n * The Post FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.postFX.addBloom();\r\n * ```\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * This property is always `null` until the `initPostPipeline` method is called.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postFX\r\n * @type {Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postFX: null,\r\n\r\n /**\r\n * This should only be called during the instantiation of the Game Object.\r\n *\r\n * It is called by default by all core Game Objects and doesn't need\r\n * calling again.\r\n *\r\n * After that, use `setPostPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#initPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [preFX=false] - Does this Game Object support Pre FX?\r\n */\r\n initPostPipeline: function (preFX)\r\n {\r\n this.postPipelines = [];\r\n this.postPipelineData = {};\r\n\r\n this.postFX = new FX(this, true);\r\n\r\n if (preFX)\r\n {\r\n this.preFX = new FX(this, false);\r\n }\r\n },\r\n\r\n /**\r\n * Sets one, or more, Post Pipelines on this Game Object.\r\n *\r\n * Post Pipelines are invoked after this Game Object has rendered to its target and\r\n * are commonly used for post-fx.\r\n *\r\n * The post pipelines are appended to the `postPipelines` array belonging to this\r\n * Game Object. When the renderer processes this Game Object, it iterates through the post\r\n * pipelines in the order in which they appear in the array. If you are stacking together\r\n * multiple effects, be aware that the order is important.\r\n *\r\n * If you call this method multiple times, the new pipelines will be appended to any existing\r\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\r\n *\r\n * You can optionally also set the `postPipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `postPipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `postPipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipeline: function (pipelines, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelineManager = renderer.pipelines;\r\n\r\n if (pipelineManager)\r\n {\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelineManager.getPostPipeline(pipelines[i], this, pipelineData);\r\n\r\n if (instance)\r\n {\r\n this.postPipelines.push(instance);\r\n }\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.postPipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `postPipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipelineData\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipelineData: function (key, value)\r\n {\r\n var data = this.postPipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#getPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} An array of all the Post Pipelines matching the name. This array will be empty if there was no match. If there was only one single match, that pipeline is returned directly, not in an array.\r\n */\r\n getPostPipeline: function (pipeline)\r\n {\r\n var isString = (typeof pipeline === 'string');\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n var results = [];\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\r\n {\r\n results.push(instance);\r\n }\r\n }\r\n\r\n return (results.length === 1) ? results[0] : results;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\r\n * the `destroy` method on each post pipeline and then clearing the local array.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#resetPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `postPipelineData` object to being an empty object?\r\n */\r\n resetPostPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n pipelines[i].destroy();\r\n }\r\n\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n\r\n if (resetData)\r\n {\r\n this.postPipelineData = {};\r\n }\r\n },\r\n\r\n /**\r\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\r\n *\r\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#removePostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removePostPipeline: function (pipeline)\r\n {\r\n var isString = (typeof pipeline === 'string');\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = pipelines.length - 1; i >= 0; i--)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if (\r\n (isString && instance.name === pipeline) ||\r\n (!isString && instance === pipeline))\r\n {\r\n instance.destroy();\r\n\r\n SpliceOne(pipelines, i);\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Pre and Post FX Controllers from this Game Object.\r\n *\r\n * If you wish to remove a single controller, use the `preFX.remove(fx)` or `postFX.remove(fx)` methods instead.\r\n *\r\n * If you wish to clear a single controller, use the `preFX.clear()` or `postFX.clear()` methods instead.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#clearFX\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearFX: function ()\r\n {\r\n if (this.preFX)\r\n {\r\n this.preFX.clear();\r\n }\r\n\r\n if (this.postFX)\r\n {\r\n this.postFX.clear();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PostPipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleX * this.frame.realWidth);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleY * this.frame.realHeight);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame|boolean} [frame] - The frame to base the size of this Game Object on.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (!frame) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n var input = this.input;\r\n\r\n if (input && !input.customHitArea)\r\n {\r\n input.hitArea.width = this.width;\r\n input.hitArea.height = this.height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the tint of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Tint\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Tint = {\r\n\r\n /**\r\n * The tint value being applied to the top-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the top-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopRight: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomRight: 0xffffff,\r\n\r\n /**\r\n * The tint fill mode.\r\n *\r\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\r\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n tintFill: false,\r\n\r\n /**\r\n * Clears all tint values associated with this Game Object.\r\n *\r\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\r\n * which results in no visible change to the texture.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#clearTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearTint: function ()\r\n {\r\n this.setTint(0xffffff);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an additive tint on this Game Object.\r\n *\r\n * The tint works by taking the pixel color values from the Game Objects texture, and then\r\n * multiplying it by the color value of the tint. You can provide either one color value,\r\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\r\n * per corner. The colors are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 0xffffff; }\r\n\r\n if (topRight === undefined)\r\n {\r\n topRight = topLeft;\r\n bottomLeft = topLeft;\r\n bottomRight = topLeft;\r\n }\r\n\r\n this.tintTopLeft = topLeft;\r\n this.tintTopRight = topRight;\r\n this.tintBottomLeft = bottomLeft;\r\n this.tintBottomRight = bottomRight;\r\n\r\n this.tintFill = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a fill-based tint on this Game Object.\r\n *\r\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\r\n * with those in the tint. You can use this for effects such as making a player flash 'white'\r\n * if hit by something. You can provide either one color value, in which case the whole\r\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\r\n * are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTintFill\r\n * @webglOnly\r\n * @since 3.11.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n\r\n this.tintFill = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The tint value being applied to the whole of the Game Object.\r\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tint\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tint: {\r\n\r\n set: function (value)\r\n {\r\n this.setTint(value, value, value, value);\r\n }\r\n },\r\n\r\n /**\r\n * Does this Game Object have a tint applied?\r\n *\r\n * It checks to see if the 4 tint properties are set to the value 0xffffff\r\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#isTinted\r\n * @type {boolean}\r\n * @webglOnly\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n isTinted: {\r\n\r\n get: function ()\r\n {\r\n var white = 0xffffff;\r\n\r\n return (\r\n this.tintFill ||\r\n this.tintTopLeft !== white ||\r\n this.tintTopRight !== white ||\r\n this.tintBottomLeft !== white ||\r\n this.tintBottomRight !== white\r\n );\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Tint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../../math/const');\r\nvar TransformMatrix = require('./TransformMatrix');\r\nvar TransformXY = require('../../math/TransformXY');\r\nvar WrapAngle = require('../../math/angle/Wrap');\r\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Transform\r\n * @since 3.0.0\r\n */\r\n\r\nvar Transform = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\r\n * @type {boolean}\r\n * @readonly\r\n * @default true\r\n * @since 3.60.0\r\n */\r\n hasTransformComponent: true,\r\n\r\n /**\r\n * Private internal value. Holds the horizontal scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleX\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleX: 1,\r\n\r\n /**\r\n * Private internal value. Holds the vertical scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleY\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleY: 1,\r\n\r\n /**\r\n * Private internal value. Holds the rotation value in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _rotation: 0,\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: 0,\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: 0,\r\n\r\n /**\r\n * The z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: 0,\r\n\r\n /**\r\n * The w position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: 0,\r\n\r\n /**\r\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\r\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\r\n *\r\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\r\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.18.0\r\n */\r\n scale: {\r\n\r\n get: function ()\r\n {\r\n return (this._scaleX + this._scaleY) / 2;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleY !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleX !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The angle of this Game Object as expressed in degrees.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in radians, see the `rotation` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * The angle of this Game Object in radians.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\r\n * and -PI/2 is up.\r\n *\r\n * If you prefer to work in degrees, see the `angle` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#rotation\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of this Game Object.\r\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\r\n * @param {number} [z=0] - The z position of this Game Object.\r\n * @param {number} [w=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPosition: function (x, y, z, w)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n if (z === undefined) { z = 0; }\r\n if (w === undefined) { w = 0; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies an object's coordinates to this Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#copyPosition\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n copyPosition: function (source)\r\n {\r\n if (source.x !== undefined) { this.x = source.x; }\r\n if (source.y !== undefined) { this.y = source.y; }\r\n if (source.z !== undefined) { this.z = source.z; }\r\n if (source.w !== undefined) { this.w = source.w; }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object to be a random position within the confines of\r\n * the given area.\r\n *\r\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\r\n *\r\n * The position does not factor in the size of this Game Object, meaning that only the origin is\r\n * guaranteed to be within the area.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\r\n * @since 3.8.0\r\n *\r\n * @param {number} [x=0] - The x position of the top-left of the random area.\r\n * @param {number} [y=0] - The y position of the top-left of the random area.\r\n * @param {number} [width] - The width of the random area.\r\n * @param {number} [height] - The height of the random area.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRandomPosition: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n\r\n this.x = x + (Math.random() * width);\r\n this.y = y + (Math.random() * height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this.rotation = radians;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=1] - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScale: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scaleX = x;\r\n this.scaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the x position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The x position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setX: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the y position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The y position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setY: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The z position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setZ: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.z = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the w position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setW\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setW: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.w = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the local transform matrix for this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getLocalTransformMatrix: function (tempMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n },\r\n\r\n /**\r\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n var parent = this.parentContainer;\r\n\r\n if (!parent)\r\n {\r\n return this.getLocalTransformMatrix(tempMatrix);\r\n }\r\n\r\n if (!parentMatrix)\r\n {\r\n parentMatrix = new TransformMatrix();\r\n }\r\n\r\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n\r\n while (parent)\r\n {\r\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\r\n\r\n parentMatrix.multiply(tempMatrix, tempMatrix);\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return tempMatrix;\r\n },\r\n\r\n /**\r\n * Takes the given `x` and `y` coordinates and converts them into local space for this\r\n * Game Object, taking into account parent and local transforms, and the Display Origin.\r\n *\r\n * The returned Vector2 contains the translated point in its properties.\r\n *\r\n * A Camera needs to be provided in order to handle modified scroll factors. If no\r\n * camera is specified, it will use the `main` camera from the Scene to which this\r\n * Game Object belongs.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\r\n *\r\n * @return {Phaser.Math.Vector2} The translated point.\r\n */\r\n getLocalPoint: function (x, y, point, camera)\r\n {\r\n if (!point) { point = new Vector2(); }\r\n if (!camera) { camera = this.scene.sys.cameras.main; }\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n var px = x + (csx * this.scrollFactorX) - csx;\r\n var py = y + (csy * this.scrollFactorY) - csy;\r\n\r\n if (this.parentContainer)\r\n {\r\n this.getWorldTransformMatrix().applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\r\n }\r\n\r\n // Normalize origin\r\n if (this._originComponent)\r\n {\r\n point.x += this._displayOriginX;\r\n point.y += this._displayOriginY;\r\n }\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Gets the sum total rotation of all of this Game Objects parent Containers.\r\n *\r\n * The returned value is in radians and will be zero if this Game Object has no parent container.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\r\n * @since 3.18.0\r\n *\r\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\r\n */\r\n getParentRotation: function ()\r\n {\r\n var rotation = 0;\r\n\r\n var parent = this.parentContainer;\r\n\r\n while (parent)\r\n {\r\n rotation += parent.rotation;\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return rotation;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n\r\n /**\r\n * The temporary quad value cache.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\r\n * @type {Float32Array}\r\n * @since 3.60.0\r\n */\r\n this.quad = new Float32Array(8);\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n\r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n\r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? matrix : out.matrix;\r\n\r\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix[5] = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n *\r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point in to the local space of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {Phaser.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n *\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n *\r\n * The result must be applied in the following order to reproduce the current matrix:\r\n *\r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.DecomposeMatrixResults} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n *\r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Performs the 8 calculations required to create the vertices of\r\n * a quad based on this matrix and the given x/y/xw/yh values.\r\n *\r\n * The result is stored in `TransformMatrix.quad`, which is returned\r\n * from this method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\r\n * @since 3.60.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} xw - The xw value.\r\n * @param {number} yh - The yh value.\r\n * @param {boolean} roundPixels - Pass the results via Math.round?\r\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\r\n *\r\n * @return {Float32Array} The quad Float32Array.\r\n */\r\n setQuad: function (x, y, xw, yh, roundPixels, quad)\r\n {\r\n if (quad === undefined) { quad = this.quad; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var e = matrix[4];\r\n var f = matrix[5];\r\n\r\n quad[0] = x * a + y * c + e;\r\n quad[1] = x * b + y * d + f;\r\n\r\n quad[2] = x * a + yh * c + e;\r\n quad[3] = x * b + yh * d + f;\r\n\r\n quad[4] = xw * a + yh * c + e;\r\n quad[5] = xw * b + yh * d + f;\r\n\r\n quad[6] = xw * a + y * c + e;\r\n quad[7] = xw * b + y * d + f;\r\n\r\n if (roundPixels)\r\n {\r\n quad.forEach(function (value, index)\r\n {\r\n quad[index] = Math.round(value);\r\n });\r\n }\r\n\r\n return quad;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.quad = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: require('./Alpha'),\r\n AlphaSingle: require('./AlphaSingle'),\r\n BlendMode: require('./BlendMode'),\r\n ComputedSize: require('./ComputedSize'),\r\n Crop: require('./Crop'),\r\n Depth: require('./Depth'),\r\n Flip: require('./Flip'),\r\n FX: require('./FX'),\r\n GetBounds: require('./GetBounds'),\r\n Mask: require('./Mask'),\r\n Origin: require('./Origin'),\r\n PathFollower: require('./PathFollower'),\r\n Pipeline: require('./Pipeline'),\r\n PostPipeline: require('./PostPipeline'),\r\n ScrollFactor: require('./ScrollFactor'),\r\n Size: require('./Size'),\r\n Texture: require('./Texture'),\r\n TextureCrop: require('./TextureCrop'),\r\n Tint: require('./Tint'),\r\n ToJSON: require('./ToJSON'),\r\n Transform: require('./Transform'),\r\n TransformMatrix: require('./TransformMatrix'),\r\n Visible: require('./Visible')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = require('../../utils/array');\r\nvar BlendModes = require('../../renderer/BlendModes');\r\nvar Class = require('../../utils/Class');\r\nvar Components = require('../components');\r\nvar Events = require('../events');\r\nvar GameObject = require('../GameObject');\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar Render = require('./ContainerRender');\r\nvar Union = require('../../geom/rectangle/Union');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * The transform point of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\r\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\r\n * the Container, and position children positively and negative around it as required.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\r\n * or the input area will become misaligned.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.AlphaSingle\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.PostPipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.AlphaSingle,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.PostPipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {number}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.initPostPipeline();\r\n\r\n this.setPosition(x, y);\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {this} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\r\n\r\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\r\n }\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n var hasSetFirst = false;\r\n\r\n output.setEmpty();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n\r\n if (!hasSetFirst)\r\n {\r\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\r\n hasSetFirst = true;\r\n }\r\n else\r\n {\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.parentContainer = this;\r\n\r\n gameObject.removeFromDisplayList();\r\n\r\n gameObject.addedToScene();\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n\r\n gameObject.removedFromScene();\r\n\r\n gameObject.addToDisplayList();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n this.parentContainer.pointToContainer(source, output);\r\n }\r\n else\r\n {\r\n output.x = source.x;\r\n output.y = source.y;\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n *\r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {number} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {number} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {number} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {number} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object above another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveAbove\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveAbove: function (child1, child2)\r\n {\r\n ArrayUtils.MoveAbove(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object below another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveBelow\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveBelow: function (child1, child2)\r\n {\r\n ArrayUtils.MoveBelow(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var list = this.list;\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n if (list[i] && list[i].scene)\r\n {\r\n list[i].off(Events.DESTROY, this.remove, this);\r\n\r\n list[i].destroy();\r\n }\r\n }\r\n\r\n this.list = [];\r\n }\r\n else\r\n {\r\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [oldChild,newChild]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Container#setScrollFactor\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n if (container.mask)\r\n {\r\n container.mask.preRenderCanvas(renderer, null, camera);\r\n }\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n }\r\n\r\n if (container.mask)\r\n {\r\n container.mask.postRenderCanvas(renderer);\r\n }\r\n};\r\n\r\nmodule.exports = ContainerCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar NOOP = require('../../utils/NOOP');\r\nvar renderWebGL = NOOP;\r\nvar renderCanvas = NOOP;\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./ContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./ContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderWebGL\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n var childCount = children.length;\r\n\r\n if (childCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n renderer.pipelines.preBatch(container);\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container.alpha;\r\n\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlphaTopLeft;\r\n var childAlphaTopRight;\r\n var childAlphaBottomLeft;\r\n var childAlphaBottomRight;\r\n\r\n if (child.alphaTopLeft !== undefined)\r\n {\r\n childAlphaTopLeft = child.alphaTopLeft;\r\n childAlphaTopRight = child.alphaTopRight;\r\n childAlphaBottomLeft = child.alphaBottomLeft;\r\n childAlphaBottomRight = child.alphaBottomRight;\r\n }\r\n else\r\n {\r\n var childAlpha = child.alpha;\r\n\r\n childAlphaTopLeft = childAlpha;\r\n childAlphaTopRight = childAlpha;\r\n childAlphaBottomLeft = childAlpha;\r\n childAlphaBottomRight = childAlpha;\r\n }\r\n\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n mask.preRenderWebGL(renderer, child, camera);\r\n }\r\n\r\n var type = child.type;\r\n\r\n if (type !== renderer.currentType)\r\n {\r\n renderer.newType = true;\r\n renderer.currentType = type;\r\n }\r\n\r\n renderer.nextTypeMatch = (i < childCount - 1) ? (children[i + 1].type === renderer.currentType) : false;\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n\r\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\r\n\r\n // Render\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n // Restore original values\r\n\r\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\r\n\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n\r\n if (mask)\r\n {\r\n mask.postRenderWebGL(renderer, camera);\r\n }\r\n\r\n renderer.newType = false;\r\n }\r\n\r\n renderer.pipelines.postBatch(container);\r\n};\r\n\r\nmodule.exports = ContainerWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n *\r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n *\r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n *\r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n *\r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n *\r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {number} width - The width of the video.\r\n * @param {number} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n *\r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {DOMException|string} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Locked Event.\r\n *\r\n * This event is dispatched when a Video was attempted to be played, but the browser prevented it\r\n * from doing so due to the Media Engagement Interaction policy.\r\n *\r\n * If you get this event you will need to wait for the user to interact with the browser before\r\n * the video will play. This is a browser security measure to prevent autoplaying videos with\r\n * audio. An interaction includes a mouse click, a touch, or a key press.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('locked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOCKED\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'locked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n *\r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n *\r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Playing Event.\r\n *\r\n * The playing event is fired after playback is first started,\r\n * and whenever it is restarted. For example it is fired when playback\r\n * resumes after having been paused or delayed due to lack of data.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('playing', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAYING\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'playing';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n *\r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n *\r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n *\r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stalled Event.\r\n *\r\n * This event is dispatched by a Video Game Object when the video playback stalls.\r\n *\r\n * This can happen if the video is buffering.\r\n *\r\n * If will fire for any of the following native DOM events:\r\n *\r\n * `stalled`\r\n * `suspend`\r\n * `waiting`\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('stalled', listener)`.\r\n *\r\n * Note that being stalled isn't always a negative thing. A video can be stalled if it\r\n * has downloaded enough data in to its buffer to not need to download any more until\r\n * the current batch of frames have rendered.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STALLED\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'stalled';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n *\r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Texture Ready Event.\r\n *\r\n * This event is dispatched by a Video Game Object when it has finished creating its texture.\r\n *\r\n * This happens when the video has finished loading enough data for its first frame.\r\n *\r\n * If you wish to use the Video texture elsewhere in your game, such as as a Sprite texture,\r\n * then you should listen for this event first, before creating the Sprites that use it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('textureready', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TEXTURE\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object that emitted the event.\r\n * @param {Phaser.Textures.Texture} texture - The Texture that was created.\r\n */\r\nmodule.exports = 'textureready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n *\r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unsupported Event.\r\n *\r\n * This event is dispatched by a Video Game Object if the media source\r\n * (which may be specified as a MediaStream, MediaSource, Blob, or File,\r\n * for example) doesn't represent a supported media format.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('unsupported', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNSUPPORTED\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n * @param {DOMException|string} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'unsupported';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\r\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\r\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\r\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\r\n VIDEO_LOCKED: require('./VIDEO_LOCKED_EVENT'),\r\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\r\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\r\n VIDEO_PLAYING: require('./VIDEO_PLAYING_EVENT'),\r\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\r\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\r\n VIDEO_STALLED: require('./VIDEO_STALLED_EVENT'),\r\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\r\n VIDEO_TEXTURE: require('./VIDEO_TEXTURE_EVENT'),\r\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT'),\r\n VIDEO_UNSUPPORTED: require('./VIDEO_UNSUPPORTED_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n *\r\n * @name Phaser.Geom.CIRCLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n *\r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n *\r\n * @name Phaser.Geom.LINE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n *\r\n * @name Phaser.Geom.POINT\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n *\r\n * @name Phaser.Geom.POLYGON\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = require('./Length');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Random = require('./Random');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GEOM_CONST = require('../const');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {this} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = require('./Perimeter');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = require('./GetPoint');\r\nvar Perimeter = require('./Perimeter');\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\r\n * @param {number} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Contains = require('./Contains');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Line = require('../line/Line');\r\nvar Random = require('./Random');\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('./Rectangle');\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\nvar GetURL = require('./GetURL');\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\nvar XHRLoader = require('./XHRLoader');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * @classdesc\r\n * The base File class used by all File Types that the Loader can support.\r\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class File\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\r\n */\r\nvar File = new Class({\r\n\r\n initialize:\r\n\r\n function File (loader, fileConfig)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.File#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\r\n *\r\n * @name Phaser.Loader.File#cache\r\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\r\n * @since 3.7.0\r\n */\r\n this.cache = GetFastValue(fileConfig, 'cache', false);\r\n\r\n /**\r\n * The file type string (image, json, etc) for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.File#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(fileConfig, 'type', false);\r\n\r\n if (!this.type)\r\n {\r\n throw new Error('Invalid File type: ' + this.type);\r\n }\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.File#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = GetFastValue(fileConfig, 'key', false);\r\n\r\n var loadKey = this.key;\r\n\r\n if (loader.prefix && loader.prefix !== '')\r\n {\r\n this.key = loader.prefix + loadKey;\r\n }\r\n\r\n if (!this.key)\r\n {\r\n throw new Error('Invalid File key: ' + this.key);\r\n }\r\n\r\n var url = GetFastValue(fileConfig, 'url');\r\n\r\n if (url === undefined)\r\n {\r\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n url = loader.path + url;\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n *\r\n * Automatically has Loader.path prepended to it if a string.\r\n *\r\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {object|string}\r\n * @since 3.0.0\r\n */\r\n this.url = url;\r\n\r\n /**\r\n * The final URL this file will load from, including baseURL and path.\r\n * Set automatically when the Loader calls 'load' on this file.\r\n *\r\n * @name Phaser.Loader.File#src\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.src = '';\r\n\r\n /**\r\n * The merged XHRSettings for this file.\r\n *\r\n * @name Phaser.Loader.File#xhrSettings\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\r\n\r\n if (GetFastValue(fileConfig, 'xhrSettings', false))\r\n {\r\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\r\n }\r\n\r\n /**\r\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\r\n *\r\n * @name Phaser.Loader.File#xhrLoader\r\n * @type {?XMLHttpRequest}\r\n * @since 3.0.0\r\n */\r\n this.xhrLoader = null;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.File#state\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\r\n\r\n /**\r\n * The total size of this file.\r\n * Set by onProgress and only if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesTotal\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bytesTotal = 0;\r\n\r\n /**\r\n * Updated as the file loads.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesLoaded\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.bytesLoaded = -1;\r\n\r\n /**\r\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#percentComplete\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.percentComplete = -1;\r\n\r\n /**\r\n * For CORs based loading.\r\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\r\n *\r\n * @name Phaser.Loader.File#crossOrigin\r\n * @type {(string|undefined)}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = undefined;\r\n\r\n /**\r\n * The processed file data, stored here after the file has loaded.\r\n *\r\n * @name Phaser.Loader.File#data\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.data = undefined;\r\n\r\n /**\r\n * A config object that can be used by file types to store transitional data.\r\n *\r\n * @name Phaser.Loader.File#config\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.config = GetFastValue(fileConfig, 'config', {});\r\n\r\n /**\r\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\r\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\r\n *\r\n * @name Phaser.Loader.File#multiFile\r\n * @type {?Phaser.Loader.MultiFile}\r\n * @since 3.7.0\r\n */\r\n this.multiFile;\r\n\r\n /**\r\n * Does this file have an associated linked file? Such as an image and a normal map.\r\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\r\n * actually bound by data, where-as a linkFile is.\r\n *\r\n * @name Phaser.Loader.File#linkFile\r\n * @type {?Phaser.Loader.File}\r\n * @since 3.7.0\r\n */\r\n this.linkFile;\r\n },\r\n\r\n /**\r\n * Links this File with another, so they depend upon each other for loading and processing.\r\n *\r\n * @method Phaser.Loader.File#setLink\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\r\n */\r\n setLink: function (fileB)\r\n {\r\n this.linkFile = fileB;\r\n\r\n fileB.linkFile = this;\r\n },\r\n\r\n /**\r\n * Resets the XHRLoader instance this file is using.\r\n *\r\n * @method Phaser.Loader.File#resetXHR\r\n * @since 3.0.0\r\n */\r\n resetXHR: function ()\r\n {\r\n if (this.xhrLoader)\r\n {\r\n this.xhrLoader.onload = undefined;\r\n this.xhrLoader.onerror = undefined;\r\n this.xhrLoader.onprogress = undefined;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.File#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\r\n this.loader.nextFile(this, true);\r\n }\r\n else\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n // The creation of this XHRLoader starts the load process going.\r\n // It will automatically call the following, based on the load outcome:\r\n //\r\n // xhr.onload = this.onLoad\r\n // xhr.onerror = this.onError\r\n // xhr.onprogress = this.onProgress\r\n\r\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onLoad\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\r\n */\r\n onLoad: function (xhr, event)\r\n {\r\n var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\r\n {\r\n return xhr.responseURL.indexOf(scheme) === 0;\r\n });\r\n\r\n var localFileOk = (isLocalFile && event.target.status === 0);\r\n\r\n var success = !(event.target && event.target.status !== 200) || localFileOk;\r\n\r\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\r\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\r\n {\r\n success = false;\r\n }\r\n\r\n this.state = CONST.FILE_LOADED;\r\n\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, success);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onError\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\r\n */\r\n onError: function ()\r\n {\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n *\r\n * @param {ProgressEvent} event - The DOM ProgressEvent.\r\n */\r\n onProgress: function (event)\r\n {\r\n if (event.lengthComputable)\r\n {\r\n this.bytesLoaded = event.loaded;\r\n this.bytesTotal = event.total;\r\n\r\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\r\n *\r\n * @method Phaser.Loader.File#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessComplete\r\n * @since 3.7.0\r\n */\r\n onProcessComplete: function ()\r\n {\r\n this.state = CONST.FILE_COMPLETE;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileComplete(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing but it generated an error.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessError\r\n * @since 3.7.0\r\n */\r\n onProcessError: function ()\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\r\n\r\n this.state = CONST.FILE_ERRORED;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileFailed(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Checks if a key matching the one used by this file exists in the target Cache or not.\r\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\r\n * loaded or will conflict.\r\n *\r\n * @method Phaser.Loader.File#hasCacheConflict\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\r\n */\r\n hasCacheConflict: function ()\r\n {\r\n return (this.cache && this.cache.exists(this.key));\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n * This method is often overridden by specific file types.\r\n *\r\n * @method Phaser.Loader.File#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.cache && this.data)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\r\n },\r\n\r\n /**\r\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.File#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.7.0\r\n */\r\n pendingDestroy: function (data)\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n if (data === undefined) { data = this.data; }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this File and any references it holds.\r\n *\r\n * @method Phaser.Loader.File#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.cache = null;\r\n this.xhrSettings = null;\r\n this.multiFile = null;\r\n this.linkFile = null;\r\n this.data = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\r\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\r\n *\r\n * @method Phaser.Loader.File.createObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\r\n * @param {Blob} blob - A Blob object to create an object URL for.\r\n * @param {string} defaultType - Default mime type used if blob type is not available.\r\n */\r\nFile.createObjectURL = function (image, blob, defaultType)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n image.src = URL.createObjectURL(blob);\r\n }\r\n else\r\n {\r\n var reader = new FileReader();\r\n\r\n reader.onload = function ()\r\n {\r\n image.removeAttribute('crossOrigin');\r\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\r\n };\r\n\r\n reader.onerror = image.onerror;\r\n\r\n reader.readAsDataURL(blob);\r\n }\r\n};\r\n\r\n/**\r\n * Static method for releasing an existing object URL which was previously created\r\n * by calling {@link File#createObjectURL} method.\r\n *\r\n * @method Phaser.Loader.File.revokeObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\r\n */\r\nFile.revokeObjectURL = function (image)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n URL.revokeObjectURL(image.src);\r\n }\r\n};\r\n\r\nmodule.exports = File;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n *\r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n *\r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n *\r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n var finalFiles = [];\r\n\r\n // Clean out any potential 'null' or 'undefined' file entries\r\n files.forEach(function (file)\r\n {\r\n if (file)\r\n {\r\n finalFiles.push(file);\r\n }\r\n });\r\n\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {number}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = finalFiles;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.MultiFile#state\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.state = CONST.FILE_PENDING;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {number}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = finalFiles.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < finalFiles.length; i++)\r\n {\r\n finalFiles[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n\r\n // eslint-disable-next-line no-console\r\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\r\n }\r\n },\r\n\r\n /**\r\n * Called once all children of this multi file have been added to their caches and is now\r\n * ready for deletion from the Loader.\r\n *\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.MultiFile#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.60.0\r\n */\r\n pendingDestroy: function ()\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n for (var i = 0; i < this.files.length; i++)\r\n {\r\n this.files[i].pendingDestroy();\r\n }\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this Multi File and any references it holds.\r\n *\r\n * @method Phaser.Loader.MultiFile#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.files = null;\r\n this.config = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {number} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n *\r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n *\r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n *\r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n *\r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n *\r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n *\r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n *\r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing.\r\n *\r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load.\r\n *\r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n *\r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n *\r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n *\r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request.\r\n *\r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19,\r\n\r\n /**\r\n * File is pending being destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING_DESTROY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n FILE_PENDING_DESTROY: 20\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n *\r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n *\r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n *\r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {number} totalComplete - The total number of files that successfully loaded.\r\n * @param {number} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n *\r\n * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n *\r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n *\r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n *\r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n *\r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n *\r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n *\r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n *\r\n * This event is dispatched even if there aren't any files in the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\nvar GetURL = require('../GetURL');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n\r\n this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\r\n\r\n if (this.useImageElementLoad)\r\n {\r\n this.load = this.loadImage;\r\n this.onProcess = this.onProcessImage;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Handles image load processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n onProcessImage: function ()\r\n {\r\n var result = this.state;\r\n\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n if (result === CONST.FILE_LOADED)\r\n {\r\n this.onProcessComplete();\r\n }\r\n else\r\n {\r\n this.onProcessError();\r\n }\r\n },\r\n\r\n /**\r\n * Loads the image using either XHR or an Image tag.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n loadImage: function ()\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n _this.state = CONST.FILE_LOADED;\r\n\r\n _this.loader.nextFile(_this, true);\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n _this.loader.nextFile(_this, false);\r\n };\r\n\r\n this.data.src = this.src;\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n // Check if we have a linked normal map\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile)\r\n {\r\n // We do, but has it loaded?\r\n if (linkFile.state >= CONST.FILE_COMPLETE)\r\n {\r\n // Both files have loaded\r\n if (this.type === 'normalMap')\r\n {\r\n // linkFile.data = Image\r\n // this.data = Normal Map\r\n this.cache.addImage(this.key, linkFile.data, this.data);\r\n }\r\n else\r\n {\r\n // linkFile.data = Normal Map\r\n // this.data = Image\r\n this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n }\r\n\r\n // Nothing to do here, we'll use the linkFile `addToCache` call\r\n // to process this pair\r\n }\r\n else\r\n {\r\n this.cache.addImage(this.key, this.data);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\r\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\r\n * via the Image tag instead.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\r\n *\r\n * @class JSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar JSONFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function JSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n var extension = 'json';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataKey = GetFastValue(config, 'dataKey', dataKey);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'json',\r\n cache: loader.cacheManager.json,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: dataKey\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\r\n if (IsPlainObject(url))\r\n {\r\n if (dataKey)\r\n {\r\n this.data = GetValue(url, dataKey);\r\n }\r\n else\r\n {\r\n this.data = url;\r\n }\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n try\r\n {\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n catch (e)\r\n {\r\n this.onProcessError();\r\n\r\n throw e;\r\n }\r\n\r\n var key = this.config;\r\n\r\n if (typeof key === 'string')\r\n {\r\n this.data = GetValue(json, key, json);\r\n }\r\n else\r\n {\r\n this.data = json;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON file, or array of JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.json({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n *\r\n * ```json\r\n * {\r\n * \"level1\": {\r\n * \"baddies\": {\r\n * \"aliens\": {},\r\n * \"boss\": {}\r\n * }\r\n * },\r\n * \"level2\": {},\r\n * \"level3\": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#json\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new JSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = JSONFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var type = 'text';\r\n var extension = 'txt';\r\n var cache = loader.cacheManager.text;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n type = GetFastValue(config, 'type', type);\r\n cache = GetFastValue(config, 'cache', cache);\r\n }\r\n\r\n var fileConfig = {\r\n type: type,\r\n cache: cache,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {number} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\nvar Class = require('../utils/Class');\r\nvar Matrix4 = require('./Matrix4');\r\nvar NOOP = require('../utils/NOOP');\r\n\r\nvar tempMatrix = new Matrix4();\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Euler\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Euler = new Class({\r\n\r\n initialize:\r\n\r\n function Euler (x, y, z, order)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (z === undefined) { z = 0; }\r\n if (order === undefined) { order = Euler.DefaultOrder; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback = NOOP;\r\n },\r\n\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n order: {\r\n get: function ()\r\n {\r\n return this._order;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._order = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n set: function (x, y, z, order)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n copy: function (euler)\r\n {\r\n return this.set(euler.x, euler.y, euler.z, euler.order);\r\n },\r\n\r\n setFromQuaternion: function (quaternion, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n tempMatrix.fromQuat(quaternion);\r\n\r\n return this.setFromRotationMatrix(tempMatrix, order, update);\r\n },\r\n\r\n setFromRotationMatrix: function (matrix, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n var elements = matrix.val;\r\n\r\n // Upper 3x3 of matrix is un-scaled rotation matrix\r\n var m11 = elements[0];\r\n var m12 = elements[4];\r\n var m13 = elements[8];\r\n var m21 = elements[1];\r\n var m22 = elements[5];\r\n var m23 = elements[9];\r\n var m31 = elements[2];\r\n var m32 = elements[6];\r\n var m33 = elements[10];\r\n\r\n var x = 0;\r\n var y = 0;\r\n var z = 0;\r\n var epsilon = 0.99999;\r\n\r\n switch (order)\r\n {\r\n case 'XYZ':\r\n {\r\n y = Math.asin(Clamp(m13, -1, 1));\r\n\r\n if (Math.abs(m13) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m33);\r\n z = Math.atan2(-m12, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(m32, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n x = Math.asin(-Clamp(m23, -1, 1));\r\n\r\n if (Math.abs(m23) < epsilon)\r\n {\r\n y = Math.atan2(m13, m33);\r\n z = Math.atan2(m21, m22);\r\n }\r\n else\r\n {\r\n y = Math.atan2(-m31, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n x = Math.asin(Clamp(m32, -1, 1));\r\n\r\n if (Math.abs(m32) < epsilon)\r\n {\r\n y = Math.atan2(-m31, m33);\r\n z = Math.atan2(-m12, m22);\r\n }\r\n else\r\n {\r\n z = Math.atan2(m21, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n y = Math.asin(-Clamp(m31, -1, 1));\r\n\r\n if (Math.abs(m31) < epsilon)\r\n {\r\n x = Math.atan2(m32, m33);\r\n z = Math.atan2(m21, m11);\r\n }\r\n else\r\n {\r\n z = Math.atan2(-m12, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n z = Math.asin(Clamp(m21, -1, 1));\r\n\r\n if (Math.abs(m21) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m22);\r\n y = Math.atan2(-m31, m11);\r\n }\r\n else\r\n {\r\n y = Math.atan2(m13, m33);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n z = Math.asin(-Clamp(m12, -1, 1));\r\n\r\n if (Math.abs(m12) < epsilon)\r\n {\r\n x = Math.atan2(m32, m22);\r\n y = Math.atan2(m13, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(-m23, m33);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\r\n\r\nEuler.DefaultOrder = 'XYZ';\r\n\r\nmodule.exports = Euler;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent + min;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {number} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Greg McLean \r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Interpolates two given Vectors and returns a new Vector between them.\r\n *\r\n * Does not modify either of the passed Vectors.\r\n *\r\n * @function Phaser.Math.LinearXY\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\r\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\r\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\r\n */\r\nvar LinearXY = function (vector1, vector2, t)\r\n{\r\n if (t === undefined) { t = 0; }\r\n\r\n return vector1.clone().lerp(vector2, t);\r\n};\r\n\r\nmodule.exports = LinearXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Sets all values of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#setValues\r\n * @since 3.50.0\r\n *\r\n * @param {number} m00 - The m00 value.\r\n * @param {number} m01 - The m01 value.\r\n * @param {number} m02 - The m02 value.\r\n * @param {number} m03 - The m03 value.\r\n * @param {number} m10 - The m10 value.\r\n * @param {number} m11 - The m11 value.\r\n * @param {number} m12 - The m12 value.\r\n * @param {number} m13 - The m13 value.\r\n * @param {number} m20 - The m20 value.\r\n * @param {number} m21 - The m21 value.\r\n * @param {number} m22 - The m22 value.\r\n * @param {number} m23 - The m23 value.\r\n * @param {number} m30 - The m30 value.\r\n * @param {number} m31 - The m31 value.\r\n * @param {number} m32 - The m32 value.\r\n * @param {number} m33 - The m33 value.\r\n *\r\n * @return {this} This Matrix4 instance.\r\n */\r\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = m00;\r\n out[1] = m01;\r\n out[2] = m02;\r\n out[3] = m03;\r\n out[4] = m10;\r\n out[5] = m11;\r\n out[6] = m12;\r\n out[7] = m13;\r\n out[8] = m20;\r\n out[9] = m21;\r\n out[10] = m22;\r\n out[11] = m23;\r\n out[12] = m30;\r\n out[13] = m31;\r\n out[14] = m32;\r\n out[15] = m33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var a = src.val;\r\n\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} a - The array to copy the values from. Must have at least 16 elements.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Generates a transform matrix based on the given position, scale and rotation.\r\n *\r\n * @method Phaser.Math.Matrix4#transform\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {Phaser.Math.Vector3} scale - The scale vector.\r\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transform: function (position, scale, rotation)\r\n {\r\n var rotMatrix = _tempMat1.fromQuat(rotation);\r\n\r\n var rm = rotMatrix.val;\r\n\r\n var sx = scale.x;\r\n var sy = scale.y;\r\n var sz = scale.z;\r\n\r\n return this.setValues(\r\n rm[0] * sx,\r\n rm[1] * sx,\r\n rm[2] * sx,\r\n 0,\r\n\r\n rm[4] * sy,\r\n rm[5] * sy,\r\n rm[6] * sy,\r\n 0,\r\n\r\n rm[8] * sz,\r\n rm[9] * sz,\r\n rm[10] * sz,\r\n 0,\r\n\r\n position.x,\r\n position.y,\r\n position.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies the given Matrix4 into this Matrix and then inverses it.\r\n *\r\n * @method Phaser.Math.Matrix4#getInverse\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n getInverse: function (m)\r\n {\r\n this.copy(m);\r\n\r\n return this.invert();\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return this;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n return this.setValues(\r\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\r\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\r\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\r\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\r\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\r\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\r\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\r\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\r\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\r\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\r\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\r\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\r\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\r\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\r\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\r\n (a20 * b03 - a21 * b01 + a22 * b00) * det\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n return this.setValues(\r\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\r\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\r\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\r\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\r\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\r\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\r\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\r\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\r\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\r\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\r\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\r\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\r\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\r\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\r\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\r\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n return this.setValues(\r\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\r\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\r\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\r\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\r\n\r\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\r\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\r\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\r\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\r\n\r\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\r\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\r\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\r\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\r\n\r\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\r\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\r\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\r\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\r\n );\r\n },\r\n\r\n /**\r\n * Multiplies the given Matrix4 object with this Matrix.\r\n *\r\n * This is the same as calling `multiplyMatrices(m, this)`.\r\n *\r\n * @method Phaser.Math.Matrix4#premultiply\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n premultiply: function (m)\r\n {\r\n return this.multiplyMatrices(m, this);\r\n },\r\n\r\n /**\r\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyMatrices\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\r\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyMatrices: function (a, b)\r\n {\r\n var am = a.val;\r\n var bm = b.val;\r\n\r\n var a11 = am[0];\r\n var a12 = am[4];\r\n var a13 = am[8];\r\n var a14 = am[12];\r\n var a21 = am[1];\r\n var a22 = am[5];\r\n var a23 = am[9];\r\n var a24 = am[13];\r\n var a31 = am[2];\r\n var a32 = am[6];\r\n var a33 = am[10];\r\n var a34 = am[14];\r\n var a41 = am[3];\r\n var a42 = am[7];\r\n var a43 = am[11];\r\n var a44 = am[15];\r\n\r\n var b11 = bm[0];\r\n var b12 = bm[4];\r\n var b13 = bm[8];\r\n var b14 = bm[12];\r\n var b21 = bm[1];\r\n var b22 = bm[5];\r\n var b23 = bm[9];\r\n var b24 = bm[13];\r\n var b31 = bm[2];\r\n var b32 = bm[6];\r\n var b33 = bm[10];\r\n var b34 = bm[14];\r\n var b41 = bm[3];\r\n var b42 = bm[7];\r\n var b43 = bm[11];\r\n var b44 = bm[15];\r\n\r\n return this.setValues(\r\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\r\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\r\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\r\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\r\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\r\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\r\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\r\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\r\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\r\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\r\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\r\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\r\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\r\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\r\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\r\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\r\n );\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n return this.translateXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n return this.scaleXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n return this.setValues(\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n );\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return this;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n return this.setValues(\r\n a00 * b00 + a10 * b01 + a20 * b02,\r\n a01 * b00 + a11 * b01 + a21 * b02,\r\n a02 * b00 + a12 * b01 + a22 * b02,\r\n a03 * b00 + a13 * b01 + a23 * b02,\r\n a00 * b10 + a10 * b11 + a20 * b12,\r\n a01 * b10 + a11 * b11 + a21 * b12,\r\n a02 * b10 + a12 * b11 + a22 * b12,\r\n a03 * b10 + a13 * b11 + a23 * b12,\r\n a00 * b20 + a10 * b21 + a20 * b22,\r\n a01 * b20 + a11 * b21 + a21 * b22,\r\n a02 * b20 + a12 * b21 + a22 * b22,\r\n a03 * b20 + a13 * b21 + a23 * b22,\r\n a30, a31, a32, a33\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n v.x,\r\n v.y,\r\n v.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 0,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n (near * 2) * rl,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (near * 2) * tb,\r\n 0,\r\n 0,\r\n\r\n (right + left) * rl,\r\n (top + bottom) * tb,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (far * near * 2) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n f / aspect,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n f,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (2 * far * near) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n return this.setValues(\r\n (2 * near) / width,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (2 * near) / height,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n -far / (near - far),\r\n 1,\r\n\r\n 0,\r\n 0,\r\n (near * far) / (near - far),\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n return this.setValues(\r\n -2 * lr,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n -2 * bt,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 2 * nf,\r\n 0,\r\n\r\n (left + right) * lr,\r\n (top + bottom) * bt,\r\n (far + near) * nf,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAtRH\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\r\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAtRH: function (eye, target, up)\r\n {\r\n var m = this.val;\r\n\r\n _z.subVectors(eye, target);\r\n\r\n if (_z.getLengthSquared() === 0)\r\n {\r\n // eye and target are in the same position\r\n _z.z = 1;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n\r\n if (_x.getLengthSquared() === 0)\r\n {\r\n // up and z are parallel\r\n\r\n if (Math.abs(up.z) === 1)\r\n {\r\n _z.x += 0.0001;\r\n }\r\n else\r\n {\r\n _z.z += 0.0001;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n }\r\n\r\n _x.normalize();\r\n _y.crossVectors(_z, _x);\r\n\r\n m[0] = _x.x;\r\n m[1] = _x.y;\r\n m[2] = _x.z;\r\n m[4] = _y.x;\r\n m[5] = _y.y;\r\n m[6] = _y.z;\r\n m[8] = _z.x;\r\n m[9] = _z.y;\r\n m[10] = _z.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n return this.setValues(\r\n x0,\r\n y0,\r\n z0,\r\n 0,\r\n\r\n x1,\r\n y1,\r\n z1,\r\n 0,\r\n\r\n x2,\r\n y2,\r\n z2,\r\n 0,\r\n\r\n -(x0 * eyex + x1 * eyey + x2 * eyez),\r\n -(y0 * eyex + y1 * eyey + y2 * eyez),\r\n -(z0 * eyex + z1 * eyey + z2 * eyez),\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyToMat4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\r\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\r\n */\r\n multiplyToMat4: function (src, out)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b03 = b[3];\r\n var b10 = b[4];\r\n var b11 = b[5];\r\n var b12 = b[6];\r\n var b13 = b[7];\r\n var b20 = b[8];\r\n var b21 = b[9];\r\n var b22 = b[10];\r\n var b23 = b[11];\r\n var b30 = b[12];\r\n var b31 = b[13];\r\n var b32 = b[14];\r\n var b33 = b[15];\r\n\r\n return out.setValues(\r\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\r\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\r\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\r\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\r\n\r\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\r\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\r\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\r\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\r\n\r\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\r\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\r\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\r\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\r\n\r\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\r\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\r\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\r\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\r\n );\r\n },\r\n\r\n /**\r\n * Takes the rotation and position vectors and builds this Matrix4 from them.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationXYTranslation: function (rotation, position, translateFirst)\r\n {\r\n var x = position.x;\r\n var y = position.y;\r\n var z = position.z;\r\n\r\n var sx = Math.sin(rotation.x);\r\n var cx = Math.cos(rotation.x);\r\n\r\n var sy = Math.sin(rotation.y);\r\n var cy = Math.cos(rotation.y);\r\n\r\n var a30 = x;\r\n var a31 = y;\r\n var a32 = z;\r\n\r\n // Rotate X\r\n\r\n var b21 = -sx;\r\n\r\n // Rotate Y\r\n\r\n var c01 = 0 - b21 * sy;\r\n\r\n var c02 = 0 - cx * sy;\r\n\r\n var c21 = b21 * cy;\r\n\r\n var c22 = cx * cy;\r\n\r\n // Translate\r\n if (!translateFirst)\r\n {\r\n // a30 = cy * x + 0 * y + sy * z;\r\n a30 = cy * x + sy * z;\r\n a31 = c01 * x + cx * y + c21 * z;\r\n a32 = c02 * x + sx * y + c22 * z;\r\n }\r\n\r\n return this.setValues(\r\n cy,\r\n c01,\r\n c02,\r\n 0,\r\n 0,\r\n cx,\r\n sx,\r\n 0,\r\n sy,\r\n c21,\r\n c22,\r\n 0,\r\n a30,\r\n a31,\r\n a32,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Returns the maximum axis scale from this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\r\n * @since 3.50.0\r\n *\r\n * @return {number} The maximum axis scale.\r\n */\r\n getMaxScaleOnAxis: function ()\r\n {\r\n var m = this.val;\r\n\r\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\r\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\r\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\r\n\r\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat1 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat2 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _x = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _y = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _z = new Vector3();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Vladislav Forsh \r\n * @copyright 2021 RoboWhale\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\r\n * In case of an even number of values, the average of the two middle values is returned.\r\n *\r\n * @function Phaser.Math.Median\r\n * @since 3.54.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The median value.\r\n */\r\nvar Median = function (values)\r\n{\r\n var valuesNum = values.length;\r\n if (valuesNum === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n values.sort(function (a, b) { return a - b; });\r\n\r\n var halfIndex = Math.floor(valuesNum / 2);\r\n\r\n return valuesNum % 2 === 0\r\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\r\n : values[halfIndex];\r\n};\r\n\r\nmodule.exports = Median;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Matrix3 = require('./Matrix3');\r\nvar NOOP = require('../utils/NOOP');\r\nvar Vector3 = require('./Vector3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x component.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=1] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_x\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_y\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_z\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_w\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * This callback is invoked, if set, each time a value in this quaternion is changed.\r\n * The callback is passed one argument, a reference to this quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#onChangeCallback\r\n * @type {function}\r\n * @since 3.50.0\r\n */\r\n this.onChangeCallback = NOOP;\r\n\r\n this.set(x, y, z, w);\r\n },\r\n\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: {\r\n get: function ()\r\n {\r\n return this._w;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._w = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n return this.set(src);\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n * @param {boolean} [update=true] - Call the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w, update)\r\n {\r\n if (update === undefined) { update = true; }\r\n\r\n if (typeof x === 'object')\r\n {\r\n this._x = x.x || 0;\r\n this._y = x.y || 0;\r\n this._z = x.z || 0;\r\n this._w = x.w || 0;\r\n }\r\n else\r\n {\r\n this._x = x || 0;\r\n this._y = y || 0;\r\n this._z = z || 0;\r\n this._w = w || 0;\r\n }\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this._x += v.x;\r\n this._y += v.y;\r\n this._z += v.z;\r\n this._w += v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this._x -= v.x;\r\n this._y -= v.y;\r\n this._z -= v.z;\r\n this._w -= v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this._x *= scale;\r\n this._y *= scale;\r\n this._z *= scale;\r\n this._w *= scale;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this._x = x * len;\r\n this._y = y * len;\r\n this._z = z * len;\r\n this._w = w * len;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n return this.set(\r\n ax + t * (v.x - ax),\r\n ay + t * (v.y - ay),\r\n az + t * (v.z - az),\r\n aw + t * (v.w - aw)\r\n );\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n return this.set(0, 0, 0, 1);\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this._x = tmpvec.x;\r\n this._y = tmpvec.y;\r\n this._z = tmpvec.z;\r\n this._w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n return this.set(0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n return this.set(\r\n s * axis.x,\r\n s * axis.y,\r\n s * axis.z,\r\n Math.cos(rad)\r\n );\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n return this.set(\r\n ax * bw + aw * bx + ay * bz - az * by,\r\n ay * bw + aw * by + az * bx - ax * bz,\r\n az * bw + aw * bz + ax * by - ay * bx,\r\n aw * bw - ax * bx - ay * by - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n return this.set(\r\n scale0 * ax + scale1 * bx,\r\n scale0 * ay + scale1 * by,\r\n scale0 * az + scale1 * bz,\r\n scale0 * aw + scale1 * bw\r\n );\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n return this.set(\r\n -a0 * invDot,\r\n -a1 * invDot,\r\n -a2 * invDot,\r\n a3 * invDot\r\n );\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this._x = -this.x;\r\n this._y = -this.y;\r\n this._z = -this.z;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + aw * bx,\r\n ay * bw + az * bx,\r\n az * bw - ay * bx,\r\n aw * bw - ax * bx\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw - az * by,\r\n ay * bw + aw * by,\r\n az * bw + ax * by,\r\n aw * bw - ay * by\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + ay * bz,\r\n ay * bw - ax * bz,\r\n az * bw + aw * bz,\r\n aw * bw - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set this Quaternion from the given Euler, based on Euler order.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromEuler\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\r\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromEuler: function (euler, update)\r\n {\r\n var x = euler.x / 2;\r\n var y = euler.y / 2;\r\n var z = euler.z / 2;\r\n\r\n var c1 = Math.cos(x);\r\n var c2 = Math.cos(y);\r\n var c3 = Math.cos(z);\r\n\r\n var s1 = Math.sin(x);\r\n var s2 = Math.sin(y);\r\n var s3 = Math.sin(z);\r\n\r\n switch (euler.order)\r\n {\r\n case 'XYZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Quaternion from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromRotationMatrix: function (mat4)\r\n {\r\n var m = mat4.val;\r\n\r\n var m11 = m[0];\r\n var m12 = m[4];\r\n var m13 = m[8];\r\n var m21 = m[1];\r\n var m22 = m[5];\r\n var m23 = m[9];\r\n var m31 = m[2];\r\n var m32 = m[6];\r\n var m33 = m[10];\r\n\r\n var trace = m11 + m22 + m33;\r\n var s;\r\n\r\n if (trace > 0)\r\n {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n this.set(\r\n (m32 - m23) * s,\r\n (m13 - m31) * s,\r\n (m21 - m12) * s,\r\n 0.25 / s\r\n );\r\n }\r\n else if (m11 > m22 && m11 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n this.set(\r\n 0.25 * s,\r\n (m12 + m21) / s,\r\n (m13 + m31) / s,\r\n (m32 - m23) / s\r\n );\r\n }\r\n else if (m22 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n this.set(\r\n (m12 + m21) / s,\r\n 0.25 * s,\r\n (m23 + m32) / s,\r\n (m13 - m31) / s\r\n );\r\n }\r\n else\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n this.set(\r\n (m13 + m31) / s,\r\n (m23 + m32) / s,\r\n 0.25 * s,\r\n (m21 - m12) / s\r\n );\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this._x = (m[7] - m[5]) * fRoot;\r\n this._y = (m[2] - m[6]) * fRoot;\r\n this._z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this._x = tmp[0];\r\n this._y = tmp[1];\r\n this._z = tmp[2];\r\n this._w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {number} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n *\r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n *\r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n *\r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {number} index - The position within the grid to get the x/y value for.\r\n * @param {number} width - The width of the grid.\r\n * @param {number} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n }\r\n\r\n return out.set(x, y);\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y=x] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n },\r\n\r\n /**\r\n * Project this Vector onto another.\r\n *\r\n * @method Phaser.Math.Vector2#project\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n project: function (src)\r\n {\r\n var scalar = this.dot(src) / src.dot(src);\r\n\r\n return this.copy(src).scale(scalar);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.min` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#min\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n min: function (v)\r\n {\r\n this.x = Math.min(this.x, v.x);\r\n this.y = Math.min(this.y, v.y);\r\n this.z = Math.min(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#max\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n max: function (v)\r\n {\r\n this.x = Math.max(this.x, v.x);\r\n this.y = Math.max(this.y, v.y);\r\n this.z = Math.max(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Adds the two given Vector3s and sets the results into this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#addVectors\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addVectors: function (a, b)\r\n {\r\n this.x = a.x + b.x;\r\n this.y = a.y + b.y;\r\n this.z = a.z + b.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the position of the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixPosition\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixPosition: function (m)\r\n {\r\n return this.fromArray(m.val, 12);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the Matrix4 column specified.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixColumn\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\r\n * @param {number} index - The column index.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixColumn: function (mat4, index)\r\n {\r\n return this.fromArray(mat4.val, index * 4);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the given array, based on the offset.\r\n *\r\n * Vector3.x = array[offset]\r\n * Vector3.y = array[offset + 1]\r\n * Vector3.z = array[offset + 2]\r\n *\r\n * @method Phaser.Math.Vector3#fromArray\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} array - The array of values to get this Vector from.\r\n * @param {number} [offset=0] - The offset index into the array.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n fromArray: function (array, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.x = array[offset];\r\n this.y = array[offset + 1];\r\n this.z = array[offset + 2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add the given value to each component of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#addScalar\r\n * @since 3.50.0\r\n *\r\n * @param {number} s - The amount to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScalar: function (s)\r\n {\r\n this.x += s;\r\n this.y += s;\r\n this.z += s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add and scale a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#addScale\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n * @param {number} scale - The amount to scale `v` by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScale: function (v, scale)\r\n {\r\n this.x += v.x * scale;\r\n this.y += v.y * scale;\r\n this.z += v.z * scale || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix3 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix3\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix3: function (mat3)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat3.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6] * z;\r\n this.y = m[1] * x + m[4] * y + m[7] * z;\r\n this.z = m[2] * x + m[5] * y + m[8] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix4 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix4: function (mat4)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat4.val;\r\n\r\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\r\n\r\n this.x = (m[0] * x + m[4] * y + m[8] * z + m[12]) * w;\r\n this.y = (m[1] * x + m[5] * y + m[9] * z + m[13]) * w;\r\n this.z = (m[2] * x + m[6] * y + m[10] * z + m[14]) * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given view and projection matrices.\r\n *\r\n * @method Phaser.Math.Vector3#projectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n projectViewMatrix: function (viewMatrix, projectionMatrix)\r\n {\r\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\r\n *\r\n * @method Phaser.Math.Vector3#unprojectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\r\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\r\n {\r\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max`.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n if (value >= min && value <= max)\r\n {\r\n // Skip modulo if already in range\r\n return value;\r\n }\r\n\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n *\r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n *\r\n * Yes, we understand that this should actually be PI * 2, but\r\n * it has been like this for so long we can't change it now.\r\n * If you need PI * 2, use the PI2 constant instead.\r\n *\r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n *\r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n *\r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n *\r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n *\r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Euler: require('./Euler'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n LinearXY: require('./LinearXY'),\r\n MaxAdd: require('./MaxAdd'),\r\n Median: require('./Median'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {number} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n *\r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n *\r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n *\r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar corePlugins = {};\r\n\r\n// Contains the plugins that the dev has loaded into their game\r\n// These are the source objects, not instantiated.\r\nvar customPlugins = {};\r\n\r\nvar PluginCache = {};\r\n\r\n/**\r\n * @namespace Phaser.Plugins.PluginCache\r\n */\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @method Phaser.Plugins.PluginCache.register\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\r\n */\r\nPluginCache.register = function (key, plugin, mapping, custom)\r\n{\r\n if (custom === undefined) { custom = false; }\r\n\r\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\r\n};\r\n\r\n/**\r\n * Stores a custom plugin in the global plugin cache.\r\n * The key must be unique, within the scope of the cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.registerCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {?any} data - A value to be passed to the plugin's `init` method.\r\n */\r\nPluginCache.registerCustom = function (key, plugin, mapping, data)\r\n{\r\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the core plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\r\n */\r\nPluginCache.hasCore = function (key)\r\n{\r\n return corePlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the custom plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\r\n */\r\nPluginCache.hasCustom = function (key)\r\n{\r\n return customPlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Returns the core plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\r\n */\r\nPluginCache.getCore = function (key)\r\n{\r\n return corePlugins[key];\r\n};\r\n\r\n/**\r\n * Returns the custom plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\r\n */\r\nPluginCache.getCustom = function (key)\r\n{\r\n return customPlugins[key];\r\n};\r\n\r\n/**\r\n * Returns an object from the custom cache based on the given key that can be instantiated.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustomClass\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {function} The custom plugin object.\r\n */\r\nPluginCache.getCustomClass = function (key)\r\n{\r\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\r\n};\r\n\r\n/**\r\n * Removes a core plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.remove\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to remove.\r\n */\r\nPluginCache.remove = function (key)\r\n{\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes a custom plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.removeCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to remove.\r\n */\r\nPluginCache.removeCustom = function (key)\r\n{\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Core Plugins.\r\n *\r\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\r\n * So be sure you only call this if you do not wish to run Phaser again.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCorePlugins = function ()\r\n{\r\n for (var key in corePlugins)\r\n {\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Custom Plugins.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCustomPlugins = function ()\r\n{\r\n for (var key in customPlugins)\r\n {\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = PluginCache;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager, pluginKey)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The key under which this plugin was installed into the Scene Systems.\r\n *\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#pluginKey\r\n * @type {string}\r\n * @readonly\r\n * @since 3.54.0\r\n */\r\n this.pluginKey = pluginKey;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n *\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n *\r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n *\r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.ADD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n *\r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n *\r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n *\r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n *\r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n *\r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n *\r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n *\r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n *\r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n *\r\n * @name Phaser.BlendModes.HUE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n *\r\n * @name Phaser.BlendModes.ERASE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n *\r\n * @name Phaser.BlendModes.COPY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n *\r\n * @name Phaser.BlendModes.XOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Modes.\r\n *\r\n * @namespace Phaser.ScaleModes\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScaleModes = {\r\n\r\n /**\r\n * Default Scale Mode (Linear).\r\n *\r\n * @name Phaser.ScaleModes.DEFAULT\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n DEFAULT: 0,\r\n\r\n /**\r\n * Linear Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.LINEAR\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.NEAREST\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n\r\n};\r\n\r\nmodule.exports = ScaleModes;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n *\r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('boot', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#BOOT\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n *\r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n *\r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n *\r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('create', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#CREATE\r\n * @type {string}\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('destroy', listener)`.\r\n *\r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n *\r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n *\r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('pause', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('postupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author samme\r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre-Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_RENDER\r\n * @type {string}\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'prerender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('preupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('ready', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#READY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('render', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n *\r\n * @event Phaser.Scenes.Events#RENDER\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n *\r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('resume', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#RESUME\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('shutdown', listener)`.\r\n *\r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n *\r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n *\r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('sleep', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('start', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioncomplete', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioninit', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n *\r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionout', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n *\r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n *\r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionstart', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionwake', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists and the Scene is in a Running state, otherwise this is skipped.\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('update', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n *\r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('wake', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#WAKE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\r\n BOOT: require('./BOOT_EVENT'),\r\n CREATE: require('./CREATE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n PAUSE: require('./PAUSE_EVENT'),\r\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\r\n RENDER: require('./RENDER_EVENT'),\r\n RESUME: require('./RESUME_EVENT'),\r\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\r\n SLEEP: require('./SLEEP_EVENT'),\r\n START: require('./START_EVENT'),\r\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\r\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\r\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\r\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\r\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\r\n UPDATE: require('./UPDATE_EVENT'),\r\n WAKE: require('./WAKE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Clamp = require('../math/Clamp');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @classdesc\r\n * A Frame is a section of a Texture.\r\n *\r\n * @class Frame\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\r\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n */\r\nvar Frame = new Class({\r\n\r\n initialize:\r\n\r\n function Frame (texture, name, sourceIndex, x, y, width, height)\r\n {\r\n /**\r\n * The Texture this Frame is a part of.\r\n *\r\n * @name Phaser.Textures.Frame#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The name of this Frame.\r\n * The name is unique within the Texture.\r\n *\r\n * @name Phaser.Textures.Frame#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The TextureSource this Frame is part of.\r\n *\r\n * @name Phaser.Textures.Frame#source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @since 3.0.0\r\n */\r\n this.source = texture.source[sourceIndex];\r\n\r\n /**\r\n * The index of the TextureSource in the Texture sources array.\r\n *\r\n * @name Phaser.Textures.Frame#sourceIndex\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.sourceIndex = sourceIndex;\r\n\r\n /**\r\n * A reference to the Texture Source WebGL Texture that this Frame is using.\r\n *\r\n * @name Phaser.Textures.Frame#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this.glTexture = this.source.glTexture;\r\n\r\n /**\r\n * X position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutX;\r\n\r\n /**\r\n * Y position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutY;\r\n\r\n /**\r\n * The width of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutWidth;\r\n\r\n /**\r\n * The height of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutHeight;\r\n\r\n /**\r\n * The X rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The Y rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The rendering width of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width;\r\n\r\n /**\r\n * The rendering height of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height;\r\n\r\n /**\r\n * Half the width, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth;\r\n\r\n /**\r\n * Half the height, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight;\r\n\r\n /**\r\n * The x center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerX;\r\n\r\n /**\r\n * The y center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerY;\r\n\r\n /**\r\n * The horizontal pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotX = 0;\r\n\r\n /**\r\n * The vertical pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotY = 0;\r\n\r\n /**\r\n * Does this Frame have a custom pivot point?\r\n *\r\n * @name Phaser.Textures.Frame#customPivot\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customPivot = false;\r\n\r\n /**\r\n * **CURRENTLY UNSUPPORTED**\r\n *\r\n * Is this frame is rotated or not in the Texture?\r\n * Rotation allows you to use rotated frames in texture atlas packing.\r\n * It has nothing to do with Sprite rotation.\r\n *\r\n * @name Phaser.Textures.Frame#rotated\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rotated = false;\r\n\r\n /**\r\n * Over-rides the Renderer setting.\r\n * -1 = use Renderer Setting\r\n * 0 = No rounding\r\n * 1 = Round\r\n *\r\n * @name Phaser.Textures.Frame#autoRound\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.autoRound = -1;\r\n\r\n /**\r\n * Any Frame specific custom data can be stored here.\r\n *\r\n * @name Phaser.Textures.Frame#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * WebGL UV u0 value.\r\n *\r\n * @name Phaser.Textures.Frame#u0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u0 = 0;\r\n\r\n /**\r\n * WebGL UV v0 value.\r\n *\r\n * @name Phaser.Textures.Frame#v0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v0 = 0;\r\n\r\n /**\r\n * WebGL UV u1 value.\r\n *\r\n * @name Phaser.Textures.Frame#u1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u1 = 0;\r\n\r\n /**\r\n * WebGL UV v1 value.\r\n *\r\n * @name Phaser.Textures.Frame#v1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v1 = 0;\r\n\r\n /**\r\n * The un-modified source frame, trim and UV data.\r\n *\r\n * @name Phaser.Textures.Frame#data\r\n * @type {object}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n cut: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n trim: false,\r\n sourceSize: {\r\n w: 0,\r\n h: 0\r\n },\r\n spriteSourceSize: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n radius: 0,\r\n drawImage: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n }\r\n };\r\n\r\n this.setSize(width, height, x, y);\r\n },\r\n\r\n /**\r\n * Sets the width, height, x and y of this Frame.\r\n *\r\n * This is called automatically by the constructor\r\n * and should rarely be changed on-the-fly.\r\n *\r\n * @method Phaser.Textures.Frame#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {number} width - The width of the frame before being trimmed.\r\n * @param {number} height - The height of the frame before being trimmed.\r\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\r\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setSize: function (width, height, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.cutX = x;\r\n this.cutY = y;\r\n this.cutWidth = width;\r\n this.cutHeight = height;\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width * 0.5);\r\n this.halfHeight = Math.floor(height * 0.5);\r\n\r\n this.centerX = Math.floor(width / 2);\r\n this.centerY = Math.floor(height / 2);\r\n\r\n var data = this.data;\r\n var cut = data.cut;\r\n\r\n cut.x = x;\r\n cut.y = y;\r\n cut.w = width;\r\n cut.h = height;\r\n cut.r = x + width;\r\n cut.b = y + height;\r\n\r\n data.sourceSize.w = width;\r\n data.sourceSize.h = height;\r\n\r\n data.spriteSourceSize.w = width;\r\n data.spriteSourceSize.h = height;\r\n\r\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\r\n\r\n var drawImage = data.drawImage;\r\n\r\n drawImage.x = x;\r\n drawImage.y = y;\r\n drawImage.width = width;\r\n drawImage.height = height;\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\r\n *\r\n * @method Phaser.Textures.Frame#setTrim\r\n * @since 3.0.0\r\n *\r\n * @param {number} actualWidth - The width of the frame before being trimmed.\r\n * @param {number} actualHeight - The height of the frame before being trimmed.\r\n * @param {number} destX - The destination X position of the trimmed frame for display.\r\n * @param {number} destY - The destination Y position of the trimmed frame for display.\r\n * @param {number} destWidth - The destination width of the trimmed frame for display.\r\n * @param {number} destHeight - The destination height of the trimmed frame for display.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\r\n {\r\n var data = this.data;\r\n var ss = data.spriteSourceSize;\r\n\r\n // Store actual values\r\n\r\n data.trim = true;\r\n\r\n data.sourceSize.w = actualWidth;\r\n data.sourceSize.h = actualHeight;\r\n\r\n ss.x = destX;\r\n ss.y = destY;\r\n ss.w = destWidth;\r\n ss.h = destHeight;\r\n ss.r = destX + destWidth;\r\n ss.b = destY + destHeight;\r\n\r\n // Adjust properties\r\n this.x = destX;\r\n this.y = destY;\r\n\r\n this.width = destWidth;\r\n this.height = destHeight;\r\n\r\n this.halfWidth = destWidth * 0.5;\r\n this.halfHeight = destHeight * 0.5;\r\n\r\n this.centerX = Math.floor(destWidth / 2);\r\n this.centerY = Math.floor(destHeight / 2);\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * Takes a crop data object and, based on the rectangular region given, calculates the\r\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\r\n *\r\n * This is called directly by the Game Object Texture Components `setCrop` method.\r\n * Please use that method to crop a Game Object.\r\n *\r\n * @method Phaser.Textures.Frame#setCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\r\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\r\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\r\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\r\n {\r\n // Clamp the input values\r\n\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n var rw = this.realWidth;\r\n var rh = this.realHeight;\r\n\r\n x = Clamp(x, 0, rw);\r\n y = Clamp(y, 0, rh);\r\n\r\n width = Clamp(width, 0, rw - x);\r\n height = Clamp(height, 0, rh - y);\r\n\r\n var ox = cx + x;\r\n var oy = cy + y;\r\n var ow = width;\r\n var oh = height;\r\n\r\n var data = this.data;\r\n\r\n if (data.trim)\r\n {\r\n var ss = data.spriteSourceSize;\r\n\r\n // Need to check for intersection between the cut area and the crop area\r\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\r\n\r\n width = Clamp(width, 0, cw - x);\r\n height = Clamp(height, 0, ch - y);\r\n\r\n var cropRight = x + width;\r\n var cropBottom = y + height;\r\n\r\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\r\n\r\n if (intersects)\r\n {\r\n var ix = Math.max(ss.x, x);\r\n var iy = Math.max(ss.y, y);\r\n var iw = Math.min(ss.r, cropRight) - ix;\r\n var ih = Math.min(ss.b, cropBottom) - iy;\r\n\r\n ow = iw;\r\n oh = ih;\r\n\r\n if (flipX)\r\n {\r\n ox = cx + (cw - (ix - ss.x) - iw);\r\n }\r\n else\r\n {\r\n ox = cx + (ix - ss.x);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - (iy - ss.y) - ih);\r\n }\r\n else\r\n {\r\n oy = cy + (iy - ss.y);\r\n }\r\n\r\n x = ix;\r\n y = iy;\r\n\r\n width = iw;\r\n height = ih;\r\n }\r\n else\r\n {\r\n ox = 0;\r\n oy = 0;\r\n ow = 0;\r\n oh = 0;\r\n }\r\n }\r\n else\r\n {\r\n if (flipX)\r\n {\r\n ox = cx + (cw - x - width);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - y - height);\r\n }\r\n }\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n // Map the given coordinates into UV space, clamping to the 0-1 range.\r\n\r\n crop.u0 = Math.max(0, ox / tw);\r\n crop.v0 = Math.max(0, oy / th);\r\n crop.u1 = Math.min(1, (ox + ow) / tw);\r\n crop.v1 = Math.min(1, (oy + oh) / th);\r\n\r\n crop.x = x;\r\n crop.y = y;\r\n\r\n crop.cx = ox;\r\n crop.cy = oy;\r\n crop.cw = ow;\r\n crop.ch = oh;\r\n\r\n crop.width = width;\r\n crop.height = height;\r\n\r\n crop.flipX = flipX;\r\n crop.flipY = flipY;\r\n\r\n return crop;\r\n },\r\n\r\n /**\r\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\r\n * Called automatically by `setFrame`.\r\n *\r\n * @method Phaser.Textures.Frame#updateCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n updateCropUVs: function (crop, flipX, flipY)\r\n {\r\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\r\n },\r\n\r\n /**\r\n * Directly sets the canvas and WebGL UV data for this frame.\r\n *\r\n * Use this if you need to override the values that are generated automatically\r\n * when the Frame is created.\r\n *\r\n * @method Phaser.Textures.Frame#setUVs\r\n * @since 3.50.0\r\n *\r\n * @param {number} width - Width of this frame for the Canvas data.\r\n * @param {number} height - Height of this frame for the Canvas data.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setUVs: function (width, height, u0, v0, u1, v1)\r\n {\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = width;\r\n cd.height = height;\r\n\r\n // WebGL data\r\n\r\n this.u0 = u0;\r\n this.v0 = v0;\r\n\r\n this.u1 = u1;\r\n this.v1 = v1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache and the drawImage cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVs\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVs: function ()\r\n {\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = cw;\r\n cd.height = ch;\r\n\r\n // WebGL data\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = cx / tw;\r\n this.v0 = cy / th;\r\n\r\n this.u1 = (cx + cw) / tw;\r\n this.v1 = (cy + ch) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVsInverted\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVsInverted: function ()\r\n {\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = (this.cutX + this.cutHeight) / tw;\r\n this.v0 = this.cutY / th;\r\n\r\n this.u1 = this.cutX / tw;\r\n this.v1 = (this.cutY + this.cutWidth) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clones this Frame into a new Frame object.\r\n *\r\n * @method Phaser.Textures.Frame#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} A clone of this Frame.\r\n */\r\n clone: function ()\r\n {\r\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\r\n\r\n clone.cutX = this.cutX;\r\n clone.cutY = this.cutY;\r\n clone.cutWidth = this.cutWidth;\r\n clone.cutHeight = this.cutHeight;\r\n\r\n clone.x = this.x;\r\n clone.y = this.y;\r\n\r\n clone.width = this.width;\r\n clone.height = this.height;\r\n\r\n clone.halfWidth = this.halfWidth;\r\n clone.halfHeight = this.halfHeight;\r\n\r\n clone.centerX = this.centerX;\r\n clone.centerY = this.centerY;\r\n\r\n clone.rotated = this.rotated;\r\n\r\n clone.data = Extend(true, clone.data, this.data);\r\n\r\n clone.updateUVs();\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\r\n *\r\n * @method Phaser.Textures.Frame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.source = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n this.customData = null;\r\n this.data = null;\r\n },\r\n\r\n /**\r\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.w;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.h;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\r\n *\r\n * @name Phaser.Textures.Frame#radius\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.data.radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Frame trimmed or not?\r\n *\r\n * @name Phaser.Textures.Frame#trimmed\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n trimmed: {\r\n\r\n get: function ()\r\n {\r\n return this.data.trim;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Canvas drawImage data object.\r\n *\r\n * @name Phaser.Textures.Frame#canvasData\r\n * @type {object}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canvasData: {\r\n\r\n get: function ()\r\n {\r\n return this.data.drawImage;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Frame;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {boolean} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Tween States.\r\n *\r\n * @namespace Phaser.Tweens.States\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\n/**\r\n * Phaser Tween state constants.\r\n *\r\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.CREATED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n // 1 used to be INIT prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n // 3 used to be OFFSET_DELAY prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_RENDER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_FORWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.HOLD_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.REPEAT_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state. The Tween has been created but has not yet been added to the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING: 20,\r\n\r\n /**\r\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\r\n * or was playing and is currently paused, but in both cases it's still being processed by\r\n * the Tween Manager, so is considered 'active'.\r\n *\r\n * @name Phaser.Tweens.States.ACTIVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 21,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a loop countdown to elapse.\r\n *\r\n * @name Phaser.Tweens.States.LOOP_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a complete delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 23,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a starting delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.START_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n START_DELAY: 24,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_REMOVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state. The Tween has been removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.REMOVED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\r\n * so will not be automatically removed by the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.FINISHED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n FINISHED: 27,\r\n\r\n /**\r\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.DESTROYED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DESTROYED: 28,\r\n\r\n /**\r\n * A large integer value used for 'infinite' style countdowns.\r\n *\r\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\r\n * supported on IE.\r\n *\r\n * @name Phaser.Tweens.States.MAX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n MAX: 999999999999\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @ignore\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @ignore\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * Existing elements in the array are shifted up.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {number} [index=0] - The index in the array where the item will be inserted.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {number} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {number} startIndex - The start index to search from.\r\n * @param {number} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array and flattens it, returning a shallow-copy flattened array.\r\n *\r\n * @function Phaser.Utils.Array.Flatten\r\n * @since 3.60.0\r\n *\r\n * @param {array} array - The array to flatten.\r\n * @param {array} [output] - An array to hold the results in.\r\n *\r\n * @return {array} The flattened output array.\r\n */\r\nvar Flatten = function (array, output)\r\n{\r\n if (output === undefined) { output = []; }\r\n\r\n for (var i = 0; i < array.length; i++)\r\n {\r\n if (Array.isArray(array[i]))\r\n {\r\n Flatten(array[i], output);\r\n }\r\n else\r\n {\r\n output.push(array[i]);\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = Flatten;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element above another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveAbove\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move above base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveAbove = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex > baseIndex)\r\n {\r\n // item1 is already above item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === array.length - 1)\r\n {\r\n array.push(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveAbove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element below another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveBelow\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move below base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveBelow = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex < baseIndex)\r\n {\r\n // item1 is already below item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === 0)\r\n {\r\n array.unshift(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveBelow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {number} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\r\n\r\n/**\r\n * Create an array of numbers (positive and/or negative) progressing from `start`\r\n * up to but not including `end` by advancing by `step`.\r\n *\r\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\r\n *\r\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\r\n * for forward compatibility make sure to pass in actual numbers.\r\n *\r\n * @example\r\n * NumberArrayStep(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * NumberArrayStep(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * NumberArrayStep(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * NumberArrayStep(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * NumberArrayStep(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * NumberArrayStep(0);\r\n * // => []\r\n *\r\n * @function Phaser.Utils.Array.NumberArrayStep\r\n * @since 3.0.0\r\n *\r\n * @param {number} [start=0] - The start of the range.\r\n * @param {number} [end=null] - The end of the range.\r\n * @param {number} [step=1] - The value to increment or decrement by.\r\n *\r\n * @return {number[]} The array of number values.\r\n */\r\nvar NumberArrayStep = function (start, end, step)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (end === undefined) { end = null; }\r\n if (step === undefined) { step = 1; }\r\n\r\n if (end === null)\r\n {\r\n end = start;\r\n start = 0;\r\n }\r\n\r\n var result = [];\r\n\r\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n result.push(start);\r\n start += step;\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArrayStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {number} k - The k-th element index.\r\n * @param {number} [left=0] - The index of the left part of the range.\r\n * @param {number} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = require('../object/GetValue');\r\nvar Shuffle = require('./Shuffle');\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n *\r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n *\r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n *\r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n *\r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n *\r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n *\r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n var removed = [];\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n removed.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return removed;\r\n};\r\n\r\nmodule.exports = Remove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} startIndex - The start index to remove from.\r\n * @param {number} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {number} [start=0] - The array index to start the search from.\r\n * @param {number} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search within.\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The \"rotation\" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The \"rotation\" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n *\r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {number} startIndex - The start index.\r\n * @param {number} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {number} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n","/**\r\n * @author Richard Davey \r\n * @author Angry Bytes (and contributors)\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Device = require('../../device');\r\n\r\n/**\r\n * The comparator function.\r\n *\r\n * @ignore\r\n *\r\n * @param {*} a - The first item to test.\r\n * @param {*} b - The second itemt to test.\r\n *\r\n * @return {boolean} True if they localCompare, otherwise false.\r\n */\r\nfunction Compare (a, b)\r\n{\r\n return String(a).localeCompare(b);\r\n}\r\n\r\n/**\r\n * Process the array contents.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} array - The array to process.\r\n * @param {function} compare - The comparison function.\r\n *\r\n * @return {array} - The processed array.\r\n */\r\nfunction Process (array, compare)\r\n{\r\n // Short-circuit when there's nothing to sort.\r\n var len = array.length;\r\n\r\n if (len <= 1)\r\n {\r\n return array;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n\r\n for (var chk = 1; chk < len; chk *= 2)\r\n {\r\n RunPass(array, compare, chk, buffer);\r\n\r\n var tmp = array;\r\n\r\n array = buffer;\r\n\r\n buffer = tmp;\r\n }\r\n\r\n return array;\r\n}\r\n\r\n/**\r\n * Run a single pass with the given chunk size.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} arr - The array to run the pass on.\r\n * @param {function} comp - The comparison function.\r\n * @param {number} chk - The number of iterations.\r\n * @param {array} result - The array to store the result in.\r\n */\r\nfunction RunPass (arr, comp, chk, result)\r\n{\r\n var len = arr.length;\r\n var i = 0;\r\n\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl)\r\n {\r\n r = l + chk;\r\n e = r + chk;\r\n\r\n if (r > len)\r\n {\r\n r = len;\r\n }\r\n\r\n if (e > len)\r\n {\r\n e = len;\r\n }\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n\r\n while (true)\r\n {\r\n // Compare the chunks.\r\n if (li < r && ri < e)\r\n {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0)\r\n {\r\n result[i++] = arr[li++];\r\n }\r\n else\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n else if (li < r)\r\n {\r\n // Nothing to compare, just flush what's left.\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e)\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n else\r\n {\r\n // Both iterators are at the chunk ends.\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\r\n *\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The input array to be sorted.\r\n * @param {function} [compare] - The comparison function.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar StableSort = function (array, compare)\r\n{\r\n if (compare === undefined) { compare = Compare; }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n if (!array || array.length < 2)\r\n {\r\n return array;\r\n }\r\n\r\n if (Device.features.stableSort)\r\n {\r\n return array.sort(compare);\r\n }\r\n\r\n var result = Process(array, compare);\r\n\r\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\r\n if (result !== array)\r\n {\r\n RunPass(result, null, array.length, array);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = StableSort;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: require('./matrix'),\r\n\r\n Add: require('./Add'),\r\n AddAt: require('./AddAt'),\r\n BringToTop: require('./BringToTop'),\r\n CountAllMatching: require('./CountAllMatching'),\r\n Each: require('./Each'),\r\n EachInRange: require('./EachInRange'),\r\n FindClosestInSorted: require('./FindClosestInSorted'),\r\n Flatten: require('./Flatten'),\r\n GetAll: require('./GetAll'),\r\n GetFirst: require('./GetFirst'),\r\n GetRandom: require('./GetRandom'),\r\n MoveDown: require('./MoveDown'),\r\n MoveTo: require('./MoveTo'),\r\n MoveUp: require('./MoveUp'),\r\n MoveAbove: require('./MoveAbove'),\r\n MoveBelow: require('./MoveBelow'),\r\n NumberArray: require('./NumberArray'),\r\n NumberArrayStep: require('./NumberArrayStep'),\r\n QuickSelect: require('./QuickSelect'),\r\n Range: require('./Range'),\r\n Remove: require('./Remove'),\r\n RemoveAt: require('./RemoveAt'),\r\n RemoveBetween: require('./RemoveBetween'),\r\n RemoveRandomElement: require('./RemoveRandomElement'),\r\n Replace: require('./Replace'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateRight: require('./RotateRight'),\r\n SafeRange: require('./SafeRange'),\r\n SendToBack: require('./SendToBack'),\r\n SetAll: require('./SetAll'),\r\n Shuffle: require('./Shuffle'),\r\n SortByDigits: require('./SortByDigits'),\r\n SpliceOne: require('./SpliceOne'),\r\n StableSort: require('./StableSort'),\r\n Swap: require('./Swap')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = require('../../string/Pad');\r\nvar CheckMatrix = require('./CheckMatrix');\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = require('./CheckMatrix');\r\nvar TransposeMatrix = require('./TransposeMatrix');\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateLeft = require('../RotateLeft');\r\nvar RotateRight = require('../RotateRight');\r\n\r\n/**\r\n * Translates the given Array Matrix by shifting each column and row the\r\n * amount specified.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Translate\r\n * @since 3.50.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to translate.\r\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\r\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\r\n *\r\n * @return {T[][]} The translated matrix.\r\n */\r\nvar TranslateMatrix = function (matrix, x, y)\r\n{\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n // Vertical translation\r\n\r\n if (y !== 0)\r\n {\r\n if (y < 0)\r\n {\r\n // Shift Up\r\n RotateLeft(matrix, Math.abs(y));\r\n }\r\n else\r\n {\r\n // Shift Down\r\n RotateRight(matrix, y);\r\n }\r\n }\r\n\r\n // Horizontal translation\r\n\r\n if (x !== 0)\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n var row = matrix[i];\r\n\r\n if (x < 0)\r\n {\r\n RotateLeft(row, Math.abs(x));\r\n }\r\n else\r\n {\r\n RotateRight(row, x);\r\n }\r\n }\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = TranslateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n *\r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: require('./CheckMatrix'),\r\n MatrixToString: require('./MatrixToString'),\r\n ReverseColumns: require('./ReverseColumns'),\r\n ReverseRows: require('./ReverseRows'),\r\n Rotate180: require('./Rotate180'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateMatrix: require('./RotateMatrix'),\r\n RotateRight: require('./RotateRight'),\r\n Translate: require('./TranslateMatrix'),\r\n TransposeMatrix: require('./TransposeMatrix')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Deep Copy the given object or array.\r\n *\r\n * @function Phaser.Utils.Objects.DeepCopy\r\n * @since 3.50.0\r\n *\r\n * @param {object} obj - The object to deep copy.\r\n *\r\n * @return {object} A deep copy of the original object.\r\n */\r\nvar DeepCopy = function (inObject)\r\n{\r\n var outObject;\r\n var value;\r\n var key;\r\n\r\n if (typeof inObject !== 'object' || inObject === null)\r\n {\r\n // inObject is not an object\r\n return inObject;\r\n }\r\n\r\n // Create an array or object to hold the values\r\n outObject = Array.isArray(inObject) ? [] : {};\r\n\r\n for (key in inObject)\r\n {\r\n value = inObject[key];\r\n\r\n // Recursively (deep) copy for nested objects, including arrays\r\n outObject[key] = DeepCopy(value);\r\n }\r\n\r\n return outObject;\r\n};\r\n\r\nmodule.exports = DeepCopy;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n *\r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n *\r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\r\n *\r\n * The key is a string, which can be split based on the use of the period character.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * const source = {\r\n * lives: 3,\r\n * render: {\r\n * screen: {\r\n * width: 1024\r\n * }\r\n * }\r\n * }\r\n *\r\n * const lives = GetValue(source, 'lives', 1);\r\n * const width = GetValue(source, 'render.screen.width', 800);\r\n * const height = GetValue(source, 'render.screen.height', 600);\r\n * ```\r\n *\r\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\r\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\r\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue, altSource)\r\n{\r\n if ((!source && !altSource) || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source && source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (altSource && altSource.hasOwnProperty(key))\r\n {\r\n return altSource[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parentA = source;\r\n var parentB = altSource;\r\n var valueA = defaultValue;\r\n var valueB = defaultValue;\r\n var valueAFound = true;\r\n var valueBFound = true;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parentA && parentA.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentA has a key property, let's carry on down\r\n valueA = parentA[keys[i]];\r\n parentA = parentA[keys[i]];\r\n }\r\n else\r\n {\r\n valueAFound = false;\r\n }\r\n\r\n if (parentB && parentB.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentB has a key property, let's carry on down\r\n valueB = parentB[keys[i]];\r\n parentB = parentB[keys[i]];\r\n }\r\n else\r\n {\r\n valueBFound = false;\r\n }\r\n }\r\n\r\n if (valueAFound)\r\n {\r\n return valueA;\r\n }\r\n else if (valueBFound)\r\n {\r\n return valueB;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (!obj || typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and pads it out, to the length required, using the character\r\n * specified. For example if you need a string to be 6 characters long, you can call:\r\n *\r\n * `pad('bob', 6, '-', 2)`\r\n *\r\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\r\n *\r\n * You can also use it to pad numbers (they are always returned as strings):\r\n *\r\n * `pad(512, 6, '0', 1)`\r\n *\r\n * Would return: `000512` with the string padded to the left.\r\n *\r\n * If you don't specify a direction it'll pad to both sides:\r\n *\r\n * `pad('c64', 7, '*')`\r\n *\r\n * Would return: `**c64**`\r\n *\r\n * @function Phaser.Utils.String.Pad\r\n * @since 3.0.0\r\n *\r\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\r\n * @param {number} [len=0] - The number of characters to be added.\r\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\r\n * @param {number} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\r\n *\r\n * @return {string} The padded string.\r\n */\r\nvar Pad = function (str, len, pad, dir)\r\n{\r\n if (len === undefined) { len = 0; }\r\n if (pad === undefined) { pad = ' '; }\r\n if (dir === undefined) { dir = 3; }\r\n\r\n str = str.toString();\r\n\r\n var padlen = 0;\r\n\r\n if (len + 1 >= str.length)\r\n {\r\n switch (dir)\r\n {\r\n case 1:\r\n str = new Array(len + 1 - str.length).join(pad) + str;\r\n break;\r\n\r\n case 3:\r\n var right = Math.ceil((padlen = len - str.length) / 2);\r\n var left = padlen - right;\r\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\r\n break;\r\n\r\n default:\r\n str = str + new Array(len + 1 - str.length).join(pad);\r\n break;\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = Pad;\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./SpinePlugin.js\");\n",""],"names":[],"sourceRoot":""} +{"version":3,"file":"SpinePluginDebug.js","mappings":";;;;;;;;;;AAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0DAA0D,OAAO;AACjE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,SAAS;AACnD;AACA;;AAEA;AACA,IAAI;AACJ;AACA;;AAEA,gBAAgB,YAAY;AAC5B;;AAEA;AACA,4DAA4D;AAC5D,gEAAgE;AAChE,oEAAoE;AACpE,wEAAwE;AACxE;AACA,2DAA2D,SAAS;AACpE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,UAAU;AACrB,WAAW,GAAG;AACd,WAAW,SAAS;AACpB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,4DAA4D,YAAY;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;;;AC/UA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,mBAAmB,mBAAO,CAAC,yFAAwC;AACnE,gBAAgB,mBAAO,CAAC,8FAA4C;AACpE,oBAAoB,mBAAO,CAAC,2FAAyC;AACrE,eAAe,mBAAO,CAAC,4FAA2C;AAClE,gBAAgB,mBAAO,CAAC,0EAAkC;AAC1D,eAAe,mBAAO,CAAC,4FAA2C;AAClE;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB,cAAc,iBAAiB;AAC/B,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,kDAAkD;AAC7D,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,mBAAmB;AAC9B,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sFAAsF;AAC7H;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,kBAAkB,mBAAO,CAAC,+CAAa;AACvC,iBAAiB,mBAAO,CAAC,6CAAY;AACrC;AACA;AACA;AACA;AACA,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sGAAsG;AACrH,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC,eAAe,SAAS;AACxB,eAAe,uCAAuC;AACtD,eAAe,uCAAuC;AACtD,eAAe,QAAQ,yDAAyD;AAChF;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,gBAAgB;AAC/B,eAAe,YAAY;AAC3B;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,SAAS;AACpB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;;;;;;;;;;;AChuCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD;AACA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,iFAA+B;AACzD;AACA;AACA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,gBAAgB;AAC3B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC,8CAAe;AAClC,iBAAiB,mBAAO,CAAC,0DAAqB;AAC9C,WAAW,mBAAO,CAAC,8CAAe;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,8EAAoC;AAC/D,YAAY,mBAAO,CAAC,8DAA4B;AAChD,YAAY,mBAAO,CAAC,gEAA6B;AACjD,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,sBAAsB,mBAAO,CAAC,kGAA8C;AAC5E,qBAAqB,mBAAO,CAAC,gGAA6C;AAC1E,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+BAA+B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oCAAoC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC,mCAAmC;AACnC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD,mBAAmB,mBAAO,CAAC,8DAA4B;AACvD;AACA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D,mBAAmB,mBAAO,CAAC,gFAA8B;AACzD;AACA;AACA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,8DAA4B;AAChD,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,oBAAoB,mBAAO,CAAC,4FAA2C;AACvE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,iBAAiB;AAC5B,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA,gBAAgB,mBAAO,CAAC,kEAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;AAC/B;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0DAA0D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtsBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,KAAK;AAChB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;AACxC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ,qGAAqG;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,SAAS,mBAAO,CAAC,uCAAM;AACvB,cAAc,mBAAO,CAAC,iDAAW;AACjC,iBAAiB,mBAAO,CAAC,+EAA8B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,0BAA0B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,mBAAmB,+IAA+I;AACpN;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,iDAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,GAAG,uBAAuB,OAAO;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,kBAAkB;AAChC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,0BAA0B;AACxC,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,uCAAM;AACtB,aAAa,mBAAO,CAAC,iDAAW;AAChC,cAAc,mBAAO,CAAC,mDAAY;AAClC,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,WAAW,mBAAO,CAAC,6CAAS;AAC5B,gBAAgB,mBAAO,CAAC,uDAAc;AACtC,oBAAoB,mBAAO,CAAC,+DAAkB;AAC9C;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,uCAAuC;AACvC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5qBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,0CAAa;AACjC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC,wCAAwC;AACxC,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,2BAA2B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9PA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,wBAAwB,mBAAO,CAAC,0FAAqC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,oDAAoD;AACpG;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gEAAgE;AAC/E;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6EAA6E;AAC5F;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gEAAgE;AAC3E,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACA,YAAY,iCAAiC;AAC7C;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3OA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,6BAA6B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,4BAA4B;AAC9D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACpTA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,qCAAqC;AACrC,0CAA0C;AAC1C,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B,+BAA+B;AAC/B,sCAAsC;AACtC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,oCAAoC;AACpC,sCAAsC;AACtC,yCAAyC;AACzC,mCAAmC;AACnC,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,mCAAmC;AACnC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACrLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,sBAAsB,mBAAO,CAAC,mEAAwB;AACtD,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AChHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C,2CAA2C;AAC3C,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,mCAAmC;AACnC,mCAAmC;AACnC,iCAAiC;AACjC,iCAAiC;AACjC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC7MA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,mCAAmC;AACnC,qCAAqC;AACrC,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACjKA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,uCAAuC;AACvC,sCAAsC;AACtC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AChGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,oCAAoC;AACpC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC/FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,mDAAc;AACvC,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,uCAAuC;AACvC,kCAAkC;AAClC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,eAAe,mBAAO,CAAC,yCAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,2CAAU;AAC9B,gBAAgB,mBAAO,CAAC,mDAAc;AACtC,WAAW,mBAAO,CAAC,yCAAS;AAC5B,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,YAAY,mBAAO,CAAC,2CAAU;AAC9B,iBAAiB,mBAAO,CAAC,qDAAe;AACxC,kBAAkB,mBAAO,CAAC,uDAAgB;AAC1C,UAAU,mBAAO,CAAC,uCAAQ;AAC1B,cAAc,mBAAO,CAAC,+CAAY;AAClC,cAAc,mBAAO,CAAC,+CAAY;AAClC,YAAY,mBAAO,CAAC,2CAAU;AAC9B,WAAW,mBAAO,CAAC,yCAAS;AAC5B,cAAc,mBAAO,CAAC,+CAAY;AAClC,UAAU,mBAAO,CAAC,uCAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,+BAA+B;AAC1C,WAAW,2CAA2C;AACtD;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW,KAAK,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB,KAAK,gBAAgB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,KAAK,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;AAC/B,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAA0D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC,eAAe,GAAG;AAClB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK;AACtB,oBAAoB,YAAY;AAChC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,oCAAoC;AACnD,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2DAA2D;AAC1E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACl5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,mEAAwB;AAClD,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mFAAmF;AACpG;AACA,eAAe,mFAAmF;AAClG;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,sBAAsB,mBAAO,CAAC,4FAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,oDAAkB;AACtC;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC;AAClD;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,cAAc,mBAAO,CAAC,2CAAW;AACjC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC,oBAAoB,GAAG;AACvB;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC,oBAAoB,GAAG;AACvB;AACA,eAAe,sBAAsB;AACrC,eAAe,QAAQ;AACvB;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA,4GAA4G,sCAAsC;AAClJ,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACr0BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA,eAAe,gCAAgC;AAC/C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpXA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mEAAmE;AAClF;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,iBAAiB,gCAAgC;AACjD,oBAAoB,YAAY;AAChC;AACA,eAAe,gEAAgE;AAC/E,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,kCAAkC;AACjD,eAAe,uCAAuC;AACtD;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,6BAA6B;AAC9C,iBAAiB,0BAA0B;AAC3C,oBAAoB,OAAO;AAC3B;AACA,eAAe,sDAAsD;AACrE;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxMA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wDAAwD;AACnF;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,wGAAwG;AACvH;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wGAAwG,UAAU;AACjI,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtaA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0EAA6B;AACpD,SAAS,mBAAO,CAAC,mEAAkB;AACnC,gBAAgB,mBAAO,CAAC,0EAA6B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uIAAuI;AACtJ,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,mGAAmG;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uDAAuD;AACtE;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9WA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAkC;AACjD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4DAAsB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,wCAAwC;AACxC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtNA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C;AACA,YAAY,yCAAyC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,iDAAiD;AACzD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6FAA6F;AAC5G;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAoD;AAC5D;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,sBAAsB;AACtB,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3mBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,sDAAsD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,cAAc;AAC7B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,6DAAS;AAC5B,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,eAAe,mBAAO,CAAC,qEAAa;AACpC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,QAAQ,mBAAO,CAAC,uDAAM;AACtB,eAAe,mBAAO,CAAC,qEAAa;AACpC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,cAAc,mBAAO,CAAC,mEAAY;AAClC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,aAAa,mBAAO,CAAC,iEAAW;AAChC,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,eAAe,mBAAO,CAAC,qEAAa;AACpC,qBAAqB,mBAAO,CAAC,iFAAmB;AAChD,aAAa,mBAAO,CAAC,iEAAW;AAChC;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,QAAQ;AACvB,eAAe,GAAG;AAClB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,KAAK;AACzB;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,SAAS;AAC7B;AACA,eAAe,+DAA+D;AAC9E,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C,eAAe,+BAA+B;AAC9C,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD,oBAAoB,GAAG;AACvB;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,KAAK;AACpB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACl7CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,oDAAkB;AACrC;AACA;AACA;AACA,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;AACA;AACA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,8BAA8B;AACzC,WAAW,+BAA+B;AAC1C,WAAW,+CAA+C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,SAAS;AACpB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,qBAAqB;AAChC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,qBAAqB;AAChC;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,uBAAuB,mBAAO,CAAC,6FAA2B;AAC1D;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAU;AAC/B,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,sDAAY;AACnC,gBAAgB,mBAAO,CAAC,wDAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,aAAa,mBAAO,CAAC,kDAAU;AAC/B,cAAc,mBAAO,CAAC,wDAAoB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,kBAAkB;AAC7B,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,6BAA6B;AACxC;AACA,YAAY,6BAA6B;AACzC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,wDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA,WAAW,uBAAuB;AAClC,WAAW,mBAAmB;AAC9B;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,2DAAY;AACnC,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,WAAW,mBAAO,CAAC,oDAAc;AACjC,aAAa,mBAAO,CAAC,uDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC,WAAW,uBAAuB;AAClC;AACA,YAAY,uBAAuB;AACnC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjjBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,uCAAuC;AAClD;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3SA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,uCAAuC;AAClD;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,uCAAuC;AACnD;AACA;AACA;AACA,sCAAsC;AACtC,+BAA+B;AAC/B,8BAA8B;AAC9B,kCAAkC;AAClC,iCAAiC;AACjC,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1JA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,4BAA4B;AACvC,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,wDAAwD;AAClJ;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,oFAAoF,oDAAoD;AACxI;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ,uBAAuB,+BAA+B;AACzE,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mBAAO,CAAC,4DAAa;AAC9B,cAAc,mBAAO,CAAC,sEAAkB;AACxC,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,uBAAuB,mBAAO,CAAC,wFAA2B;AAC1D,qBAAqB,mBAAO,CAAC,oFAAyB;AACtD,eAAe,mBAAO,CAAC,wEAAmB;AAC1C,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,kBAAkB,mBAAO,CAAC,8EAAsB;AAChD,cAAc,mBAAO,CAAC,sEAAkB;AACxC,WAAW,mBAAO,CAAC,gEAAe;AAClC;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D,aAAa,mBAAO,CAAC,gDAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,wDAAwD;AACnE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,gDAAgD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wGAAwG;AACnH,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC9VA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACxOA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uDAAuD;AAClE,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sGAAsG;AACjH,WAAW,QAAQ;AACnB,WAAW,uCAAuC;AAClD;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA,wBAAwB,gBAAgB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC5KA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,mDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B;AAC/B,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpRA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,SAAS;AACxB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1vDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,WAAW,mBAAO,CAAC,iDAAe;AAClC,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,SAAS;AACxB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AClhCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,4BAA4B;AACvC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA,WAAW,+BAA+B;AAC1C,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,cAAc,mBAAO,CAAC,+CAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,gDAAgD;AAC3D;AACA,YAAY,gDAAgD;AAC5D;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AClxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/gCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC,eAAe,QAAQ;AACvB;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAA+D;AAC9E;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACthBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,uCAAuC;AAClF;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,2CAA2C,iCAAiC;AAC5E;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,4CAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,yDAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,4CAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,0CAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,0CAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,+BAA+B;AAC1C;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;AACxC;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC;AACnC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,cAAc,mBAAO,CAAC,8DAAY;AAClC,WAAW,mBAAO,CAAC,wDAAS;AAC5B,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,YAAY,mBAAO,CAAC,0DAAU;AAC9B,eAAe,mBAAO,CAAC,gEAAa;AACpC,aAAa,mBAAO,CAAC,4DAAW;AAChC,aAAa,mBAAO,CAAC,4DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;AAChC;AACA;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iGAAoC;;;;;;;;;;;ACNpC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;AAC5B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,oGAAqC;;;;;;;;;;;ACVrC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,WAAW,mBAAO,CAAC,iDAAS;AAC5B,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,cAAc,mBAAO,CAAC,uDAAY;AAClC;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,2CAAS;AAC7B,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAO,CAAC,kDAAU;AAC7B,cAAc,mBAAO,CAAC,wDAAa;AACnC,YAAY,mBAAO,CAAC,oDAAW;AAC/B,WAAW,mBAAO,CAAC,kDAAU;AAC7B,mBAAmB,mBAAO,CAAC,kEAAkB;AAC7C,UAAU,mBAAO,CAAC,gDAAS;AAC3B,UAAU,mBAAO,CAAC,gDAAS;AAC3B;AACA;AACA,yBAAyB,mBAAO,CAAC,mHAA6C;AAC9E;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,eAAe,mBAAO,CAAC,mDAAa;AACpC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,WAAW,mBAAO,CAAC,2CAAS;AAC5B,cAAc,mBAAO,CAAC,iDAAY;AAClC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,WAAW,mBAAO,CAAC,2CAAS;AAC5B,eAAe,mBAAO,CAAC,mDAAa;AACpC,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,aAAa,mBAAO,CAAC,+CAAW;AAChC,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,YAAY,mBAAO,CAAC,6CAAU;AAC9B,cAAc,mBAAO,CAAC,iDAAY;AAClC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,YAAY,mBAAO,CAAC,6CAAU;AAC9B,aAAa,mBAAO,CAAC,+CAAW;AAChC,cAAc,mBAAO,CAAC,iDAAY;AAClC,cAAc,mBAAO,CAAC,iDAAY;AAClC,eAAe,mBAAO,CAAC,mDAAa;AACpC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,cAAc,mBAAO,CAAC,iDAAY;AAClC,uBAAuB,mBAAO,CAAC,mEAAqB;AACpD,aAAa,mBAAO,CAAC,+CAAW;AAChC,0BAA0B,mBAAO,CAAC,yEAAwB;AAC1D,kBAAkB,mBAAO,CAAC,yDAAgB;AAC1C,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,UAAU,mBAAO,CAAC,yCAAQ;AAC1B,iBAAiB,mBAAO,CAAC,uDAAe;AACxC,YAAY,mBAAO,CAAC,6CAAU;AAC9B,UAAU,mBAAO,CAAC,yCAAQ;AAC1B;AACA;AACA,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,oDAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,8CAAW;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,sDAAe;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,0DAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;AACvD;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;AAC1C;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,sDAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,kDAAkD;AAClD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,wCAAwC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB,oBAAoB,GAAG;AACvB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,GAAG;AACnB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,KAAK;AACzB;AACA,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;AAC1B;AACA;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,uCAAuC;AACnG;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,0CAA0C;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,4CAA4C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1MA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,yCAAyC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACvIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,+BAA+B;AAC1C,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,6EAA6E;AACxF;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,8CAA8C;AACrF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB;AACA;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,sDAAsD;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,uDAAuD;AACnI;AACA;AACA;AACA;AACA;AACA,uBAAuB,qDAAqD;AAC5E,wBAAwB,sDAAsD;AAC9E,yBAAyB,uDAAuD;AAChF,wBAAwB,sDAAsD;AAC9E,4BAA4B,0DAA0D;AACtF;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,mBAAmB;AACnB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,WAAW,uBAAuB;AAClC,WAAW,KAAK;AAChB;AACA;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,UAAU,mBAAO,CAAC,6DAAc;AAChC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,aAAa,mBAAO,CAAC,mEAAiB;AACtC,WAAW,mBAAO,CAAC,+DAAe;AAClC,iBAAiB,mBAAO,CAAC,2EAAqB;AAC9C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,gBAAgB,mBAAO,CAAC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,wBAAwB,mBAAO,CAAC,yFAA4B;AAC5D,YAAY,mBAAO,CAAC,iEAAgB;AACpC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,cAAc,mBAAO,CAAC,qEAAkB;AACxC,WAAW,mBAAO,CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;AAChC;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,iDAAe;AACnC,aAAa,mBAAO,CAAC,mEAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,SAAS;AACxB,eAAe,SAAS;AACxB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;ACl1BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1NA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzPA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC;AAChC;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,oCAAoC;AACpC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,sDAAsD;AACtD,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE,qEAAqE;AACrE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,wBAAwB,mBAAO,CAAC,4EAA8B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,+BAA+B;AAC/B,6BAA6B;AAC7B,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;AACjC;AACA;AACA;AACA;AACA;AACA,yBAAyB,mBAAmB;AAC5C;AACA,6BAA6B,mBAAmB;AAChD;AACA,4BAA4B,SAAS;AACrC;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,aAAa;AACxB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,+BAA+B;AAC/B,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,gBAAgB,mBAAO,CAAC,0DAAa;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oCAAoC;AACpC,kCAAkC;AAClC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA,WAAW,KAAK;AAChB;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,aAAa,mBAAO,CAAC,kDAAc;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtLA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,GAAG;AACd,WAAW,GAAG;AACd;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,0DAAU;AAC9B;AACA,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,eAAe,mBAAO,CAAC,0DAAa;AACpC,eAAe,mBAAO,CAAC,0DAAa;AACpC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,qBAAqB,mBAAO,CAAC,sEAAmB;AAChD,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,WAAW,mBAAO,CAAC,kDAAS;AAC5B,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,mBAAmB,mBAAO,CAAC,kEAAiB;AAC5C,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,aAAa,mBAAO,CAAC,sDAAW;AAChC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,YAAY,mBAAO,CAAC,oDAAU;AAC9B,aAAa,mBAAO,CAAC,sDAAW;AAChC,kBAAkB,mBAAO,CAAC,gEAAgB;AAC1C,eAAe,mBAAO,CAAC,0DAAa;AACpC,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;AAC1B;AACA;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/EA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,mBAAmB,mBAAO,CAAC,uEAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,kBAAkB,mBAAO,CAAC,+DAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,iEAAa;AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,6EAAmB;AAC1C,qBAAqB,mBAAO,CAAC,6EAAmB;AAChD;AACA;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,oBAAoB,mBAAO,CAAC,mEAAiB;AAC7C;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,8CAA8C,cAAc,oBAAoB;AAChF;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd;AACA,YAAY,GAAG,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,GAAG;AACd,WAAW,QAAQ;AACnB;AACA,YAAY,GAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/GA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UCrEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack:///../../../node_modules/eventemitter3/index.js","webpack:///./runtimes/spine-canvas.js","webpack:///./runtimes/spine-webgl.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLDirect.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///../../../src/const.js","webpack:///../../../src/data/DataManager.js","webpack:///../../../src/data/events/CHANGE_DATA_EVENT.js","webpack:///../../../src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///../../../src/data/events/DESTROY_EVENT.js","webpack:///../../../src/data/events/REMOVE_DATA_EVENT.js","webpack:///../../../src/data/events/SET_DATA_EVENT.js","webpack:///../../../src/data/events/index.js","webpack:///../../../src/device/Audio.js","webpack:///../../../src/device/Browser.js","webpack:///../../../src/device/CanvasFeatures.js","webpack:///../../../src/device/Features.js","webpack:///../../../src/device/Fullscreen.js","webpack:///../../../src/device/Input.js","webpack:///../../../src/device/OS.js","webpack:///../../../src/device/Video.js","webpack:///../../../src/device/index.js","webpack:///../../../src/display/ColorMatrix.js","webpack:///../../../src/display/canvas/CanvasPool.js","webpack:///../../../src/display/canvas/Smoothing.js","webpack:///../../../src/display/mask/BitmapMask.js","webpack:///../../../src/display/mask/GeometryMask.js","webpack:///../../../src/fx/Barrel.js","webpack:///../../../src/fx/Bloom.js","webpack:///../../../src/fx/Blur.js","webpack:///../../../src/fx/Bokeh.js","webpack:///../../../src/fx/Circle.js","webpack:///../../../src/fx/ColorMatrix.js","webpack:///../../../src/fx/Controller.js","webpack:///../../../src/fx/Displacement.js","webpack:///../../../src/fx/Glow.js","webpack:///../../../src/fx/Gradient.js","webpack:///../../../src/fx/Pixelate.js","webpack:///../../../src/fx/Shadow.js","webpack:///../../../src/fx/Shine.js","webpack:///../../../src/fx/Vignette.js","webpack:///../../../src/fx/Wipe.js","webpack:///../../../src/fx/const.js","webpack:///../../../src/fx/index.js","webpack:///../../../src/gameobjects/BuildGameObject.js","webpack:///../../../src/gameobjects/GameObject.js","webpack:///../../../src/gameobjects/GameObjectFactory.js","webpack:///../../../src/gameobjects/GetCalcMatrix.js","webpack:///../../../src/gameobjects/components/Alpha.js","webpack:///../../../src/gameobjects/components/AlphaSingle.js","webpack:///../../../src/gameobjects/components/BlendMode.js","webpack:///../../../src/gameobjects/components/ComputedSize.js","webpack:///../../../src/gameobjects/components/Crop.js","webpack:///../../../src/gameobjects/components/Depth.js","webpack:///../../../src/gameobjects/components/FX.js","webpack:///../../../src/gameobjects/components/Flip.js","webpack:///../../../src/gameobjects/components/GetBounds.js","webpack:///../../../src/gameobjects/components/Mask.js","webpack:///../../../src/gameobjects/components/Origin.js","webpack:///../../../src/gameobjects/components/PathFollower.js","webpack:///../../../src/gameobjects/components/Pipeline.js","webpack:///../../../src/gameobjects/components/PostPipeline.js","webpack:///../../../src/gameobjects/components/ScrollFactor.js","webpack:///../../../src/gameobjects/components/Size.js","webpack:///../../../src/gameobjects/components/Texture.js","webpack:///../../../src/gameobjects/components/TextureCrop.js","webpack:///../../../src/gameobjects/components/Tint.js","webpack:///../../../src/gameobjects/components/ToJSON.js","webpack:///../../../src/gameobjects/components/Transform.js","webpack:///../../../src/gameobjects/components/TransformMatrix.js","webpack:///../../../src/gameobjects/components/Visible.js","webpack:///../../../src/gameobjects/components/index.js","webpack:///../../../src/gameobjects/container/Container.js","webpack:///../../../src/gameobjects/container/ContainerCanvasRenderer.js","webpack:///../../../src/gameobjects/container/ContainerRender.js","webpack:///../../../src/gameobjects/container/ContainerWebGLRenderer.js","webpack:///../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/DESTROY_EVENT.js","webpack:///../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAYING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STALLED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_TEXTURE_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///../../../src/gameobjects/events/VIDEO_UNSUPPORTED_EVENT.js","webpack:///../../../src/gameobjects/events/index.js","webpack:///../../../src/geom/const.js","webpack:///../../../src/geom/line/GetPoint.js","webpack:///../../../src/geom/line/GetPoints.js","webpack:///../../../src/geom/line/Length.js","webpack:///../../../src/geom/line/Line.js","webpack:///../../../src/geom/line/Random.js","webpack:///../../../src/geom/point/Point.js","webpack:///../../../src/geom/rectangle/Contains.js","webpack:///../../../src/geom/rectangle/GetPoint.js","webpack:///../../../src/geom/rectangle/GetPoints.js","webpack:///../../../src/geom/rectangle/Perimeter.js","webpack:///../../../src/geom/rectangle/Random.js","webpack:///../../../src/geom/rectangle/Rectangle.js","webpack:///../../../src/geom/rectangle/Union.js","webpack:///../../../src/loader/File.js","webpack:///../../../src/loader/FileTypesManager.js","webpack:///../../../src/loader/GetURL.js","webpack:///../../../src/loader/MergeXHRSettings.js","webpack:///../../../src/loader/MultiFile.js","webpack:///../../../src/loader/XHRLoader.js","webpack:///../../../src/loader/XHRSettings.js","webpack:///../../../src/loader/const.js","webpack:///../../../src/loader/events/ADD_EVENT.js","webpack:///../../../src/loader/events/COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///../../../src/loader/events/FILE_LOAD_EVENT.js","webpack:///../../../src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///../../../src/loader/events/POST_PROCESS_EVENT.js","webpack:///../../../src/loader/events/PROGRESS_EVENT.js","webpack:///../../../src/loader/events/START_EVENT.js","webpack:///../../../src/loader/events/index.js","webpack:///../../../src/loader/filetypes/ImageFile.js","webpack:///../../../src/loader/filetypes/JSONFile.js","webpack:///../../../src/loader/filetypes/TextFile.js","webpack:///../../../src/math/Average.js","webpack:///../../../src/math/Bernstein.js","webpack:///../../../src/math/Between.js","webpack:///../../../src/math/CatmullRom.js","webpack:///../../../src/math/CeilTo.js","webpack:///../../../src/math/Clamp.js","webpack:///../../../src/math/DegToRad.js","webpack:///../../../src/math/Difference.js","webpack:///../../../src/math/Euler.js","webpack:///../../../src/math/Factorial.js","webpack:///../../../src/math/FloatBetween.js","webpack:///../../../src/math/FloorTo.js","webpack:///../../../src/math/FromPercent.js","webpack:///../../../src/math/GetSpeed.js","webpack:///../../../src/math/IsEven.js","webpack:///../../../src/math/IsEvenStrict.js","webpack:///../../../src/math/Linear.js","webpack:///../../../src/math/LinearXY.js","webpack:///../../../src/math/Matrix3.js","webpack:///../../../src/math/Matrix4.js","webpack:///../../../src/math/MaxAdd.js","webpack:///../../../src/math/Median.js","webpack:///../../../src/math/MinSub.js","webpack:///../../../src/math/Percent.js","webpack:///../../../src/math/Quaternion.js","webpack:///../../../src/math/RadToDeg.js","webpack:///../../../src/math/RandomXY.js","webpack:///../../../src/math/RandomXYZ.js","webpack:///../../../src/math/RandomXYZW.js","webpack:///../../../src/math/Rotate.js","webpack:///../../../src/math/RotateAround.js","webpack:///../../../src/math/RotateAroundDistance.js","webpack:///../../../src/math/RotateTo.js","webpack:///../../../src/math/RotateVec3.js","webpack:///../../../src/math/RoundAwayFromZero.js","webpack:///../../../src/math/RoundTo.js","webpack:///../../../src/math/SinCosTableGenerator.js","webpack:///../../../src/math/SmoothStep.js","webpack:///../../../src/math/SmootherStep.js","webpack:///../../../src/math/ToXY.js","webpack:///../../../src/math/TransformXY.js","webpack:///../../../src/math/Vector2.js","webpack:///../../../src/math/Vector3.js","webpack:///../../../src/math/Vector4.js","webpack:///../../../src/math/Within.js","webpack:///../../../src/math/Wrap.js","webpack:///../../../src/math/angle/Between.js","webpack:///../../../src/math/angle/BetweenPoints.js","webpack:///../../../src/math/angle/BetweenPointsY.js","webpack:///../../../src/math/angle/BetweenY.js","webpack:///../../../src/math/angle/CounterClockwise.js","webpack:///../../../src/math/angle/Normalize.js","webpack:///../../../src/math/angle/Random.js","webpack:///../../../src/math/angle/RandomDegrees.js","webpack:///../../../src/math/angle/Reverse.js","webpack:///../../../src/math/angle/RotateTo.js","webpack:///../../../src/math/angle/ShortestBetween.js","webpack:///../../../src/math/angle/Wrap.js","webpack:///../../../src/math/angle/WrapDegrees.js","webpack:///../../../src/math/angle/index.js","webpack:///../../../src/math/const.js","webpack:///../../../src/math/distance/DistanceBetween.js","webpack:///../../../src/math/distance/DistanceBetweenPoints.js","webpack:///../../../src/math/distance/DistanceBetweenPointsSquared.js","webpack:///../../../src/math/distance/DistanceChebyshev.js","webpack:///../../../src/math/distance/DistancePower.js","webpack:///../../../src/math/distance/DistanceSnake.js","webpack:///../../../src/math/distance/DistanceSquared.js","webpack:///../../../src/math/distance/index.js","webpack:///../../../src/math/easing/back/In.js","webpack:///../../../src/math/easing/back/InOut.js","webpack:///../../../src/math/easing/back/Out.js","webpack:///../../../src/math/easing/back/index.js","webpack:///../../../src/math/easing/bounce/In.js","webpack:///../../../src/math/easing/bounce/InOut.js","webpack:///../../../src/math/easing/bounce/Out.js","webpack:///../../../src/math/easing/bounce/index.js","webpack:///../../../src/math/easing/circular/In.js","webpack:///../../../src/math/easing/circular/InOut.js","webpack:///../../../src/math/easing/circular/Out.js","webpack:///../../../src/math/easing/circular/index.js","webpack:///../../../src/math/easing/cubic/In.js","webpack:///../../../src/math/easing/cubic/InOut.js","webpack:///../../../src/math/easing/cubic/Out.js","webpack:///../../../src/math/easing/cubic/index.js","webpack:///../../../src/math/easing/elastic/In.js","webpack:///../../../src/math/easing/elastic/InOut.js","webpack:///../../../src/math/easing/elastic/Out.js","webpack:///../../../src/math/easing/elastic/index.js","webpack:///../../../src/math/easing/expo/In.js","webpack:///../../../src/math/easing/expo/InOut.js","webpack:///../../../src/math/easing/expo/Out.js","webpack:///../../../src/math/easing/expo/index.js","webpack:///../../../src/math/easing/index.js","webpack:///../../../src/math/easing/linear/Linear.js","webpack:///../../../src/math/easing/linear/index.js","webpack:///../../../src/math/easing/quadratic/In.js","webpack:///../../../src/math/easing/quadratic/InOut.js","webpack:///../../../src/math/easing/quadratic/Out.js","webpack:///../../../src/math/easing/quadratic/index.js","webpack:///../../../src/math/easing/quartic/In.js","webpack:///../../../src/math/easing/quartic/InOut.js","webpack:///../../../src/math/easing/quartic/Out.js","webpack:///../../../src/math/easing/quartic/index.js","webpack:///../../../src/math/easing/quintic/In.js","webpack:///../../../src/math/easing/quintic/InOut.js","webpack:///../../../src/math/easing/quintic/Out.js","webpack:///../../../src/math/easing/quintic/index.js","webpack:///../../../src/math/easing/sine/In.js","webpack:///../../../src/math/easing/sine/InOut.js","webpack:///../../../src/math/easing/sine/Out.js","webpack:///../../../src/math/easing/sine/index.js","webpack:///../../../src/math/easing/stepped/Stepped.js","webpack:///../../../src/math/easing/stepped/index.js","webpack:///../../../src/math/fuzzy/Ceil.js","webpack:///../../../src/math/fuzzy/Equal.js","webpack:///../../../src/math/fuzzy/Floor.js","webpack:///../../../src/math/fuzzy/GreaterThan.js","webpack:///../../../src/math/fuzzy/LessThan.js","webpack:///../../../src/math/fuzzy/index.js","webpack:///../../../src/math/index.js","webpack:///../../../src/math/interpolation/BezierInterpolation.js","webpack:///../../../src/math/interpolation/CatmullRomInterpolation.js","webpack:///../../../src/math/interpolation/CubicBezierInterpolation.js","webpack:///../../../src/math/interpolation/LinearInterpolation.js","webpack:///../../../src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///../../../src/math/interpolation/SmoothStepInterpolation.js","webpack:///../../../src/math/interpolation/SmootherStepInterpolation.js","webpack:///../../../src/math/interpolation/index.js","webpack:///../../../src/math/pow2/GetPowerOfTwo.js","webpack:///../../../src/math/pow2/IsSizePowerOfTwo.js","webpack:///../../../src/math/pow2/IsValuePowerOfTwo.js","webpack:///../../../src/math/pow2/index.js","webpack:///../../../src/math/random-data-generator/RandomDataGenerator.js","webpack:///../../../src/math/snap/SnapCeil.js","webpack:///../../../src/math/snap/SnapFloor.js","webpack:///../../../src/math/snap/SnapTo.js","webpack:///../../../src/math/snap/index.js","webpack:///../../../src/plugins/BasePlugin.js","webpack:///../../../src/plugins/PluginCache.js","webpack:///../../../src/plugins/ScenePlugin.js","webpack:///../../../src/renderer/BlendModes.js","webpack:///../../../src/renderer/ScaleModes.js","webpack:///../../../src/scale/events/RESIZE_EVENT.js","webpack:///../../../src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///../../../src/scene/events/BOOT_EVENT.js","webpack:///../../../src/scene/events/CREATE_EVENT.js","webpack:///../../../src/scene/events/DESTROY_EVENT.js","webpack:///../../../src/scene/events/PAUSE_EVENT.js","webpack:///../../../src/scene/events/POST_UPDATE_EVENT.js","webpack:///../../../src/scene/events/PRE_RENDER_EVENT.js","webpack:///../../../src/scene/events/PRE_UPDATE_EVENT.js","webpack:///../../../src/scene/events/READY_EVENT.js","webpack:///../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///../../../src/scene/events/RENDER_EVENT.js","webpack:///../../../src/scene/events/RESUME_EVENT.js","webpack:///../../../src/scene/events/SHUTDOWN_EVENT.js","webpack:///../../../src/scene/events/SLEEP_EVENT.js","webpack:///../../../src/scene/events/START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_START_EVENT.js","webpack:///../../../src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///../../../src/scene/events/UPDATE_EVENT.js","webpack:///../../../src/scene/events/WAKE_EVENT.js","webpack:///../../../src/scene/events/index.js","webpack:///../../../src/textures/Frame.js","webpack:///../../../src/tweens/builders/GetBoolean.js","webpack:///../../../src/tweens/tween/const.js","webpack:///../../../src/utils/Class.js","webpack:///../../../src/utils/NOOP.js","webpack:///../../../src/utils/array/Add.js","webpack:///../../../src/utils/array/AddAt.js","webpack:///../../../src/utils/array/BringToTop.js","webpack:///../../../src/utils/array/CountAllMatching.js","webpack:///../../../src/utils/array/Each.js","webpack:///../../../src/utils/array/EachInRange.js","webpack:///../../../src/utils/array/FindClosestInSorted.js","webpack:///../../../src/utils/array/Flatten.js","webpack:///../../../src/utils/array/GetAll.js","webpack:///../../../src/utils/array/GetFirst.js","webpack:///../../../src/utils/array/GetRandom.js","webpack:///../../../src/utils/array/MoveAbove.js","webpack:///../../../src/utils/array/MoveBelow.js","webpack:///../../../src/utils/array/MoveDown.js","webpack:///../../../src/utils/array/MoveTo.js","webpack:///../../../src/utils/array/MoveUp.js","webpack:///../../../src/utils/array/NumberArray.js","webpack:///../../../src/utils/array/NumberArrayStep.js","webpack:///../../../src/utils/array/QuickSelect.js","webpack:///../../../src/utils/array/Range.js","webpack:///../../../src/utils/array/Remove.js","webpack:///../../../src/utils/array/RemoveAt.js","webpack:///../../../src/utils/array/RemoveBetween.js","webpack:///../../../src/utils/array/RemoveRandomElement.js","webpack:///../../../src/utils/array/Replace.js","webpack:///../../../src/utils/array/RotateLeft.js","webpack:///../../../src/utils/array/RotateRight.js","webpack:///../../../src/utils/array/SafeRange.js","webpack:///../../../src/utils/array/SendToBack.js","webpack:///../../../src/utils/array/SetAll.js","webpack:///../../../src/utils/array/Shuffle.js","webpack:///../../../src/utils/array/SortByDigits.js","webpack:///../../../src/utils/array/SpliceOne.js","webpack:///../../../src/utils/array/StableSort.js","webpack:///../../../src/utils/array/Swap.js","webpack:///../../../src/utils/array/index.js","webpack:///../../../src/utils/array/matrix/CheckMatrix.js","webpack:///../../../src/utils/array/matrix/MatrixToString.js","webpack:///../../../src/utils/array/matrix/ReverseColumns.js","webpack:///../../../src/utils/array/matrix/ReverseRows.js","webpack:///../../../src/utils/array/matrix/Rotate180.js","webpack:///../../../src/utils/array/matrix/RotateLeft.js","webpack:///../../../src/utils/array/matrix/RotateMatrix.js","webpack:///../../../src/utils/array/matrix/RotateRight.js","webpack:///../../../src/utils/array/matrix/TranslateMatrix.js","webpack:///../../../src/utils/array/matrix/TransposeMatrix.js","webpack:///../../../src/utils/array/matrix/index.js","webpack:///../../../src/utils/object/DeepCopy.js","webpack:///../../../src/utils/object/Extend.js","webpack:///../../../src/utils/object/GetAdvancedValue.js","webpack:///../../../src/utils/object/GetFastValue.js","webpack:///../../../src/utils/object/GetValue.js","webpack:///../../../src/utils/object/IsPlainObject.js","webpack:///../../../src/utils/string/Pad.js","webpack:///webpack/bootstrap","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["'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\";\r\nvar spine = (() => {\r\n var __defProp = Object.defineProperty;\r\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\r\n var __getOwnPropNames = Object.getOwnPropertyNames;\r\n var __hasOwnProp = Object.prototype.hasOwnProperty;\r\n var __export = (target, all) => {\r\n for (var name in all)\r\n __defProp(target, name, { get: all[name], enumerable: true });\r\n };\r\n var __copyProps = (to, from, except, desc) => {\r\n if (from && typeof from === \"object\" || typeof from === \"function\") {\r\n for (let key of __getOwnPropNames(from))\r\n if (!__hasOwnProp.call(to, key) && key !== except)\r\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\r\n }\r\n return to;\r\n };\r\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\r\n\r\n // spine-canvas/src/index.ts\r\n var src_exports = {};\r\n __export(src_exports, {\r\n AlphaTimeline: () => AlphaTimeline,\r\n Animation: () => Animation,\r\n AnimationState: () => AnimationState,\r\n AnimationStateAdapter: () => AnimationStateAdapter,\r\n AnimationStateData: () => AnimationStateData,\r\n AssetManager: () => AssetManager,\r\n AssetManagerBase: () => AssetManagerBase,\r\n AtlasAttachmentLoader: () => AtlasAttachmentLoader,\r\n Attachment: () => Attachment,\r\n AttachmentTimeline: () => AttachmentTimeline,\r\n BinaryInput: () => BinaryInput,\r\n BlendMode: () => BlendMode,\r\n Bone: () => Bone,\r\n BoneData: () => BoneData,\r\n BoundingBoxAttachment: () => BoundingBoxAttachment,\r\n CURRENT: () => CURRENT,\r\n CanvasTexture: () => CanvasTexture,\r\n ClippingAttachment: () => ClippingAttachment,\r\n Color: () => Color,\r\n ConstraintData: () => ConstraintData,\r\n CurveTimeline: () => CurveTimeline,\r\n CurveTimeline1: () => CurveTimeline1,\r\n CurveTimeline2: () => CurveTimeline2,\r\n DebugUtils: () => DebugUtils,\r\n DeformTimeline: () => DeformTimeline,\r\n Downloader: () => Downloader,\r\n DrawOrderTimeline: () => DrawOrderTimeline,\r\n Event: () => Event,\r\n EventData: () => EventData,\r\n EventQueue: () => EventQueue,\r\n EventTimeline: () => EventTimeline,\r\n EventType: () => EventType,\r\n FIRST: () => FIRST,\r\n FakeTexture: () => FakeTexture,\r\n HOLD_FIRST: () => HOLD_FIRST,\r\n HOLD_MIX: () => HOLD_MIX,\r\n HOLD_SUBSEQUENT: () => HOLD_SUBSEQUENT,\r\n IkConstraint: () => IkConstraint,\r\n IkConstraintData: () => IkConstraintData,\r\n IkConstraintTimeline: () => IkConstraintTimeline,\r\n IntSet: () => IntSet,\r\n Interpolation: () => Interpolation,\r\n MathUtils: () => MathUtils,\r\n MeshAttachment: () => MeshAttachment,\r\n MixBlend: () => MixBlend,\r\n MixDirection: () => MixDirection,\r\n PathAttachment: () => PathAttachment,\r\n PathConstraint: () => PathConstraint,\r\n PathConstraintData: () => PathConstraintData,\r\n PathConstraintMixTimeline: () => PathConstraintMixTimeline,\r\n PathConstraintPositionTimeline: () => PathConstraintPositionTimeline,\r\n PathConstraintSpacingTimeline: () => PathConstraintSpacingTimeline,\r\n PointAttachment: () => PointAttachment,\r\n Pool: () => Pool,\r\n PositionMode: () => PositionMode,\r\n Pow: () => Pow,\r\n PowOut: () => PowOut,\r\n RGB2Timeline: () => RGB2Timeline,\r\n RGBA2Timeline: () => RGBA2Timeline,\r\n RGBATimeline: () => RGBATimeline,\r\n RGBTimeline: () => RGBTimeline,\r\n RegionAttachment: () => RegionAttachment,\r\n RotateMode: () => RotateMode,\r\n RotateTimeline: () => RotateTimeline,\r\n SETUP: () => SETUP,\r\n SUBSEQUENT: () => SUBSEQUENT,\r\n ScaleTimeline: () => ScaleTimeline,\r\n ScaleXTimeline: () => ScaleXTimeline,\r\n ScaleYTimeline: () => ScaleYTimeline,\r\n SequenceTimeline: () => SequenceTimeline,\r\n ShearTimeline: () => ShearTimeline,\r\n ShearXTimeline: () => ShearXTimeline,\r\n ShearYTimeline: () => ShearYTimeline,\r\n Skeleton: () => Skeleton,\r\n SkeletonBinary: () => SkeletonBinary,\r\n SkeletonBounds: () => SkeletonBounds,\r\n SkeletonClipping: () => SkeletonClipping,\r\n SkeletonData: () => SkeletonData,\r\n SkeletonJson: () => SkeletonJson,\r\n SkeletonRenderer: () => SkeletonRenderer,\r\n Skin: () => Skin,\r\n SkinEntry: () => SkinEntry,\r\n Slot: () => Slot,\r\n SlotData: () => SlotData,\r\n SpacingMode: () => SpacingMode,\r\n StringSet: () => StringSet,\r\n Texture: () => Texture,\r\n TextureAtlas: () => TextureAtlas,\r\n TextureAtlasPage: () => TextureAtlasPage,\r\n TextureAtlasRegion: () => TextureAtlasRegion,\r\n TextureFilter: () => TextureFilter,\r\n TextureRegion: () => TextureRegion,\r\n TextureWrap: () => TextureWrap,\r\n TimeKeeper: () => TimeKeeper,\r\n Timeline: () => Timeline,\r\n TrackEntry: () => TrackEntry,\r\n TransformConstraint: () => TransformConstraint,\r\n TransformConstraintData: () => TransformConstraintData,\r\n TransformConstraintTimeline: () => TransformConstraintTimeline,\r\n TransformMode: () => TransformMode,\r\n TranslateTimeline: () => TranslateTimeline,\r\n TranslateXTimeline: () => TranslateXTimeline,\r\n TranslateYTimeline: () => TranslateYTimeline,\r\n Triangulator: () => Triangulator,\r\n Utils: () => Utils,\r\n Vector2: () => Vector2,\r\n VertexAttachment: () => VertexAttachment,\r\n WindowedMean: () => WindowedMean\r\n });\r\n\r\n // spine-core/src/Utils.ts\r\n var IntSet = class {\r\n constructor() {\r\n this.array = new Array();\r\n }\r\n add(value) {\r\n let contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n }\r\n contains(value) {\r\n return this.array[value | 0] != void 0;\r\n }\r\n remove(value) {\r\n this.array[value | 0] = void 0;\r\n }\r\n clear() {\r\n this.array.length = 0;\r\n }\r\n };\r\n var StringSet = class {\r\n constructor() {\r\n this.entries = {};\r\n this.size = 0;\r\n }\r\n add(value) {\r\n let contains = this.entries[value];\r\n this.entries[value] = true;\r\n if (!contains) {\r\n this.size++;\r\n return true;\r\n }\r\n return false;\r\n }\r\n addAll(values) {\r\n let oldSize = this.size;\r\n for (var i = 0, n = values.length; i < n; i++)\r\n this.add(values[i]);\r\n return oldSize != this.size;\r\n }\r\n contains(value) {\r\n return this.entries[value];\r\n }\r\n clear() {\r\n this.entries = {};\r\n this.size = 0;\r\n }\r\n };\r\n var _Color = class {\r\n constructor(r = 0, g = 0, b = 0, a = 0) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n set(r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n return this.clamp();\r\n }\r\n setFromColor(c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n }\r\n setFromString(hex) {\r\n hex = hex.charAt(0) == \"#\" ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255;\r\n this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\r\n return this;\r\n }\r\n add(r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n return this.clamp();\r\n }\r\n clamp() {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n }\r\n static rgba8888ToColor(color, value) {\r\n color.r = ((value & 4278190080) >>> 24) / 255;\r\n color.g = ((value & 16711680) >>> 16) / 255;\r\n color.b = ((value & 65280) >>> 8) / 255;\r\n color.a = (value & 255) / 255;\r\n }\r\n static rgb888ToColor(color, value) {\r\n color.r = ((value & 16711680) >>> 16) / 255;\r\n color.g = ((value & 65280) >>> 8) / 255;\r\n color.b = (value & 255) / 255;\r\n }\r\n static fromString(hex) {\r\n return new _Color().setFromString(hex);\r\n }\r\n };\r\n var Color = _Color;\r\n Color.WHITE = new _Color(1, 1, 1, 1);\r\n Color.RED = new _Color(1, 0, 0, 1);\r\n Color.GREEN = new _Color(0, 1, 0, 1);\r\n Color.BLUE = new _Color(0, 0, 1, 1);\r\n Color.MAGENTA = new _Color(1, 0, 1, 1);\r\n var _MathUtils = class {\r\n static clamp(value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n }\r\n static cosDeg(degrees) {\r\n return Math.cos(degrees * _MathUtils.degRad);\r\n }\r\n static sinDeg(degrees) {\r\n return Math.sin(degrees * _MathUtils.degRad);\r\n }\r\n static signum(value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n }\r\n static toInt(x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n }\r\n static cbrt(x) {\r\n let y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n }\r\n static randomTriangular(min, max) {\r\n return _MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n }\r\n static randomTriangularWith(min, max, mode) {\r\n let u = Math.random();\r\n let d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n }\r\n static isPowerOfTwo(value) {\r\n return value && (value & value - 1) === 0;\r\n }\r\n };\r\n var MathUtils = _MathUtils;\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = _MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / _MathUtils.PI;\r\n MathUtils.radDeg = _MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = _MathUtils.PI / 180;\r\n MathUtils.degRad = _MathUtils.degreesToRadians;\r\n var Interpolation = class {\r\n apply(start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n }\r\n };\r\n var Pow = class extends Interpolation {\r\n constructor(power) {\r\n super();\r\n this.power = 2;\r\n this.power = power;\r\n }\r\n applyInternal(a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n }\r\n };\r\n var PowOut = class extends Pow {\r\n constructor(power) {\r\n super(power);\r\n }\r\n applyInternal(a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n }\r\n };\r\n var _Utils = class {\r\n static arrayCopy(source, sourceStart, dest, destStart, numElements) {\r\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n }\r\n static arrayFill(array, fromIndex, toIndex, value) {\r\n for (let i = fromIndex; i < toIndex; i++)\r\n array[i] = value;\r\n }\r\n static setArraySize(array, size, value = 0) {\r\n let oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (let i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n }\r\n static ensureArrayCapacity(array, size, value = 0) {\r\n if (array.length >= size)\r\n return array;\r\n return _Utils.setArraySize(array, size, value);\r\n }\r\n static newArray(size, defaultValue) {\r\n let array = new Array(size);\r\n for (let i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n }\r\n static newFloatArray(size) {\r\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\r\n return new Float32Array(size);\r\n else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n }\r\n static newShortArray(size) {\r\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\r\n return new Int16Array(size);\r\n else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n }\r\n static toFloatArray(array) {\r\n return _Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n }\r\n static toSinglePrecision(value) {\r\n return _Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n }\r\n static webkit602BugfixHelper(alpha, blend) {\r\n }\r\n static contains(array, element, identity = true) {\r\n for (var i = 0; i < array.length; i++)\r\n if (array[i] == element)\r\n return true;\r\n return false;\r\n }\r\n static enumValue(type, name) {\r\n return type[name[0].toUpperCase() + name.slice(1)];\r\n }\r\n };\r\n var Utils = _Utils;\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== \"undefined\";\r\n var DebugUtils = class {\r\n static logBones(skeleton) {\r\n for (let i = 0; i < skeleton.bones.length; i++) {\r\n let bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n }\r\n };\r\n var Pool = class {\r\n constructor(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n obtain() {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n }\r\n free(item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n }\r\n freeAll(items) {\r\n for (let i = 0; i < items.length; i++)\r\n this.free(items[i]);\r\n }\r\n clear() {\r\n this.items.length = 0;\r\n }\r\n };\r\n var Vector2 = class {\r\n constructor(x = 0, y = 0) {\r\n this.x = x;\r\n this.y = y;\r\n }\r\n set(x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n }\r\n length() {\r\n let x = this.x;\r\n let y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n }\r\n normalize() {\r\n let len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n }\r\n };\r\n var TimeKeeper = class {\r\n constructor() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1e3;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n update() {\r\n let now = Date.now() / 1e3;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n }\r\n };\r\n var WindowedMean = class {\r\n constructor(windowSize = 32) {\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n hasEnoughData() {\r\n return this.addedValues >= this.values.length;\r\n }\r\n addValue(value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n }\r\n getMean() {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n let mean = 0;\r\n for (let i = 0; i < this.values.length; i++)\r\n mean += this.values[i];\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n return 0;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/Attachment.ts\r\n var Attachment = class {\r\n constructor(name) {\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n };\r\n var _VertexAttachment = class extends Attachment {\r\n constructor(name) {\r\n super(name);\r\n this.id = _VertexAttachment.nextID++;\r\n this.bones = null;\r\n this.vertices = [];\r\n this.worldVerticesLength = 0;\r\n this.timelineAttachment = this;\r\n }\r\n computeWorldVertices(slot, start, count, worldVertices2, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n let skeleton = slot.bone.skeleton;\r\n let deformArray = slot.deform;\r\n let vertices = this.vertices;\r\n let bones = this.bones;\r\n if (!bones) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n let bone = slot.bone;\r\n let x = bone.worldX;\r\n let y = bone.worldY;\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (let v2 = start, w = offset; w < count; v2 += 2, w += stride) {\r\n let vx = vertices[v2], vy = vertices[v2 + 1];\r\n worldVertices2[w] = vx * a + vy * b + x;\r\n worldVertices2[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n let v = 0, skip = 0;\r\n for (let i = 0; i < start; i += 2) {\r\n let n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n let skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (let w = offset, b = skip * 3; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n let bone = skeletonBones[bones[v]];\r\n let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices2[w] = wx;\r\n worldVertices2[w + 1] = wy;\r\n }\r\n } else {\r\n let deform = deformArray;\r\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n let bone = skeletonBones[bones[v]];\r\n let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices2[w] = wx;\r\n worldVertices2[w + 1] = wy;\r\n }\r\n }\r\n }\r\n copyTo(attachment) {\r\n if (this.bones) {\r\n attachment.bones = new Array(this.bones.length);\r\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n } else\r\n attachment.bones = null;\r\n if (this.vertices) {\r\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\r\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.timelineAttachment = this.timelineAttachment;\r\n }\r\n };\r\n var VertexAttachment = _VertexAttachment;\r\n VertexAttachment.nextID = 0;\r\n\r\n // spine-core/src/attachments/Sequence.ts\r\n var _Sequence = class {\r\n constructor(count) {\r\n this.id = _Sequence.nextID();\r\n this.start = 0;\r\n this.digits = 0;\r\n this.setupIndex = 0;\r\n this.regions = new Array(count);\r\n }\r\n copy() {\r\n let copy = new _Sequence(this.regions.length);\r\n Utils.arrayCopy(this.regions, 0, copy.regions, 0, this.regions.length);\r\n copy.start = this.start;\r\n copy.digits = this.digits;\r\n copy.setupIndex = this.setupIndex;\r\n return copy;\r\n }\r\n apply(slot, attachment) {\r\n let index = slot.sequenceIndex;\r\n if (index == -1)\r\n index = this.setupIndex;\r\n if (index >= this.regions.length)\r\n index = this.regions.length - 1;\r\n let region = this.regions[index];\r\n if (attachment.region != region) {\r\n attachment.region = region;\r\n attachment.updateRegion();\r\n }\r\n }\r\n getPath(basePath, index) {\r\n let result = basePath;\r\n let frame = (this.start + index).toString();\r\n for (let i = this.digits - frame.length; i > 0; i--)\r\n result += \"0\";\r\n result += frame;\r\n return result;\r\n }\r\n static nextID() {\r\n return _Sequence._nextID++;\r\n }\r\n };\r\n var Sequence = _Sequence;\r\n Sequence._nextID = 0;\r\n var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {\r\n SequenceMode2[SequenceMode2[\"hold\"] = 0] = \"hold\";\r\n SequenceMode2[SequenceMode2[\"once\"] = 1] = \"once\";\r\n SequenceMode2[SequenceMode2[\"loop\"] = 2] = \"loop\";\r\n SequenceMode2[SequenceMode2[\"pingpong\"] = 3] = \"pingpong\";\r\n SequenceMode2[SequenceMode2[\"onceReverse\"] = 4] = \"onceReverse\";\r\n SequenceMode2[SequenceMode2[\"loopReverse\"] = 5] = \"loopReverse\";\r\n SequenceMode2[SequenceMode2[\"pingpongReverse\"] = 6] = \"pingpongReverse\";\r\n return SequenceMode2;\r\n })(SequenceMode || {});\r\n var SequenceModeValues = [\r\n 0 /* hold */,\r\n 1 /* once */,\r\n 2 /* loop */,\r\n 3 /* pingpong */,\r\n 4 /* onceReverse */,\r\n 5 /* loopReverse */,\r\n 6 /* pingpongReverse */\r\n ];\r\n\r\n // spine-core/src/Animation.ts\r\n var Animation = class {\r\n constructor(name, timelines, duration) {\r\n this.timelines = [];\r\n this.timelineIds = new StringSet();\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n this.setTimelines(timelines);\r\n this.duration = duration;\r\n }\r\n setTimelines(timelines) {\r\n if (!timelines)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.timelines = timelines;\r\n this.timelineIds.clear();\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds.addAll(timelines[i].getPropertyIds());\r\n }\r\n hasTimeline(ids) {\r\n for (let i = 0; i < ids.length; i++)\r\n if (this.timelineIds.contains(ids[i]))\r\n return true;\r\n return false;\r\n }\r\n apply(skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n let timelines = this.timelines;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n }\r\n };\r\n var MixBlend = /* @__PURE__ */ ((MixBlend2) => {\r\n MixBlend2[MixBlend2[\"setup\"] = 0] = \"setup\";\r\n MixBlend2[MixBlend2[\"first\"] = 1] = \"first\";\r\n MixBlend2[MixBlend2[\"replace\"] = 2] = \"replace\";\r\n MixBlend2[MixBlend2[\"add\"] = 3] = \"add\";\r\n return MixBlend2;\r\n })(MixBlend || {});\r\n var MixDirection = /* @__PURE__ */ ((MixDirection2) => {\r\n MixDirection2[MixDirection2[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection2[MixDirection2[\"mixOut\"] = 1] = \"mixOut\";\r\n return MixDirection2;\r\n })(MixDirection || {});\r\n var Property = {\r\n rotate: 0,\r\n x: 1,\r\n y: 2,\r\n scaleX: 3,\r\n scaleY: 4,\r\n shearX: 5,\r\n shearY: 6,\r\n rgb: 7,\r\n alpha: 8,\r\n rgb2: 9,\r\n attachment: 10,\r\n deform: 11,\r\n event: 12,\r\n drawOrder: 13,\r\n ikConstraint: 14,\r\n transformConstraint: 15,\r\n pathConstraintPosition: 16,\r\n pathConstraintSpacing: 17,\r\n pathConstraintMix: 18,\r\n sequence: 19\r\n };\r\n var Timeline = class {\r\n constructor(frameCount, propertyIds) {\r\n this.propertyIds = propertyIds;\r\n this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\r\n }\r\n getPropertyIds() {\r\n return this.propertyIds;\r\n }\r\n getFrameEntries() {\r\n return 1;\r\n }\r\n getFrameCount() {\r\n return this.frames.length / this.getFrameEntries();\r\n }\r\n getDuration() {\r\n return this.frames[this.frames.length - this.getFrameEntries()];\r\n }\r\n static search1(frames, time) {\r\n let n = frames.length;\r\n for (let i = 1; i < n; i++)\r\n if (frames[i] > time)\r\n return i - 1;\r\n return n - 1;\r\n }\r\n static search(frames, time, step) {\r\n let n = frames.length;\r\n for (let i = step; i < n; i += step)\r\n if (frames[i] > time)\r\n return i - step;\r\n return n - step;\r\n }\r\n };\r\n var CurveTimeline = class extends Timeline {\r\n constructor(frameCount, bezierCount, propertyIds) {\r\n super(frameCount, propertyIds);\r\n this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);\r\n this.curves[frameCount - 1] = 1;\r\n }\r\n setLinear(frame) {\r\n this.curves[frame] = 0;\r\n }\r\n setStepped(frame) {\r\n this.curves[frame] = 1;\r\n }\r\n shrink(bezierCount) {\r\n let size = this.getFrameCount() + bezierCount * 18;\r\n if (this.curves.length > size) {\r\n let newCurves = Utils.newFloatArray(size);\r\n Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\r\n this.curves = newCurves;\r\n }\r\n }\r\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\r\n let curves = this.curves;\r\n let i = this.getFrameCount() + bezier * 18;\r\n if (value == 0)\r\n curves[frame] = 2 + i;\r\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\r\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 6e-3;\r\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\r\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\r\n let x = time1 + dx, y = value1 + dy;\r\n for (let n = i + 18; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dx += ddx;\r\n dy += ddy;\r\n ddx += dddx;\r\n ddy += dddy;\r\n x += dx;\r\n y += dy;\r\n }\r\n }\r\n getBezierValue(time, frameIndex, valueOffset, i) {\r\n let curves = this.curves;\r\n if (curves[i] > time) {\r\n let x2 = this.frames[frameIndex], y2 = this.frames[frameIndex + valueOffset];\r\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\r\n }\r\n let n = i + 18;\r\n for (i += 2; i < n; i += 2) {\r\n if (curves[i] >= time) {\r\n let x2 = curves[i - 2], y2 = curves[i - 1];\r\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\r\n }\r\n }\r\n frameIndex += this.getFrameEntries();\r\n let x = curves[n - 2], y = curves[n - 1];\r\n return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\r\n }\r\n };\r\n var CurveTimeline1 = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, propertyId) {\r\n super(frameCount, bezierCount, [propertyId]);\r\n }\r\n getFrameEntries() {\r\n return 2;\r\n }\r\n setFrame(frame, time, value) {\r\n frame <<= 1;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = value;\r\n }\r\n getCurveValue(time) {\r\n let frames = this.frames;\r\n let i = frames.length - 2;\r\n for (let ii = 2; ii <= i; ii += 2) {\r\n if (frames[ii] > time) {\r\n i = ii - 2;\r\n break;\r\n }\r\n }\r\n let curveType = this.curves[i >> 1];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i], value = frames[i + 1];\r\n return value + (time - before) / (frames[i + 2] - before) * (frames[i + 2 + 1] - value);\r\n case 1:\r\n return frames[i + 1];\r\n }\r\n return this.getBezierValue(time, i, 1, curveType - 2);\r\n }\r\n };\r\n var CurveTimeline2 = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, propertyId1, propertyId2) {\r\n super(frameCount, bezierCount, [propertyId1, propertyId2]);\r\n }\r\n getFrameEntries() {\r\n return 3;\r\n }\r\n setFrame(frame, time, value1, value2) {\r\n frame *= 3;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = value1;\r\n this.frames[frame + 2] = value2;\r\n }\r\n };\r\n var RotateTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.rotate + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case 1 /* first */:\r\n bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\r\n }\r\n return;\r\n }\r\n let r = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.rotation = bone.data.rotation + r * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n r += bone.data.rotation - bone.rotation;\r\n case 3 /* add */:\r\n bone.rotation += r * alpha;\r\n }\r\n }\r\n };\r\n var TranslateTimeline = class extends CurveTimeline2 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(\r\n frameCount,\r\n bezierCount,\r\n Property.x + \"|\" + boneIndex,\r\n Property.y + \"|\" + boneIndex\r\n );\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case 1 /* first */:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n let x = 0, y = 0;\r\n let i = Timeline.search(frames, time, 3);\r\n let curveType = this.curves[i / 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n let t = (time - before) / (frames[i + 3] - before);\r\n x += (frames[i + 3 + 1] - x) * t;\r\n y += (frames[i + 3 + 2] - y) * t;\r\n break;\r\n case 1:\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n break;\r\n default:\r\n x = this.getBezierValue(time, i, 1, curveType - 2);\r\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n }\r\n };\r\n var TranslateXTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.x + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x;\r\n return;\r\n case 1 /* first */:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n }\r\n return;\r\n }\r\n let x = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x + x * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.x += x * alpha;\r\n }\r\n }\r\n };\r\n var TranslateYTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.y + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.y = bone.data.y;\r\n return;\r\n case 1 /* first */:\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n let y = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.y += y * alpha;\r\n }\r\n }\r\n };\r\n var ScaleTimeline = class extends CurveTimeline2 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(\r\n frameCount,\r\n bezierCount,\r\n Property.scaleX + \"|\" + boneIndex,\r\n Property.scaleY + \"|\" + boneIndex\r\n );\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case 1 /* first */:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n let x, y;\r\n let i = Timeline.search(frames, time, 3);\r\n let curveType = this.curves[i / 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n let t = (time - before) / (frames[i + 3] - before);\r\n x += (frames[i + 3 + 1] - x) * t;\r\n y += (frames[i + 3 + 2] - y) * t;\r\n break;\r\n case 1:\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n break;\r\n default:\r\n x = this.getBezierValue(time, i, 1, curveType - 2);\r\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n x *= bone.data.scaleX;\r\n y *= bone.data.scaleY;\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n } else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n } else {\r\n let bx = 0, by = 0;\r\n if (direction == 1 /* mixOut */) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var ScaleXTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.scaleX = bone.data.scaleX;\r\n return;\r\n case 1 /* first */:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n }\r\n return;\r\n }\r\n let x = this.getCurveValue(time) * bone.data.scaleX;\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */)\r\n bone.scaleX += x - bone.data.scaleX;\r\n else\r\n bone.scaleX = x;\r\n } else {\r\n let bx = 0;\r\n if (direction == 1 /* mixOut */) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = bone.data.scaleX;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = bone.scaleX;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var ScaleYTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case 1 /* first */:\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n let y = this.getCurveValue(time) * bone.data.scaleY;\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */)\r\n bone.scaleY += y - bone.data.scaleY;\r\n else\r\n bone.scaleY = y;\r\n } else {\r\n let by = 0;\r\n if (direction == 1 /* mixOut */) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n by = bone.data.scaleY;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n by = bone.scaleY;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var ShearTimeline = class extends CurveTimeline2 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(\r\n frameCount,\r\n bezierCount,\r\n Property.shearX + \"|\" + boneIndex,\r\n Property.shearY + \"|\" + boneIndex\r\n );\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case 1 /* first */:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n let x = 0, y = 0;\r\n let i = Timeline.search(frames, time, 3);\r\n let curveType = this.curves[i / 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n let t = (time - before) / (frames[i + 3] - before);\r\n x += (frames[i + 3 + 1] - x) * t;\r\n y += (frames[i + 3 + 2] - y) * t;\r\n break;\r\n case 1:\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n break;\r\n default:\r\n x = this.getBezierValue(time, i, 1, curveType - 2);\r\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n }\r\n };\r\n var ShearXTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.shearX + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX;\r\n return;\r\n case 1 /* first */:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n }\r\n return;\r\n }\r\n let x = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.shearX += x * alpha;\r\n }\r\n }\r\n };\r\n var ShearYTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.shearY + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case 1 /* first */:\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n let y = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.shearY += y * alpha;\r\n }\r\n }\r\n };\r\n var RGBATimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex,\r\n Property.alpha + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 5;\r\n }\r\n setFrame(frame, time, r, g, b, a) {\r\n frame *= 5;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n this.frames[frame + 4] = a;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let color = slot.color;\r\n if (time < frames[0]) {\r\n let setup = slot.data.color;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n color.setFromColor(setup);\r\n return;\r\n case 1 /* first */:\r\n color.add(\r\n (setup.r - color.r) * alpha,\r\n (setup.g - color.g) * alpha,\r\n (setup.b - color.b) * alpha,\r\n (setup.a - color.a) * alpha\r\n );\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0, a = 0;\r\n let i = Timeline.search(frames, time, 5);\r\n let curveType = this.curves[i / 5];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n let t = (time - before) / (frames[i + 5] - before);\r\n r += (frames[i + 5 + 1] - r) * t;\r\n g += (frames[i + 5 + 2] - g) * t;\r\n b += (frames[i + 5 + 3] - b) * t;\r\n a += (frames[i + 5 + 4] - a) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n }\r\n if (alpha == 1)\r\n color.set(r, g, b, a);\r\n else {\r\n if (blend == 0 /* setup */)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n }\r\n };\r\n var RGBTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 4;\r\n }\r\n setFrame(frame, time, r, g, b) {\r\n frame <<= 2;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let color = slot.color;\r\n if (time < frames[0]) {\r\n let setup = slot.data.color;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n color.r = setup.r;\r\n color.g = setup.g;\r\n color.b = setup.b;\r\n return;\r\n case 1 /* first */:\r\n color.r += (setup.r - color.r) * alpha;\r\n color.g += (setup.g - color.g) * alpha;\r\n color.b += (setup.b - color.b) * alpha;\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0;\r\n let i = Timeline.search(frames, time, 4);\r\n let curveType = this.curves[i >> 2];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n let t = (time - before) / (frames[i + 4] - before);\r\n r += (frames[i + 4 + 1] - r) * t;\r\n g += (frames[i + 4 + 2] - g) * t;\r\n b += (frames[i + 4 + 3] - b) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n }\r\n if (alpha == 1) {\r\n color.r = r;\r\n color.g = g;\r\n color.b = b;\r\n } else {\r\n if (blend == 0 /* setup */) {\r\n let setup = slot.data.color;\r\n color.r = setup.r;\r\n color.g = setup.g;\r\n color.b = setup.b;\r\n }\r\n color.r += (r - color.r) * alpha;\r\n color.g += (g - color.g) * alpha;\r\n color.b += (b - color.b) * alpha;\r\n }\r\n }\r\n };\r\n var AlphaTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, Property.alpha + \"|\" + slotIndex);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let color = slot.color;\r\n if (time < this.frames[0]) {\r\n let setup = slot.data.color;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n color.a = setup.a;\r\n return;\r\n case 1 /* first */:\r\n color.a += (setup.a - color.a) * alpha;\r\n }\r\n return;\r\n }\r\n let a = this.getCurveValue(time);\r\n if (alpha == 1)\r\n color.a = a;\r\n else {\r\n if (blend == 0 /* setup */)\r\n color.a = slot.data.color.a;\r\n color.a += (a - color.a) * alpha;\r\n }\r\n }\r\n };\r\n var RGBA2Timeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex,\r\n Property.alpha + \"|\" + slotIndex,\r\n Property.rgb2 + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 8;\r\n }\r\n setFrame(frame, time, r, g, b, a, r2, g2, b2) {\r\n frame <<= 3;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n this.frames[frame + 4] = a;\r\n this.frames[frame + 5] = r2;\r\n this.frames[frame + 6] = g2;\r\n this.frames[frame + 7] = b2;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let light = slot.color, dark = slot.darkColor;\r\n if (time < frames[0]) {\r\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n light.setFromColor(setupLight);\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n return;\r\n case 1 /* first */:\r\n light.add(\r\n (setupLight.r - light.r) * alpha,\r\n (setupLight.g - light.g) * alpha,\r\n (setupLight.b - light.b) * alpha,\r\n (setupLight.a - light.a) * alpha\r\n );\r\n dark.r += (setupDark.r - dark.r) * alpha;\r\n dark.g += (setupDark.g - dark.g) * alpha;\r\n dark.b += (setupDark.b - dark.b) * alpha;\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n let i = Timeline.search(frames, time, 8);\r\n let curveType = this.curves[i >> 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n r2 = frames[i + 5];\r\n g2 = frames[i + 6];\r\n b2 = frames[i + 7];\r\n let t = (time - before) / (frames[i + 8] - before);\r\n r += (frames[i + 8 + 1] - r) * t;\r\n g += (frames[i + 8 + 2] - g) * t;\r\n b += (frames[i + 8 + 3] - b) * t;\r\n a += (frames[i + 8 + 4] - a) * t;\r\n r2 += (frames[i + 8 + 5] - r2) * t;\r\n g2 += (frames[i + 8 + 6] - g2) * t;\r\n b2 += (frames[i + 8 + 7] - b2) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n r2 = frames[i + 5];\r\n g2 = frames[i + 6];\r\n b2 = frames[i + 7];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n r2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\r\n g2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\r\n b2 = this.getBezierValue(time, i, 7, curveType + 18 * 6 - 2);\r\n }\r\n if (alpha == 1) {\r\n light.set(r, g, b, a);\r\n dark.r = r2;\r\n dark.g = g2;\r\n dark.b = b2;\r\n } else {\r\n if (blend == 0 /* setup */) {\r\n light.setFromColor(slot.data.color);\r\n let setupDark = slot.data.darkColor;\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.r += (r2 - dark.r) * alpha;\r\n dark.g += (g2 - dark.g) * alpha;\r\n dark.b += (b2 - dark.b) * alpha;\r\n }\r\n }\r\n };\r\n var RGB2Timeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex,\r\n Property.rgb2 + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 7;\r\n }\r\n setFrame(frame, time, r, g, b, r2, g2, b2) {\r\n frame *= 7;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n this.frames[frame + 4] = r2;\r\n this.frames[frame + 5] = g2;\r\n this.frames[frame + 6] = b2;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let light = slot.color, dark = slot.darkColor;\r\n if (time < frames[0]) {\r\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n light.r = setupLight.r;\r\n light.g = setupLight.g;\r\n light.b = setupLight.b;\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n return;\r\n case 1 /* first */:\r\n light.r += (setupLight.r - light.r) * alpha;\r\n light.g += (setupLight.g - light.g) * alpha;\r\n light.b += (setupLight.b - light.b) * alpha;\r\n dark.r += (setupDark.r - dark.r) * alpha;\r\n dark.g += (setupDark.g - dark.g) * alpha;\r\n dark.b += (setupDark.b - dark.b) * alpha;\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n let i = Timeline.search(frames, time, 7);\r\n let curveType = this.curves[i / 7];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n r2 = frames[i + 4];\r\n g2 = frames[i + 5];\r\n b2 = frames[i + 6];\r\n let t = (time - before) / (frames[i + 7] - before);\r\n r += (frames[i + 7 + 1] - r) * t;\r\n g += (frames[i + 7 + 2] - g) * t;\r\n b += (frames[i + 7 + 3] - b) * t;\r\n r2 += (frames[i + 7 + 4] - r2) * t;\r\n g2 += (frames[i + 7 + 5] - g2) * t;\r\n b2 += (frames[i + 7 + 6] - b2) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n r2 = frames[i + 4];\r\n g2 = frames[i + 5];\r\n b2 = frames[i + 6];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n r2 = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n g2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\r\n b2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\r\n }\r\n if (alpha == 1) {\r\n light.r = r;\r\n light.g = g;\r\n light.b = b;\r\n dark.r = r2;\r\n dark.g = g2;\r\n dark.b = b2;\r\n } else {\r\n if (blend == 0 /* setup */) {\r\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.r = setupLight.r;\r\n light.g = setupLight.g;\r\n light.b = setupLight.b;\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n }\r\n light.r += (r - light.r) * alpha;\r\n light.g += (g - light.g) * alpha;\r\n light.b += (b - light.b) * alpha;\r\n dark.r += (r2 - dark.r) * alpha;\r\n dark.g += (g2 - dark.g) * alpha;\r\n dark.b += (b2 - dark.b) * alpha;\r\n }\r\n }\r\n };\r\n var AttachmentTimeline = class extends Timeline {\r\n constructor(frameCount, slotIndex) {\r\n super(frameCount, [\r\n Property.attachment + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, time, attachmentName) {\r\n this.frames[frame] = time;\r\n this.attachmentNames[frame] = attachmentName;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == 1 /* mixOut */) {\r\n if (blend == 0 /* setup */)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n if (time < this.frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\r\n }\r\n setAttachment(skeleton, slot, attachmentName) {\r\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n }\r\n };\r\n var DeformTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex, attachment) {\r\n super(frameCount, bezierCount, [\r\n Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n this.attachment = attachment;\r\n this.vertices = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, time, vertices) {\r\n this.frames[frame] = time;\r\n this.vertices[frame] = vertices;\r\n }\r\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\r\n let curves = this.curves;\r\n let i = this.getFrameCount() + bezier * 18;\r\n if (value == 0)\r\n curves[frame] = 2 + i;\r\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\r\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\r\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\r\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\r\n let x = time1 + dx, y = dy;\r\n for (let n = i + 18; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dx += ddx;\r\n dy += ddy;\r\n ddx += dddx;\r\n ddy += dddy;\r\n x += dx;\r\n y += dy;\r\n }\r\n }\r\n getCurvePercent(time, frame) {\r\n let curves = this.curves;\r\n let i = curves[frame];\r\n switch (i) {\r\n case 0:\r\n let x2 = this.frames[frame];\r\n return (time - x2) / (this.frames[frame + this.getFrameEntries()] - x2);\r\n case 1:\r\n return 0;\r\n }\r\n i -= 2;\r\n if (curves[i] > time) {\r\n let x2 = this.frames[frame];\r\n return curves[i + 1] * (time - x2) / (curves[i] - x2);\r\n }\r\n let n = i + 18;\r\n for (i += 2; i < n; i += 2) {\r\n if (curves[i] >= time) {\r\n let x2 = curves[i - 2], y2 = curves[i - 1];\r\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\r\n }\r\n }\r\n let x = curves[n - 2], y = curves[n - 1];\r\n return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let slotAttachment = slot.getAttachment();\r\n if (!slotAttachment)\r\n return;\r\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)\r\n return;\r\n let deform = slot.deform;\r\n if (deform.length == 0)\r\n blend = 0 /* setup */;\r\n let vertices = this.vertices;\r\n let vertexCount = vertices[0].length;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n deform.length = 0;\r\n return;\r\n case 1 /* first */:\r\n if (alpha == 1) {\r\n deform.length = 0;\r\n return;\r\n }\r\n deform.length = vertexCount;\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\r\n } else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n deform.length = vertexCount;\r\n if (time >= frames[frames.length - 1]) {\r\n let lastVertices = vertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */) {\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += lastVertices[i2] - setupVertices[i2];\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += lastVertices[i2];\r\n }\r\n } else\r\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */: {\r\n let vertexAttachment2 = slotAttachment;\r\n if (!vertexAttachment2.bones) {\r\n let setupVertices = vertexAttachment2.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let setup = setupVertices[i2];\r\n deform[i2] = setup + (lastVertices[i2] - setup) * alpha;\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] = lastVertices[i2] * alpha;\r\n }\r\n break;\r\n }\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += (lastVertices[i2] - deform[i2]) * alpha;\r\n break;\r\n case 3 /* add */:\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += (lastVertices[i2] - setupVertices[i2]) * alpha;\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += lastVertices[i2] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n let frame = Timeline.search1(frames, time);\r\n let percent = this.getCurvePercent(time, frame);\r\n let prevVertices = vertices[frame];\r\n let nextVertices = vertices[frame + 1];\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */) {\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += prev + (nextVertices[i2] - prev) * percent - setupVertices[i2];\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += prev + (nextVertices[i2] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] = prev + (nextVertices[i2] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */: {\r\n let vertexAttachment2 = slotAttachment;\r\n if (!vertexAttachment2.bones) {\r\n let setupVertices = vertexAttachment2.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2], setup = setupVertices[i2];\r\n deform[i2] = setup + (prev + (nextVertices[i2] - prev) * percent - setup) * alpha;\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] = (prev + (nextVertices[i2] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - deform[i2]) * alpha;\r\n }\r\n break;\r\n case 3 /* add */:\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - setupVertices[i2]) * alpha;\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var _EventTimeline = class extends Timeline {\r\n constructor(frameCount) {\r\n super(frameCount, _EventTimeline.propertyIds);\r\n this.events = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, event) {\r\n this.frames[frame] = event.time;\r\n this.events[frame] = event;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (!firedEvents)\r\n return;\r\n let frames = this.frames;\r\n let frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n } else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n let i = 0;\r\n if (lastTime < frames[0])\r\n i = 0;\r\n else {\r\n i = Timeline.search1(frames, lastTime) + 1;\r\n let frameTime = frames[i];\r\n while (i > 0) {\r\n if (frames[i - 1] != frameTime)\r\n break;\r\n i--;\r\n }\r\n }\r\n for (; i < frameCount && time >= frames[i]; i++)\r\n firedEvents.push(this.events[i]);\r\n }\r\n };\r\n var EventTimeline = _EventTimeline;\r\n EventTimeline.propertyIds = [\"\" + Property.event];\r\n var _DrawOrderTimeline = class extends Timeline {\r\n constructor(frameCount) {\r\n super(frameCount, _DrawOrderTimeline.propertyIds);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, time, drawOrder) {\r\n this.frames[frame] = time;\r\n this.drawOrders[frame] = drawOrder;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (direction == 1 /* mixOut */) {\r\n if (blend == 0 /* setup */)\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n if (time < this.frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n let idx = Timeline.search1(this.frames, time);\r\n let drawOrderToSetupIndex = this.drawOrders[idx];\r\n if (!drawOrderToSetupIndex)\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n else {\r\n let drawOrder = skeleton.drawOrder;\r\n let slots = skeleton.slots;\r\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n }\r\n };\r\n var DrawOrderTimeline = _DrawOrderTimeline;\r\n DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\r\n var IkConstraintTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, ikConstraintIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.ikConstraint + \"|\" + ikConstraintIndex\r\n ]);\r\n this.ikConstraintIndex = 0;\r\n this.ikConstraintIndex = ikConstraintIndex;\r\n }\r\n getFrameEntries() {\r\n return 6;\r\n }\r\n setFrame(frame, time, mix, softness, bendDirection, compress, stretch) {\r\n frame *= 6;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = mix;\r\n this.frames[frame + 2] = softness;\r\n this.frames[frame + 3] = bendDirection;\r\n this.frames[frame + 4] = compress ? 1 : 0;\r\n this.frames[frame + 5] = stretch ? 1 : 0;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case 1 /* first */:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n let mix = 0, softness = 0;\r\n let i = Timeline.search(frames, time, 6);\r\n let curveType = this.curves[i / 6];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n mix = frames[i + 1];\r\n softness = frames[i + 2];\r\n let t = (time - before) / (frames[i + 6] - before);\r\n mix += (frames[i + 6 + 1] - mix) * t;\r\n softness += (frames[i + 6 + 2] - softness) * t;\r\n break;\r\n case 1:\r\n mix = frames[i + 1];\r\n softness = frames[i + 2];\r\n break;\r\n default:\r\n mix = this.getBezierValue(time, i, 1, curveType - 2);\r\n softness = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n if (blend == 0 /* setup */) {\r\n constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\r\n if (direction == 1 /* mixOut */) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n } else {\r\n constraint.bendDirection = frames[i + 3];\r\n constraint.compress = frames[i + 4] != 0;\r\n constraint.stretch = frames[i + 5] != 0;\r\n }\r\n } else {\r\n constraint.mix += (mix - constraint.mix) * alpha;\r\n constraint.softness += (softness - constraint.softness) * alpha;\r\n if (direction == 0 /* mixIn */) {\r\n constraint.bendDirection = frames[i + 3];\r\n constraint.compress = frames[i + 4] != 0;\r\n constraint.stretch = frames[i + 5] != 0;\r\n }\r\n }\r\n }\r\n };\r\n var TransformConstraintTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, transformConstraintIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.transformConstraint + \"|\" + transformConstraintIndex\r\n ]);\r\n this.transformConstraintIndex = 0;\r\n this.transformConstraintIndex = transformConstraintIndex;\r\n }\r\n getFrameEntries() {\r\n return 7;\r\n }\r\n setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\r\n let frames = this.frames;\r\n frame *= 7;\r\n frames[frame] = time;\r\n frames[frame + 1] = mixRotate;\r\n frames[frame + 2] = mixX;\r\n frames[frame + 3] = mixY;\r\n frames[frame + 4] = mixScaleX;\r\n frames[frame + 5] = mixScaleY;\r\n frames[frame + 6] = mixShearY;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n let data = constraint.data;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.mixRotate = data.mixRotate;\r\n constraint.mixX = data.mixX;\r\n constraint.mixY = data.mixY;\r\n constraint.mixScaleX = data.mixScaleX;\r\n constraint.mixScaleY = data.mixScaleY;\r\n constraint.mixShearY = data.mixShearY;\r\n return;\r\n case 1 /* first */:\r\n constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (data.mixX - constraint.mixX) * alpha;\r\n constraint.mixY += (data.mixY - constraint.mixY) * alpha;\r\n constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\r\n constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\r\n constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\r\n }\r\n return;\r\n }\r\n let rotate, x, y, scaleX, scaleY, shearY;\r\n let i = Timeline.search(frames, time, 7);\r\n let curveType = this.curves[i / 7];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n scaleX = frames[i + 4];\r\n scaleY = frames[i + 5];\r\n shearY = frames[i + 6];\r\n let t = (time - before) / (frames[i + 7] - before);\r\n rotate += (frames[i + 7 + 1] - rotate) * t;\r\n x += (frames[i + 7 + 2] - x) * t;\r\n y += (frames[i + 7 + 3] - y) * t;\r\n scaleX += (frames[i + 7 + 4] - scaleX) * t;\r\n scaleY += (frames[i + 7 + 5] - scaleY) * t;\r\n shearY += (frames[i + 7 + 6] - shearY) * t;\r\n break;\r\n case 1:\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n scaleX = frames[i + 4];\r\n scaleY = frames[i + 5];\r\n shearY = frames[i + 6];\r\n break;\r\n default:\r\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\r\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n scaleX = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n scaleY = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\r\n shearY = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\r\n }\r\n if (blend == 0 /* setup */) {\r\n let data = constraint.data;\r\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\r\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\r\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\r\n constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\r\n constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\r\n constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\r\n } else {\r\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (x - constraint.mixX) * alpha;\r\n constraint.mixY += (y - constraint.mixY) * alpha;\r\n constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\r\n constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\r\n constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\r\n }\r\n }\r\n };\r\n var PathConstraintPositionTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, pathConstraintIndex) {\r\n super(frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex);\r\n this.pathConstraintIndex = 0;\r\n this.pathConstraintIndex = pathConstraintIndex;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case 1 /* first */:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n let position = this.getCurveValue(time);\r\n if (blend == 0 /* setup */)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n }\r\n };\r\n var PathConstraintSpacingTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, pathConstraintIndex) {\r\n super(frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex);\r\n this.pathConstraintIndex = 0;\r\n this.pathConstraintIndex = pathConstraintIndex;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case 1 /* first */:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n let spacing = this.getCurveValue(time);\r\n if (blend == 0 /* setup */)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n }\r\n };\r\n var PathConstraintMixTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, pathConstraintIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.pathConstraintMix + \"|\" + pathConstraintIndex\r\n ]);\r\n this.pathConstraintIndex = 0;\r\n this.pathConstraintIndex = pathConstraintIndex;\r\n }\r\n getFrameEntries() {\r\n return 4;\r\n }\r\n setFrame(frame, time, mixRotate, mixX, mixY) {\r\n let frames = this.frames;\r\n frame <<= 2;\r\n frames[frame] = time;\r\n frames[frame + 1] = mixRotate;\r\n frames[frame + 2] = mixX;\r\n frames[frame + 3] = mixY;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.mixRotate = constraint.data.mixRotate;\r\n constraint.mixX = constraint.data.mixX;\r\n constraint.mixY = constraint.data.mixY;\r\n return;\r\n case 1 /* first */:\r\n constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\r\n constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\r\n }\r\n return;\r\n }\r\n let rotate, x, y;\r\n let i = Timeline.search(frames, time, 4);\r\n let curveType = this.curves[i >> 2];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n let t = (time - before) / (frames[i + 4] - before);\r\n rotate += (frames[i + 4 + 1] - rotate) * t;\r\n x += (frames[i + 4 + 2] - x) * t;\r\n y += (frames[i + 4 + 3] - y) * t;\r\n break;\r\n case 1:\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n break;\r\n default:\r\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\r\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n }\r\n if (blend == 0 /* setup */) {\r\n let data = constraint.data;\r\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\r\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\r\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\r\n } else {\r\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (x - constraint.mixX) * alpha;\r\n constraint.mixY += (y - constraint.mixY) * alpha;\r\n }\r\n }\r\n };\r\n var _SequenceTimeline = class extends Timeline {\r\n constructor(frameCount, slotIndex, attachment) {\r\n super(frameCount, [\r\n Property.sequence + \"|\" + slotIndex + \"|\" + attachment.sequence.id\r\n ]);\r\n this.slotIndex = slotIndex;\r\n this.attachment = attachment;\r\n }\r\n getFrameEntries() {\r\n return _SequenceTimeline.ENTRIES;\r\n }\r\n getSlotIndex() {\r\n return this.slotIndex;\r\n }\r\n getAttachment() {\r\n return this.attachment;\r\n }\r\n setFrame(frame, time, mode, index, delay) {\r\n let frames = this.frames;\r\n frame *= _SequenceTimeline.ENTRIES;\r\n frames[frame] = time;\r\n frames[frame + _SequenceTimeline.MODE] = mode | index << 4;\r\n frames[frame + _SequenceTimeline.DELAY] = delay;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let slotAttachment = slot.attachment;\r\n let attachment = this.attachment;\r\n if (slotAttachment != attachment) {\r\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)\r\n return;\r\n }\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n slot.sequenceIndex = -1;\r\n return;\r\n }\r\n let i = Timeline.search(frames, time, _SequenceTimeline.ENTRIES);\r\n let before = frames[i];\r\n let modeAndIndex = frames[i + _SequenceTimeline.MODE];\r\n let delay = frames[i + _SequenceTimeline.DELAY];\r\n if (!this.attachment.sequence)\r\n return;\r\n let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;\r\n let mode = SequenceModeValues[modeAndIndex & 15];\r\n if (mode != 0 /* hold */) {\r\n index += (time - before) / delay + 1e-5 | 0;\r\n switch (mode) {\r\n case 1 /* once */:\r\n index = Math.min(count - 1, index);\r\n break;\r\n case 2 /* loop */:\r\n index %= count;\r\n break;\r\n case 3 /* pingpong */: {\r\n let n = (count << 1) - 2;\r\n index = n == 0 ? 0 : index % n;\r\n if (index >= count)\r\n index = n - index;\r\n break;\r\n }\r\n case 4 /* onceReverse */:\r\n index = Math.max(count - 1 - index, 0);\r\n break;\r\n case 5 /* loopReverse */:\r\n index = count - 1 - index % count;\r\n break;\r\n case 6 /* pingpongReverse */: {\r\n let n = (count << 1) - 2;\r\n index = n == 0 ? 0 : (index + count - 1) % n;\r\n if (index >= count)\r\n index = n - index;\r\n }\r\n }\r\n }\r\n slot.sequenceIndex = index;\r\n }\r\n };\r\n var SequenceTimeline = _SequenceTimeline;\r\n SequenceTimeline.ENTRIES = 3;\r\n SequenceTimeline.MODE = 1;\r\n SequenceTimeline.DELAY = 2;\r\n\r\n // spine-core/src/AnimationState.ts\r\n var _AnimationState = class {\r\n constructor(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new StringSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new Pool(() => new TrackEntry());\r\n this.data = data;\r\n }\r\n static emptyAnimation() {\r\n return _AnimationState._emptyAnimation;\r\n }\r\n update(delta) {\r\n delta *= this.timeScale;\r\n let tracks = this.tracks;\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let current = tracks[i];\r\n if (!current)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n let currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n let next = current.next;\r\n if (next) {\r\n let nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n } else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.clearNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\r\n let from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from)\r\n from.mixingTo = null;\r\n while (from) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n }\r\n updateMixingFrom(to, delta) {\r\n let from = to.mixingFrom;\r\n if (!from)\r\n return true;\r\n let finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n }\r\n apply(skeleton) {\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n let events = this.events;\r\n let tracks = this.tracks;\r\n let applied = false;\r\n for (let i2 = 0, n2 = tracks.length; i2 < n2; i2++) {\r\n let current = tracks[i2];\r\n if (!current || current.delay > 0)\r\n continue;\r\n applied = true;\r\n let blend = i2 == 0 ? 1 /* first */ : current.mixBlend;\r\n let mix = current.alpha;\r\n if (current.mixingFrom)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && !current.next)\r\n mix = 0;\r\n let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\r\n let applyEvents = events;\r\n if (current.reverse) {\r\n applyTime = current.animation.duration - applyTime;\r\n applyEvents = null;\r\n }\r\n let timelines = current.animation.timelines;\r\n let timelineCount = timelines.length;\r\n if (i2 == 0 && mix == 1 || blend == 3 /* add */) {\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, 0 /* mixIn */);\r\n }\r\n } else {\r\n let timelineMode = current.timelineMode;\r\n let shortestRotation = current.shortestRotation;\r\n let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;\r\n if (firstFrame)\r\n current.timelinesRotation.length = timelineCount << 1;\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n let timeline2 = timelines[ii];\r\n let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : 0 /* setup */;\r\n if (!shortestRotation && timeline2 instanceof RotateTimeline) {\r\n this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\r\n } else if (timeline2 instanceof AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);\r\n } else {\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n timeline2.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, 0 /* mixIn */);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n }\r\n applyMixingFrom(to, skeleton, blend) {\r\n let from = to.mixingFrom;\r\n if (from.mixingFrom)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n let mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == 1 /* first */)\r\n blend = 0 /* setup */;\r\n } else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != 1 /* first */)\r\n blend = from.mixBlend;\r\n }\r\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n let timelines = from.animation.timelines;\r\n let timelineCount = timelines.length;\r\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\r\n let events = null;\r\n if (from.reverse)\r\n applyTime = from.animation.duration - applyTime;\r\n else if (mix < from.eventThreshold)\r\n events = this.events;\r\n if (blend == 3 /* add */) {\r\n for (let i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, 1 /* mixOut */);\r\n } else {\r\n let timelineMode = from.timelineMode;\r\n let timelineHoldMix = from.timelineHoldMix;\r\n let shortestRotation = from.shortestRotation;\r\n let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;\r\n if (firstFrame)\r\n from.timelinesRotation.length = timelineCount << 1;\r\n from.totalAlpha = 0;\r\n for (let i = 0; i < timelineCount; i++) {\r\n let timeline = timelines[i];\r\n let direction = 1 /* mixOut */;\r\n let timelineBlend;\r\n let alpha = 0;\r\n switch (timelineMode[i]) {\r\n case SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case FIRST:\r\n timelineBlend = 0 /* setup */;\r\n alpha = alphaMix;\r\n break;\r\n case HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case HOLD_FIRST:\r\n timelineBlend = 0 /* setup */;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = 0 /* setup */;\r\n let holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (!shortestRotation && timeline instanceof RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\r\n else {\r\n Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == 0 /* setup */)\r\n direction = 0 /* mixIn */;\r\n timeline.apply(skeleton, animationLast, applyTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n }\r\n applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (time < timeline.frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n } else\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + SETUP;\r\n }\r\n setAttachment(skeleton, slot, attachmentName, attachments) {\r\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + CURRENT;\r\n }\r\n applyRotateTimeline(timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, 0 /* mixIn */);\r\n return;\r\n }\r\n let bone = skeleton.bones[timeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = timeline.frames;\r\n let r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case 1 /* first */:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n } else {\r\n r1 = blend == 0 /* setup */ ? bone.data.rotation : bone.rotation;\r\n r2 = bone.data.rotation + timeline.getCurveValue(time);\r\n }\r\n let total = 0, diff = r2 - r1;\r\n diff -= (16384 - (16384.499999999996 - diff / 360 | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n } else {\r\n let lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n } else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n let current = diff > 0, dir = lastTotal >= 0;\r\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n bone.rotation = r1 + total * alpha;\r\n }\r\n queueEvents(entry, animationTime) {\r\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n let duration = animationEnd - animationStart;\r\n let trackLastWrapped = entry.trackLast % duration;\r\n let events = this.events;\r\n let i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < trackLastWrapped)\r\n break;\r\n if (event.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event);\r\n }\r\n let complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < animationStart)\r\n continue;\r\n this.queue.event(entry, event);\r\n }\r\n }\r\n clearTracks() {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n clearTrack(trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n let current = this.tracks[trackIndex];\r\n if (!current)\r\n return;\r\n this.queue.end(current);\r\n this.clearNext(current);\r\n let entry = current;\r\n while (true) {\r\n let from = entry.mixingFrom;\r\n if (!from)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n }\r\n setCurrent(index, current, interrupt) {\r\n let from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n current.previous = null;\r\n if (from) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n }\r\n setAnimation(trackIndex, animationName, loop = false) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (!animation)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n }\r\n setAnimationWith(trackIndex, animation, loop = false) {\r\n if (!animation)\r\n throw new Error(\"animation cannot be null.\");\r\n let interrupt = true;\r\n let current = this.expandToIndex(trackIndex);\r\n if (current) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.clearNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n } else\r\n this.clearNext(current);\r\n }\r\n let entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n }\r\n addAnimation(trackIndex, animationName, loop = false, delay = 0) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (!animation)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n }\r\n addAnimationWith(trackIndex, animation, loop = false, delay = 0) {\r\n if (!animation)\r\n throw new Error(\"animation cannot be null.\");\r\n let last = this.expandToIndex(trackIndex);\r\n if (last) {\r\n while (last.next)\r\n last = last.next;\r\n }\r\n let entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (!last) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n } else {\r\n last.next = entry;\r\n entry.previous = last;\r\n if (delay <= 0)\r\n delay += last.getTrackComplete() - entry.mixDuration;\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n }\r\n setEmptyAnimation(trackIndex, mixDuration = 0) {\r\n let entry = this.setAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {\r\n let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);\r\n if (delay <= 0)\r\n entry.delay += entry.mixDuration - mixDuration;\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n setEmptyAnimations(mixDuration = 0) {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++) {\r\n let current = this.tracks[i];\r\n if (current)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n expandToIndex(index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n }\r\n trackEntry(trackIndex, animation, loop, last) {\r\n let entry = this.trackEntryPool.obtain();\r\n entry.reset();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.reverse = false;\r\n entry.shortestRotation = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\r\n entry.interruptAlpha = 1;\r\n entry.totalAlpha = 0;\r\n entry.mixBlend = 2 /* replace */;\r\n return entry;\r\n }\r\n clearNext(entry) {\r\n let next = entry.next;\r\n while (next) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n }\r\n _animationsChanged() {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n let tracks = this.tracks;\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let entry = tracks[i];\r\n if (!entry)\r\n continue;\r\n while (entry.mixingFrom)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (!entry.mixingTo || entry.mixBlend != 3 /* add */)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry);\r\n }\r\n }\r\n computeHold(entry) {\r\n let to = entry.mixingTo;\r\n let timelines = entry.animation.timelines;\r\n let timelinesCount = entry.animation.timelines.length;\r\n let timelineMode = entry.timelineMode;\r\n timelineMode.length = timelinesCount;\r\n let timelineHoldMix = entry.timelineHoldMix;\r\n timelineHoldMix.length = 0;\r\n let propertyIDs = this.propertyIDs;\r\n if (to && to.holdPrevious) {\r\n for (let i = 0; i < timelinesCount; i++)\r\n timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\r\n return;\r\n }\r\n outer:\r\n for (let i = 0; i < timelinesCount; i++) {\r\n let timeline = timelines[i];\r\n let ids = timeline.getPropertyIds();\r\n if (!propertyIDs.addAll(ids))\r\n timelineMode[i] = SUBSEQUENT;\r\n else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\r\n timelineMode[i] = FIRST;\r\n } else {\r\n for (let next = to.mixingTo; next; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(ids))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = HOLD_MIX;\r\n timelineHoldMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = HOLD_FIRST;\r\n }\r\n }\r\n }\r\n getCurrent(trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n }\r\n addListener(listener) {\r\n if (!listener)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n }\r\n removeListener(listener) {\r\n let index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n }\r\n clearListeners() {\r\n this.listeners.length = 0;\r\n }\r\n clearListenerNotifications() {\r\n this.queue.clear();\r\n }\r\n };\r\n var AnimationState = _AnimationState;\r\n AnimationState._emptyAnimation = new Animation(\"\", [], 0);\r\n var TrackEntry = class {\r\n constructor() {\r\n this.animation = null;\r\n this.previous = null;\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.listener = null;\r\n this.trackIndex = 0;\r\n this.loop = false;\r\n this.holdPrevious = false;\r\n this.reverse = false;\r\n this.shortestRotation = false;\r\n this.eventThreshold = 0;\r\n this.attachmentThreshold = 0;\r\n this.drawOrderThreshold = 0;\r\n this.animationStart = 0;\r\n this.animationEnd = 0;\r\n this.animationLast = 0;\r\n this.nextAnimationLast = 0;\r\n this.delay = 0;\r\n this.trackTime = 0;\r\n this.trackLast = 0;\r\n this.nextTrackLast = 0;\r\n this.trackEnd = 0;\r\n this.timeScale = 0;\r\n this.alpha = 0;\r\n this.mixTime = 0;\r\n this.mixDuration = 0;\r\n this.interruptAlpha = 0;\r\n this.totalAlpha = 0;\r\n this.mixBlend = 2 /* replace */;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n reset() {\r\n this.next = null;\r\n this.previous = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n }\r\n getAnimationTime() {\r\n if (this.loop) {\r\n let duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return this.trackTime % duration + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n }\r\n setAnimationLast(animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n }\r\n isComplete() {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n }\r\n resetRotationDirections() {\r\n this.timelinesRotation.length = 0;\r\n }\r\n getTrackComplete() {\r\n let duration = this.animationEnd - this.animationStart;\r\n if (duration != 0) {\r\n if (this.loop)\r\n return duration * (1 + (this.trackTime / duration | 0));\r\n if (this.trackTime < duration)\r\n return duration;\r\n }\r\n return this.trackTime;\r\n }\r\n };\r\n var EventQueue = class {\r\n constructor(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n start(entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n interrupt(entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n }\r\n end(entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n dispose(entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n }\r\n complete(entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n }\r\n event(entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n }\r\n drain() {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n let objects = this.objects;\r\n let listeners = this.animState.listeners;\r\n for (let i = 0; i < objects.length; i += 2) {\r\n let type = objects[i];\r\n let entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.start)\r\n listener.start(entry);\r\n }\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.interrupt)\r\n listener.interrupt(entry);\r\n }\r\n break;\r\n case EventType.end:\r\n if (entry.listener && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.end)\r\n listener.end(entry);\r\n }\r\n case EventType.dispose:\r\n if (entry.listener && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.dispose)\r\n listener.dispose(entry);\r\n }\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.complete)\r\n listener.complete(entry);\r\n }\r\n break;\r\n case EventType.event:\r\n let event = objects[i++ + 2];\r\n if (entry.listener && entry.listener.event)\r\n entry.listener.event(entry, event);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.event)\r\n listener.event(entry, event);\r\n }\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n }\r\n clear() {\r\n this.objects.length = 0;\r\n }\r\n };\r\n var EventType = /* @__PURE__ */ ((EventType2) => {\r\n EventType2[EventType2[\"start\"] = 0] = \"start\";\r\n EventType2[EventType2[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType2[EventType2[\"end\"] = 2] = \"end\";\r\n EventType2[EventType2[\"dispose\"] = 3] = \"dispose\";\r\n EventType2[EventType2[\"complete\"] = 4] = \"complete\";\r\n EventType2[EventType2[\"event\"] = 5] = \"event\";\r\n return EventType2;\r\n })(EventType || {});\r\n var AnimationStateAdapter = class {\r\n start(entry) {\r\n }\r\n interrupt(entry) {\r\n }\r\n end(entry) {\r\n }\r\n dispose(entry) {\r\n }\r\n complete(entry) {\r\n }\r\n event(entry, event) {\r\n }\r\n };\r\n var SUBSEQUENT = 0;\r\n var FIRST = 1;\r\n var HOLD_SUBSEQUENT = 2;\r\n var HOLD_FIRST = 3;\r\n var HOLD_MIX = 4;\r\n var SETUP = 1;\r\n var CURRENT = 2;\r\n\r\n // spine-core/src/AnimationStateData.ts\r\n var AnimationStateData = class {\r\n constructor(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (!skeletonData)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n setMix(fromName, toName, duration) {\r\n let from = this.skeletonData.findAnimation(fromName);\r\n if (!from)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n let to = this.skeletonData.findAnimation(toName);\r\n if (!to)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n }\r\n setMixWith(from, to, duration) {\r\n if (!from)\r\n throw new Error(\"from cannot be null.\");\r\n if (!to)\r\n throw new Error(\"to cannot be null.\");\r\n let key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n }\r\n getMix(from, to) {\r\n let key = from.name + \".\" + to.name;\r\n let value = this.animationToMixTime[key];\r\n return value === void 0 ? this.defaultMix : value;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/BoundingBoxAttachment.ts\r\n var BoundingBoxAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.color = new Color(1, 1, 1, 1);\r\n }\r\n copy() {\r\n let copy = new BoundingBoxAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/ClippingAttachment.ts\r\n var ClippingAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.endSlot = null;\r\n this.color = new Color(0.2275, 0.2275, 0.8078, 1);\r\n }\r\n copy() {\r\n let copy = new ClippingAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/Texture.ts\r\n var Texture = class {\r\n constructor(image) {\r\n this._image = image;\r\n }\r\n getImage() {\r\n return this._image;\r\n }\r\n };\r\n var TextureFilter = /* @__PURE__ */ ((TextureFilter3) => {\r\n TextureFilter3[TextureFilter3[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter3[TextureFilter3[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter3[TextureFilter3[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter3[TextureFilter3[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter3[TextureFilter3[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter3[TextureFilter3[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter3[TextureFilter3[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n return TextureFilter3;\r\n })(TextureFilter || {});\r\n var TextureWrap = /* @__PURE__ */ ((TextureWrap3) => {\r\n TextureWrap3[TextureWrap3[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap3[TextureWrap3[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap3[TextureWrap3[\"Repeat\"] = 10497] = \"Repeat\";\r\n return TextureWrap3;\r\n })(TextureWrap || {});\r\n var TextureRegion = class {\r\n constructor() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.degrees = 0;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n };\r\n var FakeTexture = class extends Texture {\r\n setFilters(minFilter, magFilter) {\r\n }\r\n setWraps(uWrap, vWrap) {\r\n }\r\n dispose() {\r\n }\r\n };\r\n\r\n // spine-core/src/TextureAtlas.ts\r\n var TextureAtlas = class {\r\n constructor(atlasText) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n let reader = new TextureAtlasReader(atlasText);\r\n let entry = new Array(4);\r\n let pageFields = {};\r\n pageFields[\"size\"] = (page2) => {\r\n page2.width = parseInt(entry[1]);\r\n page2.height = parseInt(entry[2]);\r\n };\r\n pageFields[\"format\"] = () => {\r\n };\r\n pageFields[\"filter\"] = (page2) => {\r\n page2.minFilter = Utils.enumValue(TextureFilter, entry[1]);\r\n page2.magFilter = Utils.enumValue(TextureFilter, entry[2]);\r\n };\r\n pageFields[\"repeat\"] = (page2) => {\r\n if (entry[1].indexOf(\"x\") != -1)\r\n page2.uWrap = 10497 /* Repeat */;\r\n if (entry[1].indexOf(\"y\") != -1)\r\n page2.vWrap = 10497 /* Repeat */;\r\n };\r\n pageFields[\"pma\"] = (page2) => {\r\n page2.pma = entry[1] == \"true\";\r\n };\r\n var regionFields = {};\r\n regionFields[\"xy\"] = (region) => {\r\n region.x = parseInt(entry[1]);\r\n region.y = parseInt(entry[2]);\r\n };\r\n regionFields[\"size\"] = (region) => {\r\n region.width = parseInt(entry[1]);\r\n region.height = parseInt(entry[2]);\r\n };\r\n regionFields[\"bounds\"] = (region) => {\r\n region.x = parseInt(entry[1]);\r\n region.y = parseInt(entry[2]);\r\n region.width = parseInt(entry[3]);\r\n region.height = parseInt(entry[4]);\r\n };\r\n regionFields[\"offset\"] = (region) => {\r\n region.offsetX = parseInt(entry[1]);\r\n region.offsetY = parseInt(entry[2]);\r\n };\r\n regionFields[\"orig\"] = (region) => {\r\n region.originalWidth = parseInt(entry[1]);\r\n region.originalHeight = parseInt(entry[2]);\r\n };\r\n regionFields[\"offsets\"] = (region) => {\r\n region.offsetX = parseInt(entry[1]);\r\n region.offsetY = parseInt(entry[2]);\r\n region.originalWidth = parseInt(entry[3]);\r\n region.originalHeight = parseInt(entry[4]);\r\n };\r\n regionFields[\"rotate\"] = (region) => {\r\n let value = entry[1];\r\n if (value == \"true\")\r\n region.degrees = 90;\r\n else if (value != \"false\")\r\n region.degrees = parseInt(value);\r\n };\r\n regionFields[\"index\"] = (region) => {\r\n region.index = parseInt(entry[1]);\r\n };\r\n let line = reader.readLine();\r\n while (line && line.trim().length == 0)\r\n line = reader.readLine();\r\n while (true) {\r\n if (!line || line.trim().length == 0)\r\n break;\r\n if (reader.readEntry(entry, line) == 0)\r\n break;\r\n line = reader.readLine();\r\n }\r\n let page = null;\r\n let names = null;\r\n let values = null;\r\n while (true) {\r\n if (line === null)\r\n break;\r\n if (line.trim().length == 0) {\r\n page = null;\r\n line = reader.readLine();\r\n } else if (!page) {\r\n page = new TextureAtlasPage(line.trim());\r\n while (true) {\r\n if (reader.readEntry(entry, line = reader.readLine()) == 0)\r\n break;\r\n let field = pageFields[entry[0]];\r\n if (field)\r\n field(page);\r\n }\r\n this.pages.push(page);\r\n } else {\r\n let region = new TextureAtlasRegion(page, line);\r\n while (true) {\r\n let count = reader.readEntry(entry, line = reader.readLine());\r\n if (count == 0)\r\n break;\r\n let field = regionFields[entry[0]];\r\n if (field)\r\n field(region);\r\n else {\r\n if (!names)\r\n names = [];\r\n if (!values)\r\n values = [];\r\n names.push(entry[0]);\r\n let entryValues = [];\r\n for (let i = 0; i < count; i++)\r\n entryValues.push(parseInt(entry[i + 1]));\r\n values.push(entryValues);\r\n }\r\n }\r\n if (region.originalWidth == 0 && region.originalHeight == 0) {\r\n region.originalWidth = region.width;\r\n region.originalHeight = region.height;\r\n }\r\n if (names && names.length > 0 && values && values.length > 0) {\r\n region.names = names;\r\n region.values = values;\r\n names = null;\r\n values = null;\r\n }\r\n region.u = region.x / page.width;\r\n region.v = region.y / page.height;\r\n if (region.degrees == 90) {\r\n region.u2 = (region.x + region.height) / page.width;\r\n region.v2 = (region.y + region.width) / page.height;\r\n } else {\r\n region.u2 = (region.x + region.width) / page.width;\r\n region.v2 = (region.y + region.height) / page.height;\r\n }\r\n this.regions.push(region);\r\n }\r\n }\r\n }\r\n findRegion(name) {\r\n for (let i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n }\r\n setTextures(assetManager, pathPrefix = \"\") {\r\n for (let page of this.pages)\r\n page.setTexture(assetManager.get(pathPrefix + page.name));\r\n }\r\n dispose() {\r\n var _a;\r\n for (let i = 0; i < this.pages.length; i++) {\r\n (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();\r\n }\r\n }\r\n };\r\n var TextureAtlasReader = class {\r\n constructor(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n readLine() {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n }\r\n readEntry(entry, line) {\r\n if (!line)\r\n return 0;\r\n line = line.trim();\r\n if (line.length == 0)\r\n return 0;\r\n let colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n return 0;\r\n entry[0] = line.substr(0, colon).trim();\r\n for (let i = 1, lastMatch = colon + 1; ; i++) {\r\n let comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1) {\r\n entry[i] = line.substr(lastMatch).trim();\r\n return i;\r\n }\r\n entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n if (i == 4)\r\n return 4;\r\n }\r\n }\r\n };\r\n var TextureAtlasPage = class {\r\n constructor(name) {\r\n this.minFilter = 9728 /* Nearest */;\r\n this.magFilter = 9728 /* Nearest */;\r\n this.uWrap = 33071 /* ClampToEdge */;\r\n this.vWrap = 33071 /* ClampToEdge */;\r\n this.texture = null;\r\n this.width = 0;\r\n this.height = 0;\r\n this.pma = false;\r\n this.name = name;\r\n }\r\n setTexture(texture) {\r\n this.texture = texture;\r\n texture.setFilters(this.minFilter, this.magFilter);\r\n texture.setWraps(this.uWrap, this.vWrap);\r\n }\r\n };\r\n var TextureAtlasRegion = class extends TextureRegion {\r\n constructor(page, name) {\r\n super();\r\n this.x = 0;\r\n this.y = 0;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n this.index = 0;\r\n this.degrees = 0;\r\n this.names = null;\r\n this.values = null;\r\n this.page = page;\r\n this.name = name;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/MeshAttachment.ts\r\n var MeshAttachment = class extends VertexAttachment {\r\n constructor(name, path) {\r\n super(name);\r\n this.region = null;\r\n this.regionUVs = [];\r\n this.uvs = [];\r\n this.triangles = [];\r\n this.color = new Color(1, 1, 1, 1);\r\n this.width = 0;\r\n this.height = 0;\r\n this.hullLength = 0;\r\n this.edges = [];\r\n this.parentMesh = null;\r\n this.sequence = null;\r\n this.tempColor = new Color(0, 0, 0, 0);\r\n this.path = path;\r\n }\r\n updateRegion() {\r\n if (!this.region)\r\n throw new Error(\"Region not set.\");\r\n let regionUVs = this.regionUVs;\r\n if (!this.uvs || this.uvs.length != regionUVs.length)\r\n this.uvs = Utils.newFloatArray(regionUVs.length);\r\n let uvs = this.uvs;\r\n let n = this.uvs.length;\r\n let u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof TextureAtlasRegion) {\r\n let region = this.region, image = region.page.texture.getImage();\r\n let textureWidth = image.width, textureHeight = image.height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n } else if (!this.region) {\r\n u = v = 0;\r\n width = height = 1;\r\n } else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n }\r\n getParentMesh() {\r\n return this.parentMesh;\r\n }\r\n setParentMesh(parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n }\r\n copy() {\r\n if (this.parentMesh)\r\n return this.newLinkedMesh();\r\n let copy = new MeshAttachment(this.name, this.path);\r\n copy.region = this.region;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\r\n if (this.edges) {\r\n copy.edges = new Array(this.edges.length);\r\n Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n }\r\n computeWorldVertices(slot, start, count, worldVertices2, offset, stride) {\r\n if (this.sequence != null)\r\n this.sequence.apply(slot, this);\r\n super.computeWorldVertices(slot, start, count, worldVertices2, offset, stride);\r\n }\r\n newLinkedMesh() {\r\n let copy = new MeshAttachment(this.name, this.path);\r\n copy.region = this.region;\r\n copy.color.setFromColor(this.color);\r\n copy.timelineAttachment = this.timelineAttachment;\r\n copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\r\n if (copy.region != null)\r\n copy.updateRegion();\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/PathAttachment.ts\r\n var PathAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.lengths = [];\r\n this.closed = false;\r\n this.constantSpeed = false;\r\n this.color = new Color(1, 1, 1, 1);\r\n }\r\n copy() {\r\n let copy = new PathAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/PointAttachment.ts\r\n var PointAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.color = new Color(0.38, 0.94, 0, 1);\r\n }\r\n computeWorldPosition(bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n }\r\n computeWorldRotation(bone) {\r\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\r\n let x = cos * bone.a + sin * bone.b;\r\n let y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * MathUtils.radDeg;\r\n }\r\n copy() {\r\n let copy = new PointAttachment(this.name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/RegionAttachment.ts\r\n var _RegionAttachment = class extends Attachment {\r\n constructor(name, path) {\r\n super(name);\r\n this.x = 0;\r\n this.y = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.rotation = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.color = new Color(1, 1, 1, 1);\r\n this.rendererObject = null;\r\n this.region = null;\r\n this.sequence = null;\r\n this.offset = Utils.newFloatArray(8);\r\n this.uvs = Utils.newFloatArray(8);\r\n this.tempColor = new Color(1, 1, 1, 1);\r\n this.path = path;\r\n }\r\n updateRegion() {\r\n if (!this.region)\r\n throw new Error(\"Region not set.\");\r\n let region = this.region;\r\n let uvs = this.uvs;\r\n if (region == null) {\r\n uvs[0] = 0;\r\n uvs[1] = 0;\r\n uvs[2] = 0;\r\n uvs[3] = 1;\r\n uvs[4] = 1;\r\n uvs[5] = 1;\r\n uvs[6] = 1;\r\n uvs[7] = 0;\r\n return;\r\n }\r\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n let localX2 = localX + this.region.width * regionScaleX;\r\n let localY2 = localY + this.region.height * regionScaleY;\r\n let radians = this.rotation * Math.PI / 180;\r\n let cos = Math.cos(radians);\r\n let sin = Math.sin(radians);\r\n let x = this.x, y = this.y;\r\n let localXCos = localX * cos + x;\r\n let localXSin = localX * sin;\r\n let localYCos = localY * cos + y;\r\n let localYSin = localY * sin;\r\n let localX2Cos = localX2 * cos + x;\r\n let localX2Sin = localX2 * sin;\r\n let localY2Cos = localY2 * cos + y;\r\n let localY2Sin = localY2 * sin;\r\n let offset = this.offset;\r\n offset[0] = localXCos - localYSin;\r\n offset[1] = localYCos + localXSin;\r\n offset[2] = localXCos - localY2Sin;\r\n offset[3] = localY2Cos + localXSin;\r\n offset[4] = localX2Cos - localY2Sin;\r\n offset[5] = localY2Cos + localX2Sin;\r\n offset[6] = localX2Cos - localYSin;\r\n offset[7] = localYCos + localX2Sin;\r\n if (region.degrees == 90) {\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n } else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n }\r\n computeWorldVertices(slot, worldVertices2, offset, stride) {\r\n if (this.sequence != null)\r\n this.sequence.apply(slot, this);\r\n let bone = slot.bone;\r\n let vertexOffset = this.offset;\r\n let x = bone.worldX, y = bone.worldY;\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n let offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[0];\r\n offsetY = vertexOffset[1];\r\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[2];\r\n offsetY = vertexOffset[3];\r\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[4];\r\n offsetY = vertexOffset[5];\r\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[6];\r\n offsetY = vertexOffset[7];\r\n worldVertices2[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices2[offset + 1] = offsetX * c + offsetY * d + y;\r\n }\r\n copy() {\r\n let copy = new _RegionAttachment(this.name, this.path);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\r\n return copy;\r\n }\r\n };\r\n var RegionAttachment = _RegionAttachment;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n\r\n // spine-core/src/AtlasAttachmentLoader.ts\r\n var AtlasAttachmentLoader = class {\r\n constructor(atlas) {\r\n this.atlas = atlas;\r\n }\r\n loadSequence(name, basePath, sequence) {\r\n let regions = sequence.regions;\r\n for (let i = 0, n = regions.length; i < n; i++) {\r\n let path = sequence.getPath(basePath, i);\r\n let region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (sequence: \" + name + \")\");\r\n regions[i] = region;\r\n regions[i].renderObject = regions[i];\r\n }\r\n }\r\n newRegionAttachment(skin, name, path, sequence) {\r\n let attachment = new RegionAttachment(name, path);\r\n if (sequence != null) {\r\n this.loadSequence(name, path, sequence);\r\n } else {\r\n let region = this.atlas.findRegion(path);\r\n if (!region)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n attachment.region = region;\r\n }\r\n return attachment;\r\n }\r\n newMeshAttachment(skin, name, path, sequence) {\r\n let attachment = new MeshAttachment(name, path);\r\n if (sequence != null) {\r\n this.loadSequence(name, path, sequence);\r\n } else {\r\n let region = this.atlas.findRegion(path);\r\n if (!region)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n attachment.region = region;\r\n }\r\n return attachment;\r\n }\r\n newBoundingBoxAttachment(skin, name) {\r\n return new BoundingBoxAttachment(name);\r\n }\r\n newPathAttachment(skin, name) {\r\n return new PathAttachment(name);\r\n }\r\n newPointAttachment(skin, name) {\r\n return new PointAttachment(name);\r\n }\r\n newClippingAttachment(skin, name) {\r\n return new ClippingAttachment(name);\r\n }\r\n };\r\n\r\n // spine-core/src/BoneData.ts\r\n var BoneData = class {\r\n constructor(index, name, parent) {\r\n this.index = 0;\r\n this.parent = null;\r\n this.length = 0;\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n };\r\n var TransformMode = /* @__PURE__ */ ((TransformMode2) => {\r\n TransformMode2[TransformMode2[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode2[TransformMode2[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode2[TransformMode2[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode2[TransformMode2[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode2[TransformMode2[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n return TransformMode2;\r\n })(TransformMode || {});\r\n\r\n // spine-core/src/Bone.ts\r\n var Bone = class {\r\n constructor(data, skeleton, parent) {\r\n this.parent = null;\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\r\n }\r\n updateWorldTransform() {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n }\r\n updateWorldTransformWith(x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n let parent = this.parent;\r\n if (!parent) {\r\n let skeleton = this.skeleton;\r\n let rotationY = rotation + 90 + shearY;\r\n let sx = skeleton.scaleX;\r\n let sy = skeleton.scaleY;\r\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case 0 /* Normal */: {\r\n let rotationY = rotation + 90 + shearY;\r\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\r\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n let ld = MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case 1 /* OnlyTranslation */: {\r\n let rotationY = rotation + 90 + shearY;\r\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case 2 /* NoRotationOrReflection */: {\r\n let s = pa * pa + pc * pc;\r\n let prx = 0;\r\n if (s > 1e-4) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * MathUtils.radDeg;\r\n } else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\r\n }\r\n let rx = rotation + shearX - prx;\r\n let ry = rotation + shearY - prx + 90;\r\n let la = MathUtils.cosDeg(rx) * scaleX;\r\n let lb = MathUtils.cosDeg(ry) * scaleY;\r\n let lc = MathUtils.sinDeg(rx) * scaleX;\r\n let ld = MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case 3 /* NoScale */:\r\n case 4 /* NoScaleOrReflection */: {\r\n let cos = MathUtils.cosDeg(rotation);\r\n let sin = MathUtils.sinDeg(rotation);\r\n let za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n let s = Math.sqrt(za * za + zc * zc);\r\n if (s > 1e-5)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n let r = Math.PI / 2 + Math.atan2(zc, za);\r\n let zb = Math.cos(r) * s;\r\n let zd = Math.sin(r) * s;\r\n let la = MathUtils.cosDeg(shearX) * scaleX;\r\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\r\n let lc = MathUtils.sinDeg(shearX) * scaleX;\r\n let ld = MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n }\r\n setToSetupPose() {\r\n let data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n }\r\n getWorldRotationX() {\r\n return Math.atan2(this.c, this.a) * MathUtils.radDeg;\r\n }\r\n getWorldRotationY() {\r\n return Math.atan2(this.d, this.b) * MathUtils.radDeg;\r\n }\r\n getWorldScaleX() {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n }\r\n getWorldScaleY() {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n }\r\n updateAppliedTransform() {\r\n let parent = this.parent;\r\n if (!parent) {\r\n this.ax = this.worldX - this.skeleton.x;\r\n this.ay = this.worldY - this.skeleton.y;\r\n this.arotation = Math.atan2(this.c, this.a) * MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * MathUtils.radDeg;\r\n return;\r\n }\r\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n let pid = 1 / (pa * pd - pb * pc);\r\n let dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = dx * pd * pid - dy * pb * pid;\r\n this.ay = dy * pa * pid - dx * pc * pid;\r\n let ia = pid * pd;\r\n let id = pid * pa;\r\n let ib = pid * pb;\r\n let ic = pid * pc;\r\n let ra = ia * this.a - ib * this.c;\r\n let rb = ia * this.b - ib * this.d;\r\n let rc = id * this.c - ic * this.a;\r\n let rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 1e-4) {\r\n let det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\r\n } else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * MathUtils.radDeg;\r\n }\r\n }\r\n worldToLocal(world) {\r\n let invDet = 1 / (this.a * this.d - this.b * this.c);\r\n let x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = x * this.d * invDet - y * this.b * invDet;\r\n world.y = y * this.a * invDet - x * this.c * invDet;\r\n return world;\r\n }\r\n localToWorld(local) {\r\n let x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n }\r\n worldToLocalRotation(worldRotation) {\r\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;\r\n }\r\n localToWorldRotation(localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;\r\n }\r\n rotateWorld(degrees) {\r\n let a = this.a, b = this.b, c = this.c, d = this.d;\r\n let cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n }\r\n };\r\n\r\n // spine-core/src/ConstraintData.ts\r\n var ConstraintData = class {\r\n constructor(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n };\r\n\r\n // spine-core/src/AssetManagerBase.ts\r\n var AssetManagerBase = class {\r\n constructor(textureLoader, pathPrefix = \"\", downloader = new Downloader()) {\r\n this.pathPrefix = \"\";\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n this.downloader = downloader;\r\n }\r\n start(path) {\r\n this.toLoad++;\r\n return this.pathPrefix + path;\r\n }\r\n success(callback, path, asset) {\r\n this.toLoad--;\r\n this.loaded++;\r\n this.assets[path] = asset;\r\n if (callback)\r\n callback(path, asset);\r\n }\r\n error(callback, path, message) {\r\n this.toLoad--;\r\n this.loaded++;\r\n this.errors[path] = message;\r\n if (callback)\r\n callback(path, message);\r\n }\r\n loadAll() {\r\n let promise = new Promise((resolve, reject) => {\r\n let check = () => {\r\n if (this.isLoadingComplete()) {\r\n if (this.hasErrors())\r\n reject(this.errors);\r\n else\r\n resolve(this);\r\n return;\r\n }\r\n requestAnimationFrame(check);\r\n };\r\n requestAnimationFrame(check);\r\n });\r\n return promise;\r\n }\r\n setRawDataURI(path, data) {\r\n this.downloader.rawDataUris[this.pathPrefix + path] = data;\r\n }\r\n loadBinary(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n this.downloader.downloadBinary(path, (data) => {\r\n this.success(success, path, data);\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load binary ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n loadText(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n this.downloader.downloadText(path, (data) => {\r\n this.success(success, path, data);\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load text ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n loadJson(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n this.downloader.downloadJson(path, (data) => {\r\n this.success(success, path, data);\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load JSON ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n loadTexture(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n let isBrowser = !!(typeof window !== \"undefined\" && typeof navigator !== \"undefined\" && window.document);\r\n let isWebWorker = !isBrowser;\r\n if (isWebWorker) {\r\n fetch(path, { mode: \"cors\" }).then((response) => {\r\n if (response.ok)\r\n return response.blob();\r\n this.error(error, path, `Couldn't load image: ${path}`);\r\n return null;\r\n }).then((blob) => {\r\n return blob ? createImageBitmap(blob, { premultiplyAlpha: \"none\", colorSpaceConversion: \"none\" }) : null;\r\n }).then((bitmap) => {\r\n if (bitmap)\r\n this.success(success, path, this.textureLoader(bitmap));\r\n });\r\n } else {\r\n let image = new Image();\r\n image.crossOrigin = \"anonymous\";\r\n image.onload = () => {\r\n this.success(success, path, this.textureLoader(image));\r\n };\r\n image.onerror = () => {\r\n this.error(error, path, `Couldn't load image: ${path}`);\r\n };\r\n if (this.downloader.rawDataUris[path])\r\n path = this.downloader.rawDataUris[path];\r\n image.src = path;\r\n }\r\n }\r\n loadTextureAtlas(path, success = () => {\r\n }, error = () => {\r\n }, fileAlias) {\r\n let index = path.lastIndexOf(\"/\");\r\n let parent = index >= 0 ? path.substring(0, index + 1) : \"\";\r\n path = this.start(path);\r\n this.downloader.downloadText(path, (atlasText) => {\r\n try {\r\n let atlas = new TextureAtlas(atlasText);\r\n let toLoad = atlas.pages.length, abort = false;\r\n for (let page of atlas.pages) {\r\n this.loadTexture(\r\n !fileAlias ? parent + page.name : fileAlias[page.name],\r\n (imagePath, texture) => {\r\n if (!abort) {\r\n page.setTexture(texture);\r\n if (--toLoad == 0)\r\n this.success(success, path, atlas);\r\n }\r\n },\r\n (imagePath, message) => {\r\n if (!abort)\r\n this.error(error, path, `Couldn't load texture atlas ${path} page image: ${imagePath}`);\r\n abort = true;\r\n }\r\n );\r\n }\r\n } catch (e) {\r\n this.error(error, path, `Couldn't parse texture atlas ${path}: ${e.message}`);\r\n }\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n get(path) {\r\n return this.assets[this.pathPrefix + path];\r\n }\r\n require(path) {\r\n path = this.pathPrefix + path;\r\n let asset = this.assets[path];\r\n if (asset)\r\n return asset;\r\n let error = this.errors[path];\r\n throw Error(\"Asset not found: \" + path + (error ? \"\\n\" + error : \"\"));\r\n }\r\n remove(path) {\r\n path = this.pathPrefix + path;\r\n let asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n delete this.assets[path];\r\n return asset;\r\n }\r\n removeAll() {\r\n for (let key in this.assets) {\r\n let asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n }\r\n isLoadingComplete() {\r\n return this.toLoad == 0;\r\n }\r\n getToLoad() {\r\n return this.toLoad;\r\n }\r\n getLoaded() {\r\n return this.loaded;\r\n }\r\n dispose() {\r\n this.removeAll();\r\n }\r\n hasErrors() {\r\n return Object.keys(this.errors).length > 0;\r\n }\r\n getErrors() {\r\n return this.errors;\r\n }\r\n };\r\n var Downloader = class {\r\n constructor() {\r\n this.callbacks = {};\r\n this.rawDataUris = {};\r\n }\r\n dataUriToString(dataUri) {\r\n if (!dataUri.startsWith(\"data:\")) {\r\n throw new Error(\"Not a data URI.\");\r\n }\r\n let base64Idx = dataUri.indexOf(\"base64,\");\r\n if (base64Idx != -1) {\r\n base64Idx += \"base64,\".length;\r\n return atob(dataUri.substr(base64Idx));\r\n } else {\r\n return dataUri.substr(dataUri.indexOf(\",\") + 1);\r\n }\r\n }\r\n base64ToUint8Array(base64) {\r\n var binary_string = window.atob(base64);\r\n var len = binary_string.length;\r\n var bytes = new Uint8Array(len);\r\n for (var i = 0; i < len; i++) {\r\n bytes[i] = binary_string.charCodeAt(i);\r\n }\r\n return bytes;\r\n }\r\n dataUriToUint8Array(dataUri) {\r\n if (!dataUri.startsWith(\"data:\")) {\r\n throw new Error(\"Not a data URI.\");\r\n }\r\n let base64Idx = dataUri.indexOf(\"base64,\");\r\n if (base64Idx == -1)\r\n throw new Error(\"Not a binary data URI.\");\r\n base64Idx += \"base64,\".length;\r\n return this.base64ToUint8Array(dataUri.substr(base64Idx));\r\n }\r\n downloadText(url, success, error) {\r\n if (this.start(url, success, error))\r\n return;\r\n if (this.rawDataUris[url]) {\r\n try {\r\n let dataUri = this.rawDataUris[url];\r\n this.finish(url, 200, this.dataUriToString(dataUri));\r\n } catch (e) {\r\n this.finish(url, 400, JSON.stringify(e));\r\n }\r\n return;\r\n }\r\n let request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.open(\"GET\", url, true);\r\n let done = () => {\r\n this.finish(url, request.status, request.responseText);\r\n };\r\n request.onload = done;\r\n request.onerror = done;\r\n request.send();\r\n }\r\n downloadJson(url, success, error) {\r\n this.downloadText(url, (data) => {\r\n success(JSON.parse(data));\r\n }, error);\r\n }\r\n downloadBinary(url, success, error) {\r\n if (this.start(url, success, error))\r\n return;\r\n if (this.rawDataUris[url]) {\r\n try {\r\n let dataUri = this.rawDataUris[url];\r\n this.finish(url, 200, this.dataUriToUint8Array(dataUri));\r\n } catch (e) {\r\n this.finish(url, 400, JSON.stringify(e));\r\n }\r\n return;\r\n }\r\n let request = new XMLHttpRequest();\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n let onerror = () => {\r\n this.finish(url, request.status, request.response);\r\n };\r\n request.onload = () => {\r\n if (request.status == 200 || request.status == 0)\r\n this.finish(url, 200, new Uint8Array(request.response));\r\n else\r\n onerror();\r\n };\r\n request.onerror = onerror;\r\n request.send();\r\n }\r\n start(url, success, error) {\r\n let callbacks = this.callbacks[url];\r\n try {\r\n if (callbacks)\r\n return true;\r\n this.callbacks[url] = callbacks = [];\r\n } finally {\r\n callbacks.push(success, error);\r\n }\r\n }\r\n finish(url, status, data) {\r\n let callbacks = this.callbacks[url];\r\n delete this.callbacks[url];\r\n let args = status == 200 || status == 0 ? [data] : [status, data];\r\n for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)\r\n callbacks[i].apply(null, args);\r\n }\r\n };\r\n\r\n // spine-core/src/Event.ts\r\n var Event = class {\r\n constructor(time, data) {\r\n this.intValue = 0;\r\n this.floatValue = 0;\r\n this.stringValue = null;\r\n this.time = 0;\r\n this.volume = 0;\r\n this.balance = 0;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n };\r\n\r\n // spine-core/src/EventData.ts\r\n var EventData = class {\r\n constructor(name) {\r\n this.intValue = 0;\r\n this.floatValue = 0;\r\n this.stringValue = null;\r\n this.audioPath = null;\r\n this.volume = 0;\r\n this.balance = 0;\r\n this.name = name;\r\n }\r\n };\r\n\r\n // spine-core/src/IkConstraint.ts\r\n var IkConstraint = class {\r\n constructor(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let bone = skeleton.findBone(data.bones[i].name);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${data.bones[i].name}`);\r\n this.bones.push(bone);\r\n }\r\n let target = skeleton.findBone(data.target.name);\r\n if (!target)\r\n throw new Error(`Couldn't find bone ${data.target.name}`);\r\n this.target = target;\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n if (this.mix == 0)\r\n return;\r\n let target = this.target;\r\n let bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.data.uniform, this.softness, this.mix);\r\n break;\r\n }\r\n }\r\n apply1(bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n let p = bone.parent;\r\n if (!p)\r\n throw new Error(\"IK bone must have parent.\");\r\n let pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case 1 /* OnlyTranslation */:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case 2 /* NoRotationOrReflection */:\r\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n let sa = pa / bone.skeleton.scaleX;\r\n let sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * MathUtils.radDeg;\r\n default:\r\n let x = targetX - p.worldX, y = targetY - p.worldY;\r\n let d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n let sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case 3 /* NoScale */:\r\n case 4 /* NoScaleOrReflection */:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if (compress && dd < b || stretch && dd > b && b > 1e-4) {\r\n let s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(\r\n bone.ax,\r\n bone.ay,\r\n bone.arotation + rotationIK * alpha,\r\n sx,\r\n sy,\r\n bone.ashearX,\r\n bone.ashearY\r\n );\r\n }\r\n apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\r\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\r\n let os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n } else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n } else\r\n os2 = 0;\r\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n let u = Math.abs(psx - psy) <= 1e-4;\r\n if (!u || stretch) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n } else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n let pp = parent.parent;\r\n if (!pp)\r\n throw new Error(\"IK parent must itself have a parent.\");\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n let id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 1e-4) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n let dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) * 0.5;\r\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n let p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer:\r\n if (u) {\r\n l2 *= psx;\r\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1) {\r\n cos = -1;\r\n a2 = Math.PI * bendDir;\r\n } else if (cos > 1) {\r\n cos = 1;\r\n a2 = 0;\r\n if (stretch) {\r\n a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n sx *= a;\r\n if (uniform)\r\n sy *= a;\r\n }\r\n } else\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n } else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n let c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n let q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) * 0.5;\r\n let r0 = q / c2, r1 = c / q;\r\n let r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n let maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) * 0.5) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n } else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n let os = Math.atan2(cy, cx) * s2;\r\n let rotation = parent.arotation;\r\n a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, sy, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n }\r\n };\r\n\r\n // spine-core/src/IkConstraintData.ts\r\n var IkConstraintData = class extends ConstraintData {\r\n constructor(name) {\r\n super(name, 0, false);\r\n this.bones = new Array();\r\n this._target = null;\r\n this.bendDirection = 1;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.uniform = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n }\r\n set target(boneData) {\r\n this._target = boneData;\r\n }\r\n get target() {\r\n if (!this._target)\r\n throw new Error(\"BoneData not set.\");\r\n else\r\n return this._target;\r\n }\r\n };\r\n\r\n // spine-core/src/PathConstraintData.ts\r\n var PathConstraintData = class extends ConstraintData {\r\n constructor(name) {\r\n super(name, 0, false);\r\n this.bones = new Array();\r\n this._target = null;\r\n this.positionMode = PositionMode.Fixed;\r\n this.spacingMode = SpacingMode.Fixed;\r\n this.rotateMode = RotateMode.Chain;\r\n this.offsetRotation = 0;\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n }\r\n set target(slotData) {\r\n this._target = slotData;\r\n }\r\n get target() {\r\n if (!this._target)\r\n throw new Error(\"SlotData not set.\");\r\n else\r\n return this._target;\r\n }\r\n };\r\n var PositionMode = /* @__PURE__ */ ((PositionMode2) => {\r\n PositionMode2[PositionMode2[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode2[PositionMode2[\"Percent\"] = 1] = \"Percent\";\r\n return PositionMode2;\r\n })(PositionMode || {});\r\n var SpacingMode = /* @__PURE__ */ ((SpacingMode2) => {\r\n SpacingMode2[SpacingMode2[\"Length\"] = 0] = \"Length\";\r\n SpacingMode2[SpacingMode2[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode2[SpacingMode2[\"Percent\"] = 2] = \"Percent\";\r\n SpacingMode2[SpacingMode2[\"Proportional\"] = 3] = \"Proportional\";\r\n return SpacingMode2;\r\n })(SpacingMode || {});\r\n var RotateMode = /* @__PURE__ */ ((RotateMode2) => {\r\n RotateMode2[RotateMode2[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode2[RotateMode2[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode2[RotateMode2[\"ChainScale\"] = 2] = \"ChainScale\";\r\n return RotateMode2;\r\n })(RotateMode || {});\r\n\r\n // spine-core/src/PathConstraint.ts\r\n var _PathConstraint = class {\r\n constructor(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (let i = 0, n = data.bones.length; i < n; i++) {\r\n let bone = skeleton.findBone(data.bones[i].name);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\r\n this.bones.push(bone);\r\n }\r\n let target = skeleton.findSlot(data.target.name);\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${data.target.name}`);\r\n this.target = target;\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.mixRotate = data.mixRotate;\r\n this.mixX = data.mixX;\r\n this.mixY = data.mixY;\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n let attachment = this.target.getAttachment();\r\n if (!(attachment instanceof PathAttachment))\r\n return;\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\r\n if (mixRotate == 0 && mixX == 0 && mixY == 0)\r\n return;\r\n let data = this.data;\r\n let tangents = data.rotateMode == 0 /* Tangent */, scale = data.rotateMode == 2 /* ChainScale */;\r\n let bones = this.bones;\r\n let boneCount = bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : [];\r\n let spacing = this.spacing;\r\n switch (data.spacingMode) {\r\n case 2 /* Percent */:\r\n if (scale) {\r\n for (let i = 0, n = spacesCount - 1; i < n; i++) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < _PathConstraint.epsilon)\r\n lengths[i] = 0;\r\n else {\r\n let x = setupLength * bone.a, y = setupLength * bone.c;\r\n lengths[i] = Math.sqrt(x * x + y * y);\r\n }\r\n }\r\n }\r\n Utils.arrayFill(spaces, 1, spacesCount, spacing);\r\n break;\r\n case 3 /* Proportional */:\r\n let sum = 0;\r\n for (let i = 0, n = spacesCount - 1; i < n; ) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < _PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = spacing;\r\n } else {\r\n let x = setupLength * bone.a, y = setupLength * bone.c;\r\n let length = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length;\r\n spaces[++i] = length;\r\n sum += length;\r\n }\r\n }\r\n if (sum > 0) {\r\n sum = spacesCount / sum * spacing;\r\n for (let i = 1; i < spacesCount; i++)\r\n spaces[i] *= sum;\r\n }\r\n break;\r\n default:\r\n let lengthSpacing = data.spacingMode == 0 /* Length */;\r\n for (let i = 0, n = spacesCount - 1; i < n; ) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < _PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = spacing;\r\n } else {\r\n let x = setupLength * bone.a, y = setupLength * bone.c;\r\n let length = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\r\n }\r\n }\r\n }\r\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents);\r\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n let tip = false;\r\n if (offsetRotation == 0)\r\n tip = data.rotateMode == 1 /* Chain */;\r\n else {\r\n tip = false;\r\n let p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n }\r\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n let bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * mixX;\r\n bone.worldY += (boneY - bone.worldY) * mixY;\r\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n let length = lengths[i];\r\n if (length != 0) {\r\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (mixRotate > 0) {\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n let length = bone.data.length;\r\n boneX += (length * (cos * a - sin * c) - dx) * mixRotate;\r\n boneY += (length * (sin * a + cos * c) - dy) * mixRotate;\r\n } else {\r\n r += offsetRotation;\r\n }\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= mixRotate;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.updateAppliedTransform();\r\n }\r\n }\r\n computeWorldPositions(path, spacesCount, tangents) {\r\n let target = this.target;\r\n let position = this.position;\r\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = this.world;\r\n let closed2 = path.closed;\r\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = _PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n let lengths = path.lengths;\r\n curveCount -= closed2 ? 1 : 2;\r\n let pathLength2 = lengths[curveCount];\r\n if (this.data.positionMode == 1 /* Percent */)\r\n position *= pathLength2;\r\n let multiplier2;\r\n switch (this.data.spacingMode) {\r\n case 2 /* Percent */:\r\n multiplier2 = pathLength2;\r\n break;\r\n case 3 /* Proportional */:\r\n multiplier2 = pathLength2 / spacesCount;\r\n break;\r\n default:\r\n multiplier2 = 1;\r\n }\r\n world = Utils.setArraySize(this.world, 8);\r\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i] * multiplier2;\r\n position += space;\r\n let p = position;\r\n if (closed2) {\r\n p %= pathLength2;\r\n if (p < 0)\r\n p += pathLength2;\r\n curve = 0;\r\n } else if (p < 0) {\r\n if (prevCurve != _PathConstraint.BEFORE) {\r\n prevCurve = _PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength2) {\r\n if (prevCurve != _PathConstraint.AFTER) {\r\n prevCurve = _PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength2, world, 0, out, o);\r\n continue;\r\n }\r\n for (; ; curve++) {\r\n let length = lengths[curve];\r\n if (p > length)\r\n continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = lengths[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed2 && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n } else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(\r\n p,\r\n world[0],\r\n world[1],\r\n world[2],\r\n world[3],\r\n world[4],\r\n world[5],\r\n world[6],\r\n world[7],\r\n out,\r\n o,\r\n tangents || i > 0 && space == 0\r\n );\r\n }\r\n return out;\r\n }\r\n if (closed2) {\r\n verticesLength += 2;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n } else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n let curves = Utils.setArraySize(this.curves, curveCount);\r\n let pathLength = 0;\r\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (let i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (this.data.positionMode == 1 /* Percent */)\r\n position *= pathLength;\r\n let multiplier;\r\n switch (this.data.spacingMode) {\r\n case 2 /* Percent */:\r\n multiplier = pathLength;\r\n break;\r\n case 3 /* Proportional */:\r\n multiplier = pathLength / spacesCount;\r\n break;\r\n default:\r\n multiplier = 1;\r\n }\r\n let segments = this.segments;\r\n let curveLength = 0;\r\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i] * multiplier;\r\n position += space;\r\n let p = position;\r\n if (closed2) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n } else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (; ; curve++) {\r\n let length = curves[curve];\r\n if (p > length)\r\n continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = curves[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n let ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 6e-3;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 6e-3;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (; ; segment++) {\r\n let length = segments[segment];\r\n if (p > length)\r\n continue;\r\n if (segment == 0)\r\n p /= length;\r\n else {\r\n let prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || i > 0 && space == 0);\r\n }\r\n return out;\r\n }\r\n addBeforePosition(p, temp, i, out, o) {\r\n let x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n addAfterPosition(p, temp, i, out, o) {\r\n let x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n addCurvePosition(p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n let x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 1e-3)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n }\r\n };\r\n var PathConstraint = _PathConstraint;\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 1e-5;\r\n\r\n // spine-core/src/Slot.ts\r\n var Slot = class {\r\n constructor(data, bone) {\r\n this.darkColor = null;\r\n this.attachment = null;\r\n this.attachmentState = 0;\r\n this.sequenceIndex = -1;\r\n this.deform = new Array();\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!bone)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new Color();\r\n this.darkColor = !data.darkColor ? null : new Color();\r\n this.setToSetupPose();\r\n }\r\n getSkeleton() {\r\n return this.bone.skeleton;\r\n }\r\n getAttachment() {\r\n return this.attachment;\r\n }\r\n setAttachment(attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {\r\n this.deform.length = 0;\r\n }\r\n this.attachment = attachment;\r\n this.sequenceIndex = -1;\r\n }\r\n setToSetupPose() {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (!this.data.attachmentName)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/TransformConstraint.ts\r\n var TransformConstraint = class {\r\n constructor(data, skeleton) {\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n this.mixScaleX = 0;\r\n this.mixScaleY = 0;\r\n this.mixShearY = 0;\r\n this.temp = new Vector2();\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mixRotate = data.mixRotate;\r\n this.mixX = data.mixX;\r\n this.mixY = data.mixY;\r\n this.mixScaleX = data.mixScaleX;\r\n this.mixScaleY = data.mixScaleY;\r\n this.mixShearY = data.mixShearY;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let bone = skeleton.findBone(data.bones[i].name);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\r\n this.bones.push(bone);\r\n }\r\n let target = skeleton.findBone(data.target.name);\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${data.target.name}.`);\r\n this.target = target;\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0)\r\n return;\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n } else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n }\r\n applyAbsoluteWorld() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let translate = mixX != 0 || mixY != 0;\r\n let target = this.target;\r\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect;\r\n let offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (mixRotate != 0) {\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= mixRotate;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n if (translate) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * mixX;\r\n bone.worldY += (temp.y - bone.worldY) * mixY;\r\n }\r\n if (mixScaleX != 0) {\r\n let s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n if (s != 0)\r\n s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n if (mixScaleY != 0) {\r\n let s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n if (s != 0)\r\n s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n }\r\n if (mixShearY > 0) {\r\n let b = bone.b, d = bone.d;\r\n let by = Math.atan2(d, b);\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r = by + (r + offsetShearY) * mixShearY;\r\n let s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n }\r\n bone.updateAppliedTransform();\r\n }\r\n }\r\n applyRelativeWorld() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let translate = mixX != 0 || mixY != 0;\r\n let target = this.target;\r\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (mixRotate != 0) {\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n let r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= mixRotate;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n if (translate) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * mixX;\r\n bone.worldY += temp.y * mixY;\r\n }\r\n if (mixScaleX != 0) {\r\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n if (mixScaleY != 0) {\r\n let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n }\r\n if (mixShearY > 0) {\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n let b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\r\n let s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n }\r\n bone.updateAppliedTransform();\r\n }\r\n }\r\n applyAbsoluteLocal() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let target = this.target;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let rotation = bone.arotation;\r\n if (mixRotate != 0) {\r\n let r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\r\n rotation += r * mixRotate;\r\n }\r\n let x = bone.ax, y = bone.ay;\r\n x += (target.ax - x + this.data.offsetX) * mixX;\r\n y += (target.ay - y + this.data.offsetY) * mixY;\r\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (mixScaleX != 0 && scaleX != 0)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\r\n if (mixScaleY != 0 && scaleY != 0)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\r\n let shearY = bone.ashearY;\r\n if (mixShearY != 0) {\r\n let r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\r\n shearY += r * mixShearY;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n applyRelativeLocal() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let target = this.target;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\r\n let x = bone.ax + (target.ax + this.data.offsetX) * mixX;\r\n let y = bone.ay + (target.ay + this.data.offsetY) * mixY;\r\n let scaleX = bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX + 1);\r\n let scaleY = bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY + 1);\r\n let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/Skeleton.ts\r\n var _Skeleton = class {\r\n constructor(data) {\r\n this._updateCache = new Array();\r\n this.skin = null;\r\n this.scaleX = 1;\r\n this._scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let boneData = data.bones[i];\r\n let bone;\r\n if (!boneData.parent)\r\n bone = new Bone(boneData, this, null);\r\n else {\r\n let parent = this.bones[boneData.parent.index];\r\n bone = new Bone(boneData, this, parent);\r\n parent.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (let i = 0; i < data.slots.length; i++) {\r\n let slotData = data.slots[i];\r\n let bone = this.bones[slotData.boneData.index];\r\n let slot = new Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (let i = 0; i < data.ikConstraints.length; i++) {\r\n let ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (let i = 0; i < data.transformConstraints.length; i++) {\r\n let transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (let i = 0; i < data.pathConstraints.length; i++) {\r\n let pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n get scaleY() {\r\n return _Skeleton.yDown ? -this._scaleY : this._scaleY;\r\n }\r\n set scaleY(scaleY) {\r\n this._scaleY = scaleY;\r\n }\r\n updateCache() {\r\n let updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin) {\r\n let skinBones = this.skin.bones;\r\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\r\n let bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone);\r\n }\r\n }\r\n let ikConstraints = this.ikConstraints;\r\n let transformConstraints = this.transformConstraints;\r\n let pathConstraints = this.pathConstraints;\r\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n let constraintCount = ikCount + transformCount + pathCount;\r\n outer:\r\n for (let i = 0; i < constraintCount; i++) {\r\n for (let ii = 0; ii < ikCount; ii++) {\r\n let constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < transformCount; ii++) {\r\n let constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < pathCount; ii++) {\r\n let constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n }\r\n sortIkConstraint(constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\r\n if (!constraint.active)\r\n return;\r\n let target = constraint.target;\r\n this.sortBone(target);\r\n let constrained = constraint.bones;\r\n let parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length == 1) {\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n } else {\r\n let child = constrained[constrained.length - 1];\r\n this.sortBone(child);\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n child.sorted = true;\r\n }\r\n }\r\n sortPathConstraint(constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\r\n if (!constraint.active)\r\n return;\r\n let slot = constraint.target;\r\n let slotIndex = slot.data.index;\r\n let slotBone = slot.bone;\r\n if (this.skin)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (let i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (let i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n }\r\n sortTransformConstraint(constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (let i = 0; i < boneCount; i++) {\r\n let child = constrained[i];\r\n this.sortBone(child.parent);\r\n this.sortBone(child);\r\n }\r\n } else {\r\n for (let i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (let i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n }\r\n sortPathConstraintAttachment(skin, slotIndex, slotBone) {\r\n let attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (let key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n }\r\n sortPathConstraintAttachmentWith(attachment, slotBone) {\r\n if (!(attachment instanceof PathAttachment))\r\n return;\r\n let pathBones = attachment.bones;\r\n if (!pathBones)\r\n this.sortBone(slotBone);\r\n else {\r\n let bones = this.bones;\r\n for (let i = 0, n = pathBones.length; i < n; ) {\r\n let nn = pathBones[i++];\r\n nn += i;\r\n while (i < nn)\r\n this.sortBone(bones[pathBones[i++]]);\r\n }\r\n }\r\n }\r\n sortBone(bone) {\r\n if (!bone)\r\n return;\r\n if (bone.sorted)\r\n return;\r\n let parent = bone.parent;\r\n if (parent)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n }\r\n sortReset(bones) {\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n }\r\n updateWorldTransform() {\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n }\r\n let updateCache = this._updateCache;\r\n for (let i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n }\r\n updateWorldTransformWith(parent) {\r\n let rootBone = this.getRootBone();\r\n if (!rootBone)\r\n throw new Error(\"Root bone must not be null.\");\r\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n rootBone.worldX = pa * this.x + pb * this.y + parent.worldX;\r\n rootBone.worldY = pc * this.x + pd * this.y + parent.worldY;\r\n let rotationY = rootBone.rotation + 90 + rootBone.shearY;\r\n let la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\r\n let lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\r\n let lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\r\n let ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\r\n rootBone.a = (pa * la + pb * lc) * this.scaleX;\r\n rootBone.b = (pa * lb + pb * ld) * this.scaleX;\r\n rootBone.c = (pc * la + pd * lc) * this.scaleY;\r\n rootBone.d = (pc * lb + pd * ld) * this.scaleY;\r\n let updateCache = this._updateCache;\r\n for (let i = 0, n = updateCache.length; i < n; i++) {\r\n let updatable = updateCache[i];\r\n if (updatable != rootBone)\r\n updatable.update();\r\n }\r\n }\r\n setToSetupPose() {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n }\r\n setBonesToSetupPose() {\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n let data = constraint.data;\r\n constraint.mixRotate = data.mixRotate;\r\n constraint.mixX = data.mixX;\r\n constraint.mixY = data.mixY;\r\n constraint.mixScaleX = data.mixScaleX;\r\n constraint.mixScaleY = data.mixScaleY;\r\n constraint.mixShearY = data.mixShearY;\r\n }\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n let data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.mixRotate = data.mixRotate;\r\n constraint.mixX = data.mixX;\r\n constraint.mixY = data.mixY;\r\n }\r\n }\r\n setSlotsToSetupPose() {\r\n let slots = this.slots;\r\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n }\r\n getRootBone() {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n }\r\n findBone(boneName) {\r\n if (!boneName)\r\n throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n }\r\n findSlot(slotName) {\r\n if (!slotName)\r\n throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n }\r\n setSkinByName(skinName) {\r\n let skin = this.data.findSkin(skinName);\r\n if (!skin)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n }\r\n setSkin(newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin) {\r\n if (this.skin)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n let name = slot.data.attachmentName;\r\n if (name) {\r\n let attachment = newSkin.getAttachment(i, name);\r\n if (attachment)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n }\r\n getAttachmentByName(slotName, attachmentName) {\r\n let slot = this.data.findSlot(slotName);\r\n if (!slot)\r\n throw new Error(`Can't find slot with name ${slotName}`);\r\n return this.getAttachment(slot.index, attachmentName);\r\n }\r\n getAttachment(slotIndex, attachmentName) {\r\n if (!attachmentName)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin) {\r\n let attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n }\r\n setAttachment(slotName, attachmentName) {\r\n if (!slotName)\r\n throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n let attachment = null;\r\n if (attachmentName) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (!attachment)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n }\r\n findIkConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n }\r\n findTransformConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n findPathConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n getBoundsRect() {\r\n let offset = new Vector2();\r\n let size = new Vector2();\r\n this.getBounds(offset, size);\r\n return { x: offset.x, y: offset.y, width: size.x, height: size.y };\r\n }\r\n getBounds(offset, size, temp = new Array(2)) {\r\n if (!offset)\r\n throw new Error(\"offset cannot be null.\");\r\n if (!size)\r\n throw new Error(\"size cannot be null.\");\r\n let drawOrder = this.drawOrder;\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let verticesLength = 0;\r\n let vertices = null;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot, vertices, 0, 2);\r\n } else if (attachment instanceof MeshAttachment) {\r\n let mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices) {\r\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n let x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n }\r\n };\r\n var Skeleton = _Skeleton;\r\n Skeleton.yDown = false;\r\n\r\n // spine-core/src/SkeletonData.ts\r\n var SkeletonData = class {\r\n constructor() {\r\n this.name = null;\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.defaultSkin = null;\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.version = null;\r\n this.hash = null;\r\n this.fps = 0;\r\n this.imagesPath = null;\r\n this.audioPath = null;\r\n }\r\n findBone(boneName) {\r\n if (!boneName)\r\n throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n }\r\n findSlot(slotName) {\r\n if (!slotName)\r\n throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n }\r\n findSkin(skinName) {\r\n if (!skinName)\r\n throw new Error(\"skinName cannot be null.\");\r\n let skins = this.skins;\r\n for (let i = 0, n = skins.length; i < n; i++) {\r\n let skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n }\r\n findEvent(eventDataName) {\r\n if (!eventDataName)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n let events = this.events;\r\n for (let i = 0, n = events.length; i < n; i++) {\r\n let event = events[i];\r\n if (event.name == eventDataName)\r\n return event;\r\n }\r\n return null;\r\n }\r\n findAnimation(animationName) {\r\n if (!animationName)\r\n throw new Error(\"animationName cannot be null.\");\r\n let animations = this.animations;\r\n for (let i = 0, n = animations.length; i < n; i++) {\r\n let animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n }\r\n findIkConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n findTransformConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n findPathConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n };\r\n\r\n // spine-core/src/Skin.ts\r\n var SkinEntry = class {\r\n constructor(slotIndex = 0, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n };\r\n var Skin = class {\r\n constructor(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n setAttachment(slotIndex, name, attachment) {\r\n if (!attachment)\r\n throw new Error(\"attachment cannot be null.\");\r\n let attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n }\r\n addSkin(skin) {\r\n for (let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.bones.length; ii++) {\r\n if (this.bones[ii] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.constraints.length; ii++) {\r\n if (this.constraints[ii] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n copySkin(skin) {\r\n for (let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.bones.length; ii++) {\r\n if (this.bones[ii] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.constraints.length; ii++) {\r\n if (this.constraints[ii] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (!attachment.attachment)\r\n continue;\r\n if (attachment.attachment instanceof MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n } else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n }\r\n getAttachment(slotIndex, name) {\r\n let dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n }\r\n removeAttachment(slotIndex, name) {\r\n let dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n delete dictionary[name];\r\n }\r\n getAttachments() {\r\n let entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n let slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n }\r\n getAttachmentsForSlot(slotIndex, attachments) {\r\n let slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name, attachment));\r\n }\r\n }\r\n }\r\n clear() {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n }\r\n attachAll(skeleton, oldSkin) {\r\n let slotIndex = 0;\r\n for (let i = 0; i < skeleton.slots.length; i++) {\r\n let slot = skeleton.slots[i];\r\n let slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n let dictionary = oldSkin.attachments[slotIndex];\r\n for (let key in dictionary) {\r\n let skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n let attachment = this.getAttachment(slotIndex, key);\r\n if (attachment)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/SlotData.ts\r\n var SlotData = class {\r\n constructor(index, name, boneData) {\r\n this.index = 0;\r\n this.color = new Color(1, 1, 1, 1);\r\n this.darkColor = null;\r\n this.attachmentName = null;\r\n this.blendMode = BlendMode.Normal;\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n if (!boneData)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n };\r\n var BlendMode = /* @__PURE__ */ ((BlendMode3) => {\r\n BlendMode3[BlendMode3[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode3[BlendMode3[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode3[BlendMode3[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode3[BlendMode3[\"Screen\"] = 3] = \"Screen\";\r\n return BlendMode3;\r\n })(BlendMode || {});\r\n\r\n // spine-core/src/TransformConstraintData.ts\r\n var TransformConstraintData = class extends ConstraintData {\r\n constructor(name) {\r\n super(name, 0, false);\r\n this.bones = new Array();\r\n this._target = null;\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n this.mixScaleX = 0;\r\n this.mixScaleY = 0;\r\n this.mixShearY = 0;\r\n this.offsetRotation = 0;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.offsetScaleX = 0;\r\n this.offsetScaleY = 0;\r\n this.offsetShearY = 0;\r\n this.relative = false;\r\n this.local = false;\r\n }\r\n set target(boneData) {\r\n this._target = boneData;\r\n }\r\n get target() {\r\n if (!this._target)\r\n throw new Error(\"BoneData not set.\");\r\n else\r\n return this._target;\r\n }\r\n };\r\n\r\n // spine-core/src/SkeletonBinary.ts\r\n var SkeletonBinary = class {\r\n constructor(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n readSkeletonData(binary) {\r\n let scale = this.scale;\r\n let skeletonData = new SkeletonData();\r\n skeletonData.name = \"\";\r\n let input = new BinaryInput(binary);\r\n let lowHash = input.readInt32();\r\n let highHash = input.readInt32();\r\n skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\r\n skeletonData.version = input.readString();\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n let nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n let n = 0;\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let str = input.readString();\r\n if (!str)\r\n throw new Error(\"String in string table must not be null.\");\r\n input.strings.push(str);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"Bone name must not be null.\");\r\n let parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n let data = new BoneData(i, name, parent);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let slotName = input.readString();\r\n if (!slotName)\r\n throw new Error(\"Slot name must not be null.\");\r\n let boneData = skeletonData.bones[input.readInt(true)];\r\n let data = new SlotData(i, slotName, boneData);\r\n Color.rgba8888ToColor(data.color, input.readInt32());\r\n let darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = input.readInt(true);\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0, nn; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"IK constraint data name must not be null.\");\r\n let data = new IkConstraintData(name);\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (let ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0, nn; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"Transform constraint data name must not be null.\");\r\n let data = new TransformConstraintData(name);\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (let ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.mixRotate = input.readFloat();\r\n data.mixX = input.readFloat();\r\n data.mixY = input.readFloat();\r\n data.mixScaleX = input.readFloat();\r\n data.mixScaleY = input.readFloat();\r\n data.mixShearY = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0, nn; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"Path constraint data name must not be null.\");\r\n let data = new PathConstraintData(name);\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (let ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = input.readInt(true);\r\n data.spacingMode = input.readInt(true);\r\n data.rotateMode = input.readInt(true);\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == 0 /* Fixed */)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\r\n data.spacing *= scale;\r\n data.mixRotate = input.readFloat();\r\n data.mixX = input.readFloat();\r\n data.mixY = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n let i = skeletonData.skins.length;\r\n Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++) {\r\n let skin = this.readSkin(input, skeletonData, false, nonessential);\r\n if (!skin)\r\n throw new Error(\"readSkin() should not have returned null.\");\r\n skeletonData.skins[i] = skin;\r\n }\r\n }\r\n n = this.linkedMeshes.length;\r\n for (let i = 0; i < n; i++) {\r\n let linkedMesh = this.linkedMeshes[i];\r\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (!skin)\r\n throw new Error(\"Not skin found for linked mesh.\");\r\n if (!linkedMesh.parent)\r\n throw new Error(\"Linked mesh parent must not be null\");\r\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (!parent)\r\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\r\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent);\r\n if (linkedMesh.mesh.region != null)\r\n linkedMesh.mesh.updateRegion();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let eventName = input.readStringRef();\r\n if (!eventName)\r\n throw new Error();\r\n let data = new EventData(eventName);\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let animationName = input.readString();\r\n if (!animationName)\r\n throw new Error(\"Animatio name must not be null.\");\r\n skeletonData.animations.push(this.readAnimation(input, animationName, skeletonData));\r\n }\r\n return skeletonData;\r\n }\r\n readSkin(input, skeletonData, defaultSkin, nonessential) {\r\n let skin = null;\r\n let slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new Skin(\"default\");\r\n } else {\r\n let skinName = input.readStringRef();\r\n if (!skinName)\r\n throw new Error(\"Skin name must not be null.\");\r\n skin = new Skin(skinName);\r\n skin.bones.length = input.readInt(true);\r\n for (let i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (let i = 0; i < slotCount; i++) {\r\n let slotIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let name = input.readStringRef();\r\n if (!name)\r\n throw new Error(\"Attachment name must not be null\");\r\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\r\n if (attachment)\r\n skin.setAttachment(slotIndex, name, attachment);\r\n }\r\n }\r\n return skin;\r\n }\r\n readAttachment(input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n let scale = this.scale;\r\n let name = input.readStringRef();\r\n if (!name)\r\n name = attachmentName;\r\n switch (input.readByte()) {\r\n case AttachmentType.Region: {\r\n let path = input.readStringRef();\r\n let rotation = input.readFloat();\r\n let x = input.readFloat();\r\n let y = input.readFloat();\r\n let scaleX = input.readFloat();\r\n let scaleY = input.readFloat();\r\n let width = input.readFloat();\r\n let height = input.readFloat();\r\n let color = input.readInt32();\r\n let sequence = this.readSequence(input);\r\n if (!path)\r\n path = name;\r\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\r\n if (!region)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n Color.rgba8888ToColor(region.color, color);\r\n region.sequence = sequence;\r\n if (sequence == null)\r\n region.updateRegion();\r\n return region;\r\n }\r\n case AttachmentType.BoundingBox: {\r\n let vertexCount = input.readInt(true);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let color = nonessential ? input.readInt32() : 0;\r\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (!box)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case AttachmentType.Mesh: {\r\n let path = input.readStringRef();\r\n let color = input.readInt32();\r\n let vertexCount = input.readInt(true);\r\n let uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n let triangles = this.readShortArray(input);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let hullLength = input.readInt(true);\r\n let sequence = this.readSequence(input);\r\n let edges = [];\r\n let width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (!path)\r\n path = name;\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\r\n if (!mesh)\r\n return null;\r\n mesh.path = path;\r\n Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n if (sequence == null)\r\n mesh.updateRegion();\r\n mesh.hullLength = hullLength << 1;\r\n mesh.sequence = sequence;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case AttachmentType.LinkedMesh: {\r\n let path = input.readStringRef();\r\n let color = input.readInt32();\r\n let skinName = input.readStringRef();\r\n let parent = input.readStringRef();\r\n let inheritTimelines = input.readBoolean();\r\n let sequence = this.readSequence(input);\r\n let width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (!path)\r\n path = name;\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\r\n if (!mesh)\r\n return null;\r\n mesh.path = path;\r\n Color.rgba8888ToColor(mesh.color, color);\r\n mesh.sequence = sequence;\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));\r\n return mesh;\r\n }\r\n case AttachmentType.Path: {\r\n let closed2 = input.readBoolean();\r\n let constantSpeed = input.readBoolean();\r\n let vertexCount = input.readInt(true);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let lengths = Utils.newArray(vertexCount / 3, 0);\r\n for (let i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n let color = nonessential ? input.readInt32() : 0;\r\n let path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (!path)\r\n return null;\r\n path.closed = closed2;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case AttachmentType.Point: {\r\n let rotation = input.readFloat();\r\n let x = input.readFloat();\r\n let y = input.readFloat();\r\n let color = nonessential ? input.readInt32() : 0;\r\n let point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (!point)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case AttachmentType.Clipping: {\r\n let endSlotIndex = input.readInt(true);\r\n let vertexCount = input.readInt(true);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let color = nonessential ? input.readInt32() : 0;\r\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (!clip)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n }\r\n readSequence(input) {\r\n if (!input.readBoolean())\r\n return null;\r\n let sequence = new Sequence(input.readInt(true));\r\n sequence.start = input.readInt(true);\r\n sequence.digits = input.readInt(true);\r\n sequence.setupIndex = input.readInt(true);\r\n return sequence;\r\n }\r\n readVertices(input, vertexCount) {\r\n let scale = this.scale;\r\n let verticesLength = vertexCount << 1;\r\n let vertices = new Vertices();\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n let weights = new Array();\r\n let bonesArray = new Array();\r\n for (let i = 0; i < vertexCount; i++) {\r\n let boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (let ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n }\r\n readFloatArray(input, n, scale) {\r\n let array = new Array(n);\r\n if (scale == 1) {\r\n for (let i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n } else {\r\n for (let i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n }\r\n readShortArray(input) {\r\n let n = input.readInt(true);\r\n let array = new Array(n);\r\n for (let i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n }\r\n readAnimation(input, name, skeletonData) {\r\n input.readInt(true);\r\n let timelines = new Array();\r\n let scale = this.scale;\r\n let tempColor1 = new Color();\r\n let tempColor2 = new Color();\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let slotIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let timelineType = input.readByte();\r\n let frameCount = input.readInt(true);\r\n let frameLast = frameCount - 1;\r\n switch (timelineType) {\r\n case SLOT_ATTACHMENT: {\r\n let timeline = new AttachmentTimeline(frameCount, slotIndex);\r\n for (let frame = 0; frame < frameCount; frame++)\r\n timeline.setFrame(frame, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGBA: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n let a = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b, a);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n let a2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\r\n }\r\n time = time2;\r\n r = r2;\r\n g = g2;\r\n b = b2;\r\n a = a2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGB: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\r\n }\r\n time = time2;\r\n r = r2;\r\n g = g2;\r\n b = b2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGBA2: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n let a = input.readUnsignedByte() / 255;\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let nr = input.readUnsignedByte() / 255;\r\n let ng = input.readUnsignedByte() / 255;\r\n let nb = input.readUnsignedByte() / 255;\r\n let na = input.readUnsignedByte() / 255;\r\n let nr2 = input.readUnsignedByte() / 255;\r\n let ng2 = input.readUnsignedByte() / 255;\r\n let nb2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\r\n setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\r\n setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\r\n setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\r\n }\r\n time = time2;\r\n r = nr;\r\n g = ng;\r\n b = nb;\r\n a = na;\r\n r2 = nr2;\r\n g2 = ng2;\r\n b2 = nb2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGB2: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let nr = input.readUnsignedByte() / 255;\r\n let ng = input.readUnsignedByte() / 255;\r\n let nb = input.readUnsignedByte() / 255;\r\n let nr2 = input.readUnsignedByte() / 255;\r\n let ng2 = input.readUnsignedByte() / 255;\r\n let nb2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\r\n setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\r\n setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\r\n }\r\n time = time2;\r\n r = nr;\r\n g = ng;\r\n b = nb;\r\n r2 = nr2;\r\n g2 = ng2;\r\n b2 = nb2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_ALPHA: {\r\n let timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\r\n let time = input.readFloat(), a = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, a);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let a2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\r\n }\r\n time = time2;\r\n a = a2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let boneIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\r\n switch (type) {\r\n case BONE_ROTATE:\r\n timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_TRANSLATE:\r\n timelines.push(readTimeline2(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\r\n break;\r\n case BONE_TRANSLATEX:\r\n timelines.push(readTimeline1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\r\n break;\r\n case BONE_TRANSLATEY:\r\n timelines.push(readTimeline1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\r\n break;\r\n case BONE_SCALE:\r\n timelines.push(readTimeline2(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SCALEX:\r\n timelines.push(readTimeline1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SCALEY:\r\n timelines.push(readTimeline1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SHEAR:\r\n timelines.push(readTimeline2(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SHEARX:\r\n timelines.push(readTimeline1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SHEARY:\r\n timelines.push(readTimeline1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\r\n }\r\n }\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\r\n let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\r\n let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\r\n }\r\n time = time2;\r\n mix = mix2;\r\n softness = softness2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\r\n let timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\r\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\r\n setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\r\n setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n mixScaleX = mixScaleX2;\r\n mixScaleY = mixScaleY2;\r\n mixShearY = mixShearY2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let index = input.readInt(true);\r\n let data = skeletonData.pathConstraints[index];\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n switch (input.readByte()) {\r\n case PATH_POSITION:\r\n timelines.push(readTimeline1(\r\n input,\r\n new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),\r\n data.positionMode == 0 /* Fixed */ ? scale : 1\r\n ));\r\n break;\r\n case PATH_SPACING:\r\n timelines.push(readTimeline1(\r\n input,\r\n new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),\r\n data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */ ? scale : 1\r\n ));\r\n break;\r\n case PATH_MIX:\r\n let timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\r\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\r\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let skin = skeletonData.skins[input.readInt(true)];\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let slotIndex = input.readInt(true);\r\n for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n let attachmentName = input.readStringRef();\r\n if (!attachmentName)\r\n throw new Error(\"attachmentName must not be null.\");\r\n let attachment = skin.getAttachment(slotIndex, attachmentName);\r\n let timelineType = input.readByte();\r\n let frameCount = input.readInt(true);\r\n let frameLast = frameCount - 1;\r\n switch (timelineType) {\r\n case ATTACHMENT_DEFORM: {\r\n let vertexAttachment = attachment;\r\n let weighted = vertexAttachment.bones;\r\n let vertices = vertexAttachment.vertices;\r\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n let bezierCount = input.readInt(true);\r\n let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);\r\n let time = input.readFloat();\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n let deform;\r\n let end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = Utils.newFloatArray(deformLength);\r\n let start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (let v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n } else {\r\n for (let v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (let v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frame, time, deform);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\r\n }\r\n time = time2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case ATTACHMENT_SEQUENCE: {\r\n let timeline = new SequenceTimeline(frameCount, slotIndex, attachment);\r\n for (let frame = 0; frame < frameCount; frame++) {\r\n let time = input.readFloat();\r\n let modeAndIndex = input.readInt32();\r\n timeline.setFrame(\r\n frame,\r\n time,\r\n SequenceModeValues[modeAndIndex & 15],\r\n modeAndIndex >> 4,\r\n input.readFloat()\r\n );\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n let drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n let timeline = new DrawOrderTimeline(drawOrderCount);\r\n let slotCount = skeletonData.slots.length;\r\n for (let i = 0; i < drawOrderCount; i++) {\r\n let time = input.readFloat();\r\n let offsetCount = input.readInt(true);\r\n let drawOrder = Utils.newArray(slotCount, 0);\r\n for (let ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n let unchanged = Utils.newArray(slotCount - offsetCount, 0);\r\n let originalIndex = 0, unchangedIndex = 0;\r\n for (let ii = 0; ii < offsetCount; ii++) {\r\n let slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (let ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n }\r\n let eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n let timeline = new EventTimeline(eventCount);\r\n for (let i = 0; i < eventCount; i++) {\r\n let time = input.readFloat();\r\n let eventData = skeletonData.events[input.readInt(true)];\r\n let event = new Event(time, eventData);\r\n event.intValue = input.readInt(false);\r\n event.floatValue = input.readFloat();\r\n event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event.data.audioPath) {\r\n event.volume = input.readFloat();\r\n event.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event);\r\n }\r\n timelines.push(timeline);\r\n }\r\n let duration = 0;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n duration = Math.max(duration, timelines[i].getDuration());\r\n return new Animation(name, timelines, duration);\r\n }\r\n };\r\n var BinaryInput = class {\r\n constructor(data, strings = new Array(), index = 0, buffer = new DataView(data.buffer)) {\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n readByte() {\r\n return this.buffer.getInt8(this.index++);\r\n }\r\n readUnsignedByte() {\r\n return this.buffer.getUint8(this.index++);\r\n }\r\n readShort() {\r\n let value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n }\r\n readInt32() {\r\n let value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n }\r\n readInt(optimizePositive) {\r\n let b = this.readByte();\r\n let result = b & 127;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 7;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 14;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 21;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : result >>> 1 ^ -(result & 1);\r\n }\r\n readStringRef() {\r\n let index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n }\r\n readString() {\r\n let byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n let chars = \"\";\r\n let charCount = 0;\r\n for (let i = 0; i < byteCount; ) {\r\n let b = this.readUnsignedByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode((b & 31) << 6 | this.readByte() & 63);\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode((b & 15) << 12 | (this.readByte() & 63) << 6 | this.readByte() & 63);\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n }\r\n readFloat() {\r\n let value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n }\r\n readBoolean() {\r\n return this.readByte() != 0;\r\n }\r\n };\r\n var LinkedMesh = class {\r\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritTimeline = inheritDeform;\r\n }\r\n };\r\n var Vertices = class {\r\n constructor(bones = null, vertices = null) {\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n };\r\n var AttachmentType = /* @__PURE__ */ ((AttachmentType2) => {\r\n AttachmentType2[AttachmentType2[\"Region\"] = 0] = \"Region\";\r\n AttachmentType2[AttachmentType2[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType2[AttachmentType2[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType2[AttachmentType2[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType2[AttachmentType2[\"Path\"] = 4] = \"Path\";\r\n AttachmentType2[AttachmentType2[\"Point\"] = 5] = \"Point\";\r\n AttachmentType2[AttachmentType2[\"Clipping\"] = 6] = \"Clipping\";\r\n return AttachmentType2;\r\n })(AttachmentType || {});\r\n function readTimeline1(input, timeline, scale) {\r\n let time = input.readFloat(), value = input.readFloat() * scale;\r\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\r\n timeline.setFrame(frame, time, value);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), value2 = input.readFloat() * scale;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\r\n }\r\n time = time2;\r\n value = value2;\r\n }\r\n return timeline;\r\n }\r\n function readTimeline2(input, timeline, scale) {\r\n let time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\r\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\r\n timeline.setFrame(frame, time, value1, value2);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\r\n }\r\n time = time2;\r\n value1 = nvalue1;\r\n value2 = nvalue2;\r\n }\r\n return timeline;\r\n }\r\n function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\r\n timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\r\n }\r\n var BONE_ROTATE = 0;\r\n var BONE_TRANSLATE = 1;\r\n var BONE_TRANSLATEX = 2;\r\n var BONE_TRANSLATEY = 3;\r\n var BONE_SCALE = 4;\r\n var BONE_SCALEX = 5;\r\n var BONE_SCALEY = 6;\r\n var BONE_SHEAR = 7;\r\n var BONE_SHEARX = 8;\r\n var BONE_SHEARY = 9;\r\n var SLOT_ATTACHMENT = 0;\r\n var SLOT_RGBA = 1;\r\n var SLOT_RGB = 2;\r\n var SLOT_RGBA2 = 3;\r\n var SLOT_RGB2 = 4;\r\n var SLOT_ALPHA = 5;\r\n var ATTACHMENT_DEFORM = 0;\r\n var ATTACHMENT_SEQUENCE = 1;\r\n var PATH_POSITION = 0;\r\n var PATH_SPACING = 1;\r\n var PATH_MIX = 2;\r\n var CURVE_STEPPED = 1;\r\n var CURVE_BEZIER = 2;\r\n\r\n // spine-core/src/SkeletonBounds.ts\r\n var SkeletonBounds = class {\r\n constructor() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new Pool(() => {\r\n return Utils.newFloatArray(16);\r\n });\r\n }\r\n update(skeleton, updateAabb) {\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n let boundingBoxes = this.boundingBoxes;\r\n let polygons = this.polygons;\r\n let polygonPool = this.polygonPool;\r\n let slots = skeleton.slots;\r\n let slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (let i = 0; i < slotCount; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof BoundingBoxAttachment) {\r\n let boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n let polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n } else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n }\r\n aabbCompute() {\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++) {\r\n let polygon = polygons[i];\r\n let vertices = polygon;\r\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n let x = vertices[ii];\r\n let y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n }\r\n aabbContainsPoint(x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n }\r\n aabbIntersectsSegment(x1, y1, x2, y2) {\r\n let minX = this.minX;\r\n let minY = this.minY;\r\n let maxX = this.maxX;\r\n let maxY = this.maxY;\r\n if (x1 <= minX && x2 <= minX || y1 <= minY && y2 <= minY || x1 >= maxX && x2 >= maxX || y1 >= maxY && y2 >= maxY)\r\n return false;\r\n let m = (y2 - y1) / (x2 - x1);\r\n let y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n let x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n }\r\n aabbIntersectsSkeleton(bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n }\r\n containsPoint(x, y) {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n }\r\n containsPointPolygon(polygon, x, y) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n let prevIndex = nn - 2;\r\n let inside = false;\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let vertexY = vertices[ii + 1];\r\n let prevY = vertices[prevIndex + 1];\r\n if (vertexY < y && prevY >= y || prevY < y && vertexY >= y) {\r\n let vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n }\r\n intersectsSegment(x1, y1, x2, y2) {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n }\r\n intersectsSegmentPolygon(polygon, x1, y1, x2, y2) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n let width12 = x1 - x2, height12 = y1 - y2;\r\n let det1 = x1 * y2 - y1 * x2;\r\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let x4 = vertices[ii], y4 = vertices[ii + 1];\r\n let det2 = x3 * y4 - y3 * x4;\r\n let width34 = x3 - x4, height34 = y3 - y4;\r\n let det3 = width12 * height34 - height12 * width34;\r\n let x = (det1 * width34 - width12 * det2) / det3;\r\n if ((x >= x3 && x <= x4 || x >= x4 && x <= x3) && (x >= x1 && x <= x2 || x >= x2 && x <= x1)) {\r\n let y = (det1 * height34 - height12 * det2) / det3;\r\n if ((y >= y3 && y <= y4 || y >= y4 && y <= y3) && (y >= y1 && y <= y2 || y >= y2 && y <= y1))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n }\r\n getPolygon(boundingBox) {\r\n if (!boundingBox)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n let index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n }\r\n getWidth() {\r\n return this.maxX - this.minX;\r\n }\r\n getHeight() {\r\n return this.maxY - this.minY;\r\n }\r\n };\r\n\r\n // spine-core/src/Triangulator.ts\r\n var Triangulator = class {\r\n constructor() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new Pool(() => {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new Pool(() => {\r\n return new Array();\r\n });\r\n }\r\n triangulate(verticesArray) {\r\n let vertices = verticesArray;\r\n let vertexCount = verticesArray.length >> 1;\r\n let indices = this.indicesArray;\r\n indices.length = 0;\r\n for (let i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n let isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (let i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n let triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n let previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer:\r\n if (!isConcave[i]) {\r\n let p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n let p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n let p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n let p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n let v = indices[ii] << 1;\r\n let vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n let previousIndex = (vertexCount + i - 1) % vertexCount;\r\n let nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n }\r\n decompose(verticesArray, triangles) {\r\n let vertices = verticesArray;\r\n let convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n let convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n let polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n let polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n let fanBaseIndex = -1, lastWinding = 0;\r\n for (let i = 0, n = triangles.length; i < n; i += 3) {\r\n let t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n let x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n let x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n let x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n let merged = false;\r\n if (fanBaseIndex == t1) {\r\n let o = polygon.length - 4;\r\n let winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n let winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n } else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (let i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n let firstIndex = polygonIndices[0];\r\n let lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n let o = polygon.length - 4;\r\n let prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n let prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n let firstX = polygon[0], firstY = polygon[1];\r\n let secondX = polygon[2], secondY = polygon[3];\r\n let winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (let ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n let otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n let otherFirstIndex = otherIndices[0];\r\n let otherSecondIndex = otherIndices[1];\r\n let otherLastIndex = otherIndices[2];\r\n let otherPoly = convexPolygons[ii];\r\n let x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n let winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n let winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (let i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n }\r\n static isConcave(index, vertexCount, vertices, indices) {\r\n let previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n let current = indices[index] << 1;\r\n let next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(\r\n vertices[previous],\r\n vertices[previous + 1],\r\n vertices[current],\r\n vertices[current + 1],\r\n vertices[next],\r\n vertices[next + 1]\r\n );\r\n }\r\n static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n }\r\n static winding(p1x, p1y, p2x, p2y, p3x, p3y) {\r\n let px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n }\r\n };\r\n\r\n // spine-core/src/SkeletonClipping.ts\r\n var SkeletonClipping = class {\r\n constructor() {\r\n this.triangulator = new Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n }\r\n clipStart(slot, clip) {\r\n if (this.clipAttachment)\r\n return 0;\r\n this.clipAttachment = clip;\r\n let n = clip.worldVerticesLength;\r\n let vertices = Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n let clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n let clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (let i = 0, n2 = clippingPolygons.length; i < n2; i++) {\r\n let polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n }\r\n clipEndWithSlot(slot) {\r\n if (this.clipAttachment && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n }\r\n clipEnd() {\r\n if (!this.clipAttachment)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n }\r\n isClipping() {\r\n return this.clipAttachment != null;\r\n }\r\n clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n let clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n let clippedTriangles = this.clippedTriangles;\r\n let polygons = this.clippingPolygons;\r\n let polygonsCount = polygons.length;\r\n let vertexSize = twoColor ? 12 : 8;\r\n let index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer:\r\n for (let i = 0; i < trianglesLength; i += 3) {\r\n let vertexOffset = triangles[i] << 1;\r\n let x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n let u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n let x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n let u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n let x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n let u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (let p = 0; p < polygonsCount; p++) {\r\n let s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n let clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n let d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n let d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n let clipOutputCount = clipOutputLength >> 1;\r\n let clipOutputItems = this.clipOutput;\r\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (let ii = 0; ii < clipOutputLength; ii += 2) {\r\n let x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n let c0 = x - x3, c1 = y - y3;\r\n let a = (d0 * c0 + d1 * c1) * d;\r\n let b = (d4 * c0 + d2 * c1) * d;\r\n let c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (let ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = index + ii;\r\n clippedTrianglesItems[s + 2] = index + ii + 1;\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n } else {\r\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n } else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = index + 1;\r\n clippedTrianglesItems[s + 2] = index + 2;\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n }\r\n clip(x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n let originalOutput = output;\r\n let clipped = false;\r\n let input;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n } else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n let clippingVertices = clippingArea;\r\n let clippingVerticesLast = clippingArea.length - 4;\r\n for (let i = 0; ; i += 2) {\r\n let edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n let edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n let deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n let inputVertices = input;\r\n let inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (let ii = 0; ii < inputVerticesLength; ii += 2) {\r\n let inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n let inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n let side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 1e-6) {\r\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n } else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n } else if (side2) {\r\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 1e-6) {\r\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n } else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n let temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (let i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n } else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n }\r\n static makeClockwise(polygon) {\r\n let vertices = polygon;\r\n let verticeslength = polygon.length;\r\n let area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (let i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n let x = vertices[i], y = vertices[i + 1];\r\n let other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/SkeletonJson.ts\r\n var SkeletonJson = class {\r\n constructor(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n readSkeletonData(json) {\r\n let scale = this.scale;\r\n let skeletonData = new SkeletonData();\r\n let root = typeof json === \"string\" ? JSON.parse(json) : json;\r\n let skeletonMap = root.skeleton;\r\n if (skeletonMap) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (let i = 0; i < root.bones.length; i++) {\r\n let boneMap = root.bones[i];\r\n let parent = null;\r\n let parentName = getValue(boneMap, \"parent\", null);\r\n if (parentName)\r\n parent = skeletonData.findBone(parentName);\r\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\r\n data.length = getValue(boneMap, \"length\", 0) * scale;\r\n data.x = getValue(boneMap, \"x\", 0) * scale;\r\n data.y = getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = getValue(boneMap, \"shearX\", 0);\r\n data.shearY = getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\r\n data.skinRequired = getValue(boneMap, \"skin\", false);\r\n let color = getValue(boneMap, \"color\", null);\r\n if (color)\r\n data.color.setFromString(color);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (let i = 0; i < root.slots.length; i++) {\r\n let slotMap = root.slots[i];\r\n let boneData = skeletonData.findBone(slotMap.bone);\r\n if (!boneData)\r\n throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);\r\n let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\r\n let color = getValue(slotMap, \"color\", null);\r\n if (color)\r\n data.color.setFromString(color);\r\n let dark = getValue(slotMap, \"dark\", null);\r\n if (dark)\r\n data.darkColor = Color.fromString(dark);\r\n data.attachmentName = getValue(slotMap, \"attachment\", null);\r\n data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (let i = 0; i < root.ik.length; i++) {\r\n let constraintMap = root.ik[i];\r\n let data = new IkConstraintData(constraintMap.name);\r\n data.order = getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\r\n let bone = skeletonData.findBone(constraintMap.bones[ii]);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${constraintMap.bones[ii]} for IK constraint ${constraintMap.name}.`);\r\n data.bones.push(bone);\r\n }\r\n let target = skeletonData.findBone(constraintMap.target);\r\n ;\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${constraintMap.target} for IK constraint ${constraintMap.name}.`);\r\n data.target = target;\r\n data.mix = getValue(constraintMap, \"mix\", 1);\r\n data.softness = getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = getValue(constraintMap, \"compress\", false);\r\n data.stretch = getValue(constraintMap, \"stretch\", false);\r\n data.uniform = getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (let i = 0; i < root.transform.length; i++) {\r\n let constraintMap = root.transform[i];\r\n let data = new TransformConstraintData(constraintMap.name);\r\n data.order = getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\r\n let boneName = constraintMap.bones[ii];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${boneName} for transform constraint ${constraintMap.name}.`);\r\n data.bones.push(bone);\r\n }\r\n let targetName = constraintMap.target;\r\n let target = skeletonData.findBone(targetName);\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${targetName} for transform constraint ${constraintMap.name}.`);\r\n data.target = target;\r\n data.local = getValue(constraintMap, \"local\", false);\r\n data.relative = getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\r\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\r\n data.mixX = getValue(constraintMap, \"mixX\", 1);\r\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\r\n data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\r\n data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\r\n data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (let i = 0; i < root.path.length; i++) {\r\n let constraintMap = root.path[i];\r\n let data = new PathConstraintData(constraintMap.name);\r\n data.order = getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\r\n let boneName = constraintMap.bones[ii];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${boneName} for path constraint ${constraintMap.name}.`);\r\n data.bones.push(bone);\r\n }\r\n let targetName = constraintMap.target;\r\n let target = skeletonData.findSlot(targetName);\r\n if (!target)\r\n throw new Error(`Couldn't find target slot ${targetName} for path constraint ${constraintMap.name}.`);\r\n data.target = target;\r\n data.positionMode = Utils.enumValue(PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\r\n data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\r\n data.rotateMode = Utils.enumValue(RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\r\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\r\n data.position = getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == 0 /* Fixed */)\r\n data.position *= scale;\r\n data.spacing = getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\r\n data.spacing *= scale;\r\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\r\n data.mixX = getValue(constraintMap, \"mixX\", 1);\r\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (let i = 0; i < root.skins.length; i++) {\r\n let skinMap = root.skins[i];\r\n let skin = new Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\r\n let boneName = skinMap.bones[ii];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${boneName} for skin ${skinMap.name}.`);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\r\n let constraintName = skinMap.ik[ii];\r\n let constraint = skeletonData.findIkConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(`Couldn't find IK constraint ${constraintName} for skin ${skinMap.name}.`);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\r\n let constraintName = skinMap.transform[ii];\r\n let constraint = skeletonData.findTransformConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(`Couldn't find transform constraint ${constraintName} for skin ${skinMap.name}.`);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (let ii = 0; ii < skinMap.path.length; ii++) {\r\n let constraintName = skinMap.path[ii];\r\n let constraint = skeletonData.findPathConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(`Couldn't find path constraint ${constraintName} for skin ${skinMap.name}.`);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (let slotName in skinMap.attachments) {\r\n let slot = skeletonData.findSlot(slotName);\r\n if (!slot)\r\n throw new Error(`Couldn't find slot ${slotName} for skin ${skinMap.name}.`);\r\n let slotMap = skinMap.attachments[slotName];\r\n for (let entryName in slotMap) {\r\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n let linkedMesh = this.linkedMeshes[i];\r\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (!skin)\r\n throw new Error(`Skin not found: ${linkedMesh.skin}`);\r\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (!parent)\r\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\r\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent);\r\n if (linkedMesh.mesh.region != null)\r\n linkedMesh.mesh.updateRegion();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (let eventName in root.events) {\r\n let eventMap = root.events[eventName];\r\n let data = new EventData(eventName);\r\n data.intValue = getValue(eventMap, \"int\", 0);\r\n data.floatValue = getValue(eventMap, \"float\", 0);\r\n data.stringValue = getValue(eventMap, \"string\", \"\");\r\n data.audioPath = getValue(eventMap, \"audio\", null);\r\n if (data.audioPath) {\r\n data.volume = getValue(eventMap, \"volume\", 1);\r\n data.balance = getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (let animationName in root.animations) {\r\n let animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n }\r\n readAttachment(map, skin, slotIndex, name, skeletonData) {\r\n let scale = this.scale;\r\n name = getValue(map, \"name\", name);\r\n switch (getValue(map, \"type\", \"region\")) {\r\n case \"region\": {\r\n let path = getValue(map, \"path\", name);\r\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\r\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\r\n if (!region)\r\n return null;\r\n region.path = path;\r\n region.x = getValue(map, \"x\", 0) * scale;\r\n region.y = getValue(map, \"y\", 0) * scale;\r\n region.scaleX = getValue(map, \"scaleX\", 1);\r\n region.scaleY = getValue(map, \"scaleY\", 1);\r\n region.rotation = getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n region.sequence = sequence;\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n region.color.setFromString(color);\r\n if (region.region != null)\r\n region.updateRegion();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (!box)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n let path = getValue(map, \"path\", name);\r\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\r\n if (!mesh)\r\n return null;\r\n mesh.path = path;\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n mesh.color.setFromString(color);\r\n mesh.width = getValue(map, \"width\", 0) * scale;\r\n mesh.height = getValue(map, \"height\", 0) * scale;\r\n mesh.sequence = sequence;\r\n let parent = getValue(map, \"parent\", null);\r\n if (parent) {\r\n this.linkedMeshes.push(new LinkedMesh2(mesh, getValue(map, \"skin\", null), slotIndex, parent, getValue(map, \"timelines\", true)));\r\n return mesh;\r\n }\r\n let uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n if (mesh.region != null)\r\n mesh.updateRegion();\r\n mesh.edges = getValue(map, \"edges\", null);\r\n mesh.hullLength = getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n let path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (!path)\r\n return null;\r\n path.closed = getValue(map, \"closed\", false);\r\n path.constantSpeed = getValue(map, \"constantSpeed\", true);\r\n let vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n let lengths = Utils.newArray(vertexCount / 3, 0);\r\n for (let i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n let point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (!point)\r\n return null;\r\n point.x = getValue(map, \"x\", 0) * scale;\r\n point.y = getValue(map, \"y\", 0) * scale;\r\n point.rotation = getValue(map, \"rotation\", 0);\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (!clip)\r\n return null;\r\n let end = getValue(map, \"end\", null);\r\n if (end)\r\n clip.endSlot = skeletonData.findSlot(end);\r\n let vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n }\r\n readSequence(map) {\r\n if (map == null)\r\n return null;\r\n let sequence = new Sequence(getValue(map, \"count\", 0));\r\n sequence.start = getValue(map, \"start\", 1);\r\n sequence.digits = getValue(map, \"digits\", 0);\r\n sequence.setupIndex = getValue(map, \"setup\", 0);\r\n return sequence;\r\n }\r\n readVertices(map, attachment, verticesLength) {\r\n let scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n let vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n let scaledVertices = Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (let i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n let weights = new Array();\r\n let bones = new Array();\r\n for (let i = 0, n = vertices.length; i < n; ) {\r\n let boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (let nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = Utils.toFloatArray(weights);\r\n }\r\n readAnimation(map, name, skeletonData) {\r\n let scale = this.scale;\r\n let timelines = new Array();\r\n if (map.slots) {\r\n for (let slotName in map.slots) {\r\n let slotMap = map.slots[slotName];\r\n let slot = skeletonData.findSlot(slotName);\r\n if (!slot)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n let slotIndex = slot.index;\r\n for (let timelineName in slotMap) {\r\n let timelineMap = slotMap[timelineName];\r\n if (!timelineMap)\r\n continue;\r\n let frames = timelineMap.length;\r\n if (timelineName == \"attachment\") {\r\n let timeline = new AttachmentTimeline(frames, slotIndex);\r\n for (let frame = 0; frame < frames; frame++) {\r\n let keyMap = timelineMap[frame];\r\n timeline.setFrame(frame, getValue(keyMap, \"time\", 0), getValue(keyMap, \"name\", null));\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"rgba\") {\r\n let timeline = new RGBATimeline(frames, frames << 2, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.color);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.color);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"rgb\") {\r\n let timeline = new RGBTimeline(frames, frames * 3, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.color);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.color);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"alpha\") {\r\n timelines.push(readTimeline12(timelineMap, new AlphaTimeline(frames, frames, slotIndex), 0, 1));\r\n } else if (timelineName == \"rgba2\") {\r\n let timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.light);\r\n let color2 = Color.fromString(keyMap.dark);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.light);\r\n let newColor2 = Color.fromString(nextMap.dark);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n color2 = newColor2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"rgb2\") {\r\n let timeline = new RGB2Timeline(frames, frames * 6, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.light);\r\n let color2 = Color.fromString(keyMap.dark);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.light);\r\n let newColor2 = Color.fromString(nextMap.dark);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n color2 = newColor2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (let boneName in map.bones) {\r\n let boneMap = map.bones[boneName];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n let boneIndex = bone.index;\r\n for (let timelineName in boneMap) {\r\n let timelineMap = boneMap[timelineName];\r\n let frames = timelineMap.length;\r\n if (frames == 0)\r\n continue;\r\n if (timelineName === \"rotate\") {\r\n timelines.push(readTimeline12(timelineMap, new RotateTimeline(frames, frames, boneIndex), 0, 1));\r\n } else if (timelineName === \"translate\") {\r\n let timeline = new TranslateTimeline(frames, frames << 1, boneIndex);\r\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, scale));\r\n } else if (timelineName === \"translatex\") {\r\n let timeline = new TranslateXTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\r\n } else if (timelineName === \"translatey\") {\r\n let timeline = new TranslateYTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\r\n } else if (timelineName === \"scale\") {\r\n let timeline = new ScaleTimeline(frames, frames << 1, boneIndex);\r\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 1, 1));\r\n } else if (timelineName === \"scalex\") {\r\n let timeline = new ScaleXTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\r\n } else if (timelineName === \"scaley\") {\r\n let timeline = new ScaleYTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\r\n } else if (timelineName === \"shear\") {\r\n let timeline = new ShearTimeline(frames, frames << 1, boneIndex);\r\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, 1));\r\n } else if (timelineName === \"shearx\") {\r\n let timeline = new ShearXTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\r\n } else if (timelineName === \"sheary\") {\r\n let timeline = new ShearYTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\r\n }\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (let constraintName in map.ik) {\r\n let constraintMap = map.ik[constraintName];\r\n let keyMap = constraintMap[0];\r\n if (!keyMap)\r\n continue;\r\n let constraint = skeletonData.findIkConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(\"IK Constraint not found: \" + constraintName);\r\n let constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n let timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mix = getValue(keyMap, \"mix\", 1);\r\n let softness = getValue(keyMap, \"softness\", 0) * scale;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\r\n let nextMap = constraintMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let mix2 = getValue(nextMap, \"mix\", 1);\r\n let softness2 = getValue(nextMap, \"softness\", 0) * scale;\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\r\n }\r\n time = time2;\r\n mix = mix2;\r\n softness = softness2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n if (map.transform) {\r\n for (let constraintName in map.transform) {\r\n let timelineMap = map.transform[constraintName];\r\n let keyMap = timelineMap[0];\r\n if (!keyMap)\r\n continue;\r\n let constraint = skeletonData.findTransformConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(\"Transform constraint not found: \" + constraintName);\r\n let constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n let timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\r\n let mixX = getValue(keyMap, \"mixX\", 1);\r\n let mixY = getValue(keyMap, \"mixY\", mixX);\r\n let mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\r\n let mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\r\n let mixShearY = getValue(keyMap, \"mixShearY\", 1);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\r\n let mixX2 = getValue(nextMap, \"mixX\", 1);\r\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\r\n let mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\r\n let mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\r\n let mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n mixScaleX = mixScaleX2;\r\n mixScaleY = mixScaleY2;\r\n mixScaleX = mixScaleX2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n if (map.path) {\r\n for (let constraintName in map.path) {\r\n let constraintMap = map.path[constraintName];\r\n let constraint = skeletonData.findPathConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n let constraintIndex = skeletonData.pathConstraints.indexOf(constraint);\r\n for (let timelineName in constraintMap) {\r\n let timelineMap = constraintMap[timelineName];\r\n let keyMap = timelineMap[0];\r\n if (!keyMap)\r\n continue;\r\n let frames = timelineMap.length;\r\n if (timelineName === \"position\") {\r\n let timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.positionMode == 0 /* Fixed */ ? scale : 1));\r\n } else if (timelineName === \"spacing\") {\r\n let timeline = new PathConstraintSpacingTimeline(frames, frames, constraintIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.spacingMode == 0 /* Length */ || constraint.spacingMode == 1 /* Fixed */ ? scale : 1));\r\n } else if (timelineName === \"mix\") {\r\n let timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\r\n let mixX = getValue(keyMap, \"mixX\", 1);\r\n let mixY = getValue(keyMap, \"mixY\", mixX);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\r\n let mixX2 = getValue(nextMap, \"mixX\", 1);\r\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n if (map.attachments) {\r\n for (let attachmentsName in map.attachments) {\r\n let attachmentsMap = map.attachments[attachmentsName];\r\n let skin = skeletonData.findSkin(attachmentsName);\r\n if (!skin)\r\n throw new Error(\"Skin not found: \" + attachmentsName);\r\n for (let slotMapName in attachmentsMap) {\r\n let slotMap = attachmentsMap[slotMapName];\r\n let slot = skeletonData.findSlot(slotMapName);\r\n if (!slot)\r\n throw new Error(\"Slot not found: \" + slotMapName);\r\n let slotIndex = slot.index;\r\n for (let attachmentMapName in slotMap) {\r\n let attachmentMap = slotMap[attachmentMapName];\r\n let attachment = skin.getAttachment(slotIndex, attachmentMapName);\r\n for (let timelineMapName in attachmentMap) {\r\n let timelineMap = attachmentMap[timelineMapName];\r\n let keyMap = timelineMap[0];\r\n if (!keyMap)\r\n continue;\r\n if (timelineMapName == \"deform\") {\r\n let weighted = attachment.bones;\r\n let vertices = attachment.vertices;\r\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n let timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\r\n let time = getValue(keyMap, \"time\", 0);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n let deform;\r\n let verticesValue = getValue(keyMap, \"vertices\", null);\r\n if (!verticesValue)\r\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = Utils.newFloatArray(deformLength);\r\n let start = getValue(keyMap, \"offset\", 0);\r\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (let i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (let i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frame, time, deform);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let curve = keyMap.curve;\r\n if (curve)\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\r\n time = time2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineMapName == \"sequence\") {\r\n let timeline = new SequenceTimeline(timelineMap.length, slotIndex, attachment);\r\n let lastDelay = 0;\r\n for (let frame = 0; frame < timelineMap.length; frame++) {\r\n let delay = getValue(keyMap, \"delay\", lastDelay);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mode = SequenceMode[getValue(keyMap, \"mode\", \"hold\")];\r\n let index = getValue(keyMap, \"index\", 0);\r\n timeline.setFrame(frame, time, mode, index, delay);\r\n lastDelay = delay;\r\n keyMap = timelineMap[frame + 1];\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (map.drawOrder) {\r\n let timeline = new DrawOrderTimeline(map.drawOrder.length);\r\n let slotCount = skeletonData.slots.length;\r\n let frame = 0;\r\n for (let i = 0; i < map.drawOrder.length; i++, frame++) {\r\n let drawOrderMap = map.drawOrder[i];\r\n let drawOrder = null;\r\n let offsets = getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets) {\r\n drawOrder = Utils.newArray(slotCount, -1);\r\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\r\n let originalIndex = 0, unchangedIndex = 0;\r\n for (let ii = 0; ii < offsets.length; ii++) {\r\n let offsetMap = offsets[ii];\r\n let slot = skeletonData.findSlot(offsetMap.slot);\r\n if (!slot)\r\n throw new Error(\"Slot not found: \" + slot);\r\n let slotIndex = slot.index;\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (let ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n }\r\n if (map.events) {\r\n let timeline = new EventTimeline(map.events.length);\r\n let frame = 0;\r\n for (let i = 0; i < map.events.length; i++, frame++) {\r\n let eventMap = map.events[i];\r\n let eventData = skeletonData.findEvent(eventMap.name);\r\n if (!eventData)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n let event = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\r\n event.intValue = getValue(eventMap, \"int\", eventData.intValue);\r\n event.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\r\n event.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event.data.audioPath) {\r\n event.volume = getValue(eventMap, \"volume\", 1);\r\n event.balance = getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frame, event);\r\n }\r\n timelines.push(timeline);\r\n }\r\n let duration = 0;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n duration = Math.max(duration, timelines[i].getDuration());\r\n skeletonData.animations.push(new Animation(name, timelines, duration));\r\n }\r\n };\r\n var LinkedMesh2 = class {\r\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritTimeline = inheritDeform;\r\n }\r\n };\r\n function readTimeline12(keys, timeline, defaultValue, scale) {\r\n let keyMap = keys[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let value = getValue(keyMap, \"value\", defaultValue) * scale;\r\n let bezier = 0;\r\n for (let frame = 0; ; frame++) {\r\n timeline.setFrame(frame, time, value);\r\n let nextMap = keys[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n return timeline;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let value2 = getValue(nextMap, \"value\", defaultValue) * scale;\r\n if (keyMap.curve)\r\n bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\r\n time = time2;\r\n value = value2;\r\n keyMap = nextMap;\r\n }\r\n }\r\n function readTimeline22(keys, timeline, name1, name2, defaultValue, scale) {\r\n let keyMap = keys[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let value1 = getValue(keyMap, name1, defaultValue) * scale;\r\n let value2 = getValue(keyMap, name2, defaultValue) * scale;\r\n let bezier = 0;\r\n for (let frame = 0; ; frame++) {\r\n timeline.setFrame(frame, time, value1, value2);\r\n let nextMap = keys[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n return timeline;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\r\n let nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\r\n }\r\n time = time2;\r\n value1 = nvalue1;\r\n value2 = nvalue2;\r\n keyMap = nextMap;\r\n }\r\n }\r\n function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\r\n if (curve == \"stepped\") {\r\n timeline.setStepped(frame);\r\n return bezier;\r\n }\r\n let i = value << 2;\r\n let cx1 = curve[i];\r\n let cy1 = curve[i + 1] * scale;\r\n let cx2 = curve[i + 2];\r\n let cy2 = curve[i + 3] * scale;\r\n timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\r\n return bezier + 1;\r\n }\r\n function getValue(map, property, defaultValue) {\r\n return map[property] !== void 0 ? map[property] : defaultValue;\r\n }\r\n\r\n // spine-core/src/polyfills.ts\r\n (() => {\r\n if (typeof Math.fround === \"undefined\") {\r\n Math.fround = function(array) {\r\n return function(x) {\r\n return array[0] = x, array[0];\r\n };\r\n }(new Float32Array(1));\r\n }\r\n })();\r\n\r\n // spine-canvas/src/CanvasTexture.ts\r\n var CanvasTexture = class extends Texture {\r\n constructor(image) {\r\n super(image);\r\n }\r\n setFilters(minFilter, magFilter) {\r\n }\r\n setWraps(uWrap, vWrap) {\r\n }\r\n dispose() {\r\n }\r\n };\r\n\r\n // spine-canvas/src/AssetManager.ts\r\n var AssetManager = class extends AssetManagerBase {\r\n constructor(pathPrefix = \"\", downloader = new Downloader()) {\r\n super((image) => {\r\n return new CanvasTexture(image);\r\n }, pathPrefix, downloader);\r\n }\r\n };\r\n\r\n // spine-canvas/src/SkeletonRenderer.ts\r\n var worldVertices = Utils.newFloatArray(8);\r\n var _SkeletonRenderer = class {\r\n constructor(context) {\r\n this.triangleRendering = false;\r\n this.debugRendering = false;\r\n this.vertices = Utils.newFloatArray(8 * 1024);\r\n this.tempColor = new Color();\r\n this.ctx = context;\r\n }\r\n draw(skeleton) {\r\n if (this.triangleRendering)\r\n this.drawTriangles(skeleton);\r\n else\r\n this.drawImages(skeleton);\r\n }\r\n drawImages(skeleton) {\r\n let ctx = this.ctx;\r\n let color = this.tempColor;\r\n let skeletonColor = skeleton.color;\r\n let drawOrder = skeleton.drawOrder;\r\n if (this.debugRendering)\r\n ctx.strokeStyle = \"green\";\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = drawOrder[i];\r\n let bone = slot.bone;\r\n if (!bone.active)\r\n continue;\r\n let attachment = slot.getAttachment();\r\n if (!(attachment instanceof RegionAttachment))\r\n continue;\r\n attachment.computeWorldVertices(slot, worldVertices, 0, 2);\r\n let region = attachment.region;\r\n let image = region.page.texture.getImage();\r\n let slotColor = slot.color;\r\n let regionColor = attachment.color;\r\n color.set(\r\n skeletonColor.r * slotColor.r * regionColor.r,\r\n skeletonColor.g * slotColor.g * regionColor.g,\r\n skeletonColor.b * slotColor.b * regionColor.b,\r\n skeletonColor.a * slotColor.a * regionColor.a\r\n );\r\n ctx.save();\r\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n ctx.translate(attachment.offset[0], attachment.offset[1]);\r\n ctx.rotate(attachment.rotation * Math.PI / 180);\r\n let atlasScale = attachment.width / region.originalWidth;\r\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n let w = region.width, h = region.height;\r\n ctx.translate(w / 2, h / 2);\r\n if (attachment.region.degrees == 90) {\r\n let t = w;\r\n w = h;\r\n h = t;\r\n ctx.rotate(-Math.PI / 2);\r\n }\r\n ctx.scale(1, -1);\r\n ctx.translate(-w / 2, -h / 2);\r\n ctx.globalAlpha = color.a;\r\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n if (this.debugRendering)\r\n ctx.strokeRect(0, 0, w, h);\r\n ctx.restore();\r\n }\r\n }\r\n drawTriangles(skeleton) {\r\n let ctx = this.ctx;\r\n let color = this.tempColor;\r\n let skeletonColor = skeleton.color;\r\n let drawOrder = skeleton.drawOrder;\r\n let blendMode = null;\r\n let vertices = this.vertices;\r\n let triangles = null;\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = drawOrder[i];\r\n let attachment = slot.getAttachment();\r\n let texture;\r\n let region;\r\n if (attachment instanceof RegionAttachment) {\r\n let regionAttachment = attachment;\r\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n triangles = _SkeletonRenderer.QUAD_TRIANGLES;\r\n region = regionAttachment.region;\r\n texture = region.page.texture.getImage();\r\n } else if (attachment instanceof MeshAttachment) {\r\n let mesh = attachment;\r\n vertices = this.computeMeshVertices(slot, mesh, false);\r\n triangles = mesh.triangles;\r\n let region2 = mesh.region.renderObject;\r\n texture = region2.page.texture.getImage();\r\n } else\r\n continue;\r\n if (texture) {\r\n if (slot.data.blendMode != blendMode)\r\n blendMode = slot.data.blendMode;\r\n let slotColor = slot.color;\r\n let attachmentColor = attachment.color;\r\n color.set(\r\n skeletonColor.r * slotColor.r * attachmentColor.r,\r\n skeletonColor.g * slotColor.g * attachmentColor.g,\r\n skeletonColor.b * slotColor.b * attachmentColor.b,\r\n skeletonColor.a * slotColor.a * attachmentColor.a\r\n );\r\n ctx.globalAlpha = color.a;\r\n for (var j = 0; j < triangles.length; j += 3) {\r\n let t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n let x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n let x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n let x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n if (this.debugRendering) {\r\n ctx.strokeStyle = \"green\";\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x0, y0);\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n }\r\n this.ctx.globalAlpha = 1;\r\n }\r\n drawTriangle(img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n let ctx = this.ctx;\r\n u0 *= img.width;\r\n v0 *= img.height;\r\n u1 *= img.width;\r\n v1 *= img.height;\r\n u2 *= img.width;\r\n v2 *= img.height;\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.closePath();\r\n x1 -= x0;\r\n y1 -= y0;\r\n x2 -= x0;\r\n y2 -= y0;\r\n u1 -= u0;\r\n v1 -= v0;\r\n u2 -= u0;\r\n v2 -= v0;\r\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n ctx.save();\r\n ctx.transform(a, b, c, d, e, f);\r\n ctx.clip();\r\n ctx.drawImage(img, 0, 0);\r\n ctx.restore();\r\n }\r\n computeRegionVertices(slot, region, pma) {\r\n let skeletonColor = slot.bone.skeleton.color;\r\n let slotColor = slot.color;\r\n let regionColor = region.color;\r\n let alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n let multiplier = pma ? alpha : 1;\r\n let color = this.tempColor;\r\n color.set(\r\n skeletonColor.r * slotColor.r * regionColor.r * multiplier,\r\n skeletonColor.g * slotColor.g * regionColor.g * multiplier,\r\n skeletonColor.b * slotColor.b * regionColor.b * multiplier,\r\n alpha\r\n );\r\n region.computeWorldVertices(slot, this.vertices, 0, _SkeletonRenderer.VERTEX_SIZE);\r\n let vertices = this.vertices;\r\n let uvs = region.uvs;\r\n vertices[RegionAttachment.C1R] = color.r;\r\n vertices[RegionAttachment.C1G] = color.g;\r\n vertices[RegionAttachment.C1B] = color.b;\r\n vertices[RegionAttachment.C1A] = color.a;\r\n vertices[RegionAttachment.U1] = uvs[0];\r\n vertices[RegionAttachment.V1] = uvs[1];\r\n vertices[RegionAttachment.C2R] = color.r;\r\n vertices[RegionAttachment.C2G] = color.g;\r\n vertices[RegionAttachment.C2B] = color.b;\r\n vertices[RegionAttachment.C2A] = color.a;\r\n vertices[RegionAttachment.U2] = uvs[2];\r\n vertices[RegionAttachment.V2] = uvs[3];\r\n vertices[RegionAttachment.C3R] = color.r;\r\n vertices[RegionAttachment.C3G] = color.g;\r\n vertices[RegionAttachment.C3B] = color.b;\r\n vertices[RegionAttachment.C3A] = color.a;\r\n vertices[RegionAttachment.U3] = uvs[4];\r\n vertices[RegionAttachment.V3] = uvs[5];\r\n vertices[RegionAttachment.C4R] = color.r;\r\n vertices[RegionAttachment.C4G] = color.g;\r\n vertices[RegionAttachment.C4B] = color.b;\r\n vertices[RegionAttachment.C4A] = color.a;\r\n vertices[RegionAttachment.U4] = uvs[6];\r\n vertices[RegionAttachment.V4] = uvs[7];\r\n return vertices;\r\n }\r\n computeMeshVertices(slot, mesh, pma) {\r\n let skeletonColor = slot.bone.skeleton.color;\r\n let slotColor = slot.color;\r\n let regionColor = mesh.color;\r\n let alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n let multiplier = pma ? alpha : 1;\r\n let color = this.tempColor;\r\n color.set(\r\n skeletonColor.r * slotColor.r * regionColor.r * multiplier,\r\n skeletonColor.g * slotColor.g * regionColor.g * multiplier,\r\n skeletonColor.b * slotColor.b * regionColor.b * multiplier,\r\n alpha\r\n );\r\n let vertexCount = mesh.worldVerticesLength / 2;\r\n let vertices = this.vertices;\r\n if (vertices.length < mesh.worldVerticesLength)\r\n this.vertices = vertices = Utils.newFloatArray(mesh.worldVerticesLength);\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, _SkeletonRenderer.VERTEX_SIZE);\r\n let uvs = mesh.uvs;\r\n for (let i = 0, u = 0, v = 2; i < vertexCount; i++) {\r\n vertices[v++] = color.r;\r\n vertices[v++] = color.g;\r\n vertices[v++] = color.b;\r\n vertices[v++] = color.a;\r\n vertices[v++] = uvs[u++];\r\n vertices[v++] = uvs[u++];\r\n v += 2;\r\n }\r\n return vertices;\r\n }\r\n };\r\n var SkeletonRenderer = _SkeletonRenderer;\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n return __toCommonJS(src_exports);\r\n})();\r\n//# sourceMappingURL=spine-canvas.js.map\r\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n","\"use strict\";\r\nvar spine = (() => {\r\n var __defProp = Object.defineProperty;\r\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\r\n var __getOwnPropNames = Object.getOwnPropertyNames;\r\n var __hasOwnProp = Object.prototype.hasOwnProperty;\r\n var __export = (target, all) => {\r\n for (var name in all)\r\n __defProp(target, name, { get: all[name], enumerable: true });\r\n };\r\n var __copyProps = (to, from, except, desc) => {\r\n if (from && typeof from === \"object\" || typeof from === \"function\") {\r\n for (let key of __getOwnPropNames(from))\r\n if (!__hasOwnProp.call(to, key) && key !== except)\r\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\r\n }\r\n return to;\r\n };\r\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\r\n\r\n // spine-webgl/src/index.ts\r\n var src_exports = {};\r\n __export(src_exports, {\r\n AlphaTimeline: () => AlphaTimeline,\r\n Animation: () => Animation,\r\n AnimationState: () => AnimationState,\r\n AnimationStateAdapter: () => AnimationStateAdapter,\r\n AnimationStateData: () => AnimationStateData,\r\n AssetManager: () => AssetManager,\r\n AssetManagerBase: () => AssetManagerBase,\r\n AtlasAttachmentLoader: () => AtlasAttachmentLoader,\r\n Attachment: () => Attachment,\r\n AttachmentTimeline: () => AttachmentTimeline,\r\n BinaryInput: () => BinaryInput,\r\n BlendMode: () => BlendMode,\r\n Bone: () => Bone,\r\n BoneData: () => BoneData,\r\n BoundingBoxAttachment: () => BoundingBoxAttachment,\r\n CURRENT: () => CURRENT,\r\n CameraController: () => CameraController,\r\n ClippingAttachment: () => ClippingAttachment,\r\n Color: () => Color,\r\n Color2Attribute: () => Color2Attribute,\r\n ColorAttribute: () => ColorAttribute,\r\n ConstraintData: () => ConstraintData,\r\n CurveTimeline: () => CurveTimeline,\r\n CurveTimeline1: () => CurveTimeline1,\r\n CurveTimeline2: () => CurveTimeline2,\r\n DebugUtils: () => DebugUtils,\r\n DeformTimeline: () => DeformTimeline,\r\n Downloader: () => Downloader,\r\n DrawOrderTimeline: () => DrawOrderTimeline,\r\n Event: () => Event,\r\n EventData: () => EventData,\r\n EventQueue: () => EventQueue,\r\n EventTimeline: () => EventTimeline,\r\n EventType: () => EventType,\r\n FIRST: () => FIRST,\r\n FakeTexture: () => FakeTexture,\r\n GLTexture: () => GLTexture,\r\n HOLD_FIRST: () => HOLD_FIRST,\r\n HOLD_MIX: () => HOLD_MIX,\r\n HOLD_SUBSEQUENT: () => HOLD_SUBSEQUENT,\r\n IkConstraint: () => IkConstraint,\r\n IkConstraintData: () => IkConstraintData,\r\n IkConstraintTimeline: () => IkConstraintTimeline,\r\n Input: () => Input,\r\n IntSet: () => IntSet,\r\n Interpolation: () => Interpolation,\r\n LoadingScreen: () => LoadingScreen,\r\n M00: () => M00,\r\n M01: () => M01,\r\n M02: () => M02,\r\n M03: () => M03,\r\n M10: () => M10,\r\n M11: () => M11,\r\n M12: () => M12,\r\n M13: () => M13,\r\n M20: () => M20,\r\n M21: () => M21,\r\n M22: () => M22,\r\n M23: () => M23,\r\n M30: () => M30,\r\n M31: () => M31,\r\n M32: () => M32,\r\n M33: () => M33,\r\n ManagedWebGLRenderingContext: () => ManagedWebGLRenderingContext,\r\n MathUtils: () => MathUtils,\r\n Matrix4: () => Matrix42,\r\n Mesh: () => Mesh,\r\n MeshAttachment: () => MeshAttachment,\r\n MixBlend: () => MixBlend,\r\n MixDirection: () => MixDirection,\r\n OrthoCamera: () => OrthoCamera,\r\n PathAttachment: () => PathAttachment,\r\n PathConstraint: () => PathConstraint,\r\n PathConstraintData: () => PathConstraintData,\r\n PathConstraintMixTimeline: () => PathConstraintMixTimeline,\r\n PathConstraintPositionTimeline: () => PathConstraintPositionTimeline,\r\n PathConstraintSpacingTimeline: () => PathConstraintSpacingTimeline,\r\n PointAttachment: () => PointAttachment,\r\n PolygonBatcher: () => PolygonBatcher,\r\n Pool: () => Pool,\r\n Position2Attribute: () => Position2Attribute,\r\n Position3Attribute: () => Position3Attribute,\r\n PositionMode: () => PositionMode,\r\n Pow: () => Pow,\r\n PowOut: () => PowOut,\r\n RGB2Timeline: () => RGB2Timeline,\r\n RGBA2Timeline: () => RGBA2Timeline,\r\n RGBATimeline: () => RGBATimeline,\r\n RGBTimeline: () => RGBTimeline,\r\n RegionAttachment: () => RegionAttachment,\r\n ResizeMode: () => ResizeMode,\r\n RotateMode: () => RotateMode,\r\n RotateTimeline: () => RotateTimeline,\r\n SETUP: () => SETUP,\r\n SUBSEQUENT: () => SUBSEQUENT,\r\n ScaleTimeline: () => ScaleTimeline,\r\n ScaleXTimeline: () => ScaleXTimeline,\r\n ScaleYTimeline: () => ScaleYTimeline,\r\n SceneRenderer: () => SceneRenderer,\r\n SequenceTimeline: () => SequenceTimeline,\r\n Shader: () => Shader,\r\n ShapeRenderer: () => ShapeRenderer,\r\n ShapeType: () => ShapeType,\r\n ShearTimeline: () => ShearTimeline,\r\n ShearXTimeline: () => ShearXTimeline,\r\n ShearYTimeline: () => ShearYTimeline,\r\n Skeleton: () => Skeleton,\r\n SkeletonBinary: () => SkeletonBinary,\r\n SkeletonBounds: () => SkeletonBounds,\r\n SkeletonClipping: () => SkeletonClipping,\r\n SkeletonData: () => SkeletonData,\r\n SkeletonDebugRenderer: () => SkeletonDebugRenderer,\r\n SkeletonJson: () => SkeletonJson,\r\n SkeletonRenderer: () => SkeletonRenderer,\r\n Skin: () => Skin,\r\n SkinEntry: () => SkinEntry,\r\n Slot: () => Slot,\r\n SlotData: () => SlotData,\r\n SpacingMode: () => SpacingMode,\r\n SpineCanvas: () => SpineCanvas,\r\n StringSet: () => StringSet,\r\n TexCoordAttribute: () => TexCoordAttribute,\r\n Texture: () => Texture,\r\n TextureAtlas: () => TextureAtlas,\r\n TextureAtlasPage: () => TextureAtlasPage,\r\n TextureAtlasRegion: () => TextureAtlasRegion,\r\n TextureFilter: () => TextureFilter,\r\n TextureRegion: () => TextureRegion,\r\n TextureWrap: () => TextureWrap,\r\n TimeKeeper: () => TimeKeeper,\r\n Timeline: () => Timeline,\r\n Touch: () => Touch,\r\n TrackEntry: () => TrackEntry,\r\n TransformConstraint: () => TransformConstraint,\r\n TransformConstraintData: () => TransformConstraintData,\r\n TransformConstraintTimeline: () => TransformConstraintTimeline,\r\n TransformMode: () => TransformMode,\r\n TranslateTimeline: () => TranslateTimeline,\r\n TranslateXTimeline: () => TranslateXTimeline,\r\n TranslateYTimeline: () => TranslateYTimeline,\r\n Triangulator: () => Triangulator,\r\n Utils: () => Utils,\r\n Vector2: () => Vector2,\r\n Vector3: () => Vector3,\r\n VertexAttachment: () => VertexAttachment,\r\n VertexAttribute: () => VertexAttribute,\r\n VertexAttributeType: () => VertexAttributeType,\r\n WebGLBlendModeConverter: () => WebGLBlendModeConverter,\r\n WindowedMean: () => WindowedMean\r\n });\r\n\r\n // spine-core/src/Utils.ts\r\n var IntSet = class {\r\n constructor() {\r\n this.array = new Array();\r\n }\r\n add(value) {\r\n let contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n }\r\n contains(value) {\r\n return this.array[value | 0] != void 0;\r\n }\r\n remove(value) {\r\n this.array[value | 0] = void 0;\r\n }\r\n clear() {\r\n this.array.length = 0;\r\n }\r\n };\r\n var StringSet = class {\r\n constructor() {\r\n this.entries = {};\r\n this.size = 0;\r\n }\r\n add(value) {\r\n let contains = this.entries[value];\r\n this.entries[value] = true;\r\n if (!contains) {\r\n this.size++;\r\n return true;\r\n }\r\n return false;\r\n }\r\n addAll(values) {\r\n let oldSize = this.size;\r\n for (var i = 0, n = values.length; i < n; i++)\r\n this.add(values[i]);\r\n return oldSize != this.size;\r\n }\r\n contains(value) {\r\n return this.entries[value];\r\n }\r\n clear() {\r\n this.entries = {};\r\n this.size = 0;\r\n }\r\n };\r\n var _Color = class {\r\n constructor(r = 0, g = 0, b = 0, a = 0) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n set(r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n return this.clamp();\r\n }\r\n setFromColor(c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n }\r\n setFromString(hex) {\r\n hex = hex.charAt(0) == \"#\" ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255;\r\n this.a = hex.length != 8 ? 1 : parseInt(hex.substr(6, 2), 16) / 255;\r\n return this;\r\n }\r\n add(r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n return this.clamp();\r\n }\r\n clamp() {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n }\r\n static rgba8888ToColor(color, value) {\r\n color.r = ((value & 4278190080) >>> 24) / 255;\r\n color.g = ((value & 16711680) >>> 16) / 255;\r\n color.b = ((value & 65280) >>> 8) / 255;\r\n color.a = (value & 255) / 255;\r\n }\r\n static rgb888ToColor(color, value) {\r\n color.r = ((value & 16711680) >>> 16) / 255;\r\n color.g = ((value & 65280) >>> 8) / 255;\r\n color.b = (value & 255) / 255;\r\n }\r\n static fromString(hex) {\r\n return new _Color().setFromString(hex);\r\n }\r\n };\r\n var Color = _Color;\r\n Color.WHITE = new _Color(1, 1, 1, 1);\r\n Color.RED = new _Color(1, 0, 0, 1);\r\n Color.GREEN = new _Color(0, 1, 0, 1);\r\n Color.BLUE = new _Color(0, 0, 1, 1);\r\n Color.MAGENTA = new _Color(1, 0, 1, 1);\r\n var _MathUtils = class {\r\n static clamp(value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n }\r\n static cosDeg(degrees) {\r\n return Math.cos(degrees * _MathUtils.degRad);\r\n }\r\n static sinDeg(degrees) {\r\n return Math.sin(degrees * _MathUtils.degRad);\r\n }\r\n static signum(value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n }\r\n static toInt(x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n }\r\n static cbrt(x) {\r\n let y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n }\r\n static randomTriangular(min, max) {\r\n return _MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n }\r\n static randomTriangularWith(min, max, mode) {\r\n let u = Math.random();\r\n let d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n }\r\n static isPowerOfTwo(value) {\r\n return value && (value & value - 1) === 0;\r\n }\r\n };\r\n var MathUtils = _MathUtils;\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = _MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / _MathUtils.PI;\r\n MathUtils.radDeg = _MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = _MathUtils.PI / 180;\r\n MathUtils.degRad = _MathUtils.degreesToRadians;\r\n var Interpolation = class {\r\n apply(start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n }\r\n };\r\n var Pow = class extends Interpolation {\r\n constructor(power) {\r\n super();\r\n this.power = 2;\r\n this.power = power;\r\n }\r\n applyInternal(a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n }\r\n };\r\n var PowOut = class extends Pow {\r\n constructor(power) {\r\n super(power);\r\n }\r\n applyInternal(a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n }\r\n };\r\n var _Utils = class {\r\n static arrayCopy(source, sourceStart, dest, destStart, numElements) {\r\n for (let i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n }\r\n static arrayFill(array, fromIndex, toIndex, value) {\r\n for (let i = fromIndex; i < toIndex; i++)\r\n array[i] = value;\r\n }\r\n static setArraySize(array, size, value = 0) {\r\n let oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (let i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n }\r\n static ensureArrayCapacity(array, size, value = 0) {\r\n if (array.length >= size)\r\n return array;\r\n return _Utils.setArraySize(array, size, value);\r\n }\r\n static newArray(size, defaultValue) {\r\n let array = new Array(size);\r\n for (let i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n }\r\n static newFloatArray(size) {\r\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\r\n return new Float32Array(size);\r\n else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n }\r\n static newShortArray(size) {\r\n if (_Utils.SUPPORTS_TYPED_ARRAYS)\r\n return new Int16Array(size);\r\n else {\r\n let array = new Array(size);\r\n for (let i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n }\r\n static toFloatArray(array) {\r\n return _Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n }\r\n static toSinglePrecision(value) {\r\n return _Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n }\r\n static webkit602BugfixHelper(alpha, blend) {\r\n }\r\n static contains(array, element, identity = true) {\r\n for (var i = 0; i < array.length; i++)\r\n if (array[i] == element)\r\n return true;\r\n return false;\r\n }\r\n static enumValue(type, name) {\r\n return type[name[0].toUpperCase() + name.slice(1)];\r\n }\r\n };\r\n var Utils = _Utils;\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== \"undefined\";\r\n var DebugUtils = class {\r\n static logBones(skeleton) {\r\n for (let i = 0; i < skeleton.bones.length; i++) {\r\n let bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n }\r\n };\r\n var Pool = class {\r\n constructor(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n obtain() {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n }\r\n free(item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n }\r\n freeAll(items) {\r\n for (let i = 0; i < items.length; i++)\r\n this.free(items[i]);\r\n }\r\n clear() {\r\n this.items.length = 0;\r\n }\r\n };\r\n var Vector2 = class {\r\n constructor(x = 0, y = 0) {\r\n this.x = x;\r\n this.y = y;\r\n }\r\n set(x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n }\r\n length() {\r\n let x = this.x;\r\n let y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n }\r\n normalize() {\r\n let len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n }\r\n };\r\n var TimeKeeper = class {\r\n constructor() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1e3;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n update() {\r\n let now = Date.now() / 1e3;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n }\r\n };\r\n var WindowedMean = class {\r\n constructor(windowSize = 32) {\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n hasEnoughData() {\r\n return this.addedValues >= this.values.length;\r\n }\r\n addValue(value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n }\r\n getMean() {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n let mean = 0;\r\n for (let i = 0; i < this.values.length; i++)\r\n mean += this.values[i];\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n return 0;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/Attachment.ts\r\n var Attachment = class {\r\n constructor(name) {\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n };\r\n var _VertexAttachment = class extends Attachment {\r\n constructor(name) {\r\n super(name);\r\n this.id = _VertexAttachment.nextID++;\r\n this.bones = null;\r\n this.vertices = [];\r\n this.worldVerticesLength = 0;\r\n this.timelineAttachment = this;\r\n }\r\n computeWorldVertices(slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n let skeleton = slot.bone.skeleton;\r\n let deformArray = slot.deform;\r\n let vertices = this.vertices;\r\n let bones = this.bones;\r\n if (!bones) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n let bone = slot.bone;\r\n let x = bone.worldX;\r\n let y = bone.worldY;\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (let v2 = start, w = offset; w < count; v2 += 2, w += stride) {\r\n let vx = vertices[v2], vy = vertices[v2 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n let v = 0, skip = 0;\r\n for (let i = 0; i < start; i += 2) {\r\n let n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n let skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (let w = offset, b = skip * 3; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n let bone = skeletonBones[bones[v]];\r\n let vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n } else {\r\n let deform = deformArray;\r\n for (let w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n let wx = 0, wy = 0;\r\n let n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n let bone = skeletonBones[bones[v]];\r\n let vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n }\r\n copyTo(attachment) {\r\n if (this.bones) {\r\n attachment.bones = new Array(this.bones.length);\r\n Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n } else\r\n attachment.bones = null;\r\n if (this.vertices) {\r\n attachment.vertices = Utils.newFloatArray(this.vertices.length);\r\n Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.timelineAttachment = this.timelineAttachment;\r\n }\r\n };\r\n var VertexAttachment = _VertexAttachment;\r\n VertexAttachment.nextID = 0;\r\n\r\n // spine-core/src/attachments/Sequence.ts\r\n var _Sequence = class {\r\n constructor(count) {\r\n this.id = _Sequence.nextID();\r\n this.start = 0;\r\n this.digits = 0;\r\n this.setupIndex = 0;\r\n this.regions = new Array(count);\r\n }\r\n copy() {\r\n let copy = new _Sequence(this.regions.length);\r\n Utils.arrayCopy(this.regions, 0, copy.regions, 0, this.regions.length);\r\n copy.start = this.start;\r\n copy.digits = this.digits;\r\n copy.setupIndex = this.setupIndex;\r\n return copy;\r\n }\r\n apply(slot, attachment) {\r\n let index = slot.sequenceIndex;\r\n if (index == -1)\r\n index = this.setupIndex;\r\n if (index >= this.regions.length)\r\n index = this.regions.length - 1;\r\n let region = this.regions[index];\r\n if (attachment.region != region) {\r\n attachment.region = region;\r\n attachment.updateRegion();\r\n }\r\n }\r\n getPath(basePath, index) {\r\n let result = basePath;\r\n let frame = (this.start + index).toString();\r\n for (let i = this.digits - frame.length; i > 0; i--)\r\n result += \"0\";\r\n result += frame;\r\n return result;\r\n }\r\n static nextID() {\r\n return _Sequence._nextID++;\r\n }\r\n };\r\n var Sequence = _Sequence;\r\n Sequence._nextID = 0;\r\n var SequenceMode = /* @__PURE__ */ ((SequenceMode2) => {\r\n SequenceMode2[SequenceMode2[\"hold\"] = 0] = \"hold\";\r\n SequenceMode2[SequenceMode2[\"once\"] = 1] = \"once\";\r\n SequenceMode2[SequenceMode2[\"loop\"] = 2] = \"loop\";\r\n SequenceMode2[SequenceMode2[\"pingpong\"] = 3] = \"pingpong\";\r\n SequenceMode2[SequenceMode2[\"onceReverse\"] = 4] = \"onceReverse\";\r\n SequenceMode2[SequenceMode2[\"loopReverse\"] = 5] = \"loopReverse\";\r\n SequenceMode2[SequenceMode2[\"pingpongReverse\"] = 6] = \"pingpongReverse\";\r\n return SequenceMode2;\r\n })(SequenceMode || {});\r\n var SequenceModeValues = [\r\n 0 /* hold */,\r\n 1 /* once */,\r\n 2 /* loop */,\r\n 3 /* pingpong */,\r\n 4 /* onceReverse */,\r\n 5 /* loopReverse */,\r\n 6 /* pingpongReverse */\r\n ];\r\n\r\n // spine-core/src/Animation.ts\r\n var Animation = class {\r\n constructor(name, timelines, duration) {\r\n this.timelines = [];\r\n this.timelineIds = new StringSet();\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n this.setTimelines(timelines);\r\n this.duration = duration;\r\n }\r\n setTimelines(timelines) {\r\n if (!timelines)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.timelines = timelines;\r\n this.timelineIds.clear();\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds.addAll(timelines[i].getPropertyIds());\r\n }\r\n hasTimeline(ids) {\r\n for (let i = 0; i < ids.length; i++)\r\n if (this.timelineIds.contains(ids[i]))\r\n return true;\r\n return false;\r\n }\r\n apply(skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n let timelines = this.timelines;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n }\r\n };\r\n var MixBlend = /* @__PURE__ */ ((MixBlend2) => {\r\n MixBlend2[MixBlend2[\"setup\"] = 0] = \"setup\";\r\n MixBlend2[MixBlend2[\"first\"] = 1] = \"first\";\r\n MixBlend2[MixBlend2[\"replace\"] = 2] = \"replace\";\r\n MixBlend2[MixBlend2[\"add\"] = 3] = \"add\";\r\n return MixBlend2;\r\n })(MixBlend || {});\r\n var MixDirection = /* @__PURE__ */ ((MixDirection2) => {\r\n MixDirection2[MixDirection2[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection2[MixDirection2[\"mixOut\"] = 1] = \"mixOut\";\r\n return MixDirection2;\r\n })(MixDirection || {});\r\n var Property = {\r\n rotate: 0,\r\n x: 1,\r\n y: 2,\r\n scaleX: 3,\r\n scaleY: 4,\r\n shearX: 5,\r\n shearY: 6,\r\n rgb: 7,\r\n alpha: 8,\r\n rgb2: 9,\r\n attachment: 10,\r\n deform: 11,\r\n event: 12,\r\n drawOrder: 13,\r\n ikConstraint: 14,\r\n transformConstraint: 15,\r\n pathConstraintPosition: 16,\r\n pathConstraintSpacing: 17,\r\n pathConstraintMix: 18,\r\n sequence: 19\r\n };\r\n var Timeline = class {\r\n constructor(frameCount, propertyIds) {\r\n this.propertyIds = propertyIds;\r\n this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries());\r\n }\r\n getPropertyIds() {\r\n return this.propertyIds;\r\n }\r\n getFrameEntries() {\r\n return 1;\r\n }\r\n getFrameCount() {\r\n return this.frames.length / this.getFrameEntries();\r\n }\r\n getDuration() {\r\n return this.frames[this.frames.length - this.getFrameEntries()];\r\n }\r\n static search1(frames, time) {\r\n let n = frames.length;\r\n for (let i = 1; i < n; i++)\r\n if (frames[i] > time)\r\n return i - 1;\r\n return n - 1;\r\n }\r\n static search(frames, time, step) {\r\n let n = frames.length;\r\n for (let i = step; i < n; i += step)\r\n if (frames[i] > time)\r\n return i - step;\r\n return n - step;\r\n }\r\n };\r\n var CurveTimeline = class extends Timeline {\r\n constructor(frameCount, bezierCount, propertyIds) {\r\n super(frameCount, propertyIds);\r\n this.curves = Utils.newFloatArray(frameCount + bezierCount * 18);\r\n this.curves[frameCount - 1] = 1;\r\n }\r\n setLinear(frame) {\r\n this.curves[frame] = 0;\r\n }\r\n setStepped(frame) {\r\n this.curves[frame] = 1;\r\n }\r\n shrink(bezierCount) {\r\n let size = this.getFrameCount() + bezierCount * 18;\r\n if (this.curves.length > size) {\r\n let newCurves = Utils.newFloatArray(size);\r\n Utils.arrayCopy(this.curves, 0, newCurves, 0, size);\r\n this.curves = newCurves;\r\n }\r\n }\r\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\r\n let curves = this.curves;\r\n let i = this.getFrameCount() + bezier * 18;\r\n if (value == 0)\r\n curves[frame] = 2 + i;\r\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = (value1 - cy1 * 2 + cy2) * 0.03;\r\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = ((cy1 - cy2) * 3 - value1 + value2) * 6e-3;\r\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\r\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = (cy1 - value1) * 0.3 + tmpy + dddy * 0.16666667;\r\n let x = time1 + dx, y = value1 + dy;\r\n for (let n = i + 18; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dx += ddx;\r\n dy += ddy;\r\n ddx += dddx;\r\n ddy += dddy;\r\n x += dx;\r\n y += dy;\r\n }\r\n }\r\n getBezierValue(time, frameIndex, valueOffset, i) {\r\n let curves = this.curves;\r\n if (curves[i] > time) {\r\n let x2 = this.frames[frameIndex], y2 = this.frames[frameIndex + valueOffset];\r\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\r\n }\r\n let n = i + 18;\r\n for (i += 2; i < n; i += 2) {\r\n if (curves[i] >= time) {\r\n let x2 = curves[i - 2], y2 = curves[i - 1];\r\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\r\n }\r\n }\r\n frameIndex += this.getFrameEntries();\r\n let x = curves[n - 2], y = curves[n - 1];\r\n return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y);\r\n }\r\n };\r\n var CurveTimeline1 = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, propertyId) {\r\n super(frameCount, bezierCount, [propertyId]);\r\n }\r\n getFrameEntries() {\r\n return 2;\r\n }\r\n setFrame(frame, time, value) {\r\n frame <<= 1;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = value;\r\n }\r\n getCurveValue(time) {\r\n let frames = this.frames;\r\n let i = frames.length - 2;\r\n for (let ii = 2; ii <= i; ii += 2) {\r\n if (frames[ii] > time) {\r\n i = ii - 2;\r\n break;\r\n }\r\n }\r\n let curveType = this.curves[i >> 1];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i], value = frames[i + 1];\r\n return value + (time - before) / (frames[i + 2] - before) * (frames[i + 2 + 1] - value);\r\n case 1:\r\n return frames[i + 1];\r\n }\r\n return this.getBezierValue(time, i, 1, curveType - 2);\r\n }\r\n };\r\n var CurveTimeline2 = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, propertyId1, propertyId2) {\r\n super(frameCount, bezierCount, [propertyId1, propertyId2]);\r\n }\r\n getFrameEntries() {\r\n return 3;\r\n }\r\n setFrame(frame, time, value1, value2) {\r\n frame *= 3;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = value1;\r\n this.frames[frame + 2] = value2;\r\n }\r\n };\r\n var RotateTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.rotate + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case 1 /* first */:\r\n bone.rotation += (bone.data.rotation - bone.rotation) * alpha;\r\n }\r\n return;\r\n }\r\n let r = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.rotation = bone.data.rotation + r * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n r += bone.data.rotation - bone.rotation;\r\n case 3 /* add */:\r\n bone.rotation += r * alpha;\r\n }\r\n }\r\n };\r\n var TranslateTimeline = class extends CurveTimeline2 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(\r\n frameCount,\r\n bezierCount,\r\n Property.x + \"|\" + boneIndex,\r\n Property.y + \"|\" + boneIndex\r\n );\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case 1 /* first */:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n let x = 0, y = 0;\r\n let i = Timeline.search(frames, time, 3);\r\n let curveType = this.curves[i / 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n let t = (time - before) / (frames[i + 3] - before);\r\n x += (frames[i + 3 + 1] - x) * t;\r\n y += (frames[i + 3 + 2] - y) * t;\r\n break;\r\n case 1:\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n break;\r\n default:\r\n x = this.getBezierValue(time, i, 1, curveType - 2);\r\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n }\r\n };\r\n var TranslateXTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.x + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x;\r\n return;\r\n case 1 /* first */:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n }\r\n return;\r\n }\r\n let x = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.x = bone.data.x + x * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.x += x * alpha;\r\n }\r\n }\r\n };\r\n var TranslateYTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.y + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.y = bone.data.y;\r\n return;\r\n case 1 /* first */:\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n let y = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.y += y * alpha;\r\n }\r\n }\r\n };\r\n var ScaleTimeline = class extends CurveTimeline2 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(\r\n frameCount,\r\n bezierCount,\r\n Property.scaleX + \"|\" + boneIndex,\r\n Property.scaleY + \"|\" + boneIndex\r\n );\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case 1 /* first */:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n let x, y;\r\n let i = Timeline.search(frames, time, 3);\r\n let curveType = this.curves[i / 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n let t = (time - before) / (frames[i + 3] - before);\r\n x += (frames[i + 3 + 1] - x) * t;\r\n y += (frames[i + 3 + 2] - y) * t;\r\n break;\r\n case 1:\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n break;\r\n default:\r\n x = this.getBezierValue(time, i, 1, curveType - 2);\r\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n x *= bone.data.scaleX;\r\n y *= bone.data.scaleY;\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n } else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n } else {\r\n let bx = 0, by = 0;\r\n if (direction == 1 /* mixOut */) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var ScaleXTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.scaleX + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.scaleX = bone.data.scaleX;\r\n return;\r\n case 1 /* first */:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n }\r\n return;\r\n }\r\n let x = this.getCurveValue(time) * bone.data.scaleX;\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */)\r\n bone.scaleX += x - bone.data.scaleX;\r\n else\r\n bone.scaleX = x;\r\n } else {\r\n let bx = 0;\r\n if (direction == 1 /* mixOut */) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = bone.data.scaleX;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = bone.scaleX;\r\n bone.scaleX = bx + (Math.abs(x) * MathUtils.signum(bx) - bx) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bx = Math.abs(bone.data.scaleX) * MathUtils.signum(x);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bx = Math.abs(bone.scaleX) * MathUtils.signum(x);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleX += (x - bone.data.scaleX) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var ScaleYTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.scaleY + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case 1 /* first */:\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n let y = this.getCurveValue(time) * bone.data.scaleY;\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */)\r\n bone.scaleY += y - bone.data.scaleY;\r\n else\r\n bone.scaleY = y;\r\n } else {\r\n let by = 0;\r\n if (direction == 1 /* mixOut */) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n by = bone.data.scaleY;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n by = bone.scaleY;\r\n bone.scaleY = by + (Math.abs(y) * MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n by = Math.abs(bone.data.scaleY) * MathUtils.signum(y);\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n by = Math.abs(bone.scaleY) * MathUtils.signum(y);\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.scaleY += (y - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var ShearTimeline = class extends CurveTimeline2 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(\r\n frameCount,\r\n bezierCount,\r\n Property.shearX + \"|\" + boneIndex,\r\n Property.shearY + \"|\" + boneIndex\r\n );\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case 1 /* first */:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n let x = 0, y = 0;\r\n let i = Timeline.search(frames, time, 3);\r\n let curveType = this.curves[i / 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n let t = (time - before) / (frames[i + 3] - before);\r\n x += (frames[i + 3 + 1] - x) * t;\r\n y += (frames[i + 3 + 2] - y) * t;\r\n break;\r\n case 1:\r\n x = frames[i + 1];\r\n y = frames[i + 2];\r\n break;\r\n default:\r\n x = this.getBezierValue(time, i, 1, curveType - 2);\r\n y = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n }\r\n };\r\n var ShearXTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.shearX + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX;\r\n return;\r\n case 1 /* first */:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n }\r\n return;\r\n }\r\n let x = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.shearX += x * alpha;\r\n }\r\n }\r\n };\r\n var ShearYTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, boneIndex) {\r\n super(frameCount, bezierCount, Property.shearY + \"|\" + boneIndex);\r\n this.boneIndex = 0;\r\n this.boneIndex = boneIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case 1 /* first */:\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n let y = this.getCurveValue(time);\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case 3 /* add */:\r\n bone.shearY += y * alpha;\r\n }\r\n }\r\n };\r\n var RGBATimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex,\r\n Property.alpha + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 5;\r\n }\r\n setFrame(frame, time, r, g, b, a) {\r\n frame *= 5;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n this.frames[frame + 4] = a;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let color = slot.color;\r\n if (time < frames[0]) {\r\n let setup = slot.data.color;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n color.setFromColor(setup);\r\n return;\r\n case 1 /* first */:\r\n color.add(\r\n (setup.r - color.r) * alpha,\r\n (setup.g - color.g) * alpha,\r\n (setup.b - color.b) * alpha,\r\n (setup.a - color.a) * alpha\r\n );\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0, a = 0;\r\n let i = Timeline.search(frames, time, 5);\r\n let curveType = this.curves[i / 5];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n let t = (time - before) / (frames[i + 5] - before);\r\n r += (frames[i + 5 + 1] - r) * t;\r\n g += (frames[i + 5 + 2] - g) * t;\r\n b += (frames[i + 5 + 3] - b) * t;\r\n a += (frames[i + 5 + 4] - a) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n }\r\n if (alpha == 1)\r\n color.set(r, g, b, a);\r\n else {\r\n if (blend == 0 /* setup */)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n }\r\n };\r\n var RGBTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 4;\r\n }\r\n setFrame(frame, time, r, g, b) {\r\n frame <<= 2;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let color = slot.color;\r\n if (time < frames[0]) {\r\n let setup = slot.data.color;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n color.r = setup.r;\r\n color.g = setup.g;\r\n color.b = setup.b;\r\n return;\r\n case 1 /* first */:\r\n color.r += (setup.r - color.r) * alpha;\r\n color.g += (setup.g - color.g) * alpha;\r\n color.b += (setup.b - color.b) * alpha;\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0;\r\n let i = Timeline.search(frames, time, 4);\r\n let curveType = this.curves[i >> 2];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n let t = (time - before) / (frames[i + 4] - before);\r\n r += (frames[i + 4 + 1] - r) * t;\r\n g += (frames[i + 4 + 2] - g) * t;\r\n b += (frames[i + 4 + 3] - b) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n }\r\n if (alpha == 1) {\r\n color.r = r;\r\n color.g = g;\r\n color.b = b;\r\n } else {\r\n if (blend == 0 /* setup */) {\r\n let setup = slot.data.color;\r\n color.r = setup.r;\r\n color.g = setup.g;\r\n color.b = setup.b;\r\n }\r\n color.r += (r - color.r) * alpha;\r\n color.g += (g - color.g) * alpha;\r\n color.b += (b - color.b) * alpha;\r\n }\r\n }\r\n };\r\n var AlphaTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, Property.alpha + \"|\" + slotIndex);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let color = slot.color;\r\n if (time < this.frames[0]) {\r\n let setup = slot.data.color;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n color.a = setup.a;\r\n return;\r\n case 1 /* first */:\r\n color.a += (setup.a - color.a) * alpha;\r\n }\r\n return;\r\n }\r\n let a = this.getCurveValue(time);\r\n if (alpha == 1)\r\n color.a = a;\r\n else {\r\n if (blend == 0 /* setup */)\r\n color.a = slot.data.color.a;\r\n color.a += (a - color.a) * alpha;\r\n }\r\n }\r\n };\r\n var RGBA2Timeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex,\r\n Property.alpha + \"|\" + slotIndex,\r\n Property.rgb2 + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 8;\r\n }\r\n setFrame(frame, time, r, g, b, a, r2, g2, b2) {\r\n frame <<= 3;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n this.frames[frame + 4] = a;\r\n this.frames[frame + 5] = r2;\r\n this.frames[frame + 6] = g2;\r\n this.frames[frame + 7] = b2;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let light = slot.color, dark = slot.darkColor;\r\n if (time < frames[0]) {\r\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n light.setFromColor(setupLight);\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n return;\r\n case 1 /* first */:\r\n light.add(\r\n (setupLight.r - light.r) * alpha,\r\n (setupLight.g - light.g) * alpha,\r\n (setupLight.b - light.b) * alpha,\r\n (setupLight.a - light.a) * alpha\r\n );\r\n dark.r += (setupDark.r - dark.r) * alpha;\r\n dark.g += (setupDark.g - dark.g) * alpha;\r\n dark.b += (setupDark.b - dark.b) * alpha;\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n let i = Timeline.search(frames, time, 8);\r\n let curveType = this.curves[i >> 3];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n r2 = frames[i + 5];\r\n g2 = frames[i + 6];\r\n b2 = frames[i + 7];\r\n let t = (time - before) / (frames[i + 8] - before);\r\n r += (frames[i + 8 + 1] - r) * t;\r\n g += (frames[i + 8 + 2] - g) * t;\r\n b += (frames[i + 8 + 3] - b) * t;\r\n a += (frames[i + 8 + 4] - a) * t;\r\n r2 += (frames[i + 8 + 5] - r2) * t;\r\n g2 += (frames[i + 8 + 6] - g2) * t;\r\n b2 += (frames[i + 8 + 7] - b2) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n a = frames[i + 4];\r\n r2 = frames[i + 5];\r\n g2 = frames[i + 6];\r\n b2 = frames[i + 7];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n a = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n r2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\r\n g2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\r\n b2 = this.getBezierValue(time, i, 7, curveType + 18 * 6 - 2);\r\n }\r\n if (alpha == 1) {\r\n light.set(r, g, b, a);\r\n dark.r = r2;\r\n dark.g = g2;\r\n dark.b = b2;\r\n } else {\r\n if (blend == 0 /* setup */) {\r\n light.setFromColor(slot.data.color);\r\n let setupDark = slot.data.darkColor;\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.r += (r2 - dark.r) * alpha;\r\n dark.g += (g2 - dark.g) * alpha;\r\n dark.b += (b2 - dark.b) * alpha;\r\n }\r\n }\r\n };\r\n var RGB2Timeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.rgb + \"|\" + slotIndex,\r\n Property.rgb2 + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n }\r\n getFrameEntries() {\r\n return 7;\r\n }\r\n setFrame(frame, time, r, g, b, r2, g2, b2) {\r\n frame *= 7;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = r;\r\n this.frames[frame + 2] = g;\r\n this.frames[frame + 3] = b;\r\n this.frames[frame + 4] = r2;\r\n this.frames[frame + 5] = g2;\r\n this.frames[frame + 6] = b2;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let frames = this.frames;\r\n let light = slot.color, dark = slot.darkColor;\r\n if (time < frames[0]) {\r\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n light.r = setupLight.r;\r\n light.g = setupLight.g;\r\n light.b = setupLight.b;\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n return;\r\n case 1 /* first */:\r\n light.r += (setupLight.r - light.r) * alpha;\r\n light.g += (setupLight.g - light.g) * alpha;\r\n light.b += (setupLight.b - light.b) * alpha;\r\n dark.r += (setupDark.r - dark.r) * alpha;\r\n dark.g += (setupDark.g - dark.g) * alpha;\r\n dark.b += (setupDark.b - dark.b) * alpha;\r\n }\r\n return;\r\n }\r\n let r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n let i = Timeline.search(frames, time, 7);\r\n let curveType = this.curves[i / 7];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n r2 = frames[i + 4];\r\n g2 = frames[i + 5];\r\n b2 = frames[i + 6];\r\n let t = (time - before) / (frames[i + 7] - before);\r\n r += (frames[i + 7 + 1] - r) * t;\r\n g += (frames[i + 7 + 2] - g) * t;\r\n b += (frames[i + 7 + 3] - b) * t;\r\n r2 += (frames[i + 7 + 4] - r2) * t;\r\n g2 += (frames[i + 7 + 5] - g2) * t;\r\n b2 += (frames[i + 7 + 6] - b2) * t;\r\n break;\r\n case 1:\r\n r = frames[i + 1];\r\n g = frames[i + 2];\r\n b = frames[i + 3];\r\n r2 = frames[i + 4];\r\n g2 = frames[i + 5];\r\n b2 = frames[i + 6];\r\n break;\r\n default:\r\n r = this.getBezierValue(time, i, 1, curveType - 2);\r\n g = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n b = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n r2 = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n g2 = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\r\n b2 = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\r\n }\r\n if (alpha == 1) {\r\n light.r = r;\r\n light.g = g;\r\n light.b = b;\r\n dark.r = r2;\r\n dark.g = g2;\r\n dark.b = b2;\r\n } else {\r\n if (blend == 0 /* setup */) {\r\n let setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.r = setupLight.r;\r\n light.g = setupLight.g;\r\n light.b = setupLight.b;\r\n dark.r = setupDark.r;\r\n dark.g = setupDark.g;\r\n dark.b = setupDark.b;\r\n }\r\n light.r += (r - light.r) * alpha;\r\n light.g += (g - light.g) * alpha;\r\n light.b += (b - light.b) * alpha;\r\n dark.r += (r2 - dark.r) * alpha;\r\n dark.g += (g2 - dark.g) * alpha;\r\n dark.b += (b2 - dark.b) * alpha;\r\n }\r\n }\r\n };\r\n var AttachmentTimeline = class extends Timeline {\r\n constructor(frameCount, slotIndex) {\r\n super(frameCount, [\r\n Property.attachment + \"|\" + slotIndex\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, time, attachmentName) {\r\n this.frames[frame] = time;\r\n this.attachmentNames[frame] = attachmentName;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == 1 /* mixOut */) {\r\n if (blend == 0 /* setup */)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n if (time < this.frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n this.setAttachment(skeleton, slot, this.attachmentNames[Timeline.search1(this.frames, time)]);\r\n }\r\n setAttachment(skeleton, slot, attachmentName) {\r\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n }\r\n };\r\n var DeformTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, slotIndex, attachment) {\r\n super(frameCount, bezierCount, [\r\n Property.deform + \"|\" + slotIndex + \"|\" + attachment.id\r\n ]);\r\n this.slotIndex = 0;\r\n this.slotIndex = slotIndex;\r\n this.attachment = attachment;\r\n this.vertices = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, time, vertices) {\r\n this.frames[frame] = time;\r\n this.vertices[frame] = vertices;\r\n }\r\n setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2) {\r\n let curves = this.curves;\r\n let i = this.getFrameCount() + bezier * 18;\r\n if (value == 0)\r\n curves[frame] = 2 + i;\r\n let tmpx = (time1 - cx1 * 2 + cx2) * 0.03, tmpy = cy2 * 0.03 - cy1 * 0.06;\r\n let dddx = ((cx1 - cx2) * 3 - time1 + time2) * 6e-3, dddy = (cy1 - cy2 + 0.33333333) * 0.018;\r\n let ddx = tmpx * 2 + dddx, ddy = tmpy * 2 + dddy;\r\n let dx = (cx1 - time1) * 0.3 + tmpx + dddx * 0.16666667, dy = cy1 * 0.3 + tmpy + dddy * 0.16666667;\r\n let x = time1 + dx, y = dy;\r\n for (let n = i + 18; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dx += ddx;\r\n dy += ddy;\r\n ddx += dddx;\r\n ddy += dddy;\r\n x += dx;\r\n y += dy;\r\n }\r\n }\r\n getCurvePercent(time, frame) {\r\n let curves = this.curves;\r\n let i = curves[frame];\r\n switch (i) {\r\n case 0:\r\n let x2 = this.frames[frame];\r\n return (time - x2) / (this.frames[frame + this.getFrameEntries()] - x2);\r\n case 1:\r\n return 0;\r\n }\r\n i -= 2;\r\n if (curves[i] > time) {\r\n let x2 = this.frames[frame];\r\n return curves[i + 1] * (time - x2) / (curves[i] - x2);\r\n }\r\n let n = i + 18;\r\n for (i += 2; i < n; i += 2) {\r\n if (curves[i] >= time) {\r\n let x2 = curves[i - 2], y2 = curves[i - 1];\r\n return y2 + (time - x2) / (curves[i] - x2) * (curves[i + 1] - y2);\r\n }\r\n }\r\n let x = curves[n - 2], y = curves[n - 1];\r\n return y + (1 - y) * (time - x) / (this.frames[frame + this.getFrameEntries()] - x);\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let slotAttachment = slot.getAttachment();\r\n if (!slotAttachment)\r\n return;\r\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != this.attachment)\r\n return;\r\n let deform = slot.deform;\r\n if (deform.length == 0)\r\n blend = 0 /* setup */;\r\n let vertices = this.vertices;\r\n let vertexCount = vertices[0].length;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n deform.length = 0;\r\n return;\r\n case 1 /* first */:\r\n if (alpha == 1) {\r\n deform.length = 0;\r\n return;\r\n }\r\n deform.length = vertexCount;\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] += (setupVertices[i] - deform[i]) * alpha;\r\n } else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n deform.length = vertexCount;\r\n if (time >= frames[frames.length - 1]) {\r\n let lastVertices = vertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */) {\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += lastVertices[i2] - setupVertices[i2];\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += lastVertices[i2];\r\n }\r\n } else\r\n Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */: {\r\n let vertexAttachment2 = slotAttachment;\r\n if (!vertexAttachment2.bones) {\r\n let setupVertices = vertexAttachment2.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let setup = setupVertices[i2];\r\n deform[i2] = setup + (lastVertices[i2] - setup) * alpha;\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] = lastVertices[i2] * alpha;\r\n }\r\n break;\r\n }\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += (lastVertices[i2] - deform[i2]) * alpha;\r\n break;\r\n case 3 /* add */:\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += (lastVertices[i2] - setupVertices[i2]) * alpha;\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++)\r\n deform[i2] += lastVertices[i2] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n let frame = Timeline.search1(frames, time);\r\n let percent = this.getCurvePercent(time, frame);\r\n let prevVertices = vertices[frame];\r\n let nextVertices = vertices[frame + 1];\r\n if (alpha == 1) {\r\n if (blend == 3 /* add */) {\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += prev + (nextVertices[i2] - prev) * percent - setupVertices[i2];\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += prev + (nextVertices[i2] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] = prev + (nextVertices[i2] - prev) * percent;\r\n }\r\n }\r\n } else {\r\n switch (blend) {\r\n case 0 /* setup */: {\r\n let vertexAttachment2 = slotAttachment;\r\n if (!vertexAttachment2.bones) {\r\n let setupVertices = vertexAttachment2.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2], setup = setupVertices[i2];\r\n deform[i2] = setup + (prev + (nextVertices[i2] - prev) * percent - setup) * alpha;\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] = (prev + (nextVertices[i2] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case 1 /* first */:\r\n case 2 /* replace */:\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - deform[i2]) * alpha;\r\n }\r\n break;\r\n case 3 /* add */:\r\n let vertexAttachment = slotAttachment;\r\n if (!vertexAttachment.bones) {\r\n let setupVertices = vertexAttachment.vertices;\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent - setupVertices[i2]) * alpha;\r\n }\r\n } else {\r\n for (let i2 = 0; i2 < vertexCount; i2++) {\r\n let prev = prevVertices[i2];\r\n deform[i2] += (prev + (nextVertices[i2] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n var _EventTimeline = class extends Timeline {\r\n constructor(frameCount) {\r\n super(frameCount, _EventTimeline.propertyIds);\r\n this.events = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, event) {\r\n this.frames[frame] = event.time;\r\n this.events[frame] = event;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (!firedEvents)\r\n return;\r\n let frames = this.frames;\r\n let frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n } else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n let i = 0;\r\n if (lastTime < frames[0])\r\n i = 0;\r\n else {\r\n i = Timeline.search1(frames, lastTime) + 1;\r\n let frameTime = frames[i];\r\n while (i > 0) {\r\n if (frames[i - 1] != frameTime)\r\n break;\r\n i--;\r\n }\r\n }\r\n for (; i < frameCount && time >= frames[i]; i++)\r\n firedEvents.push(this.events[i]);\r\n }\r\n };\r\n var EventTimeline = _EventTimeline;\r\n EventTimeline.propertyIds = [\"\" + Property.event];\r\n var _DrawOrderTimeline = class extends Timeline {\r\n constructor(frameCount) {\r\n super(frameCount, _DrawOrderTimeline.propertyIds);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n getFrameCount() {\r\n return this.frames.length;\r\n }\r\n setFrame(frame, time, drawOrder) {\r\n this.frames[frame] = time;\r\n this.drawOrders[frame] = drawOrder;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (direction == 1 /* mixOut */) {\r\n if (blend == 0 /* setup */)\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n if (time < this.frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n let idx = Timeline.search1(this.frames, time);\r\n let drawOrderToSetupIndex = this.drawOrders[idx];\r\n if (!drawOrderToSetupIndex)\r\n Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n else {\r\n let drawOrder = skeleton.drawOrder;\r\n let slots = skeleton.slots;\r\n for (let i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n }\r\n };\r\n var DrawOrderTimeline = _DrawOrderTimeline;\r\n DrawOrderTimeline.propertyIds = [\"\" + Property.drawOrder];\r\n var IkConstraintTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, ikConstraintIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.ikConstraint + \"|\" + ikConstraintIndex\r\n ]);\r\n this.ikConstraintIndex = 0;\r\n this.ikConstraintIndex = ikConstraintIndex;\r\n }\r\n getFrameEntries() {\r\n return 6;\r\n }\r\n setFrame(frame, time, mix, softness, bendDirection, compress, stretch) {\r\n frame *= 6;\r\n this.frames[frame] = time;\r\n this.frames[frame + 1] = mix;\r\n this.frames[frame + 2] = softness;\r\n this.frames[frame + 3] = bendDirection;\r\n this.frames[frame + 4] = compress ? 1 : 0;\r\n this.frames[frame + 5] = stretch ? 1 : 0;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case 1 /* first */:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n let mix = 0, softness = 0;\r\n let i = Timeline.search(frames, time, 6);\r\n let curveType = this.curves[i / 6];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n mix = frames[i + 1];\r\n softness = frames[i + 2];\r\n let t = (time - before) / (frames[i + 6] - before);\r\n mix += (frames[i + 6 + 1] - mix) * t;\r\n softness += (frames[i + 6 + 2] - softness) * t;\r\n break;\r\n case 1:\r\n mix = frames[i + 1];\r\n softness = frames[i + 2];\r\n break;\r\n default:\r\n mix = this.getBezierValue(time, i, 1, curveType - 2);\r\n softness = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n }\r\n if (blend == 0 /* setup */) {\r\n constraint.mix = constraint.data.mix + (mix - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness + (softness - constraint.data.softness) * alpha;\r\n if (direction == 1 /* mixOut */) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n } else {\r\n constraint.bendDirection = frames[i + 3];\r\n constraint.compress = frames[i + 4] != 0;\r\n constraint.stretch = frames[i + 5] != 0;\r\n }\r\n } else {\r\n constraint.mix += (mix - constraint.mix) * alpha;\r\n constraint.softness += (softness - constraint.softness) * alpha;\r\n if (direction == 0 /* mixIn */) {\r\n constraint.bendDirection = frames[i + 3];\r\n constraint.compress = frames[i + 4] != 0;\r\n constraint.stretch = frames[i + 5] != 0;\r\n }\r\n }\r\n }\r\n };\r\n var TransformConstraintTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, transformConstraintIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.transformConstraint + \"|\" + transformConstraintIndex\r\n ]);\r\n this.transformConstraintIndex = 0;\r\n this.transformConstraintIndex = transformConstraintIndex;\r\n }\r\n getFrameEntries() {\r\n return 7;\r\n }\r\n setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY) {\r\n let frames = this.frames;\r\n frame *= 7;\r\n frames[frame] = time;\r\n frames[frame + 1] = mixRotate;\r\n frames[frame + 2] = mixX;\r\n frames[frame + 3] = mixY;\r\n frames[frame + 4] = mixScaleX;\r\n frames[frame + 5] = mixScaleY;\r\n frames[frame + 6] = mixShearY;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n let data = constraint.data;\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.mixRotate = data.mixRotate;\r\n constraint.mixX = data.mixX;\r\n constraint.mixY = data.mixY;\r\n constraint.mixScaleX = data.mixScaleX;\r\n constraint.mixScaleY = data.mixScaleY;\r\n constraint.mixShearY = data.mixShearY;\r\n return;\r\n case 1 /* first */:\r\n constraint.mixRotate += (data.mixRotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (data.mixX - constraint.mixX) * alpha;\r\n constraint.mixY += (data.mixY - constraint.mixY) * alpha;\r\n constraint.mixScaleX += (data.mixScaleX - constraint.mixScaleX) * alpha;\r\n constraint.mixScaleY += (data.mixScaleY - constraint.mixScaleY) * alpha;\r\n constraint.mixShearY += (data.mixShearY - constraint.mixShearY) * alpha;\r\n }\r\n return;\r\n }\r\n let rotate, x, y, scaleX, scaleY, shearY;\r\n let i = Timeline.search(frames, time, 7);\r\n let curveType = this.curves[i / 7];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n scaleX = frames[i + 4];\r\n scaleY = frames[i + 5];\r\n shearY = frames[i + 6];\r\n let t = (time - before) / (frames[i + 7] - before);\r\n rotate += (frames[i + 7 + 1] - rotate) * t;\r\n x += (frames[i + 7 + 2] - x) * t;\r\n y += (frames[i + 7 + 3] - y) * t;\r\n scaleX += (frames[i + 7 + 4] - scaleX) * t;\r\n scaleY += (frames[i + 7 + 5] - scaleY) * t;\r\n shearY += (frames[i + 7 + 6] - shearY) * t;\r\n break;\r\n case 1:\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n scaleX = frames[i + 4];\r\n scaleY = frames[i + 5];\r\n shearY = frames[i + 6];\r\n break;\r\n default:\r\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\r\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n scaleX = this.getBezierValue(time, i, 4, curveType + 18 * 3 - 2);\r\n scaleY = this.getBezierValue(time, i, 5, curveType + 18 * 4 - 2);\r\n shearY = this.getBezierValue(time, i, 6, curveType + 18 * 5 - 2);\r\n }\r\n if (blend == 0 /* setup */) {\r\n let data = constraint.data;\r\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\r\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\r\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\r\n constraint.mixScaleX = data.mixScaleX + (scaleX - data.mixScaleX) * alpha;\r\n constraint.mixScaleY = data.mixScaleY + (scaleY - data.mixScaleY) * alpha;\r\n constraint.mixShearY = data.mixShearY + (shearY - data.mixShearY) * alpha;\r\n } else {\r\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (x - constraint.mixX) * alpha;\r\n constraint.mixY += (y - constraint.mixY) * alpha;\r\n constraint.mixScaleX += (scaleX - constraint.mixScaleX) * alpha;\r\n constraint.mixScaleY += (scaleY - constraint.mixScaleY) * alpha;\r\n constraint.mixShearY += (shearY - constraint.mixShearY) * alpha;\r\n }\r\n }\r\n };\r\n var PathConstraintPositionTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, pathConstraintIndex) {\r\n super(frameCount, bezierCount, Property.pathConstraintPosition + \"|\" + pathConstraintIndex);\r\n this.pathConstraintIndex = 0;\r\n this.pathConstraintIndex = pathConstraintIndex;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case 1 /* first */:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n let position = this.getCurveValue(time);\r\n if (blend == 0 /* setup */)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n }\r\n };\r\n var PathConstraintSpacingTimeline = class extends CurveTimeline1 {\r\n constructor(frameCount, bezierCount, pathConstraintIndex) {\r\n super(frameCount, bezierCount, Property.pathConstraintSpacing + \"|\" + pathConstraintIndex);\r\n this.pathConstraintIndex = 0;\r\n this.pathConstraintIndex = pathConstraintIndex;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case 1 /* first */:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n let spacing = this.getCurveValue(time);\r\n if (blend == 0 /* setup */)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n }\r\n };\r\n var PathConstraintMixTimeline = class extends CurveTimeline {\r\n constructor(frameCount, bezierCount, pathConstraintIndex) {\r\n super(frameCount, bezierCount, [\r\n Property.pathConstraintMix + \"|\" + pathConstraintIndex\r\n ]);\r\n this.pathConstraintIndex = 0;\r\n this.pathConstraintIndex = pathConstraintIndex;\r\n }\r\n getFrameEntries() {\r\n return 4;\r\n }\r\n setFrame(frame, time, mixRotate, mixX, mixY) {\r\n let frames = this.frames;\r\n frame <<= 2;\r\n frames[frame] = time;\r\n frames[frame + 1] = mixRotate;\r\n frames[frame + 2] = mixX;\r\n frames[frame + 3] = mixY;\r\n }\r\n apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n let constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n constraint.mixRotate = constraint.data.mixRotate;\r\n constraint.mixX = constraint.data.mixX;\r\n constraint.mixY = constraint.data.mixY;\r\n return;\r\n case 1 /* first */:\r\n constraint.mixRotate += (constraint.data.mixRotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (constraint.data.mixX - constraint.mixX) * alpha;\r\n constraint.mixY += (constraint.data.mixY - constraint.mixY) * alpha;\r\n }\r\n return;\r\n }\r\n let rotate, x, y;\r\n let i = Timeline.search(frames, time, 4);\r\n let curveType = this.curves[i >> 2];\r\n switch (curveType) {\r\n case 0:\r\n let before = frames[i];\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n let t = (time - before) / (frames[i + 4] - before);\r\n rotate += (frames[i + 4 + 1] - rotate) * t;\r\n x += (frames[i + 4 + 2] - x) * t;\r\n y += (frames[i + 4 + 3] - y) * t;\r\n break;\r\n case 1:\r\n rotate = frames[i + 1];\r\n x = frames[i + 2];\r\n y = frames[i + 3];\r\n break;\r\n default:\r\n rotate = this.getBezierValue(time, i, 1, curveType - 2);\r\n x = this.getBezierValue(time, i, 2, curveType + 18 - 2);\r\n y = this.getBezierValue(time, i, 3, curveType + 18 * 2 - 2);\r\n }\r\n if (blend == 0 /* setup */) {\r\n let data = constraint.data;\r\n constraint.mixRotate = data.mixRotate + (rotate - data.mixRotate) * alpha;\r\n constraint.mixX = data.mixX + (x - data.mixX) * alpha;\r\n constraint.mixY = data.mixY + (y - data.mixY) * alpha;\r\n } else {\r\n constraint.mixRotate += (rotate - constraint.mixRotate) * alpha;\r\n constraint.mixX += (x - constraint.mixX) * alpha;\r\n constraint.mixY += (y - constraint.mixY) * alpha;\r\n }\r\n }\r\n };\r\n var _SequenceTimeline = class extends Timeline {\r\n constructor(frameCount, slotIndex, attachment) {\r\n super(frameCount, [\r\n Property.sequence + \"|\" + slotIndex + \"|\" + attachment.sequence.id\r\n ]);\r\n this.slotIndex = slotIndex;\r\n this.attachment = attachment;\r\n }\r\n getFrameEntries() {\r\n return _SequenceTimeline.ENTRIES;\r\n }\r\n getSlotIndex() {\r\n return this.slotIndex;\r\n }\r\n getAttachment() {\r\n return this.attachment;\r\n }\r\n setFrame(frame, time, mode, index, delay) {\r\n let frames = this.frames;\r\n frame *= _SequenceTimeline.ENTRIES;\r\n frames[frame] = time;\r\n frames[frame + _SequenceTimeline.MODE] = mode | index << 4;\r\n frames[frame + _SequenceTimeline.DELAY] = delay;\r\n }\r\n apply(skeleton, lastTime, time, events, alpha, blend, direction) {\r\n let slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n let slotAttachment = slot.attachment;\r\n let attachment = this.attachment;\r\n if (slotAttachment != attachment) {\r\n if (!(slotAttachment instanceof VertexAttachment) || slotAttachment.timelineAttachment != attachment)\r\n return;\r\n }\r\n let frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n slot.sequenceIndex = -1;\r\n return;\r\n }\r\n let i = Timeline.search(frames, time, _SequenceTimeline.ENTRIES);\r\n let before = frames[i];\r\n let modeAndIndex = frames[i + _SequenceTimeline.MODE];\r\n let delay = frames[i + _SequenceTimeline.DELAY];\r\n if (!this.attachment.sequence)\r\n return;\r\n let index = modeAndIndex >> 4, count = this.attachment.sequence.regions.length;\r\n let mode = SequenceModeValues[modeAndIndex & 15];\r\n if (mode != 0 /* hold */) {\r\n index += (time - before) / delay + 1e-5 | 0;\r\n switch (mode) {\r\n case 1 /* once */:\r\n index = Math.min(count - 1, index);\r\n break;\r\n case 2 /* loop */:\r\n index %= count;\r\n break;\r\n case 3 /* pingpong */: {\r\n let n = (count << 1) - 2;\r\n index = n == 0 ? 0 : index % n;\r\n if (index >= count)\r\n index = n - index;\r\n break;\r\n }\r\n case 4 /* onceReverse */:\r\n index = Math.max(count - 1 - index, 0);\r\n break;\r\n case 5 /* loopReverse */:\r\n index = count - 1 - index % count;\r\n break;\r\n case 6 /* pingpongReverse */: {\r\n let n = (count << 1) - 2;\r\n index = n == 0 ? 0 : (index + count - 1) % n;\r\n if (index >= count)\r\n index = n - index;\r\n }\r\n }\r\n }\r\n slot.sequenceIndex = index;\r\n }\r\n };\r\n var SequenceTimeline = _SequenceTimeline;\r\n SequenceTimeline.ENTRIES = 3;\r\n SequenceTimeline.MODE = 1;\r\n SequenceTimeline.DELAY = 2;\r\n\r\n // spine-core/src/AnimationState.ts\r\n var _AnimationState = class {\r\n constructor(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new StringSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new Pool(() => new TrackEntry());\r\n this.data = data;\r\n }\r\n static emptyAnimation() {\r\n return _AnimationState._emptyAnimation;\r\n }\r\n update(delta) {\r\n delta *= this.timeScale;\r\n let tracks = this.tracks;\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let current = tracks[i];\r\n if (!current)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n let currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n let next = current.next;\r\n if (next) {\r\n let nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n } else if (current.trackLast >= current.trackEnd && !current.mixingFrom) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.clearNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom && this.updateMixingFrom(current, delta)) {\r\n let from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from)\r\n from.mixingTo = null;\r\n while (from) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n }\r\n updateMixingFrom(to, delta) {\r\n let from = to.mixingFrom;\r\n if (!from)\r\n return true;\r\n let finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n }\r\n apply(skeleton) {\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n let events = this.events;\r\n let tracks = this.tracks;\r\n let applied = false;\r\n for (let i2 = 0, n2 = tracks.length; i2 < n2; i2++) {\r\n let current = tracks[i2];\r\n if (!current || current.delay > 0)\r\n continue;\r\n applied = true;\r\n let blend = i2 == 0 ? 1 /* first */ : current.mixBlend;\r\n let mix = current.alpha;\r\n if (current.mixingFrom)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && !current.next)\r\n mix = 0;\r\n let animationLast = current.animationLast, animationTime = current.getAnimationTime(), applyTime = animationTime;\r\n let applyEvents = events;\r\n if (current.reverse) {\r\n applyTime = current.animation.duration - applyTime;\r\n applyEvents = null;\r\n }\r\n let timelines = current.animation.timelines;\r\n let timelineCount = timelines.length;\r\n if (i2 == 0 && mix == 1 || blend == 3 /* add */) {\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, applyTime, applyEvents, mix, blend, 0 /* mixIn */);\r\n }\r\n } else {\r\n let timelineMode = current.timelineMode;\r\n let shortestRotation = current.shortestRotation;\r\n let firstFrame = !shortestRotation && current.timelinesRotation.length != timelineCount << 1;\r\n if (firstFrame)\r\n current.timelinesRotation.length = timelineCount << 1;\r\n for (let ii = 0; ii < timelineCount; ii++) {\r\n let timeline2 = timelines[ii];\r\n let timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : 0 /* setup */;\r\n if (!shortestRotation && timeline2 instanceof RotateTimeline) {\r\n this.applyRotateTimeline(timeline2, skeleton, applyTime, mix, timelineBlend, current.timelinesRotation, ii << 1, firstFrame);\r\n } else if (timeline2 instanceof AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline2, skeleton, applyTime, blend, true);\r\n } else {\r\n Utils.webkit602BugfixHelper(mix, blend);\r\n timeline2.apply(skeleton, animationLast, applyTime, applyEvents, mix, timelineBlend, 0 /* mixIn */);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n }\r\n applyMixingFrom(to, skeleton, blend) {\r\n let from = to.mixingFrom;\r\n if (from.mixingFrom)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n let mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == 1 /* first */)\r\n blend = 0 /* setup */;\r\n } else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != 1 /* first */)\r\n blend = from.mixBlend;\r\n }\r\n let attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n let timelines = from.animation.timelines;\r\n let timelineCount = timelines.length;\r\n let alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n let animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;\r\n let events = null;\r\n if (from.reverse)\r\n applyTime = from.animation.duration - applyTime;\r\n else if (mix < from.eventThreshold)\r\n events = this.events;\r\n if (blend == 3 /* add */) {\r\n for (let i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, 1 /* mixOut */);\r\n } else {\r\n let timelineMode = from.timelineMode;\r\n let timelineHoldMix = from.timelineHoldMix;\r\n let shortestRotation = from.shortestRotation;\r\n let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;\r\n if (firstFrame)\r\n from.timelinesRotation.length = timelineCount << 1;\r\n from.totalAlpha = 0;\r\n for (let i = 0; i < timelineCount; i++) {\r\n let timeline = timelines[i];\r\n let direction = 1 /* mixOut */;\r\n let timelineBlend;\r\n let alpha = 0;\r\n switch (timelineMode[i]) {\r\n case SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case FIRST:\r\n timelineBlend = 0 /* setup */;\r\n alpha = alphaMix;\r\n break;\r\n case HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case HOLD_FIRST:\r\n timelineBlend = 0 /* setup */;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = 0 /* setup */;\r\n let holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (!shortestRotation && timeline instanceof RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);\r\n else {\r\n Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == 0 /* setup */)\r\n direction = 0 /* mixIn */;\r\n timeline.apply(skeleton, animationLast, applyTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n }\r\n applyAttachmentTimeline(timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (time < timeline.frames[0]) {\r\n if (blend == 0 /* setup */ || blend == 1 /* first */)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n } else\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[Timeline.search1(timeline.frames, time)], attachments);\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + SETUP;\r\n }\r\n setAttachment(skeleton, slot, attachmentName, attachments) {\r\n slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + CURRENT;\r\n }\r\n applyRotateTimeline(timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, 0 /* mixIn */);\r\n return;\r\n }\r\n let bone = skeleton.bones[timeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n let frames = timeline.frames;\r\n let r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case 0 /* setup */:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case 1 /* first */:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n } else {\r\n r1 = blend == 0 /* setup */ ? bone.data.rotation : bone.rotation;\r\n r2 = bone.data.rotation + timeline.getCurveValue(time);\r\n }\r\n let total = 0, diff = r2 - r1;\r\n diff -= (16384 - (16384.499999999996 - diff / 360 | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n } else {\r\n let lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n } else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n let current = diff > 0, dir = lastTotal >= 0;\r\n if (MathUtils.signum(lastDiff) != MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n bone.rotation = r1 + total * alpha;\r\n }\r\n queueEvents(entry, animationTime) {\r\n let animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n let duration = animationEnd - animationStart;\r\n let trackLastWrapped = entry.trackLast % duration;\r\n let events = this.events;\r\n let i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < trackLastWrapped)\r\n break;\r\n if (event.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event);\r\n }\r\n let complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n let event = events[i];\r\n if (event.time < animationStart)\r\n continue;\r\n this.queue.event(entry, event);\r\n }\r\n }\r\n clearTracks() {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n clearTrack(trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n let current = this.tracks[trackIndex];\r\n if (!current)\r\n return;\r\n this.queue.end(current);\r\n this.clearNext(current);\r\n let entry = current;\r\n while (true) {\r\n let from = entry.mixingFrom;\r\n if (!from)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n }\r\n setCurrent(index, current, interrupt) {\r\n let from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n current.previous = null;\r\n if (from) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n }\r\n setAnimation(trackIndex, animationName, loop = false) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (!animation)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n }\r\n setAnimationWith(trackIndex, animation, loop = false) {\r\n if (!animation)\r\n throw new Error(\"animation cannot be null.\");\r\n let interrupt = true;\r\n let current = this.expandToIndex(trackIndex);\r\n if (current) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.clearNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n } else\r\n this.clearNext(current);\r\n }\r\n let entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n }\r\n addAnimation(trackIndex, animationName, loop = false, delay = 0) {\r\n let animation = this.data.skeletonData.findAnimation(animationName);\r\n if (!animation)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n }\r\n addAnimationWith(trackIndex, animation, loop = false, delay = 0) {\r\n if (!animation)\r\n throw new Error(\"animation cannot be null.\");\r\n let last = this.expandToIndex(trackIndex);\r\n if (last) {\r\n while (last.next)\r\n last = last.next;\r\n }\r\n let entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (!last) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n } else {\r\n last.next = entry;\r\n entry.previous = last;\r\n if (delay <= 0)\r\n delay += last.getTrackComplete() - entry.mixDuration;\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n }\r\n setEmptyAnimation(trackIndex, mixDuration = 0) {\r\n let entry = this.setAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n addEmptyAnimation(trackIndex, mixDuration = 0, delay = 0) {\r\n let entry = this.addAnimationWith(trackIndex, _AnimationState.emptyAnimation(), false, delay);\r\n if (delay <= 0)\r\n entry.delay += entry.mixDuration - mixDuration;\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n }\r\n setEmptyAnimations(mixDuration = 0) {\r\n let oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (let i = 0, n = this.tracks.length; i < n; i++) {\r\n let current = this.tracks[i];\r\n if (current)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n }\r\n expandToIndex(index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n }\r\n trackEntry(trackIndex, animation, loop, last) {\r\n let entry = this.trackEntryPool.obtain();\r\n entry.reset();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.reverse = false;\r\n entry.shortestRotation = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = !last ? 0 : this.data.getMix(last.animation, animation);\r\n entry.interruptAlpha = 1;\r\n entry.totalAlpha = 0;\r\n entry.mixBlend = 2 /* replace */;\r\n return entry;\r\n }\r\n clearNext(entry) {\r\n let next = entry.next;\r\n while (next) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n }\r\n _animationsChanged() {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n let tracks = this.tracks;\r\n for (let i = 0, n = tracks.length; i < n; i++) {\r\n let entry = tracks[i];\r\n if (!entry)\r\n continue;\r\n while (entry.mixingFrom)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (!entry.mixingTo || entry.mixBlend != 3 /* add */)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry);\r\n }\r\n }\r\n computeHold(entry) {\r\n let to = entry.mixingTo;\r\n let timelines = entry.animation.timelines;\r\n let timelinesCount = entry.animation.timelines.length;\r\n let timelineMode = entry.timelineMode;\r\n timelineMode.length = timelinesCount;\r\n let timelineHoldMix = entry.timelineHoldMix;\r\n timelineHoldMix.length = 0;\r\n let propertyIDs = this.propertyIDs;\r\n if (to && to.holdPrevious) {\r\n for (let i = 0; i < timelinesCount; i++)\r\n timelineMode[i] = propertyIDs.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;\r\n return;\r\n }\r\n outer:\r\n for (let i = 0; i < timelinesCount; i++) {\r\n let timeline = timelines[i];\r\n let ids = timeline.getPropertyIds();\r\n if (!propertyIDs.addAll(ids))\r\n timelineMode[i] = SUBSEQUENT;\r\n else if (!to || timeline instanceof AttachmentTimeline || timeline instanceof DrawOrderTimeline || timeline instanceof EventTimeline || !to.animation.hasTimeline(ids)) {\r\n timelineMode[i] = FIRST;\r\n } else {\r\n for (let next = to.mixingTo; next; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(ids))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = HOLD_MIX;\r\n timelineHoldMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = HOLD_FIRST;\r\n }\r\n }\r\n }\r\n getCurrent(trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n }\r\n addListener(listener) {\r\n if (!listener)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n }\r\n removeListener(listener) {\r\n let index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n }\r\n clearListeners() {\r\n this.listeners.length = 0;\r\n }\r\n clearListenerNotifications() {\r\n this.queue.clear();\r\n }\r\n };\r\n var AnimationState = _AnimationState;\r\n AnimationState._emptyAnimation = new Animation(\"\", [], 0);\r\n var TrackEntry = class {\r\n constructor() {\r\n this.animation = null;\r\n this.previous = null;\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.listener = null;\r\n this.trackIndex = 0;\r\n this.loop = false;\r\n this.holdPrevious = false;\r\n this.reverse = false;\r\n this.shortestRotation = false;\r\n this.eventThreshold = 0;\r\n this.attachmentThreshold = 0;\r\n this.drawOrderThreshold = 0;\r\n this.animationStart = 0;\r\n this.animationEnd = 0;\r\n this.animationLast = 0;\r\n this.nextAnimationLast = 0;\r\n this.delay = 0;\r\n this.trackTime = 0;\r\n this.trackLast = 0;\r\n this.nextTrackLast = 0;\r\n this.trackEnd = 0;\r\n this.timeScale = 0;\r\n this.alpha = 0;\r\n this.mixTime = 0;\r\n this.mixDuration = 0;\r\n this.interruptAlpha = 0;\r\n this.totalAlpha = 0;\r\n this.mixBlend = 2 /* replace */;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n reset() {\r\n this.next = null;\r\n this.previous = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n }\r\n getAnimationTime() {\r\n if (this.loop) {\r\n let duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return this.trackTime % duration + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n }\r\n setAnimationLast(animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n }\r\n isComplete() {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n }\r\n resetRotationDirections() {\r\n this.timelinesRotation.length = 0;\r\n }\r\n getTrackComplete() {\r\n let duration = this.animationEnd - this.animationStart;\r\n if (duration != 0) {\r\n if (this.loop)\r\n return duration * (1 + (this.trackTime / duration | 0));\r\n if (this.trackTime < duration)\r\n return duration;\r\n }\r\n return this.trackTime;\r\n }\r\n };\r\n var EventQueue = class {\r\n constructor(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n start(entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n interrupt(entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n }\r\n end(entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n }\r\n dispose(entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n }\r\n complete(entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n }\r\n event(entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n }\r\n drain() {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n let objects = this.objects;\r\n let listeners = this.animState.listeners;\r\n for (let i = 0; i < objects.length; i += 2) {\r\n let type = objects[i];\r\n let entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.start)\r\n listener.start(entry);\r\n }\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.interrupt)\r\n listener.interrupt(entry);\r\n }\r\n break;\r\n case EventType.end:\r\n if (entry.listener && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.end)\r\n listener.end(entry);\r\n }\r\n case EventType.dispose:\r\n if (entry.listener && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.dispose)\r\n listener.dispose(entry);\r\n }\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.complete)\r\n listener.complete(entry);\r\n }\r\n break;\r\n case EventType.event:\r\n let event = objects[i++ + 2];\r\n if (entry.listener && entry.listener.event)\r\n entry.listener.event(entry, event);\r\n for (let ii = 0; ii < listeners.length; ii++) {\r\n let listener = listeners[ii];\r\n if (listener.event)\r\n listener.event(entry, event);\r\n }\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n }\r\n clear() {\r\n this.objects.length = 0;\r\n }\r\n };\r\n var EventType = /* @__PURE__ */ ((EventType2) => {\r\n EventType2[EventType2[\"start\"] = 0] = \"start\";\r\n EventType2[EventType2[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType2[EventType2[\"end\"] = 2] = \"end\";\r\n EventType2[EventType2[\"dispose\"] = 3] = \"dispose\";\r\n EventType2[EventType2[\"complete\"] = 4] = \"complete\";\r\n EventType2[EventType2[\"event\"] = 5] = \"event\";\r\n return EventType2;\r\n })(EventType || {});\r\n var AnimationStateAdapter = class {\r\n start(entry) {\r\n }\r\n interrupt(entry) {\r\n }\r\n end(entry) {\r\n }\r\n dispose(entry) {\r\n }\r\n complete(entry) {\r\n }\r\n event(entry, event) {\r\n }\r\n };\r\n var SUBSEQUENT = 0;\r\n var FIRST = 1;\r\n var HOLD_SUBSEQUENT = 2;\r\n var HOLD_FIRST = 3;\r\n var HOLD_MIX = 4;\r\n var SETUP = 1;\r\n var CURRENT = 2;\r\n\r\n // spine-core/src/AnimationStateData.ts\r\n var AnimationStateData = class {\r\n constructor(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (!skeletonData)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n setMix(fromName, toName, duration) {\r\n let from = this.skeletonData.findAnimation(fromName);\r\n if (!from)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n let to = this.skeletonData.findAnimation(toName);\r\n if (!to)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n }\r\n setMixWith(from, to, duration) {\r\n if (!from)\r\n throw new Error(\"from cannot be null.\");\r\n if (!to)\r\n throw new Error(\"to cannot be null.\");\r\n let key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n }\r\n getMix(from, to) {\r\n let key = from.name + \".\" + to.name;\r\n let value = this.animationToMixTime[key];\r\n return value === void 0 ? this.defaultMix : value;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/BoundingBoxAttachment.ts\r\n var BoundingBoxAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.color = new Color(1, 1, 1, 1);\r\n }\r\n copy() {\r\n let copy = new BoundingBoxAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/ClippingAttachment.ts\r\n var ClippingAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.endSlot = null;\r\n this.color = new Color(0.2275, 0.2275, 0.8078, 1);\r\n }\r\n copy() {\r\n let copy = new ClippingAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/Texture.ts\r\n var Texture = class {\r\n constructor(image) {\r\n this._image = image;\r\n }\r\n getImage() {\r\n return this._image;\r\n }\r\n };\r\n var TextureFilter = /* @__PURE__ */ ((TextureFilter2) => {\r\n TextureFilter2[TextureFilter2[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter2[TextureFilter2[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter2[TextureFilter2[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter2[TextureFilter2[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter2[TextureFilter2[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter2[TextureFilter2[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter2[TextureFilter2[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n return TextureFilter2;\r\n })(TextureFilter || {});\r\n var TextureWrap = /* @__PURE__ */ ((TextureWrap3) => {\r\n TextureWrap3[TextureWrap3[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap3[TextureWrap3[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap3[TextureWrap3[\"Repeat\"] = 10497] = \"Repeat\";\r\n return TextureWrap3;\r\n })(TextureWrap || {});\r\n var TextureRegion = class {\r\n constructor() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.degrees = 0;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n };\r\n var FakeTexture = class extends Texture {\r\n setFilters(minFilter, magFilter) {\r\n }\r\n setWraps(uWrap, vWrap) {\r\n }\r\n dispose() {\r\n }\r\n };\r\n\r\n // spine-core/src/TextureAtlas.ts\r\n var TextureAtlas = class {\r\n constructor(atlasText) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n let reader = new TextureAtlasReader(atlasText);\r\n let entry = new Array(4);\r\n let pageFields = {};\r\n pageFields[\"size\"] = (page2) => {\r\n page2.width = parseInt(entry[1]);\r\n page2.height = parseInt(entry[2]);\r\n };\r\n pageFields[\"format\"] = () => {\r\n };\r\n pageFields[\"filter\"] = (page2) => {\r\n page2.minFilter = Utils.enumValue(TextureFilter, entry[1]);\r\n page2.magFilter = Utils.enumValue(TextureFilter, entry[2]);\r\n };\r\n pageFields[\"repeat\"] = (page2) => {\r\n if (entry[1].indexOf(\"x\") != -1)\r\n page2.uWrap = 10497 /* Repeat */;\r\n if (entry[1].indexOf(\"y\") != -1)\r\n page2.vWrap = 10497 /* Repeat */;\r\n };\r\n pageFields[\"pma\"] = (page2) => {\r\n page2.pma = entry[1] == \"true\";\r\n };\r\n var regionFields = {};\r\n regionFields[\"xy\"] = (region) => {\r\n region.x = parseInt(entry[1]);\r\n region.y = parseInt(entry[2]);\r\n };\r\n regionFields[\"size\"] = (region) => {\r\n region.width = parseInt(entry[1]);\r\n region.height = parseInt(entry[2]);\r\n };\r\n regionFields[\"bounds\"] = (region) => {\r\n region.x = parseInt(entry[1]);\r\n region.y = parseInt(entry[2]);\r\n region.width = parseInt(entry[3]);\r\n region.height = parseInt(entry[4]);\r\n };\r\n regionFields[\"offset\"] = (region) => {\r\n region.offsetX = parseInt(entry[1]);\r\n region.offsetY = parseInt(entry[2]);\r\n };\r\n regionFields[\"orig\"] = (region) => {\r\n region.originalWidth = parseInt(entry[1]);\r\n region.originalHeight = parseInt(entry[2]);\r\n };\r\n regionFields[\"offsets\"] = (region) => {\r\n region.offsetX = parseInt(entry[1]);\r\n region.offsetY = parseInt(entry[2]);\r\n region.originalWidth = parseInt(entry[3]);\r\n region.originalHeight = parseInt(entry[4]);\r\n };\r\n regionFields[\"rotate\"] = (region) => {\r\n let value = entry[1];\r\n if (value == \"true\")\r\n region.degrees = 90;\r\n else if (value != \"false\")\r\n region.degrees = parseInt(value);\r\n };\r\n regionFields[\"index\"] = (region) => {\r\n region.index = parseInt(entry[1]);\r\n };\r\n let line = reader.readLine();\r\n while (line && line.trim().length == 0)\r\n line = reader.readLine();\r\n while (true) {\r\n if (!line || line.trim().length == 0)\r\n break;\r\n if (reader.readEntry(entry, line) == 0)\r\n break;\r\n line = reader.readLine();\r\n }\r\n let page = null;\r\n let names = null;\r\n let values = null;\r\n while (true) {\r\n if (line === null)\r\n break;\r\n if (line.trim().length == 0) {\r\n page = null;\r\n line = reader.readLine();\r\n } else if (!page) {\r\n page = new TextureAtlasPage(line.trim());\r\n while (true) {\r\n if (reader.readEntry(entry, line = reader.readLine()) == 0)\r\n break;\r\n let field = pageFields[entry[0]];\r\n if (field)\r\n field(page);\r\n }\r\n this.pages.push(page);\r\n } else {\r\n let region = new TextureAtlasRegion(page, line);\r\n while (true) {\r\n let count = reader.readEntry(entry, line = reader.readLine());\r\n if (count == 0)\r\n break;\r\n let field = regionFields[entry[0]];\r\n if (field)\r\n field(region);\r\n else {\r\n if (!names)\r\n names = [];\r\n if (!values)\r\n values = [];\r\n names.push(entry[0]);\r\n let entryValues = [];\r\n for (let i = 0; i < count; i++)\r\n entryValues.push(parseInt(entry[i + 1]));\r\n values.push(entryValues);\r\n }\r\n }\r\n if (region.originalWidth == 0 && region.originalHeight == 0) {\r\n region.originalWidth = region.width;\r\n region.originalHeight = region.height;\r\n }\r\n if (names && names.length > 0 && values && values.length > 0) {\r\n region.names = names;\r\n region.values = values;\r\n names = null;\r\n values = null;\r\n }\r\n region.u = region.x / page.width;\r\n region.v = region.y / page.height;\r\n if (region.degrees == 90) {\r\n region.u2 = (region.x + region.height) / page.width;\r\n region.v2 = (region.y + region.width) / page.height;\r\n } else {\r\n region.u2 = (region.x + region.width) / page.width;\r\n region.v2 = (region.y + region.height) / page.height;\r\n }\r\n this.regions.push(region);\r\n }\r\n }\r\n }\r\n findRegion(name) {\r\n for (let i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n }\r\n setTextures(assetManager, pathPrefix = \"\") {\r\n for (let page of this.pages)\r\n page.setTexture(assetManager.get(pathPrefix + page.name));\r\n }\r\n dispose() {\r\n var _a;\r\n for (let i = 0; i < this.pages.length; i++) {\r\n (_a = this.pages[i].texture) == null ? void 0 : _a.dispose();\r\n }\r\n }\r\n };\r\n var TextureAtlasReader = class {\r\n constructor(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n readLine() {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n }\r\n readEntry(entry, line) {\r\n if (!line)\r\n return 0;\r\n line = line.trim();\r\n if (line.length == 0)\r\n return 0;\r\n let colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n return 0;\r\n entry[0] = line.substr(0, colon).trim();\r\n for (let i = 1, lastMatch = colon + 1; ; i++) {\r\n let comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1) {\r\n entry[i] = line.substr(lastMatch).trim();\r\n return i;\r\n }\r\n entry[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n if (i == 4)\r\n return 4;\r\n }\r\n }\r\n };\r\n var TextureAtlasPage = class {\r\n constructor(name) {\r\n this.minFilter = 9728 /* Nearest */;\r\n this.magFilter = 9728 /* Nearest */;\r\n this.uWrap = 33071 /* ClampToEdge */;\r\n this.vWrap = 33071 /* ClampToEdge */;\r\n this.texture = null;\r\n this.width = 0;\r\n this.height = 0;\r\n this.pma = false;\r\n this.name = name;\r\n }\r\n setTexture(texture) {\r\n this.texture = texture;\r\n texture.setFilters(this.minFilter, this.magFilter);\r\n texture.setWraps(this.uWrap, this.vWrap);\r\n }\r\n };\r\n var TextureAtlasRegion = class extends TextureRegion {\r\n constructor(page, name) {\r\n super();\r\n this.x = 0;\r\n this.y = 0;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n this.index = 0;\r\n this.degrees = 0;\r\n this.names = null;\r\n this.values = null;\r\n this.page = page;\r\n this.name = name;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/MeshAttachment.ts\r\n var MeshAttachment = class extends VertexAttachment {\r\n constructor(name, path) {\r\n super(name);\r\n this.region = null;\r\n this.regionUVs = [];\r\n this.uvs = [];\r\n this.triangles = [];\r\n this.color = new Color(1, 1, 1, 1);\r\n this.width = 0;\r\n this.height = 0;\r\n this.hullLength = 0;\r\n this.edges = [];\r\n this.parentMesh = null;\r\n this.sequence = null;\r\n this.tempColor = new Color(0, 0, 0, 0);\r\n this.path = path;\r\n }\r\n updateRegion() {\r\n if (!this.region)\r\n throw new Error(\"Region not set.\");\r\n let regionUVs = this.regionUVs;\r\n if (!this.uvs || this.uvs.length != regionUVs.length)\r\n this.uvs = Utils.newFloatArray(regionUVs.length);\r\n let uvs = this.uvs;\r\n let n = this.uvs.length;\r\n let u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof TextureAtlasRegion) {\r\n let region = this.region, image = region.page.texture.getImage();\r\n let textureWidth = image.width, textureHeight = image.height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n } else if (!this.region) {\r\n u = v = 0;\r\n width = height = 1;\r\n } else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (let i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n }\r\n getParentMesh() {\r\n return this.parentMesh;\r\n }\r\n setParentMesh(parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n }\r\n copy() {\r\n if (this.parentMesh)\r\n return this.newLinkedMesh();\r\n let copy = new MeshAttachment(this.name, this.path);\r\n copy.region = this.region;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\r\n if (this.edges) {\r\n copy.edges = new Array(this.edges.length);\r\n Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n }\r\n computeWorldVertices(slot, start, count, worldVertices, offset, stride) {\r\n if (this.sequence != null)\r\n this.sequence.apply(slot, this);\r\n super.computeWorldVertices(slot, start, count, worldVertices, offset, stride);\r\n }\r\n newLinkedMesh() {\r\n let copy = new MeshAttachment(this.name, this.path);\r\n copy.region = this.region;\r\n copy.color.setFromColor(this.color);\r\n copy.timelineAttachment = this.timelineAttachment;\r\n copy.setParentMesh(this.parentMesh ? this.parentMesh : this);\r\n if (copy.region != null)\r\n copy.updateRegion();\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/PathAttachment.ts\r\n var PathAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.lengths = [];\r\n this.closed = false;\r\n this.constantSpeed = false;\r\n this.color = new Color(1, 1, 1, 1);\r\n }\r\n copy() {\r\n let copy = new PathAttachment(this.name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/PointAttachment.ts\r\n var PointAttachment = class extends VertexAttachment {\r\n constructor(name) {\r\n super(name);\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.color = new Color(0.38, 0.94, 0, 1);\r\n }\r\n computeWorldPosition(bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n }\r\n computeWorldRotation(bone) {\r\n let cos = MathUtils.cosDeg(this.rotation), sin = MathUtils.sinDeg(this.rotation);\r\n let x = cos * bone.a + sin * bone.b;\r\n let y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * MathUtils.radDeg;\r\n }\r\n copy() {\r\n let copy = new PointAttachment(this.name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n }\r\n };\r\n\r\n // spine-core/src/attachments/RegionAttachment.ts\r\n var _RegionAttachment = class extends Attachment {\r\n constructor(name, path) {\r\n super(name);\r\n this.x = 0;\r\n this.y = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.rotation = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.color = new Color(1, 1, 1, 1);\r\n this.rendererObject = null;\r\n this.region = null;\r\n this.sequence = null;\r\n this.offset = Utils.newFloatArray(8);\r\n this.uvs = Utils.newFloatArray(8);\r\n this.tempColor = new Color(1, 1, 1, 1);\r\n this.path = path;\r\n }\r\n updateRegion() {\r\n if (!this.region)\r\n throw new Error(\"Region not set.\");\r\n let region = this.region;\r\n let uvs = this.uvs;\r\n if (region == null) {\r\n uvs[0] = 0;\r\n uvs[1] = 0;\r\n uvs[2] = 0;\r\n uvs[3] = 1;\r\n uvs[4] = 1;\r\n uvs[5] = 1;\r\n uvs[6] = 1;\r\n uvs[7] = 0;\r\n return;\r\n }\r\n let regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n let regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n let localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n let localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n let localX2 = localX + this.region.width * regionScaleX;\r\n let localY2 = localY + this.region.height * regionScaleY;\r\n let radians = this.rotation * Math.PI / 180;\r\n let cos = Math.cos(radians);\r\n let sin = Math.sin(radians);\r\n let x = this.x, y = this.y;\r\n let localXCos = localX * cos + x;\r\n let localXSin = localX * sin;\r\n let localYCos = localY * cos + y;\r\n let localYSin = localY * sin;\r\n let localX2Cos = localX2 * cos + x;\r\n let localX2Sin = localX2 * sin;\r\n let localY2Cos = localY2 * cos + y;\r\n let localY2Sin = localY2 * sin;\r\n let offset = this.offset;\r\n offset[0] = localXCos - localYSin;\r\n offset[1] = localYCos + localXSin;\r\n offset[2] = localXCos - localY2Sin;\r\n offset[3] = localY2Cos + localXSin;\r\n offset[4] = localX2Cos - localY2Sin;\r\n offset[5] = localY2Cos + localX2Sin;\r\n offset[6] = localX2Cos - localYSin;\r\n offset[7] = localYCos + localX2Sin;\r\n if (region.degrees == 90) {\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n } else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n }\r\n computeWorldVertices(slot, worldVertices, offset, stride) {\r\n if (this.sequence != null)\r\n this.sequence.apply(slot, this);\r\n let bone = slot.bone;\r\n let vertexOffset = this.offset;\r\n let x = bone.worldX, y = bone.worldY;\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n let offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[0];\r\n offsetY = vertexOffset[1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[2];\r\n offsetY = vertexOffset[3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[4];\r\n offsetY = vertexOffset[5];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[6];\r\n offsetY = vertexOffset[7];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n }\r\n copy() {\r\n let copy = new _RegionAttachment(this.name, this.path);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n copy.sequence = this.sequence != null ? this.sequence.copy() : null;\r\n return copy;\r\n }\r\n };\r\n var RegionAttachment = _RegionAttachment;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n\r\n // spine-core/src/AtlasAttachmentLoader.ts\r\n var AtlasAttachmentLoader = class {\r\n constructor(atlas) {\r\n this.atlas = atlas;\r\n }\r\n loadSequence(name, basePath, sequence) {\r\n let regions = sequence.regions;\r\n for (let i = 0, n = regions.length; i < n; i++) {\r\n let path = sequence.getPath(basePath, i);\r\n let region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (sequence: \" + name + \")\");\r\n regions[i] = region;\r\n regions[i].renderObject = regions[i];\r\n }\r\n }\r\n newRegionAttachment(skin, name, path, sequence) {\r\n let attachment = new RegionAttachment(name, path);\r\n if (sequence != null) {\r\n this.loadSequence(name, path, sequence);\r\n } else {\r\n let region = this.atlas.findRegion(path);\r\n if (!region)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n attachment.region = region;\r\n }\r\n return attachment;\r\n }\r\n newMeshAttachment(skin, name, path, sequence) {\r\n let attachment = new MeshAttachment(name, path);\r\n if (sequence != null) {\r\n this.loadSequence(name, path, sequence);\r\n } else {\r\n let region = this.atlas.findRegion(path);\r\n if (!region)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n attachment.region = region;\r\n }\r\n return attachment;\r\n }\r\n newBoundingBoxAttachment(skin, name) {\r\n return new BoundingBoxAttachment(name);\r\n }\r\n newPathAttachment(skin, name) {\r\n return new PathAttachment(name);\r\n }\r\n newPointAttachment(skin, name) {\r\n return new PointAttachment(name);\r\n }\r\n newClippingAttachment(skin, name) {\r\n return new ClippingAttachment(name);\r\n }\r\n };\r\n\r\n // spine-core/src/BoneData.ts\r\n var BoneData = class {\r\n constructor(index, name, parent) {\r\n this.index = 0;\r\n this.parent = null;\r\n this.length = 0;\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n };\r\n var TransformMode = /* @__PURE__ */ ((TransformMode2) => {\r\n TransformMode2[TransformMode2[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode2[TransformMode2[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode2[TransformMode2[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode2[TransformMode2[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode2[TransformMode2[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n return TransformMode2;\r\n })(TransformMode || {});\r\n\r\n // spine-core/src/Bone.ts\r\n var Bone = class {\r\n constructor(data, skeleton, parent) {\r\n this.parent = null;\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n this.updateWorldTransformWith(this.ax, this.ay, this.arotation, this.ascaleX, this.ascaleY, this.ashearX, this.ashearY);\r\n }\r\n updateWorldTransform() {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n }\r\n updateWorldTransformWith(x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n let parent = this.parent;\r\n if (!parent) {\r\n let skeleton = this.skeleton;\r\n let rotationY = rotation + 90 + shearY;\r\n let sx = skeleton.scaleX;\r\n let sy = skeleton.scaleY;\r\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case 0 /* Normal */: {\r\n let rotationY = rotation + 90 + shearY;\r\n let la = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n let lb = MathUtils.cosDeg(rotationY) * scaleY;\r\n let lc = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n let ld = MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case 1 /* OnlyTranslation */: {\r\n let rotationY = rotation + 90 + shearY;\r\n this.a = MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case 2 /* NoRotationOrReflection */: {\r\n let s = pa * pa + pc * pc;\r\n let prx = 0;\r\n if (s > 1e-4) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * MathUtils.radDeg;\r\n } else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * MathUtils.radDeg;\r\n }\r\n let rx = rotation + shearX - prx;\r\n let ry = rotation + shearY - prx + 90;\r\n let la = MathUtils.cosDeg(rx) * scaleX;\r\n let lb = MathUtils.cosDeg(ry) * scaleY;\r\n let lc = MathUtils.sinDeg(rx) * scaleX;\r\n let ld = MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case 3 /* NoScale */:\r\n case 4 /* NoScaleOrReflection */: {\r\n let cos = MathUtils.cosDeg(rotation);\r\n let sin = MathUtils.sinDeg(rotation);\r\n let za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n let zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n let s = Math.sqrt(za * za + zc * zc);\r\n if (s > 1e-5)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == 3 /* NoScale */ && pa * pd - pb * pc < 0 != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n let r = Math.PI / 2 + Math.atan2(zc, za);\r\n let zb = Math.cos(r) * s;\r\n let zd = Math.sin(r) * s;\r\n let la = MathUtils.cosDeg(shearX) * scaleX;\r\n let lb = MathUtils.cosDeg(90 + shearY) * scaleY;\r\n let lc = MathUtils.sinDeg(shearX) * scaleX;\r\n let ld = MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n }\r\n setToSetupPose() {\r\n let data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n }\r\n getWorldRotationX() {\r\n return Math.atan2(this.c, this.a) * MathUtils.radDeg;\r\n }\r\n getWorldRotationY() {\r\n return Math.atan2(this.d, this.b) * MathUtils.radDeg;\r\n }\r\n getWorldScaleX() {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n }\r\n getWorldScaleY() {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n }\r\n updateAppliedTransform() {\r\n let parent = this.parent;\r\n if (!parent) {\r\n this.ax = this.worldX - this.skeleton.x;\r\n this.ay = this.worldY - this.skeleton.y;\r\n this.arotation = Math.atan2(this.c, this.a) * MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * MathUtils.radDeg;\r\n return;\r\n }\r\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n let pid = 1 / (pa * pd - pb * pc);\r\n let dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = dx * pd * pid - dy * pb * pid;\r\n this.ay = dy * pa * pid - dx * pc * pid;\r\n let ia = pid * pd;\r\n let id = pid * pa;\r\n let ib = pid * pb;\r\n let ic = pid * pc;\r\n let ra = ia * this.a - ib * this.c;\r\n let rb = ia * this.b - ib * this.d;\r\n let rc = id * this.c - ic * this.a;\r\n let rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 1e-4) {\r\n let det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * MathUtils.radDeg;\r\n } else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * MathUtils.radDeg;\r\n }\r\n }\r\n worldToLocal(world) {\r\n let invDet = 1 / (this.a * this.d - this.b * this.c);\r\n let x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = x * this.d * invDet - y * this.b * invDet;\r\n world.y = y * this.a * invDet - x * this.c * invDet;\r\n return world;\r\n }\r\n localToWorld(local) {\r\n let x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n }\r\n worldToLocalRotation(worldRotation) {\r\n let sin = MathUtils.sinDeg(worldRotation), cos = MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * MathUtils.radDeg + this.rotation - this.shearX;\r\n }\r\n localToWorldRotation(localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n let sin = MathUtils.sinDeg(localRotation), cos = MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * MathUtils.radDeg;\r\n }\r\n rotateWorld(degrees) {\r\n let a = this.a, b = this.b, c = this.c, d = this.d;\r\n let cos = MathUtils.cosDeg(degrees), sin = MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n }\r\n };\r\n\r\n // spine-core/src/ConstraintData.ts\r\n var ConstraintData = class {\r\n constructor(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n };\r\n\r\n // spine-core/src/AssetManagerBase.ts\r\n var AssetManagerBase = class {\r\n constructor(textureLoader, pathPrefix = \"\", downloader = new Downloader()) {\r\n this.pathPrefix = \"\";\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n this.downloader = downloader;\r\n }\r\n start(path) {\r\n this.toLoad++;\r\n return this.pathPrefix + path;\r\n }\r\n success(callback, path, asset) {\r\n this.toLoad--;\r\n this.loaded++;\r\n this.assets[path] = asset;\r\n if (callback)\r\n callback(path, asset);\r\n }\r\n error(callback, path, message) {\r\n this.toLoad--;\r\n this.loaded++;\r\n this.errors[path] = message;\r\n if (callback)\r\n callback(path, message);\r\n }\r\n loadAll() {\r\n let promise = new Promise((resolve, reject) => {\r\n let check = () => {\r\n if (this.isLoadingComplete()) {\r\n if (this.hasErrors())\r\n reject(this.errors);\r\n else\r\n resolve(this);\r\n return;\r\n }\r\n requestAnimationFrame(check);\r\n };\r\n requestAnimationFrame(check);\r\n });\r\n return promise;\r\n }\r\n setRawDataURI(path, data) {\r\n this.downloader.rawDataUris[this.pathPrefix + path] = data;\r\n }\r\n loadBinary(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n this.downloader.downloadBinary(path, (data) => {\r\n this.success(success, path, data);\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load binary ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n loadText(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n this.downloader.downloadText(path, (data) => {\r\n this.success(success, path, data);\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load text ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n loadJson(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n this.downloader.downloadJson(path, (data) => {\r\n this.success(success, path, data);\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load JSON ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n loadTexture(path, success = () => {\r\n }, error = () => {\r\n }) {\r\n path = this.start(path);\r\n let isBrowser = !!(typeof window !== \"undefined\" && typeof navigator !== \"undefined\" && window.document);\r\n let isWebWorker = !isBrowser;\r\n if (isWebWorker) {\r\n fetch(path, { mode: \"cors\" }).then((response) => {\r\n if (response.ok)\r\n return response.blob();\r\n this.error(error, path, `Couldn't load image: ${path}`);\r\n return null;\r\n }).then((blob) => {\r\n return blob ? createImageBitmap(blob, { premultiplyAlpha: \"none\", colorSpaceConversion: \"none\" }) : null;\r\n }).then((bitmap) => {\r\n if (bitmap)\r\n this.success(success, path, this.textureLoader(bitmap));\r\n });\r\n } else {\r\n let image = new Image();\r\n image.crossOrigin = \"anonymous\";\r\n image.onload = () => {\r\n this.success(success, path, this.textureLoader(image));\r\n };\r\n image.onerror = () => {\r\n this.error(error, path, `Couldn't load image: ${path}`);\r\n };\r\n if (this.downloader.rawDataUris[path])\r\n path = this.downloader.rawDataUris[path];\r\n image.src = path;\r\n }\r\n }\r\n loadTextureAtlas(path, success = () => {\r\n }, error = () => {\r\n }, fileAlias) {\r\n let index = path.lastIndexOf(\"/\");\r\n let parent = index >= 0 ? path.substring(0, index + 1) : \"\";\r\n path = this.start(path);\r\n this.downloader.downloadText(path, (atlasText) => {\r\n try {\r\n let atlas = new TextureAtlas(atlasText);\r\n let toLoad = atlas.pages.length, abort = false;\r\n for (let page of atlas.pages) {\r\n this.loadTexture(\r\n !fileAlias ? parent + page.name : fileAlias[page.name],\r\n (imagePath, texture) => {\r\n if (!abort) {\r\n page.setTexture(texture);\r\n if (--toLoad == 0)\r\n this.success(success, path, atlas);\r\n }\r\n },\r\n (imagePath, message) => {\r\n if (!abort)\r\n this.error(error, path, `Couldn't load texture atlas ${path} page image: ${imagePath}`);\r\n abort = true;\r\n }\r\n );\r\n }\r\n } catch (e) {\r\n this.error(error, path, `Couldn't parse texture atlas ${path}: ${e.message}`);\r\n }\r\n }, (status, responseText) => {\r\n this.error(error, path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);\r\n });\r\n }\r\n get(path) {\r\n return this.assets[this.pathPrefix + path];\r\n }\r\n require(path) {\r\n path = this.pathPrefix + path;\r\n let asset = this.assets[path];\r\n if (asset)\r\n return asset;\r\n let error = this.errors[path];\r\n throw Error(\"Asset not found: \" + path + (error ? \"\\n\" + error : \"\"));\r\n }\r\n remove(path) {\r\n path = this.pathPrefix + path;\r\n let asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n delete this.assets[path];\r\n return asset;\r\n }\r\n removeAll() {\r\n for (let key in this.assets) {\r\n let asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n }\r\n isLoadingComplete() {\r\n return this.toLoad == 0;\r\n }\r\n getToLoad() {\r\n return this.toLoad;\r\n }\r\n getLoaded() {\r\n return this.loaded;\r\n }\r\n dispose() {\r\n this.removeAll();\r\n }\r\n hasErrors() {\r\n return Object.keys(this.errors).length > 0;\r\n }\r\n getErrors() {\r\n return this.errors;\r\n }\r\n };\r\n var Downloader = class {\r\n constructor() {\r\n this.callbacks = {};\r\n this.rawDataUris = {};\r\n }\r\n dataUriToString(dataUri) {\r\n if (!dataUri.startsWith(\"data:\")) {\r\n throw new Error(\"Not a data URI.\");\r\n }\r\n let base64Idx = dataUri.indexOf(\"base64,\");\r\n if (base64Idx != -1) {\r\n base64Idx += \"base64,\".length;\r\n return atob(dataUri.substr(base64Idx));\r\n } else {\r\n return dataUri.substr(dataUri.indexOf(\",\") + 1);\r\n }\r\n }\r\n base64ToUint8Array(base64) {\r\n var binary_string = window.atob(base64);\r\n var len = binary_string.length;\r\n var bytes = new Uint8Array(len);\r\n for (var i = 0; i < len; i++) {\r\n bytes[i] = binary_string.charCodeAt(i);\r\n }\r\n return bytes;\r\n }\r\n dataUriToUint8Array(dataUri) {\r\n if (!dataUri.startsWith(\"data:\")) {\r\n throw new Error(\"Not a data URI.\");\r\n }\r\n let base64Idx = dataUri.indexOf(\"base64,\");\r\n if (base64Idx == -1)\r\n throw new Error(\"Not a binary data URI.\");\r\n base64Idx += \"base64,\".length;\r\n return this.base64ToUint8Array(dataUri.substr(base64Idx));\r\n }\r\n downloadText(url, success, error) {\r\n if (this.start(url, success, error))\r\n return;\r\n if (this.rawDataUris[url]) {\r\n try {\r\n let dataUri = this.rawDataUris[url];\r\n this.finish(url, 200, this.dataUriToString(dataUri));\r\n } catch (e) {\r\n this.finish(url, 400, JSON.stringify(e));\r\n }\r\n return;\r\n }\r\n let request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.open(\"GET\", url, true);\r\n let done = () => {\r\n this.finish(url, request.status, request.responseText);\r\n };\r\n request.onload = done;\r\n request.onerror = done;\r\n request.send();\r\n }\r\n downloadJson(url, success, error) {\r\n this.downloadText(url, (data) => {\r\n success(JSON.parse(data));\r\n }, error);\r\n }\r\n downloadBinary(url, success, error) {\r\n if (this.start(url, success, error))\r\n return;\r\n if (this.rawDataUris[url]) {\r\n try {\r\n let dataUri = this.rawDataUris[url];\r\n this.finish(url, 200, this.dataUriToUint8Array(dataUri));\r\n } catch (e) {\r\n this.finish(url, 400, JSON.stringify(e));\r\n }\r\n return;\r\n }\r\n let request = new XMLHttpRequest();\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n let onerror = () => {\r\n this.finish(url, request.status, request.response);\r\n };\r\n request.onload = () => {\r\n if (request.status == 200 || request.status == 0)\r\n this.finish(url, 200, new Uint8Array(request.response));\r\n else\r\n onerror();\r\n };\r\n request.onerror = onerror;\r\n request.send();\r\n }\r\n start(url, success, error) {\r\n let callbacks = this.callbacks[url];\r\n try {\r\n if (callbacks)\r\n return true;\r\n this.callbacks[url] = callbacks = [];\r\n } finally {\r\n callbacks.push(success, error);\r\n }\r\n }\r\n finish(url, status, data) {\r\n let callbacks = this.callbacks[url];\r\n delete this.callbacks[url];\r\n let args = status == 200 || status == 0 ? [data] : [status, data];\r\n for (let i = args.length - 1, n = callbacks.length; i < n; i += 2)\r\n callbacks[i].apply(null, args);\r\n }\r\n };\r\n\r\n // spine-core/src/Event.ts\r\n var Event = class {\r\n constructor(time, data) {\r\n this.intValue = 0;\r\n this.floatValue = 0;\r\n this.stringValue = null;\r\n this.time = 0;\r\n this.volume = 0;\r\n this.balance = 0;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n };\r\n\r\n // spine-core/src/EventData.ts\r\n var EventData = class {\r\n constructor(name) {\r\n this.intValue = 0;\r\n this.floatValue = 0;\r\n this.stringValue = null;\r\n this.audioPath = null;\r\n this.volume = 0;\r\n this.balance = 0;\r\n this.name = name;\r\n }\r\n };\r\n\r\n // spine-core/src/IkConstraint.ts\r\n var IkConstraint = class {\r\n constructor(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let bone = skeleton.findBone(data.bones[i].name);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${data.bones[i].name}`);\r\n this.bones.push(bone);\r\n }\r\n let target = skeleton.findBone(data.target.name);\r\n if (!target)\r\n throw new Error(`Couldn't find bone ${data.target.name}`);\r\n this.target = target;\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n if (this.mix == 0)\r\n return;\r\n let target = this.target;\r\n let bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.data.uniform, this.softness, this.mix);\r\n break;\r\n }\r\n }\r\n apply1(bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n let p = bone.parent;\r\n if (!p)\r\n throw new Error(\"IK bone must have parent.\");\r\n let pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n let rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case 1 /* OnlyTranslation */:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case 2 /* NoRotationOrReflection */:\r\n let s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n let sa = pa / bone.skeleton.scaleX;\r\n let sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * MathUtils.radDeg;\r\n default:\r\n let x = targetX - p.worldX, y = targetY - p.worldY;\r\n let d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n let sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case 3 /* NoScale */:\r\n case 4 /* NoScaleOrReflection */:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n let b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if (compress && dd < b || stretch && dd > b && b > 1e-4) {\r\n let s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(\r\n bone.ax,\r\n bone.ay,\r\n bone.arotation + rotationIK * alpha,\r\n sx,\r\n sy,\r\n bone.ashearX,\r\n bone.ashearY\r\n );\r\n }\r\n apply2(parent, child, targetX, targetY, bendDir, stretch, uniform, softness, alpha) {\r\n let px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;\r\n let os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n } else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n } else\r\n os2 = 0;\r\n let cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n let u = Math.abs(psx - psy) <= 1e-4;\r\n if (!u || stretch) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n } else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n let pp = parent.parent;\r\n if (!pp)\r\n throw new Error(\"IK parent must itself have a parent.\");\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n let id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n let dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n let l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 1e-4) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n let tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n let dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) * 0.5;\r\n let td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n let p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer:\r\n if (u) {\r\n l2 *= psx;\r\n let cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1) {\r\n cos = -1;\r\n a2 = Math.PI * bendDir;\r\n } else if (cos > 1) {\r\n cos = 1;\r\n a2 = 0;\r\n if (stretch) {\r\n a = (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n sx *= a;\r\n if (uniform)\r\n sy *= a;\r\n }\r\n } else\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n } else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n let aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n let c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n let q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) * 0.5;\r\n let r0 = q / c2, r1 = c / q;\r\n let r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n let minAngle = MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n let maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) * 0.5) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n } else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n let os = Math.atan2(cy, cx) * s2;\r\n let rotation = parent.arotation;\r\n a1 = (a1 - os) * MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, sy, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n }\r\n };\r\n\r\n // spine-core/src/IkConstraintData.ts\r\n var IkConstraintData = class extends ConstraintData {\r\n constructor(name) {\r\n super(name, 0, false);\r\n this.bones = new Array();\r\n this._target = null;\r\n this.bendDirection = 1;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.uniform = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n }\r\n set target(boneData) {\r\n this._target = boneData;\r\n }\r\n get target() {\r\n if (!this._target)\r\n throw new Error(\"BoneData not set.\");\r\n else\r\n return this._target;\r\n }\r\n };\r\n\r\n // spine-core/src/PathConstraintData.ts\r\n var PathConstraintData = class extends ConstraintData {\r\n constructor(name) {\r\n super(name, 0, false);\r\n this.bones = new Array();\r\n this._target = null;\r\n this.positionMode = PositionMode.Fixed;\r\n this.spacingMode = SpacingMode.Fixed;\r\n this.rotateMode = RotateMode.Chain;\r\n this.offsetRotation = 0;\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n }\r\n set target(slotData) {\r\n this._target = slotData;\r\n }\r\n get target() {\r\n if (!this._target)\r\n throw new Error(\"SlotData not set.\");\r\n else\r\n return this._target;\r\n }\r\n };\r\n var PositionMode = /* @__PURE__ */ ((PositionMode2) => {\r\n PositionMode2[PositionMode2[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode2[PositionMode2[\"Percent\"] = 1] = \"Percent\";\r\n return PositionMode2;\r\n })(PositionMode || {});\r\n var SpacingMode = /* @__PURE__ */ ((SpacingMode2) => {\r\n SpacingMode2[SpacingMode2[\"Length\"] = 0] = \"Length\";\r\n SpacingMode2[SpacingMode2[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode2[SpacingMode2[\"Percent\"] = 2] = \"Percent\";\r\n SpacingMode2[SpacingMode2[\"Proportional\"] = 3] = \"Proportional\";\r\n return SpacingMode2;\r\n })(SpacingMode || {});\r\n var RotateMode = /* @__PURE__ */ ((RotateMode2) => {\r\n RotateMode2[RotateMode2[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode2[RotateMode2[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode2[RotateMode2[\"ChainScale\"] = 2] = \"ChainScale\";\r\n return RotateMode2;\r\n })(RotateMode || {});\r\n\r\n // spine-core/src/PathConstraint.ts\r\n var _PathConstraint = class {\r\n constructor(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (let i = 0, n = data.bones.length; i < n; i++) {\r\n let bone = skeleton.findBone(data.bones[i].name);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\r\n this.bones.push(bone);\r\n }\r\n let target = skeleton.findSlot(data.target.name);\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${data.target.name}`);\r\n this.target = target;\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.mixRotate = data.mixRotate;\r\n this.mixX = data.mixX;\r\n this.mixY = data.mixY;\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n let attachment = this.target.getAttachment();\r\n if (!(attachment instanceof PathAttachment))\r\n return;\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;\r\n if (mixRotate == 0 && mixX == 0 && mixY == 0)\r\n return;\r\n let data = this.data;\r\n let tangents = data.rotateMode == 0 /* Tangent */, scale = data.rotateMode == 2 /* ChainScale */;\r\n let bones = this.bones;\r\n let boneCount = bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n let spaces = Utils.setArraySize(this.spaces, spacesCount), lengths = scale ? this.lengths = Utils.setArraySize(this.lengths, boneCount) : [];\r\n let spacing = this.spacing;\r\n switch (data.spacingMode) {\r\n case 2 /* Percent */:\r\n if (scale) {\r\n for (let i = 0, n = spacesCount - 1; i < n; i++) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < _PathConstraint.epsilon)\r\n lengths[i] = 0;\r\n else {\r\n let x = setupLength * bone.a, y = setupLength * bone.c;\r\n lengths[i] = Math.sqrt(x * x + y * y);\r\n }\r\n }\r\n }\r\n Utils.arrayFill(spaces, 1, spacesCount, spacing);\r\n break;\r\n case 3 /* Proportional */:\r\n let sum = 0;\r\n for (let i = 0, n = spacesCount - 1; i < n; ) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < _PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = spacing;\r\n } else {\r\n let x = setupLength * bone.a, y = setupLength * bone.c;\r\n let length = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length;\r\n spaces[++i] = length;\r\n sum += length;\r\n }\r\n }\r\n if (sum > 0) {\r\n sum = spacesCount / sum * spacing;\r\n for (let i = 1; i < spacesCount; i++)\r\n spaces[i] *= sum;\r\n }\r\n break;\r\n default:\r\n let lengthSpacing = data.spacingMode == 0 /* Length */;\r\n for (let i = 0, n = spacesCount - 1; i < n; ) {\r\n let bone = bones[i];\r\n let setupLength = bone.data.length;\r\n if (setupLength < _PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = spacing;\r\n } else {\r\n let x = setupLength * bone.a, y = setupLength * bone.c;\r\n let length = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length / setupLength;\r\n }\r\n }\r\n }\r\n let positions = this.computeWorldPositions(attachment, spacesCount, tangents);\r\n let boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n let tip = false;\r\n if (offsetRotation == 0)\r\n tip = data.rotateMode == 1 /* Chain */;\r\n else {\r\n tip = false;\r\n let p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n }\r\n for (let i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n let bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * mixX;\r\n bone.worldY += (boneY - bone.worldY) * mixY;\r\n let x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n let length = lengths[i];\r\n if (length != 0) {\r\n let s = (Math.sqrt(dx * dx + dy * dy) / length - 1) * mixRotate + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (mixRotate > 0) {\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n let length = bone.data.length;\r\n boneX += (length * (cos * a - sin * c) - dx) * mixRotate;\r\n boneY += (length * (sin * a + cos * c) - dy) * mixRotate;\r\n } else {\r\n r += offsetRotation;\r\n }\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= mixRotate;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.updateAppliedTransform();\r\n }\r\n }\r\n computeWorldPositions(path, spacesCount, tangents) {\r\n let target = this.target;\r\n let position = this.position;\r\n let spaces = this.spaces, out = Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = this.world;\r\n let closed2 = path.closed;\r\n let verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = _PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n let lengths = path.lengths;\r\n curveCount -= closed2 ? 1 : 2;\r\n let pathLength2 = lengths[curveCount];\r\n if (this.data.positionMode == 1 /* Percent */)\r\n position *= pathLength2;\r\n let multiplier2;\r\n switch (this.data.spacingMode) {\r\n case 2 /* Percent */:\r\n multiplier2 = pathLength2;\r\n break;\r\n case 3 /* Proportional */:\r\n multiplier2 = pathLength2 / spacesCount;\r\n break;\r\n default:\r\n multiplier2 = 1;\r\n }\r\n world = Utils.setArraySize(this.world, 8);\r\n for (let i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i] * multiplier2;\r\n position += space;\r\n let p = position;\r\n if (closed2) {\r\n p %= pathLength2;\r\n if (p < 0)\r\n p += pathLength2;\r\n curve = 0;\r\n } else if (p < 0) {\r\n if (prevCurve != _PathConstraint.BEFORE) {\r\n prevCurve = _PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength2) {\r\n if (prevCurve != _PathConstraint.AFTER) {\r\n prevCurve = _PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength2, world, 0, out, o);\r\n continue;\r\n }\r\n for (; ; curve++) {\r\n let length = lengths[curve];\r\n if (p > length)\r\n continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = lengths[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed2 && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n } else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(\r\n p,\r\n world[0],\r\n world[1],\r\n world[2],\r\n world[3],\r\n world[4],\r\n world[5],\r\n world[6],\r\n world[7],\r\n out,\r\n o,\r\n tangents || i > 0 && space == 0\r\n );\r\n }\r\n return out;\r\n }\r\n if (closed2) {\r\n verticesLength += 2;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n } else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n let curves = Utils.setArraySize(this.curves, curveCount);\r\n let pathLength = 0;\r\n let x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n let tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (let i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (this.data.positionMode == 1 /* Percent */)\r\n position *= pathLength;\r\n let multiplier;\r\n switch (this.data.spacingMode) {\r\n case 2 /* Percent */:\r\n multiplier = pathLength;\r\n break;\r\n case 3 /* Proportional */:\r\n multiplier = pathLength / spacesCount;\r\n break;\r\n default:\r\n multiplier = 1;\r\n }\r\n let segments = this.segments;\r\n let curveLength = 0;\r\n for (let i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n let space = spaces[i] * multiplier;\r\n position += space;\r\n let p = position;\r\n if (closed2) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n } else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n } else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (; ; curve++) {\r\n let length = curves[curve];\r\n if (p > length)\r\n continue;\r\n if (curve == 0)\r\n p /= length;\r\n else {\r\n let prev = curves[curve - 1];\r\n p = (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n let ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 6e-3;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 6e-3;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (; ; segment++) {\r\n let length = segments[segment];\r\n if (p > length)\r\n continue;\r\n if (segment == 0)\r\n p /= length;\r\n else {\r\n let prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || i > 0 && space == 0);\r\n }\r\n return out;\r\n }\r\n addBeforePosition(p, temp, i, out, o) {\r\n let x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n addAfterPosition(p, temp, i, out, o) {\r\n let x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n }\r\n addCurvePosition(p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n let tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n let ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n let x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 1e-3)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n }\r\n };\r\n var PathConstraint = _PathConstraint;\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 1e-5;\r\n\r\n // spine-core/src/Slot.ts\r\n var Slot = class {\r\n constructor(data, bone) {\r\n this.darkColor = null;\r\n this.attachment = null;\r\n this.attachmentState = 0;\r\n this.sequenceIndex = -1;\r\n this.deform = new Array();\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!bone)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new Color();\r\n this.darkColor = !data.darkColor ? null : new Color();\r\n this.setToSetupPose();\r\n }\r\n getSkeleton() {\r\n return this.bone.skeleton;\r\n }\r\n getAttachment() {\r\n return this.attachment;\r\n }\r\n setAttachment(attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n if (!(attachment instanceof VertexAttachment) || !(this.attachment instanceof VertexAttachment) || attachment.timelineAttachment != this.attachment.timelineAttachment) {\r\n this.deform.length = 0;\r\n }\r\n this.attachment = attachment;\r\n this.sequenceIndex = -1;\r\n }\r\n setToSetupPose() {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (!this.data.attachmentName)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/TransformConstraint.ts\r\n var TransformConstraint = class {\r\n constructor(data, skeleton) {\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n this.mixScaleX = 0;\r\n this.mixScaleY = 0;\r\n this.mixShearY = 0;\r\n this.temp = new Vector2();\r\n this.active = false;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mixRotate = data.mixRotate;\r\n this.mixX = data.mixX;\r\n this.mixY = data.mixY;\r\n this.mixScaleX = data.mixScaleX;\r\n this.mixScaleY = data.mixScaleY;\r\n this.mixShearY = data.mixShearY;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let bone = skeleton.findBone(data.bones[i].name);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${data.bones[i].name}.`);\r\n this.bones.push(bone);\r\n }\r\n let target = skeleton.findBone(data.target.name);\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${data.target.name}.`);\r\n this.target = target;\r\n }\r\n isActive() {\r\n return this.active;\r\n }\r\n update() {\r\n if (this.mixRotate == 0 && this.mixX == 0 && this.mixY == 0 && this.mixScaleX == 0 && this.mixScaleY == 0 && this.mixShearY == 0)\r\n return;\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n } else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n }\r\n applyAbsoluteWorld() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let translate = mixX != 0 || mixY != 0;\r\n let target = this.target;\r\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect;\r\n let offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (mixRotate != 0) {\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n let r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= mixRotate;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n if (translate) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * mixX;\r\n bone.worldY += (temp.y - bone.worldY) * mixY;\r\n }\r\n if (mixScaleX != 0) {\r\n let s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n if (s != 0)\r\n s = (s + (Math.sqrt(ta * ta + tc * tc) - s + this.data.offsetScaleX) * mixScaleX) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n if (mixScaleY != 0) {\r\n let s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n if (s != 0)\r\n s = (s + (Math.sqrt(tb * tb + td * td) - s + this.data.offsetScaleY) * mixScaleY) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n }\r\n if (mixShearY > 0) {\r\n let b = bone.b, d = bone.d;\r\n let by = Math.atan2(d, b);\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r = by + (r + offsetShearY) * mixShearY;\r\n let s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n }\r\n bone.updateAppliedTransform();\r\n }\r\n }\r\n applyRelativeWorld() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let translate = mixX != 0 || mixY != 0;\r\n let target = this.target;\r\n let ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n let degRadReflect = ta * td - tb * tc > 0 ? MathUtils.degRad : -MathUtils.degRad;\r\n let offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (mixRotate != 0) {\r\n let a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n let r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n r *= mixRotate;\r\n let cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n if (translate) {\r\n let temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * mixX;\r\n bone.worldY += temp.y * mixY;\r\n }\r\n if (mixScaleX != 0) {\r\n let s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n if (mixScaleY != 0) {\r\n let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n }\r\n if (mixShearY > 0) {\r\n let r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > MathUtils.PI)\r\n r -= MathUtils.PI2;\r\n else if (r < -MathUtils.PI)\r\n r += MathUtils.PI2;\r\n let b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - MathUtils.PI / 2 + offsetShearY) * mixShearY;\r\n let s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n }\r\n bone.updateAppliedTransform();\r\n }\r\n }\r\n applyAbsoluteLocal() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let target = this.target;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let rotation = bone.arotation;\r\n if (mixRotate != 0) {\r\n let r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\r\n rotation += r * mixRotate;\r\n }\r\n let x = bone.ax, y = bone.ay;\r\n x += (target.ax - x + this.data.offsetX) * mixX;\r\n y += (target.ay - y + this.data.offsetY) * mixY;\r\n let scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (mixScaleX != 0 && scaleX != 0)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * mixScaleX) / scaleX;\r\n if (mixScaleY != 0 && scaleY != 0)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * mixScaleY) / scaleY;\r\n let shearY = bone.ashearY;\r\n if (mixShearY != 0) {\r\n let r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - (16384.499999999996 - r / 360 | 0)) * 360;\r\n shearY += r * mixShearY;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n applyRelativeLocal() {\r\n let mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY, mixScaleX = this.mixScaleX, mixScaleY = this.mixScaleY, mixShearY = this.mixShearY;\r\n let target = this.target;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate;\r\n let x = bone.ax + (target.ax + this.data.offsetX) * mixX;\r\n let y = bone.ay + (target.ay + this.data.offsetY) * mixY;\r\n let scaleX = bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX + 1);\r\n let scaleY = bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY + 1);\r\n let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/Skeleton.ts\r\n var _Skeleton = class {\r\n constructor(data) {\r\n this._updateCache = new Array();\r\n this.skin = null;\r\n this.scaleX = 1;\r\n this._scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (!data)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (let i = 0; i < data.bones.length; i++) {\r\n let boneData = data.bones[i];\r\n let bone;\r\n if (!boneData.parent)\r\n bone = new Bone(boneData, this, null);\r\n else {\r\n let parent = this.bones[boneData.parent.index];\r\n bone = new Bone(boneData, this, parent);\r\n parent.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (let i = 0; i < data.slots.length; i++) {\r\n let slotData = data.slots[i];\r\n let bone = this.bones[slotData.boneData.index];\r\n let slot = new Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (let i = 0; i < data.ikConstraints.length; i++) {\r\n let ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (let i = 0; i < data.transformConstraints.length; i++) {\r\n let transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (let i = 0; i < data.pathConstraints.length; i++) {\r\n let pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n get scaleY() {\r\n return _Skeleton.yDown ? -this._scaleY : this._scaleY;\r\n }\r\n set scaleY(scaleY) {\r\n this._scaleY = scaleY;\r\n }\r\n updateCache() {\r\n let updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin) {\r\n let skinBones = this.skin.bones;\r\n for (let i = 0, n = this.skin.bones.length; i < n; i++) {\r\n let bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone);\r\n }\r\n }\r\n let ikConstraints = this.ikConstraints;\r\n let transformConstraints = this.transformConstraints;\r\n let pathConstraints = this.pathConstraints;\r\n let ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n let constraintCount = ikCount + transformCount + pathCount;\r\n outer:\r\n for (let i = 0; i < constraintCount; i++) {\r\n for (let ii = 0; ii < ikCount; ii++) {\r\n let constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < transformCount; ii++) {\r\n let constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (let ii = 0; ii < pathCount; ii++) {\r\n let constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n }\r\n sortIkConstraint(constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\r\n if (!constraint.active)\r\n return;\r\n let target = constraint.target;\r\n this.sortBone(target);\r\n let constrained = constraint.bones;\r\n let parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length == 1) {\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n } else {\r\n let child = constrained[constrained.length - 1];\r\n this.sortBone(child);\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n child.sorted = true;\r\n }\r\n }\r\n sortPathConstraint(constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\r\n if (!constraint.active)\r\n return;\r\n let slot = constraint.target;\r\n let slotIndex = slot.data.index;\r\n let slotBone = slot.bone;\r\n if (this.skin)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (let i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (let i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n }\r\n sortTransformConstraint(constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || this.skin && Utils.contains(this.skin.constraints, constraint.data, true));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n let constrained = constraint.bones;\r\n let boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (let i = 0; i < boneCount; i++) {\r\n let child = constrained[i];\r\n this.sortBone(child.parent);\r\n this.sortBone(child);\r\n }\r\n } else {\r\n for (let i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (let i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (let i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n }\r\n sortPathConstraintAttachment(skin, slotIndex, slotBone) {\r\n let attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (let key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n }\r\n sortPathConstraintAttachmentWith(attachment, slotBone) {\r\n if (!(attachment instanceof PathAttachment))\r\n return;\r\n let pathBones = attachment.bones;\r\n if (!pathBones)\r\n this.sortBone(slotBone);\r\n else {\r\n let bones = this.bones;\r\n for (let i = 0, n = pathBones.length; i < n; ) {\r\n let nn = pathBones[i++];\r\n nn += i;\r\n while (i < nn)\r\n this.sortBone(bones[pathBones[i++]]);\r\n }\r\n }\r\n }\r\n sortBone(bone) {\r\n if (!bone)\r\n return;\r\n if (bone.sorted)\r\n return;\r\n let parent = bone.parent;\r\n if (parent)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n }\r\n sortReset(bones) {\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n }\r\n updateWorldTransform() {\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n }\r\n let updateCache = this._updateCache;\r\n for (let i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n }\r\n updateWorldTransformWith(parent) {\r\n let rootBone = this.getRootBone();\r\n if (!rootBone)\r\n throw new Error(\"Root bone must not be null.\");\r\n let pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n rootBone.worldX = pa * this.x + pb * this.y + parent.worldX;\r\n rootBone.worldY = pc * this.x + pd * this.y + parent.worldY;\r\n let rotationY = rootBone.rotation + 90 + rootBone.shearY;\r\n let la = MathUtils.cosDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\r\n let lb = MathUtils.cosDeg(rotationY) * rootBone.scaleY;\r\n let lc = MathUtils.sinDeg(rootBone.rotation + rootBone.shearX) * rootBone.scaleX;\r\n let ld = MathUtils.sinDeg(rotationY) * rootBone.scaleY;\r\n rootBone.a = (pa * la + pb * lc) * this.scaleX;\r\n rootBone.b = (pa * lb + pb * ld) * this.scaleX;\r\n rootBone.c = (pc * la + pd * lc) * this.scaleY;\r\n rootBone.d = (pc * lb + pd * ld) * this.scaleY;\r\n let updateCache = this._updateCache;\r\n for (let i = 0, n = updateCache.length; i < n; i++) {\r\n let updatable = updateCache[i];\r\n if (updatable != rootBone)\r\n updatable.update();\r\n }\r\n }\r\n setToSetupPose() {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n }\r\n setBonesToSetupPose() {\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n let data = constraint.data;\r\n constraint.mixRotate = data.mixRotate;\r\n constraint.mixX = data.mixX;\r\n constraint.mixY = data.mixY;\r\n constraint.mixScaleX = data.mixScaleX;\r\n constraint.mixScaleY = data.mixScaleY;\r\n constraint.mixShearY = data.mixShearY;\r\n }\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n let data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.mixRotate = data.mixRotate;\r\n constraint.mixX = data.mixX;\r\n constraint.mixY = data.mixY;\r\n }\r\n }\r\n setSlotsToSetupPose() {\r\n let slots = this.slots;\r\n Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (let i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n }\r\n getRootBone() {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n }\r\n findBone(boneName) {\r\n if (!boneName)\r\n throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n }\r\n findSlot(slotName) {\r\n if (!slotName)\r\n throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n }\r\n setSkinByName(skinName) {\r\n let skin = this.data.findSkin(skinName);\r\n if (!skin)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n }\r\n setSkin(newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin) {\r\n if (this.skin)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n let name = slot.data.attachmentName;\r\n if (name) {\r\n let attachment = newSkin.getAttachment(i, name);\r\n if (attachment)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n }\r\n getAttachmentByName(slotName, attachmentName) {\r\n let slot = this.data.findSlot(slotName);\r\n if (!slot)\r\n throw new Error(`Can't find slot with name ${slotName}`);\r\n return this.getAttachment(slot.index, attachmentName);\r\n }\r\n getAttachment(slotIndex, attachmentName) {\r\n if (!attachmentName)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin) {\r\n let attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n }\r\n setAttachment(slotName, attachmentName) {\r\n if (!slotName)\r\n throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n let attachment = null;\r\n if (attachmentName) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (!attachment)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n }\r\n findIkConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n }\r\n findTransformConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n findPathConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n getBoundsRect() {\r\n let offset = new Vector2();\r\n let size = new Vector2();\r\n this.getBounds(offset, size);\r\n return { x: offset.x, y: offset.y, width: size.x, height: size.y };\r\n }\r\n getBounds(offset, size, temp = new Array(2)) {\r\n if (!offset)\r\n throw new Error(\"offset cannot be null.\");\r\n if (!size)\r\n throw new Error(\"size cannot be null.\");\r\n let drawOrder = this.drawOrder;\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let verticesLength = 0;\r\n let vertices = null;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot, vertices, 0, 2);\r\n } else if (attachment instanceof MeshAttachment) {\r\n let mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices) {\r\n for (let ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n let x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n }\r\n };\r\n var Skeleton = _Skeleton;\r\n Skeleton.yDown = false;\r\n\r\n // spine-core/src/SkeletonData.ts\r\n var SkeletonData = class {\r\n constructor() {\r\n this.name = null;\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.defaultSkin = null;\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.version = null;\r\n this.hash = null;\r\n this.fps = 0;\r\n this.imagesPath = null;\r\n this.audioPath = null;\r\n }\r\n findBone(boneName) {\r\n if (!boneName)\r\n throw new Error(\"boneName cannot be null.\");\r\n let bones = this.bones;\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n }\r\n findSlot(slotName) {\r\n if (!slotName)\r\n throw new Error(\"slotName cannot be null.\");\r\n let slots = this.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n }\r\n findSkin(skinName) {\r\n if (!skinName)\r\n throw new Error(\"skinName cannot be null.\");\r\n let skins = this.skins;\r\n for (let i = 0, n = skins.length; i < n; i++) {\r\n let skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n }\r\n findEvent(eventDataName) {\r\n if (!eventDataName)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n let events = this.events;\r\n for (let i = 0, n = events.length; i < n; i++) {\r\n let event = events[i];\r\n if (event.name == eventDataName)\r\n return event;\r\n }\r\n return null;\r\n }\r\n findAnimation(animationName) {\r\n if (!animationName)\r\n throw new Error(\"animationName cannot be null.\");\r\n let animations = this.animations;\r\n for (let i = 0, n = animations.length; i < n; i++) {\r\n let animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n }\r\n findIkConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let ikConstraints = this.ikConstraints;\r\n for (let i = 0, n = ikConstraints.length; i < n; i++) {\r\n let constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n findTransformConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let transformConstraints = this.transformConstraints;\r\n for (let i = 0, n = transformConstraints.length; i < n; i++) {\r\n let constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n findPathConstraint(constraintName) {\r\n if (!constraintName)\r\n throw new Error(\"constraintName cannot be null.\");\r\n let pathConstraints = this.pathConstraints;\r\n for (let i = 0, n = pathConstraints.length; i < n; i++) {\r\n let constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n }\r\n };\r\n\r\n // spine-core/src/Skin.ts\r\n var SkinEntry = class {\r\n constructor(slotIndex = 0, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n };\r\n var Skin = class {\r\n constructor(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n setAttachment(slotIndex, name, attachment) {\r\n if (!attachment)\r\n throw new Error(\"attachment cannot be null.\");\r\n let attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n }\r\n addSkin(skin) {\r\n for (let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.bones.length; ii++) {\r\n if (this.bones[ii] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.constraints.length; ii++) {\r\n if (this.constraints[ii] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n copySkin(skin) {\r\n for (let i = 0; i < skin.bones.length; i++) {\r\n let bone = skin.bones[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.bones.length; ii++) {\r\n if (this.bones[ii] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (let i = 0; i < skin.constraints.length; i++) {\r\n let constraint = skin.constraints[i];\r\n let contained = false;\r\n for (let ii = 0; ii < this.constraints.length; ii++) {\r\n if (this.constraints[ii] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n let attachments = skin.getAttachments();\r\n for (let i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (!attachment.attachment)\r\n continue;\r\n if (attachment.attachment instanceof MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n } else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n }\r\n getAttachment(slotIndex, name) {\r\n let dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n }\r\n removeAttachment(slotIndex, name) {\r\n let dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n delete dictionary[name];\r\n }\r\n getAttachments() {\r\n let entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n let slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n }\r\n getAttachmentsForSlot(slotIndex, attachments) {\r\n let slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (let name in slotAttachments) {\r\n let attachment = slotAttachments[name];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name, attachment));\r\n }\r\n }\r\n }\r\n clear() {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n }\r\n attachAll(skeleton, oldSkin) {\r\n let slotIndex = 0;\r\n for (let i = 0; i < skeleton.slots.length; i++) {\r\n let slot = skeleton.slots[i];\r\n let slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n let dictionary = oldSkin.attachments[slotIndex];\r\n for (let key in dictionary) {\r\n let skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n let attachment = this.getAttachment(slotIndex, key);\r\n if (attachment)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/SlotData.ts\r\n var SlotData = class {\r\n constructor(index, name, boneData) {\r\n this.index = 0;\r\n this.color = new Color(1, 1, 1, 1);\r\n this.darkColor = null;\r\n this.attachmentName = null;\r\n this.blendMode = BlendMode.Normal;\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (!name)\r\n throw new Error(\"name cannot be null.\");\r\n if (!boneData)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n };\r\n var BlendMode = /* @__PURE__ */ ((BlendMode3) => {\r\n BlendMode3[BlendMode3[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode3[BlendMode3[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode3[BlendMode3[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode3[BlendMode3[\"Screen\"] = 3] = \"Screen\";\r\n return BlendMode3;\r\n })(BlendMode || {});\r\n\r\n // spine-core/src/TransformConstraintData.ts\r\n var TransformConstraintData = class extends ConstraintData {\r\n constructor(name) {\r\n super(name, 0, false);\r\n this.bones = new Array();\r\n this._target = null;\r\n this.mixRotate = 0;\r\n this.mixX = 0;\r\n this.mixY = 0;\r\n this.mixScaleX = 0;\r\n this.mixScaleY = 0;\r\n this.mixShearY = 0;\r\n this.offsetRotation = 0;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.offsetScaleX = 0;\r\n this.offsetScaleY = 0;\r\n this.offsetShearY = 0;\r\n this.relative = false;\r\n this.local = false;\r\n }\r\n set target(boneData) {\r\n this._target = boneData;\r\n }\r\n get target() {\r\n if (!this._target)\r\n throw new Error(\"BoneData not set.\");\r\n else\r\n return this._target;\r\n }\r\n };\r\n\r\n // spine-core/src/SkeletonBinary.ts\r\n var SkeletonBinary = class {\r\n constructor(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n readSkeletonData(binary) {\r\n let scale = this.scale;\r\n let skeletonData = new SkeletonData();\r\n skeletonData.name = \"\";\r\n let input = new BinaryInput(binary);\r\n let lowHash = input.readInt32();\r\n let highHash = input.readInt32();\r\n skeletonData.hash = highHash == 0 && lowHash == 0 ? null : highHash.toString(16) + lowHash.toString(16);\r\n skeletonData.version = input.readString();\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n let nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n let n = 0;\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let str = input.readString();\r\n if (!str)\r\n throw new Error(\"String in string table must not be null.\");\r\n input.strings.push(str);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"Bone name must not be null.\");\r\n let parent = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n let data = new BoneData(i, name, parent);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let slotName = input.readString();\r\n if (!slotName)\r\n throw new Error(\"Slot name must not be null.\");\r\n let boneData = skeletonData.bones[input.readInt(true)];\r\n let data = new SlotData(i, slotName, boneData);\r\n Color.rgba8888ToColor(data.color, input.readInt32());\r\n let darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n Color.rgb888ToColor(data.darkColor = new Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = input.readInt(true);\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0, nn; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"IK constraint data name must not be null.\");\r\n let data = new IkConstraintData(name);\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (let ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0, nn; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"Transform constraint data name must not be null.\");\r\n let data = new TransformConstraintData(name);\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (let ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.mixRotate = input.readFloat();\r\n data.mixX = input.readFloat();\r\n data.mixY = input.readFloat();\r\n data.mixScaleX = input.readFloat();\r\n data.mixScaleY = input.readFloat();\r\n data.mixShearY = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0, nn; i < n; i++) {\r\n let name = input.readString();\r\n if (!name)\r\n throw new Error(\"Path constraint data name must not be null.\");\r\n let data = new PathConstraintData(name);\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (let ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = input.readInt(true);\r\n data.spacingMode = input.readInt(true);\r\n data.rotateMode = input.readInt(true);\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == 0 /* Fixed */)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\r\n data.spacing *= scale;\r\n data.mixRotate = input.readFloat();\r\n data.mixX = input.readFloat();\r\n data.mixY = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n let defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n let i = skeletonData.skins.length;\r\n Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++) {\r\n let skin = this.readSkin(input, skeletonData, false, nonessential);\r\n if (!skin)\r\n throw new Error(\"readSkin() should not have returned null.\");\r\n skeletonData.skins[i] = skin;\r\n }\r\n }\r\n n = this.linkedMeshes.length;\r\n for (let i = 0; i < n; i++) {\r\n let linkedMesh = this.linkedMeshes[i];\r\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (!skin)\r\n throw new Error(\"Not skin found for linked mesh.\");\r\n if (!linkedMesh.parent)\r\n throw new Error(\"Linked mesh parent must not be null\");\r\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (!parent)\r\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\r\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent);\r\n if (linkedMesh.mesh.region != null)\r\n linkedMesh.mesh.updateRegion();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let eventName = input.readStringRef();\r\n if (!eventName)\r\n throw new Error();\r\n let data = new EventData(eventName);\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (let i = 0; i < n; i++) {\r\n let animationName = input.readString();\r\n if (!animationName)\r\n throw new Error(\"Animatio name must not be null.\");\r\n skeletonData.animations.push(this.readAnimation(input, animationName, skeletonData));\r\n }\r\n return skeletonData;\r\n }\r\n readSkin(input, skeletonData, defaultSkin, nonessential) {\r\n let skin = null;\r\n let slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new Skin(\"default\");\r\n } else {\r\n let skinName = input.readStringRef();\r\n if (!skinName)\r\n throw new Error(\"Skin name must not be null.\");\r\n skin = new Skin(skinName);\r\n skin.bones.length = input.readInt(true);\r\n for (let i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (let i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (let i = 0; i < slotCount; i++) {\r\n let slotIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let name = input.readStringRef();\r\n if (!name)\r\n throw new Error(\"Attachment name must not be null\");\r\n let attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);\r\n if (attachment)\r\n skin.setAttachment(slotIndex, name, attachment);\r\n }\r\n }\r\n return skin;\r\n }\r\n readAttachment(input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n let scale = this.scale;\r\n let name = input.readStringRef();\r\n if (!name)\r\n name = attachmentName;\r\n switch (input.readByte()) {\r\n case AttachmentType.Region: {\r\n let path = input.readStringRef();\r\n let rotation = input.readFloat();\r\n let x = input.readFloat();\r\n let y = input.readFloat();\r\n let scaleX = input.readFloat();\r\n let scaleY = input.readFloat();\r\n let width = input.readFloat();\r\n let height = input.readFloat();\r\n let color = input.readInt32();\r\n let sequence = this.readSequence(input);\r\n if (!path)\r\n path = name;\r\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\r\n if (!region)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n Color.rgba8888ToColor(region.color, color);\r\n region.sequence = sequence;\r\n if (sequence == null)\r\n region.updateRegion();\r\n return region;\r\n }\r\n case AttachmentType.BoundingBox: {\r\n let vertexCount = input.readInt(true);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let color = nonessential ? input.readInt32() : 0;\r\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (!box)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case AttachmentType.Mesh: {\r\n let path = input.readStringRef();\r\n let color = input.readInt32();\r\n let vertexCount = input.readInt(true);\r\n let uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n let triangles = this.readShortArray(input);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let hullLength = input.readInt(true);\r\n let sequence = this.readSequence(input);\r\n let edges = [];\r\n let width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (!path)\r\n path = name;\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\r\n if (!mesh)\r\n return null;\r\n mesh.path = path;\r\n Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n if (sequence == null)\r\n mesh.updateRegion();\r\n mesh.hullLength = hullLength << 1;\r\n mesh.sequence = sequence;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case AttachmentType.LinkedMesh: {\r\n let path = input.readStringRef();\r\n let color = input.readInt32();\r\n let skinName = input.readStringRef();\r\n let parent = input.readStringRef();\r\n let inheritTimelines = input.readBoolean();\r\n let sequence = this.readSequence(input);\r\n let width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (!path)\r\n path = name;\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\r\n if (!mesh)\r\n return null;\r\n mesh.path = path;\r\n Color.rgba8888ToColor(mesh.color, color);\r\n mesh.sequence = sequence;\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent, inheritTimelines));\r\n return mesh;\r\n }\r\n case AttachmentType.Path: {\r\n let closed2 = input.readBoolean();\r\n let constantSpeed = input.readBoolean();\r\n let vertexCount = input.readInt(true);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let lengths = Utils.newArray(vertexCount / 3, 0);\r\n for (let i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n let color = nonessential ? input.readInt32() : 0;\r\n let path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (!path)\r\n return null;\r\n path.closed = closed2;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case AttachmentType.Point: {\r\n let rotation = input.readFloat();\r\n let x = input.readFloat();\r\n let y = input.readFloat();\r\n let color = nonessential ? input.readInt32() : 0;\r\n let point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (!point)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case AttachmentType.Clipping: {\r\n let endSlotIndex = input.readInt(true);\r\n let vertexCount = input.readInt(true);\r\n let vertices = this.readVertices(input, vertexCount);\r\n let color = nonessential ? input.readInt32() : 0;\r\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (!clip)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n }\r\n readSequence(input) {\r\n if (!input.readBoolean())\r\n return null;\r\n let sequence = new Sequence(input.readInt(true));\r\n sequence.start = input.readInt(true);\r\n sequence.digits = input.readInt(true);\r\n sequence.setupIndex = input.readInt(true);\r\n return sequence;\r\n }\r\n readVertices(input, vertexCount) {\r\n let scale = this.scale;\r\n let verticesLength = vertexCount << 1;\r\n let vertices = new Vertices();\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n let weights = new Array();\r\n let bonesArray = new Array();\r\n for (let i = 0; i < vertexCount; i++) {\r\n let boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (let ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n }\r\n readFloatArray(input, n, scale) {\r\n let array = new Array(n);\r\n if (scale == 1) {\r\n for (let i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n } else {\r\n for (let i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n }\r\n readShortArray(input) {\r\n let n = input.readInt(true);\r\n let array = new Array(n);\r\n for (let i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n }\r\n readAnimation(input, name, skeletonData) {\r\n input.readInt(true);\r\n let timelines = new Array();\r\n let scale = this.scale;\r\n let tempColor1 = new Color();\r\n let tempColor2 = new Color();\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let slotIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let timelineType = input.readByte();\r\n let frameCount = input.readInt(true);\r\n let frameLast = frameCount - 1;\r\n switch (timelineType) {\r\n case SLOT_ATTACHMENT: {\r\n let timeline = new AttachmentTimeline(frameCount, slotIndex);\r\n for (let frame = 0; frame < frameCount; frame++)\r\n timeline.setFrame(frame, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGBA: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGBATimeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n let a = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b, a);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n let a2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, a2, 1);\r\n }\r\n time = time2;\r\n r = r2;\r\n g = g2;\r\n b = b2;\r\n a = a2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGB: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGBTimeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, r2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, g2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, b2, 1);\r\n }\r\n time = time2;\r\n r = r2;\r\n g = g2;\r\n b = b2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGBA2: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGBA2Timeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n let a = input.readUnsignedByte() / 255;\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b, a, r2, g2, b2);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let nr = input.readUnsignedByte() / 255;\r\n let ng = input.readUnsignedByte() / 255;\r\n let nb = input.readUnsignedByte() / 255;\r\n let na = input.readUnsignedByte() / 255;\r\n let nr2 = input.readUnsignedByte() / 255;\r\n let ng2 = input.readUnsignedByte() / 255;\r\n let nb2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, a, na, 1);\r\n setBezier(input, timeline, bezier++, frame, 4, time, time2, r2, nr2, 1);\r\n setBezier(input, timeline, bezier++, frame, 5, time, time2, g2, ng2, 1);\r\n setBezier(input, timeline, bezier++, frame, 6, time, time2, b2, nb2, 1);\r\n }\r\n time = time2;\r\n r = nr;\r\n g = ng;\r\n b = nb;\r\n a = na;\r\n r2 = nr2;\r\n g2 = ng2;\r\n b2 = nb2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_RGB2: {\r\n let bezierCount = input.readInt(true);\r\n let timeline = new RGB2Timeline(frameCount, bezierCount, slotIndex);\r\n let time = input.readFloat();\r\n let r = input.readUnsignedByte() / 255;\r\n let g = input.readUnsignedByte() / 255;\r\n let b = input.readUnsignedByte() / 255;\r\n let r2 = input.readUnsignedByte() / 255;\r\n let g2 = input.readUnsignedByte() / 255;\r\n let b2 = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, r, g, b, r2, g2, b2);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let nr = input.readUnsignedByte() / 255;\r\n let ng = input.readUnsignedByte() / 255;\r\n let nb = input.readUnsignedByte() / 255;\r\n let nr2 = input.readUnsignedByte() / 255;\r\n let ng2 = input.readUnsignedByte() / 255;\r\n let nb2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, r, nr, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, g, ng, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, b, nb, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, r2, nr2, 1);\r\n setBezier(input, timeline, bezier++, frame, 4, time, time2, g2, ng2, 1);\r\n setBezier(input, timeline, bezier++, frame, 5, time, time2, b2, nb2, 1);\r\n }\r\n time = time2;\r\n r = nr;\r\n g = ng;\r\n b = nb;\r\n r2 = nr2;\r\n g2 = ng2;\r\n b2 = nb2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case SLOT_ALPHA: {\r\n let timeline = new AlphaTimeline(frameCount, input.readInt(true), slotIndex);\r\n let time = input.readFloat(), a = input.readUnsignedByte() / 255;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, a);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n let a2 = input.readUnsignedByte() / 255;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, a, a2, 1);\r\n }\r\n time = time2;\r\n a = a2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let boneIndex = input.readInt(true);\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);\r\n switch (type) {\r\n case BONE_ROTATE:\r\n timelines.push(readTimeline1(input, new RotateTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_TRANSLATE:\r\n timelines.push(readTimeline2(input, new TranslateTimeline(frameCount, bezierCount, boneIndex), scale));\r\n break;\r\n case BONE_TRANSLATEX:\r\n timelines.push(readTimeline1(input, new TranslateXTimeline(frameCount, bezierCount, boneIndex), scale));\r\n break;\r\n case BONE_TRANSLATEY:\r\n timelines.push(readTimeline1(input, new TranslateYTimeline(frameCount, bezierCount, boneIndex), scale));\r\n break;\r\n case BONE_SCALE:\r\n timelines.push(readTimeline2(input, new ScaleTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SCALEX:\r\n timelines.push(readTimeline1(input, new ScaleXTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SCALEY:\r\n timelines.push(readTimeline1(input, new ScaleYTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SHEAR:\r\n timelines.push(readTimeline2(input, new ShearTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SHEARX:\r\n timelines.push(readTimeline1(input, new ShearXTimeline(frameCount, bezierCount, boneIndex), 1));\r\n break;\r\n case BONE_SHEARY:\r\n timelines.push(readTimeline1(input, new ShearYTimeline(frameCount, bezierCount, boneIndex), 1));\r\n }\r\n }\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\r\n let timeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);\r\n let time = input.readFloat(), mix = input.readFloat(), softness = input.readFloat() * scale;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), mix2 = input.readFloat(), softness2 = input.readFloat() * scale;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mix, mix2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, softness, softness2, scale);\r\n }\r\n time = time2;\r\n mix = mix2;\r\n softness = softness2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let index = input.readInt(true), frameCount = input.readInt(true), frameLast = frameCount - 1;\r\n let timeline = new TransformConstraintTimeline(frameCount, input.readInt(true), index);\r\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat(), mixScaleX = input.readFloat(), mixScaleY = input.readFloat(), mixShearY = input.readFloat();\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat(), mixScaleX2 = input.readFloat(), mixScaleY2 = input.readFloat(), mixShearY2 = input.readFloat();\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\r\n setBezier(input, timeline, bezier++, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\r\n setBezier(input, timeline, bezier++, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\r\n setBezier(input, timeline, bezier++, frame, 5, time, time2, mixShearY, mixShearY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n mixScaleX = mixScaleX2;\r\n mixScaleY = mixScaleY2;\r\n mixShearY = mixShearY2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let index = input.readInt(true);\r\n let data = skeletonData.pathConstraints[index];\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n switch (input.readByte()) {\r\n case PATH_POSITION:\r\n timelines.push(readTimeline1(\r\n input,\r\n new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),\r\n data.positionMode == 0 /* Fixed */ ? scale : 1\r\n ));\r\n break;\r\n case PATH_SPACING:\r\n timelines.push(readTimeline1(\r\n input,\r\n new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),\r\n data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */ ? scale : 1\r\n ));\r\n break;\r\n case PATH_MIX:\r\n let timeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);\r\n let time = input.readFloat(), mixRotate = input.readFloat(), mixX = input.readFloat(), mixY = input.readFloat();\r\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), mixRotate2 = input.readFloat(), mixX2 = input.readFloat(), mixY2 = input.readFloat();\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, mixX, mixX2, 1);\r\n setBezier(input, timeline, bezier++, frame, 2, time, time2, mixY, mixY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n for (let i = 0, n = input.readInt(true); i < n; i++) {\r\n let skin = skeletonData.skins[input.readInt(true)];\r\n for (let ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n let slotIndex = input.readInt(true);\r\n for (let iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n let attachmentName = input.readStringRef();\r\n if (!attachmentName)\r\n throw new Error(\"attachmentName must not be null.\");\r\n let attachment = skin.getAttachment(slotIndex, attachmentName);\r\n let timelineType = input.readByte();\r\n let frameCount = input.readInt(true);\r\n let frameLast = frameCount - 1;\r\n switch (timelineType) {\r\n case ATTACHMENT_DEFORM: {\r\n let vertexAttachment = attachment;\r\n let weighted = vertexAttachment.bones;\r\n let vertices = vertexAttachment.vertices;\r\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n let bezierCount = input.readInt(true);\r\n let timeline = new DeformTimeline(frameCount, bezierCount, slotIndex, vertexAttachment);\r\n let time = input.readFloat();\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n let deform;\r\n let end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = Utils.newFloatArray(deformLength);\r\n let start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (let v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n } else {\r\n for (let v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (let v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frame, time, deform);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat();\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, 0, 1, 1);\r\n }\r\n time = time2;\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n case ATTACHMENT_SEQUENCE: {\r\n let timeline = new SequenceTimeline(frameCount, slotIndex, attachment);\r\n for (let frame = 0; frame < frameCount; frame++) {\r\n let time = input.readFloat();\r\n let modeAndIndex = input.readInt32();\r\n timeline.setFrame(\r\n frame,\r\n time,\r\n SequenceModeValues[modeAndIndex & 15],\r\n modeAndIndex >> 4,\r\n input.readFloat()\r\n );\r\n }\r\n timelines.push(timeline);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n let drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n let timeline = new DrawOrderTimeline(drawOrderCount);\r\n let slotCount = skeletonData.slots.length;\r\n for (let i = 0; i < drawOrderCount; i++) {\r\n let time = input.readFloat();\r\n let offsetCount = input.readInt(true);\r\n let drawOrder = Utils.newArray(slotCount, 0);\r\n for (let ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n let unchanged = Utils.newArray(slotCount - offsetCount, 0);\r\n let originalIndex = 0, unchangedIndex = 0;\r\n for (let ii = 0; ii < offsetCount; ii++) {\r\n let slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (let ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n }\r\n let eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n let timeline = new EventTimeline(eventCount);\r\n for (let i = 0; i < eventCount; i++) {\r\n let time = input.readFloat();\r\n let eventData = skeletonData.events[input.readInt(true)];\r\n let event = new Event(time, eventData);\r\n event.intValue = input.readInt(false);\r\n event.floatValue = input.readFloat();\r\n event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event.data.audioPath) {\r\n event.volume = input.readFloat();\r\n event.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event);\r\n }\r\n timelines.push(timeline);\r\n }\r\n let duration = 0;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n duration = Math.max(duration, timelines[i].getDuration());\r\n return new Animation(name, timelines, duration);\r\n }\r\n };\r\n var BinaryInput = class {\r\n constructor(data, strings = new Array(), index = 0, buffer = new DataView(data.buffer)) {\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n readByte() {\r\n return this.buffer.getInt8(this.index++);\r\n }\r\n readUnsignedByte() {\r\n return this.buffer.getUint8(this.index++);\r\n }\r\n readShort() {\r\n let value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n }\r\n readInt32() {\r\n let value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n }\r\n readInt(optimizePositive) {\r\n let b = this.readByte();\r\n let result = b & 127;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 7;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 14;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 21;\r\n if ((b & 128) != 0) {\r\n b = this.readByte();\r\n result |= (b & 127) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : result >>> 1 ^ -(result & 1);\r\n }\r\n readStringRef() {\r\n let index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n }\r\n readString() {\r\n let byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n let chars = \"\";\r\n let charCount = 0;\r\n for (let i = 0; i < byteCount; ) {\r\n let b = this.readUnsignedByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode((b & 31) << 6 | this.readByte() & 63);\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode((b & 15) << 12 | (this.readByte() & 63) << 6 | this.readByte() & 63);\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n }\r\n readFloat() {\r\n let value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n }\r\n readBoolean() {\r\n return this.readByte() != 0;\r\n }\r\n };\r\n var LinkedMesh = class {\r\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritTimeline = inheritDeform;\r\n }\r\n };\r\n var Vertices = class {\r\n constructor(bones = null, vertices = null) {\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n };\r\n var AttachmentType = /* @__PURE__ */ ((AttachmentType2) => {\r\n AttachmentType2[AttachmentType2[\"Region\"] = 0] = \"Region\";\r\n AttachmentType2[AttachmentType2[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType2[AttachmentType2[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType2[AttachmentType2[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType2[AttachmentType2[\"Path\"] = 4] = \"Path\";\r\n AttachmentType2[AttachmentType2[\"Point\"] = 5] = \"Point\";\r\n AttachmentType2[AttachmentType2[\"Clipping\"] = 6] = \"Clipping\";\r\n return AttachmentType2;\r\n })(AttachmentType || {});\r\n function readTimeline1(input, timeline, scale) {\r\n let time = input.readFloat(), value = input.readFloat() * scale;\r\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\r\n timeline.setFrame(frame, time, value);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), value2 = input.readFloat() * scale;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value, value2, scale);\r\n }\r\n time = time2;\r\n value = value2;\r\n }\r\n return timeline;\r\n }\r\n function readTimeline2(input, timeline, scale) {\r\n let time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;\r\n for (let frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1; ; frame++) {\r\n timeline.setFrame(frame, time, value1, value2);\r\n if (frame == frameLast)\r\n break;\r\n let time2 = input.readFloat(), nvalue1 = input.readFloat() * scale, nvalue2 = input.readFloat() * scale;\r\n switch (input.readByte()) {\r\n case CURVE_STEPPED:\r\n timeline.setStepped(frame);\r\n break;\r\n case CURVE_BEZIER:\r\n setBezier(input, timeline, bezier++, frame, 0, time, time2, value1, nvalue1, scale);\r\n setBezier(input, timeline, bezier++, frame, 1, time, time2, value2, nvalue2, scale);\r\n }\r\n time = time2;\r\n value1 = nvalue1;\r\n value2 = nvalue2;\r\n }\r\n return timeline;\r\n }\r\n function setBezier(input, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\r\n timeline.setBezier(bezier, frame, value, time1, value1, input.readFloat(), input.readFloat() * scale, input.readFloat(), input.readFloat() * scale, time2, value2);\r\n }\r\n var BONE_ROTATE = 0;\r\n var BONE_TRANSLATE = 1;\r\n var BONE_TRANSLATEX = 2;\r\n var BONE_TRANSLATEY = 3;\r\n var BONE_SCALE = 4;\r\n var BONE_SCALEX = 5;\r\n var BONE_SCALEY = 6;\r\n var BONE_SHEAR = 7;\r\n var BONE_SHEARX = 8;\r\n var BONE_SHEARY = 9;\r\n var SLOT_ATTACHMENT = 0;\r\n var SLOT_RGBA = 1;\r\n var SLOT_RGB = 2;\r\n var SLOT_RGBA2 = 3;\r\n var SLOT_RGB2 = 4;\r\n var SLOT_ALPHA = 5;\r\n var ATTACHMENT_DEFORM = 0;\r\n var ATTACHMENT_SEQUENCE = 1;\r\n var PATH_POSITION = 0;\r\n var PATH_SPACING = 1;\r\n var PATH_MIX = 2;\r\n var CURVE_STEPPED = 1;\r\n var CURVE_BEZIER = 2;\r\n\r\n // spine-core/src/SkeletonBounds.ts\r\n var SkeletonBounds = class {\r\n constructor() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new Pool(() => {\r\n return Utils.newFloatArray(16);\r\n });\r\n }\r\n update(skeleton, updateAabb) {\r\n if (!skeleton)\r\n throw new Error(\"skeleton cannot be null.\");\r\n let boundingBoxes = this.boundingBoxes;\r\n let polygons = this.polygons;\r\n let polygonPool = this.polygonPool;\r\n let slots = skeleton.slots;\r\n let slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (let i = 0; i < slotCount; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof BoundingBoxAttachment) {\r\n let boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n let polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n } else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n }\r\n aabbCompute() {\r\n let minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++) {\r\n let polygon = polygons[i];\r\n let vertices = polygon;\r\n for (let ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n let x = vertices[ii];\r\n let y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n }\r\n aabbContainsPoint(x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n }\r\n aabbIntersectsSegment(x1, y1, x2, y2) {\r\n let minX = this.minX;\r\n let minY = this.minY;\r\n let maxX = this.maxX;\r\n let maxY = this.maxY;\r\n if (x1 <= minX && x2 <= minX || y1 <= minY && y2 <= minY || x1 >= maxX && x2 >= maxX || y1 >= maxY && y2 >= maxY)\r\n return false;\r\n let m = (y2 - y1) / (x2 - x1);\r\n let y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n let x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n }\r\n aabbIntersectsSkeleton(bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n }\r\n containsPoint(x, y) {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n }\r\n containsPointPolygon(polygon, x, y) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n let prevIndex = nn - 2;\r\n let inside = false;\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let vertexY = vertices[ii + 1];\r\n let prevY = vertices[prevIndex + 1];\r\n if (vertexY < y && prevY >= y || prevY < y && vertexY >= y) {\r\n let vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n }\r\n intersectsSegment(x1, y1, x2, y2) {\r\n let polygons = this.polygons;\r\n for (let i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n }\r\n intersectsSegmentPolygon(polygon, x1, y1, x2, y2) {\r\n let vertices = polygon;\r\n let nn = polygon.length;\r\n let width12 = x1 - x2, height12 = y1 - y2;\r\n let det1 = x1 * y2 - y1 * x2;\r\n let x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (let ii = 0; ii < nn; ii += 2) {\r\n let x4 = vertices[ii], y4 = vertices[ii + 1];\r\n let det2 = x3 * y4 - y3 * x4;\r\n let width34 = x3 - x4, height34 = y3 - y4;\r\n let det3 = width12 * height34 - height12 * width34;\r\n let x = (det1 * width34 - width12 * det2) / det3;\r\n if ((x >= x3 && x <= x4 || x >= x4 && x <= x3) && (x >= x1 && x <= x2 || x >= x2 && x <= x1)) {\r\n let y = (det1 * height34 - height12 * det2) / det3;\r\n if ((y >= y3 && y <= y4 || y >= y4 && y <= y3) && (y >= y1 && y <= y2 || y >= y2 && y <= y1))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n }\r\n getPolygon(boundingBox) {\r\n if (!boundingBox)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n let index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n }\r\n getWidth() {\r\n return this.maxX - this.minX;\r\n }\r\n getHeight() {\r\n return this.maxY - this.minY;\r\n }\r\n };\r\n\r\n // spine-core/src/Triangulator.ts\r\n var Triangulator = class {\r\n constructor() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new Pool(() => {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new Pool(() => {\r\n return new Array();\r\n });\r\n }\r\n triangulate(verticesArray) {\r\n let vertices = verticesArray;\r\n let vertexCount = verticesArray.length >> 1;\r\n let indices = this.indicesArray;\r\n indices.length = 0;\r\n for (let i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n let isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (let i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n let triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n let previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer:\r\n if (!isConcave[i]) {\r\n let p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n let p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n let p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n let p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (let ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n let v = indices[ii] << 1;\r\n let vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n let previousIndex = (vertexCount + i - 1) % vertexCount;\r\n let nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n }\r\n decompose(verticesArray, triangles) {\r\n let vertices = verticesArray;\r\n let convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n let convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n let polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n let polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n let fanBaseIndex = -1, lastWinding = 0;\r\n for (let i = 0, n = triangles.length; i < n; i += 3) {\r\n let t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n let x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n let x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n let x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n let merged = false;\r\n if (fanBaseIndex == t1) {\r\n let o = polygon.length - 4;\r\n let winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n let winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n } else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (let i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n let firstIndex = polygonIndices[0];\r\n let lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n let o = polygon.length - 4;\r\n let prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n let prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n let firstX = polygon[0], firstY = polygon[1];\r\n let secondX = polygon[2], secondY = polygon[3];\r\n let winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (let ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n let otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n let otherFirstIndex = otherIndices[0];\r\n let otherSecondIndex = otherIndices[1];\r\n let otherLastIndex = otherIndices[2];\r\n let otherPoly = convexPolygons[ii];\r\n let x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n let winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n let winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (let i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n }\r\n static isConcave(index, vertexCount, vertices, indices) {\r\n let previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n let current = indices[index] << 1;\r\n let next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(\r\n vertices[previous],\r\n vertices[previous + 1],\r\n vertices[current],\r\n vertices[current + 1],\r\n vertices[next],\r\n vertices[next + 1]\r\n );\r\n }\r\n static positiveArea(p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n }\r\n static winding(p1x, p1y, p2x, p2y, p3x, p3y) {\r\n let px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n }\r\n };\r\n\r\n // spine-core/src/SkeletonClipping.ts\r\n var SkeletonClipping = class {\r\n constructor() {\r\n this.triangulator = new Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n }\r\n clipStart(slot, clip) {\r\n if (this.clipAttachment)\r\n return 0;\r\n this.clipAttachment = clip;\r\n let n = clip.worldVerticesLength;\r\n let vertices = Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n let clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n let clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (let i = 0, n2 = clippingPolygons.length; i < n2; i++) {\r\n let polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n }\r\n clipEndWithSlot(slot) {\r\n if (this.clipAttachment && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n }\r\n clipEnd() {\r\n if (!this.clipAttachment)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n }\r\n isClipping() {\r\n return this.clipAttachment != null;\r\n }\r\n clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n let clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n let clippedTriangles = this.clippedTriangles;\r\n let polygons = this.clippingPolygons;\r\n let polygonsCount = polygons.length;\r\n let vertexSize = twoColor ? 12 : 8;\r\n let index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer:\r\n for (let i = 0; i < trianglesLength; i += 3) {\r\n let vertexOffset = triangles[i] << 1;\r\n let x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n let u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n let x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n let u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n let x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n let u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (let p = 0; p < polygonsCount; p++) {\r\n let s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n let clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n let d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n let d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n let clipOutputCount = clipOutputLength >> 1;\r\n let clipOutputItems = this.clipOutput;\r\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (let ii = 0; ii < clipOutputLength; ii += 2) {\r\n let x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n let c0 = x - x3, c1 = y - y3;\r\n let a = (d0 * c0 + d1 * c1) * d;\r\n let b = (d4 * c0 + d2 * c1) * d;\r\n let c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (let ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = index + ii;\r\n clippedTrianglesItems[s + 2] = index + ii + 1;\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n } else {\r\n let clippedVerticesItems = Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n } else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n let clippedTrianglesItems = Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = index + 1;\r\n clippedTrianglesItems[s + 2] = index + 2;\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n }\r\n clip(x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n let originalOutput = output;\r\n let clipped = false;\r\n let input;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n } else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n let clippingVertices = clippingArea;\r\n let clippingVerticesLast = clippingArea.length - 4;\r\n for (let i = 0; ; i += 2) {\r\n let edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n let edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n let deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n let inputVertices = input;\r\n let inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (let ii = 0; ii < inputVerticesLength; ii += 2) {\r\n let inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n let inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n let side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 1e-6) {\r\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n } else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n } else if (side2) {\r\n let c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n let s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 1e-6) {\r\n let ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n } else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n let temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (let i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n } else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n }\r\n static makeClockwise(polygon) {\r\n let vertices = polygon;\r\n let verticeslength = polygon.length;\r\n let area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (let i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (let i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n let x = vertices[i], y = vertices[i + 1];\r\n let other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n }\r\n };\r\n\r\n // spine-core/src/SkeletonJson.ts\r\n var SkeletonJson = class {\r\n constructor(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n readSkeletonData(json) {\r\n let scale = this.scale;\r\n let skeletonData = new SkeletonData();\r\n let root = typeof json === \"string\" ? JSON.parse(json) : json;\r\n let skeletonMap = root.skeleton;\r\n if (skeletonMap) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (let i = 0; i < root.bones.length; i++) {\r\n let boneMap = root.bones[i];\r\n let parent = null;\r\n let parentName = getValue(boneMap, \"parent\", null);\r\n if (parentName)\r\n parent = skeletonData.findBone(parentName);\r\n let data = new BoneData(skeletonData.bones.length, boneMap.name, parent);\r\n data.length = getValue(boneMap, \"length\", 0) * scale;\r\n data.x = getValue(boneMap, \"x\", 0) * scale;\r\n data.y = getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = getValue(boneMap, \"shearX\", 0);\r\n data.shearY = getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = Utils.enumValue(TransformMode, getValue(boneMap, \"transform\", \"Normal\"));\r\n data.skinRequired = getValue(boneMap, \"skin\", false);\r\n let color = getValue(boneMap, \"color\", null);\r\n if (color)\r\n data.color.setFromString(color);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (let i = 0; i < root.slots.length; i++) {\r\n let slotMap = root.slots[i];\r\n let boneData = skeletonData.findBone(slotMap.bone);\r\n if (!boneData)\r\n throw new Error(`Couldn't find bone ${slotMap.bone} for slot ${slotMap.name}`);\r\n let data = new SlotData(skeletonData.slots.length, slotMap.name, boneData);\r\n let color = getValue(slotMap, \"color\", null);\r\n if (color)\r\n data.color.setFromString(color);\r\n let dark = getValue(slotMap, \"dark\", null);\r\n if (dark)\r\n data.darkColor = Color.fromString(dark);\r\n data.attachmentName = getValue(slotMap, \"attachment\", null);\r\n data.blendMode = Utils.enumValue(BlendMode, getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (let i = 0; i < root.ik.length; i++) {\r\n let constraintMap = root.ik[i];\r\n let data = new IkConstraintData(constraintMap.name);\r\n data.order = getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\r\n let bone = skeletonData.findBone(constraintMap.bones[ii]);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${constraintMap.bones[ii]} for IK constraint ${constraintMap.name}.`);\r\n data.bones.push(bone);\r\n }\r\n let target = skeletonData.findBone(constraintMap.target);\r\n ;\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${constraintMap.target} for IK constraint ${constraintMap.name}.`);\r\n data.target = target;\r\n data.mix = getValue(constraintMap, \"mix\", 1);\r\n data.softness = getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = getValue(constraintMap, \"compress\", false);\r\n data.stretch = getValue(constraintMap, \"stretch\", false);\r\n data.uniform = getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (let i = 0; i < root.transform.length; i++) {\r\n let constraintMap = root.transform[i];\r\n let data = new TransformConstraintData(constraintMap.name);\r\n data.order = getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\r\n let boneName = constraintMap.bones[ii];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${boneName} for transform constraint ${constraintMap.name}.`);\r\n data.bones.push(bone);\r\n }\r\n let targetName = constraintMap.target;\r\n let target = skeletonData.findBone(targetName);\r\n if (!target)\r\n throw new Error(`Couldn't find target bone ${targetName} for transform constraint ${constraintMap.name}.`);\r\n data.target = target;\r\n data.local = getValue(constraintMap, \"local\", false);\r\n data.relative = getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = getValue(constraintMap, \"shearY\", 0);\r\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\r\n data.mixX = getValue(constraintMap, \"mixX\", 1);\r\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\r\n data.mixScaleX = getValue(constraintMap, \"mixScaleX\", 1);\r\n data.mixScaleY = getValue(constraintMap, \"mixScaleY\", data.mixScaleX);\r\n data.mixShearY = getValue(constraintMap, \"mixShearY\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (let i = 0; i < root.path.length; i++) {\r\n let constraintMap = root.path[i];\r\n let data = new PathConstraintData(constraintMap.name);\r\n data.order = getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = getValue(constraintMap, \"skin\", false);\r\n for (let ii = 0; ii < constraintMap.bones.length; ii++) {\r\n let boneName = constraintMap.bones[ii];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${boneName} for path constraint ${constraintMap.name}.`);\r\n data.bones.push(bone);\r\n }\r\n let targetName = constraintMap.target;\r\n let target = skeletonData.findSlot(targetName);\r\n if (!target)\r\n throw new Error(`Couldn't find target slot ${targetName} for path constraint ${constraintMap.name}.`);\r\n data.target = target;\r\n data.positionMode = Utils.enumValue(PositionMode, getValue(constraintMap, \"positionMode\", \"Percent\"));\r\n data.spacingMode = Utils.enumValue(SpacingMode, getValue(constraintMap, \"spacingMode\", \"Length\"));\r\n data.rotateMode = Utils.enumValue(RotateMode, getValue(constraintMap, \"rotateMode\", \"Tangent\"));\r\n data.offsetRotation = getValue(constraintMap, \"rotation\", 0);\r\n data.position = getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == 0 /* Fixed */)\r\n data.position *= scale;\r\n data.spacing = getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == 0 /* Length */ || data.spacingMode == 1 /* Fixed */)\r\n data.spacing *= scale;\r\n data.mixRotate = getValue(constraintMap, \"mixRotate\", 1);\r\n data.mixX = getValue(constraintMap, \"mixX\", 1);\r\n data.mixY = getValue(constraintMap, \"mixY\", data.mixX);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (let i = 0; i < root.skins.length; i++) {\r\n let skinMap = root.skins[i];\r\n let skin = new Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (let ii = 0; ii < skinMap.bones.length; ii++) {\r\n let boneName = skinMap.bones[ii];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(`Couldn't find bone ${boneName} for skin ${skinMap.name}.`);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (let ii = 0; ii < skinMap.ik.length; ii++) {\r\n let constraintName = skinMap.ik[ii];\r\n let constraint = skeletonData.findIkConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(`Couldn't find IK constraint ${constraintName} for skin ${skinMap.name}.`);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (let ii = 0; ii < skinMap.transform.length; ii++) {\r\n let constraintName = skinMap.transform[ii];\r\n let constraint = skeletonData.findTransformConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(`Couldn't find transform constraint ${constraintName} for skin ${skinMap.name}.`);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (let ii = 0; ii < skinMap.path.length; ii++) {\r\n let constraintName = skinMap.path[ii];\r\n let constraint = skeletonData.findPathConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(`Couldn't find path constraint ${constraintName} for skin ${skinMap.name}.`);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (let slotName in skinMap.attachments) {\r\n let slot = skeletonData.findSlot(slotName);\r\n if (!slot)\r\n throw new Error(`Couldn't find slot ${slotName} for skin ${skinMap.name}.`);\r\n let slotMap = skinMap.attachments[slotName];\r\n for (let entryName in slotMap) {\r\n let attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (let i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n let linkedMesh = this.linkedMeshes[i];\r\n let skin = !linkedMesh.skin ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (!skin)\r\n throw new Error(`Skin not found: ${linkedMesh.skin}`);\r\n let parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (!parent)\r\n throw new Error(`Parent mesh not found: ${linkedMesh.parent}`);\r\n linkedMesh.mesh.timelineAttachment = linkedMesh.inheritTimeline ? parent : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent);\r\n if (linkedMesh.mesh.region != null)\r\n linkedMesh.mesh.updateRegion();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (let eventName in root.events) {\r\n let eventMap = root.events[eventName];\r\n let data = new EventData(eventName);\r\n data.intValue = getValue(eventMap, \"int\", 0);\r\n data.floatValue = getValue(eventMap, \"float\", 0);\r\n data.stringValue = getValue(eventMap, \"string\", \"\");\r\n data.audioPath = getValue(eventMap, \"audio\", null);\r\n if (data.audioPath) {\r\n data.volume = getValue(eventMap, \"volume\", 1);\r\n data.balance = getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (let animationName in root.animations) {\r\n let animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n }\r\n readAttachment(map, skin, slotIndex, name, skeletonData) {\r\n let scale = this.scale;\r\n name = getValue(map, \"name\", name);\r\n switch (getValue(map, \"type\", \"region\")) {\r\n case \"region\": {\r\n let path = getValue(map, \"path\", name);\r\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\r\n let region = this.attachmentLoader.newRegionAttachment(skin, name, path, sequence);\r\n if (!region)\r\n return null;\r\n region.path = path;\r\n region.x = getValue(map, \"x\", 0) * scale;\r\n region.y = getValue(map, \"y\", 0) * scale;\r\n region.scaleX = getValue(map, \"scaleX\", 1);\r\n region.scaleY = getValue(map, \"scaleY\", 1);\r\n region.rotation = getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n region.sequence = sequence;\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n region.color.setFromString(color);\r\n if (region.region != null)\r\n region.updateRegion();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n let box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (!box)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n let path = getValue(map, \"path\", name);\r\n let sequence = this.readSequence(getValue(map, \"sequence\", null));\r\n let mesh = this.attachmentLoader.newMeshAttachment(skin, name, path, sequence);\r\n if (!mesh)\r\n return null;\r\n mesh.path = path;\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n mesh.color.setFromString(color);\r\n mesh.width = getValue(map, \"width\", 0) * scale;\r\n mesh.height = getValue(map, \"height\", 0) * scale;\r\n mesh.sequence = sequence;\r\n let parent = getValue(map, \"parent\", null);\r\n if (parent) {\r\n this.linkedMeshes.push(new LinkedMesh2(mesh, getValue(map, \"skin\", null), slotIndex, parent, getValue(map, \"timelines\", true)));\r\n return mesh;\r\n }\r\n let uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n if (mesh.region != null)\r\n mesh.updateRegion();\r\n mesh.edges = getValue(map, \"edges\", null);\r\n mesh.hullLength = getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n let path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (!path)\r\n return null;\r\n path.closed = getValue(map, \"closed\", false);\r\n path.constantSpeed = getValue(map, \"constantSpeed\", true);\r\n let vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n let lengths = Utils.newArray(vertexCount / 3, 0);\r\n for (let i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n let point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (!point)\r\n return null;\r\n point.x = getValue(map, \"x\", 0) * scale;\r\n point.y = getValue(map, \"y\", 0) * scale;\r\n point.rotation = getValue(map, \"rotation\", 0);\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n let clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (!clip)\r\n return null;\r\n let end = getValue(map, \"end\", null);\r\n if (end)\r\n clip.endSlot = skeletonData.findSlot(end);\r\n let vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n let color = getValue(map, \"color\", null);\r\n if (color)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n }\r\n readSequence(map) {\r\n if (map == null)\r\n return null;\r\n let sequence = new Sequence(getValue(map, \"count\", 0));\r\n sequence.start = getValue(map, \"start\", 1);\r\n sequence.digits = getValue(map, \"digits\", 0);\r\n sequence.setupIndex = getValue(map, \"setup\", 0);\r\n return sequence;\r\n }\r\n readVertices(map, attachment, verticesLength) {\r\n let scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n let vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n let scaledVertices = Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (let i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n let weights = new Array();\r\n let bones = new Array();\r\n for (let i = 0, n = vertices.length; i < n; ) {\r\n let boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (let nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = Utils.toFloatArray(weights);\r\n }\r\n readAnimation(map, name, skeletonData) {\r\n let scale = this.scale;\r\n let timelines = new Array();\r\n if (map.slots) {\r\n for (let slotName in map.slots) {\r\n let slotMap = map.slots[slotName];\r\n let slot = skeletonData.findSlot(slotName);\r\n if (!slot)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n let slotIndex = slot.index;\r\n for (let timelineName in slotMap) {\r\n let timelineMap = slotMap[timelineName];\r\n if (!timelineMap)\r\n continue;\r\n let frames = timelineMap.length;\r\n if (timelineName == \"attachment\") {\r\n let timeline = new AttachmentTimeline(frames, slotIndex);\r\n for (let frame = 0; frame < frames; frame++) {\r\n let keyMap = timelineMap[frame];\r\n timeline.setFrame(frame, getValue(keyMap, \"time\", 0), getValue(keyMap, \"name\", null));\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"rgba\") {\r\n let timeline = new RGBATimeline(frames, frames << 2, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.color);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.color);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"rgb\") {\r\n let timeline = new RGBTimeline(frames, frames * 3, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.color);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.color);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"alpha\") {\r\n timelines.push(readTimeline12(timelineMap, new AlphaTimeline(frames, frames, slotIndex), 0, 1));\r\n } else if (timelineName == \"rgba2\") {\r\n let timeline = new RGBA2Timeline(frames, frames * 7, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.light);\r\n let color2 = Color.fromString(keyMap.dark);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b, color.a, color2.r, color2.g, color2.b);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.light);\r\n let newColor2 = Color.fromString(nextMap.dark);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color.a, newColor.a, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.r, newColor2.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.g, newColor2.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 6, time, time2, color2.b, newColor2.b, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n color2 = newColor2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineName == \"rgb2\") {\r\n let timeline = new RGB2Timeline(frames, frames * 6, slotIndex);\r\n let keyMap = timelineMap[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let color = Color.fromString(keyMap.light);\r\n let color2 = Color.fromString(keyMap.dark);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, color.r, color.g, color.b, color2.r, color2.g, color2.b);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let newColor = Color.fromString(nextMap.light);\r\n let newColor2 = Color.fromString(nextMap.dark);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, color.r, newColor.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, color.g, newColor.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, color.b, newColor.b, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, color2.r, newColor2.r, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, color2.g, newColor2.g, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, color2.b, newColor2.b, 1);\r\n }\r\n time = time2;\r\n color = newColor;\r\n color2 = newColor2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (let boneName in map.bones) {\r\n let boneMap = map.bones[boneName];\r\n let bone = skeletonData.findBone(boneName);\r\n if (!bone)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n let boneIndex = bone.index;\r\n for (let timelineName in boneMap) {\r\n let timelineMap = boneMap[timelineName];\r\n let frames = timelineMap.length;\r\n if (frames == 0)\r\n continue;\r\n if (timelineName === \"rotate\") {\r\n timelines.push(readTimeline12(timelineMap, new RotateTimeline(frames, frames, boneIndex), 0, 1));\r\n } else if (timelineName === \"translate\") {\r\n let timeline = new TranslateTimeline(frames, frames << 1, boneIndex);\r\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, scale));\r\n } else if (timelineName === \"translatex\") {\r\n let timeline = new TranslateXTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\r\n } else if (timelineName === \"translatey\") {\r\n let timeline = new TranslateYTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, scale));\r\n } else if (timelineName === \"scale\") {\r\n let timeline = new ScaleTimeline(frames, frames << 1, boneIndex);\r\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 1, 1));\r\n } else if (timelineName === \"scalex\") {\r\n let timeline = new ScaleXTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\r\n } else if (timelineName === \"scaley\") {\r\n let timeline = new ScaleYTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 1, 1));\r\n } else if (timelineName === \"shear\") {\r\n let timeline = new ShearTimeline(frames, frames << 1, boneIndex);\r\n timelines.push(readTimeline22(timelineMap, timeline, \"x\", \"y\", 0, 1));\r\n } else if (timelineName === \"shearx\") {\r\n let timeline = new ShearXTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\r\n } else if (timelineName === \"sheary\") {\r\n let timeline = new ShearYTimeline(frames, frames, boneIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, 1));\r\n }\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (let constraintName in map.ik) {\r\n let constraintMap = map.ik[constraintName];\r\n let keyMap = constraintMap[0];\r\n if (!keyMap)\r\n continue;\r\n let constraint = skeletonData.findIkConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(\"IK Constraint not found: \" + constraintName);\r\n let constraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n let timeline = new IkConstraintTimeline(constraintMap.length, constraintMap.length << 1, constraintIndex);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mix = getValue(keyMap, \"mix\", 1);\r\n let softness = getValue(keyMap, \"softness\", 0) * scale;\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mix, softness, getValue(keyMap, \"bendPositive\", true) ? 1 : -1, getValue(keyMap, \"compress\", false), getValue(keyMap, \"stretch\", false));\r\n let nextMap = constraintMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let mix2 = getValue(nextMap, \"mix\", 1);\r\n let softness2 = getValue(nextMap, \"softness\", 0) * scale;\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mix, mix2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, softness, softness2, scale);\r\n }\r\n time = time2;\r\n mix = mix2;\r\n softness = softness2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n if (map.transform) {\r\n for (let constraintName in map.transform) {\r\n let timelineMap = map.transform[constraintName];\r\n let keyMap = timelineMap[0];\r\n if (!keyMap)\r\n continue;\r\n let constraint = skeletonData.findTransformConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(\"Transform constraint not found: \" + constraintName);\r\n let constraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n let timeline = new TransformConstraintTimeline(timelineMap.length, timelineMap.length * 6, constraintIndex);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\r\n let mixX = getValue(keyMap, \"mixX\", 1);\r\n let mixY = getValue(keyMap, \"mixY\", mixX);\r\n let mixScaleX = getValue(keyMap, \"mixScaleX\", 1);\r\n let mixScaleY = getValue(keyMap, \"mixScaleY\", mixScaleX);\r\n let mixShearY = getValue(keyMap, \"mixShearY\", 1);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY, mixScaleX, mixScaleY, mixShearY);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\r\n let mixX2 = getValue(nextMap, \"mixX\", 1);\r\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\r\n let mixScaleX2 = getValue(nextMap, \"mixScaleX\", 1);\r\n let mixScaleY2 = getValue(nextMap, \"mixScaleY\", mixScaleX2);\r\n let mixShearY2 = getValue(nextMap, \"mixShearY\", 1);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 3, time, time2, mixScaleX, mixScaleX2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 4, time, time2, mixScaleY, mixScaleY2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 5, time, time2, mixShearY, mixShearY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n mixScaleX = mixScaleX2;\r\n mixScaleY = mixScaleY2;\r\n mixScaleX = mixScaleX2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n if (map.path) {\r\n for (let constraintName in map.path) {\r\n let constraintMap = map.path[constraintName];\r\n let constraint = skeletonData.findPathConstraint(constraintName);\r\n if (!constraint)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n let constraintIndex = skeletonData.pathConstraints.indexOf(constraint);\r\n for (let timelineName in constraintMap) {\r\n let timelineMap = constraintMap[timelineName];\r\n let keyMap = timelineMap[0];\r\n if (!keyMap)\r\n continue;\r\n let frames = timelineMap.length;\r\n if (timelineName === \"position\") {\r\n let timeline = new PathConstraintPositionTimeline(frames, frames, constraintIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.positionMode == 0 /* Fixed */ ? scale : 1));\r\n } else if (timelineName === \"spacing\") {\r\n let timeline = new PathConstraintSpacingTimeline(frames, frames, constraintIndex);\r\n timelines.push(readTimeline12(timelineMap, timeline, 0, constraint.spacingMode == 0 /* Length */ || constraint.spacingMode == 1 /* Fixed */ ? scale : 1));\r\n } else if (timelineName === \"mix\") {\r\n let timeline = new PathConstraintMixTimeline(frames, frames * 3, constraintIndex);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mixRotate = getValue(keyMap, \"mixRotate\", 1);\r\n let mixX = getValue(keyMap, \"mixX\", 1);\r\n let mixY = getValue(keyMap, \"mixY\", mixX);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n timeline.setFrame(frame, time, mixRotate, mixX, mixY);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let mixRotate2 = getValue(nextMap, \"mixRotate\", 1);\r\n let mixX2 = getValue(nextMap, \"mixX\", 1);\r\n let mixY2 = getValue(nextMap, \"mixY\", mixX2);\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, mixRotate, mixRotate2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, mixX, mixX2, 1);\r\n bezier = readCurve(curve, timeline, bezier, frame, 2, time, time2, mixY, mixY2, 1);\r\n }\r\n time = time2;\r\n mixRotate = mixRotate2;\r\n mixX = mixX2;\r\n mixY = mixY2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n if (map.attachments) {\r\n for (let attachmentsName in map.attachments) {\r\n let attachmentsMap = map.attachments[attachmentsName];\r\n let skin = skeletonData.findSkin(attachmentsName);\r\n if (!skin)\r\n throw new Error(\"Skin not found: \" + attachmentsName);\r\n for (let slotMapName in attachmentsMap) {\r\n let slotMap = attachmentsMap[slotMapName];\r\n let slot = skeletonData.findSlot(slotMapName);\r\n if (!slot)\r\n throw new Error(\"Slot not found: \" + slotMapName);\r\n let slotIndex = slot.index;\r\n for (let attachmentMapName in slotMap) {\r\n let attachmentMap = slotMap[attachmentMapName];\r\n let attachment = skin.getAttachment(slotIndex, attachmentMapName);\r\n for (let timelineMapName in attachmentMap) {\r\n let timelineMap = attachmentMap[timelineMapName];\r\n let keyMap = timelineMap[0];\r\n if (!keyMap)\r\n continue;\r\n if (timelineMapName == \"deform\") {\r\n let weighted = attachment.bones;\r\n let vertices = attachment.vertices;\r\n let deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n let timeline = new DeformTimeline(timelineMap.length, timelineMap.length, slotIndex, attachment);\r\n let time = getValue(keyMap, \"time\", 0);\r\n for (let frame = 0, bezier = 0; ; frame++) {\r\n let deform;\r\n let verticesValue = getValue(keyMap, \"vertices\", null);\r\n if (!verticesValue)\r\n deform = weighted ? Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = Utils.newFloatArray(deformLength);\r\n let start = getValue(keyMap, \"offset\", 0);\r\n Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (let i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (let i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frame, time, deform);\r\n let nextMap = timelineMap[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n break;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let curve = keyMap.curve;\r\n if (curve)\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, 0, 1, 1);\r\n time = time2;\r\n keyMap = nextMap;\r\n }\r\n timelines.push(timeline);\r\n } else if (timelineMapName == \"sequence\") {\r\n let timeline = new SequenceTimeline(timelineMap.length, slotIndex, attachment);\r\n let lastDelay = 0;\r\n for (let frame = 0; frame < timelineMap.length; frame++) {\r\n let delay = getValue(keyMap, \"delay\", lastDelay);\r\n let time = getValue(keyMap, \"time\", 0);\r\n let mode = SequenceMode[getValue(keyMap, \"mode\", \"hold\")];\r\n let index = getValue(keyMap, \"index\", 0);\r\n timeline.setFrame(frame, time, mode, index, delay);\r\n lastDelay = delay;\r\n keyMap = timelineMap[frame + 1];\r\n }\r\n timelines.push(timeline);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (map.drawOrder) {\r\n let timeline = new DrawOrderTimeline(map.drawOrder.length);\r\n let slotCount = skeletonData.slots.length;\r\n let frame = 0;\r\n for (let i = 0; i < map.drawOrder.length; i++, frame++) {\r\n let drawOrderMap = map.drawOrder[i];\r\n let drawOrder = null;\r\n let offsets = getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets) {\r\n drawOrder = Utils.newArray(slotCount, -1);\r\n let unchanged = Utils.newArray(slotCount - offsets.length, 0);\r\n let originalIndex = 0, unchangedIndex = 0;\r\n for (let ii = 0; ii < offsets.length; ii++) {\r\n let offsetMap = offsets[ii];\r\n let slot = skeletonData.findSlot(offsetMap.slot);\r\n if (!slot)\r\n throw new Error(\"Slot not found: \" + slot);\r\n let slotIndex = slot.index;\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (let ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frame, getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n }\r\n if (map.events) {\r\n let timeline = new EventTimeline(map.events.length);\r\n let frame = 0;\r\n for (let i = 0; i < map.events.length; i++, frame++) {\r\n let eventMap = map.events[i];\r\n let eventData = skeletonData.findEvent(eventMap.name);\r\n if (!eventData)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n let event = new Event(Utils.toSinglePrecision(getValue(eventMap, \"time\", 0)), eventData);\r\n event.intValue = getValue(eventMap, \"int\", eventData.intValue);\r\n event.floatValue = getValue(eventMap, \"float\", eventData.floatValue);\r\n event.stringValue = getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event.data.audioPath) {\r\n event.volume = getValue(eventMap, \"volume\", 1);\r\n event.balance = getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frame, event);\r\n }\r\n timelines.push(timeline);\r\n }\r\n let duration = 0;\r\n for (let i = 0, n = timelines.length; i < n; i++)\r\n duration = Math.max(duration, timelines[i].getDuration());\r\n skeletonData.animations.push(new Animation(name, timelines, duration));\r\n }\r\n };\r\n var LinkedMesh2 = class {\r\n constructor(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritTimeline = inheritDeform;\r\n }\r\n };\r\n function readTimeline12(keys, timeline, defaultValue, scale) {\r\n let keyMap = keys[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let value = getValue(keyMap, \"value\", defaultValue) * scale;\r\n let bezier = 0;\r\n for (let frame = 0; ; frame++) {\r\n timeline.setFrame(frame, time, value);\r\n let nextMap = keys[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n return timeline;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let value2 = getValue(nextMap, \"value\", defaultValue) * scale;\r\n if (keyMap.curve)\r\n bezier = readCurve(keyMap.curve, timeline, bezier, frame, 0, time, time2, value, value2, scale);\r\n time = time2;\r\n value = value2;\r\n keyMap = nextMap;\r\n }\r\n }\r\n function readTimeline22(keys, timeline, name1, name2, defaultValue, scale) {\r\n let keyMap = keys[0];\r\n let time = getValue(keyMap, \"time\", 0);\r\n let value1 = getValue(keyMap, name1, defaultValue) * scale;\r\n let value2 = getValue(keyMap, name2, defaultValue) * scale;\r\n let bezier = 0;\r\n for (let frame = 0; ; frame++) {\r\n timeline.setFrame(frame, time, value1, value2);\r\n let nextMap = keys[frame + 1];\r\n if (!nextMap) {\r\n timeline.shrink(bezier);\r\n return timeline;\r\n }\r\n let time2 = getValue(nextMap, \"time\", 0);\r\n let nvalue1 = getValue(nextMap, name1, defaultValue) * scale;\r\n let nvalue2 = getValue(nextMap, name2, defaultValue) * scale;\r\n let curve = keyMap.curve;\r\n if (curve) {\r\n bezier = readCurve(curve, timeline, bezier, frame, 0, time, time2, value1, nvalue1, scale);\r\n bezier = readCurve(curve, timeline, bezier, frame, 1, time, time2, value2, nvalue2, scale);\r\n }\r\n time = time2;\r\n value1 = nvalue1;\r\n value2 = nvalue2;\r\n keyMap = nextMap;\r\n }\r\n }\r\n function readCurve(curve, timeline, bezier, frame, value, time1, time2, value1, value2, scale) {\r\n if (curve == \"stepped\") {\r\n timeline.setStepped(frame);\r\n return bezier;\r\n }\r\n let i = value << 2;\r\n let cx1 = curve[i];\r\n let cy1 = curve[i + 1] * scale;\r\n let cx2 = curve[i + 2];\r\n let cy2 = curve[i + 3] * scale;\r\n timeline.setBezier(bezier, frame, value, time1, value1, cx1, cy1, cx2, cy2, time2, value2);\r\n return bezier + 1;\r\n }\r\n function getValue(map, property, defaultValue) {\r\n return map[property] !== void 0 ? map[property] : defaultValue;\r\n }\r\n\r\n // spine-core/src/polyfills.ts\r\n (() => {\r\n if (typeof Math.fround === \"undefined\") {\r\n Math.fround = function(array) {\r\n return function(x) {\r\n return array[0] = x, array[0];\r\n };\r\n }(new Float32Array(1));\r\n }\r\n })();\r\n\r\n // spine-webgl/src/WebGL.ts\r\n var ManagedWebGLRenderingContext = class {\r\n constructor(canvasOrContext, contextConfig = { alpha: \"true\" }) {\r\n this.restorables = new Array();\r\n if (!(canvasOrContext instanceof WebGLRenderingContext || typeof WebGL2RenderingContext !== \"undefined\" && canvasOrContext instanceof WebGL2RenderingContext)) {\r\n let canvas = canvasOrContext;\r\n this.gl = canvas.getContext(\"webgl2\", contextConfig) || canvas.getContext(\"webgl\", contextConfig);\r\n this.canvas = canvas;\r\n canvas.addEventListener(\"webglcontextlost\", (e) => {\r\n let event = e;\r\n if (e)\r\n e.preventDefault();\r\n });\r\n canvas.addEventListener(\"webglcontextrestored\", (e) => {\r\n for (let i = 0, n = this.restorables.length; i < n; i++)\r\n this.restorables[i].restore();\r\n });\r\n } else {\r\n this.gl = canvasOrContext;\r\n this.canvas = this.gl.canvas;\r\n }\r\n }\r\n addRestorable(restorable) {\r\n this.restorables.push(restorable);\r\n }\r\n removeRestorable(restorable) {\r\n let index = this.restorables.indexOf(restorable);\r\n if (index > -1)\r\n this.restorables.splice(index, 1);\r\n }\r\n };\r\n var ONE = 1;\r\n var ONE_MINUS_SRC_COLOR = 769;\r\n var SRC_ALPHA = 770;\r\n var ONE_MINUS_SRC_ALPHA = 771;\r\n var DST_COLOR = 774;\r\n var WebGLBlendModeConverter = class {\r\n static getDestGLBlendMode(blendMode) {\r\n switch (blendMode) {\r\n case 0 /* Normal */:\r\n return ONE_MINUS_SRC_ALPHA;\r\n case 1 /* Additive */:\r\n return ONE;\r\n case 2 /* Multiply */:\r\n return ONE_MINUS_SRC_ALPHA;\r\n case 3 /* Screen */:\r\n return ONE_MINUS_SRC_ALPHA;\r\n default:\r\n throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n }\r\n static getSourceColorGLBlendMode(blendMode, premultipliedAlpha = false) {\r\n switch (blendMode) {\r\n case 0 /* Normal */:\r\n return premultipliedAlpha ? ONE : SRC_ALPHA;\r\n case 1 /* Additive */:\r\n return premultipliedAlpha ? ONE : SRC_ALPHA;\r\n case 2 /* Multiply */:\r\n return DST_COLOR;\r\n case 3 /* Screen */:\r\n return ONE;\r\n default:\r\n throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n }\r\n static getSourceAlphaGLBlendMode(blendMode) {\r\n switch (blendMode) {\r\n case 0 /* Normal */:\r\n return ONE;\r\n case 1 /* Additive */:\r\n return ONE;\r\n case 2 /* Multiply */:\r\n return ONE_MINUS_SRC_ALPHA;\r\n case 3 /* Screen */:\r\n return ONE_MINUS_SRC_COLOR;\r\n default:\r\n throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n }\r\n };\r\n\r\n // spine-webgl/src/GLTexture.ts\r\n var _GLTexture = class extends Texture {\r\n constructor(context, image, useMipMaps = false) {\r\n super(image);\r\n this.texture = null;\r\n this.boundUnit = 0;\r\n this.useMipMaps = false;\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n this.useMipMaps = useMipMaps;\r\n this.restore();\r\n this.context.addRestorable(this);\r\n }\r\n setFilters(minFilter, magFilter) {\r\n let gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, _GLTexture.validateMagFilter(magFilter));\r\n this.useMipMaps = _GLTexture.usesMipMaps(minFilter);\r\n if (this.useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n }\r\n static validateMagFilter(magFilter) {\r\n switch (magFilter) {\r\n case 9987 /* MipMap */:\r\n case 9987 /* MipMapLinearLinear */:\r\n case 9985 /* MipMapLinearNearest */:\r\n case 9986 /* MipMapNearestLinear */:\r\n case 9984 /* MipMapNearestNearest */:\r\n return 9729 /* Linear */;\r\n default:\r\n return magFilter;\r\n }\r\n }\r\n static usesMipMaps(filter) {\r\n switch (filter) {\r\n case 9987 /* MipMap */:\r\n case 9987 /* MipMapLinearLinear */:\r\n case 9985 /* MipMapLinearNearest */:\r\n case 9986 /* MipMapNearestLinear */:\r\n case 9984 /* MipMapNearestNearest */:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n setWraps(uWrap, vWrap) {\r\n let gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\r\n }\r\n update(useMipMaps) {\r\n let gl = this.context.gl;\r\n if (!this.texture)\r\n this.texture = this.context.gl.createTexture();\r\n this.bind();\r\n if (_GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n }\r\n restore() {\r\n this.texture = null;\r\n this.update(this.useMipMaps);\r\n }\r\n bind(unit = 0) {\r\n let gl = this.context.gl;\r\n this.boundUnit = unit;\r\n gl.activeTexture(gl.TEXTURE0 + unit);\r\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\r\n }\r\n unbind() {\r\n let gl = this.context.gl;\r\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\r\n gl.bindTexture(gl.TEXTURE_2D, null);\r\n }\r\n dispose() {\r\n this.context.removeRestorable(this);\r\n let gl = this.context.gl;\r\n gl.deleteTexture(this.texture);\r\n }\r\n };\r\n var GLTexture = _GLTexture;\r\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\r\n\r\n // spine-webgl/src/AssetManager.ts\r\n var AssetManager = class extends AssetManagerBase {\r\n constructor(context, pathPrefix = \"\", downloader = new Downloader()) {\r\n super((image) => {\r\n return new GLTexture(context, image);\r\n }, pathPrefix, downloader);\r\n }\r\n };\r\n\r\n // spine-webgl/src/Vector3.ts\r\n var Vector3 = class {\r\n constructor(x = 0, y = 0, z = 0) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n setFrom(v) {\r\n this.x = v.x;\r\n this.y = v.y;\r\n this.z = v.z;\r\n return this;\r\n }\r\n set(x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n }\r\n add(v) {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n return this;\r\n }\r\n sub(v) {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n return this;\r\n }\r\n scale(s) {\r\n this.x *= s;\r\n this.y *= s;\r\n this.z *= s;\r\n return this;\r\n }\r\n normalize() {\r\n let len = this.length();\r\n if (len == 0)\r\n return this;\r\n len = 1 / len;\r\n this.x *= len;\r\n this.y *= len;\r\n this.z *= len;\r\n return this;\r\n }\r\n cross(v) {\r\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\r\n }\r\n multiply(matrix) {\r\n let l_mat = matrix.values;\r\n return this.set(\r\n this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03],\r\n this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13],\r\n this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]\r\n );\r\n }\r\n project(matrix) {\r\n let l_mat = matrix.values;\r\n let l_w = 1 / (this.x * l_mat[M30] + this.y * l_mat[M31] + this.z * l_mat[M32] + l_mat[M33]);\r\n return this.set(\r\n (this.x * l_mat[M00] + this.y * l_mat[M01] + this.z * l_mat[M02] + l_mat[M03]) * l_w,\r\n (this.x * l_mat[M10] + this.y * l_mat[M11] + this.z * l_mat[M12] + l_mat[M13]) * l_w,\r\n (this.x * l_mat[M20] + this.y * l_mat[M21] + this.z * l_mat[M22] + l_mat[M23]) * l_w\r\n );\r\n }\r\n dot(v) {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n }\r\n length() {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n }\r\n distance(v) {\r\n let a = v.x - this.x;\r\n let b = v.y - this.y;\r\n let c = v.z - this.z;\r\n return Math.sqrt(a * a + b * b + c * c);\r\n }\r\n };\r\n\r\n // spine-webgl/src/Matrix4.ts\r\n var M00 = 0;\r\n var M01 = 4;\r\n var M02 = 8;\r\n var M03 = 12;\r\n var M10 = 1;\r\n var M11 = 5;\r\n var M12 = 9;\r\n var M13 = 13;\r\n var M20 = 2;\r\n var M21 = 6;\r\n var M22 = 10;\r\n var M23 = 14;\r\n var M30 = 3;\r\n var M31 = 7;\r\n var M32 = 11;\r\n var M33 = 15;\r\n var _Matrix4 = class {\r\n constructor() {\r\n this.temp = new Float32Array(16);\r\n this.values = new Float32Array(16);\r\n let v = this.values;\r\n v[M00] = 1;\r\n v[M11] = 1;\r\n v[M22] = 1;\r\n v[M33] = 1;\r\n }\r\n set(values) {\r\n this.values.set(values);\r\n return this;\r\n }\r\n transpose() {\r\n let t = this.temp;\r\n let v = this.values;\r\n t[M00] = v[M00];\r\n t[M01] = v[M10];\r\n t[M02] = v[M20];\r\n t[M03] = v[M30];\r\n t[M10] = v[M01];\r\n t[M11] = v[M11];\r\n t[M12] = v[M21];\r\n t[M13] = v[M31];\r\n t[M20] = v[M02];\r\n t[M21] = v[M12];\r\n t[M22] = v[M22];\r\n t[M23] = v[M32];\r\n t[M30] = v[M03];\r\n t[M31] = v[M13];\r\n t[M32] = v[M23];\r\n t[M33] = v[M33];\r\n return this.set(t);\r\n }\r\n identity() {\r\n let v = this.values;\r\n v[M00] = 1;\r\n v[M01] = 0;\r\n v[M02] = 0;\r\n v[M03] = 0;\r\n v[M10] = 0;\r\n v[M11] = 1;\r\n v[M12] = 0;\r\n v[M13] = 0;\r\n v[M20] = 0;\r\n v[M21] = 0;\r\n v[M22] = 1;\r\n v[M23] = 0;\r\n v[M30] = 0;\r\n v[M31] = 0;\r\n v[M32] = 0;\r\n v[M33] = 1;\r\n return this;\r\n }\r\n invert() {\r\n let v = this.values;\r\n let t = this.temp;\r\n let l_det = v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33];\r\n if (l_det == 0)\r\n throw new Error(\"non-invertible matrix\");\r\n let inv_det = 1 / l_det;\r\n t[M00] = v[M12] * v[M23] * v[M31] - v[M13] * v[M22] * v[M31] + v[M13] * v[M21] * v[M32] - v[M11] * v[M23] * v[M32] - v[M12] * v[M21] * v[M33] + v[M11] * v[M22] * v[M33];\r\n t[M01] = v[M03] * v[M22] * v[M31] - v[M02] * v[M23] * v[M31] - v[M03] * v[M21] * v[M32] + v[M01] * v[M23] * v[M32] + v[M02] * v[M21] * v[M33] - v[M01] * v[M22] * v[M33];\r\n t[M02] = v[M02] * v[M13] * v[M31] - v[M03] * v[M12] * v[M31] + v[M03] * v[M11] * v[M32] - v[M01] * v[M13] * v[M32] - v[M02] * v[M11] * v[M33] + v[M01] * v[M12] * v[M33];\r\n t[M03] = v[M03] * v[M12] * v[M21] - v[M02] * v[M13] * v[M21] - v[M03] * v[M11] * v[M22] + v[M01] * v[M13] * v[M22] + v[M02] * v[M11] * v[M23] - v[M01] * v[M12] * v[M23];\r\n t[M10] = v[M13] * v[M22] * v[M30] - v[M12] * v[M23] * v[M30] - v[M13] * v[M20] * v[M32] + v[M10] * v[M23] * v[M32] + v[M12] * v[M20] * v[M33] - v[M10] * v[M22] * v[M33];\r\n t[M11] = v[M02] * v[M23] * v[M30] - v[M03] * v[M22] * v[M30] + v[M03] * v[M20] * v[M32] - v[M00] * v[M23] * v[M32] - v[M02] * v[M20] * v[M33] + v[M00] * v[M22] * v[M33];\r\n t[M12] = v[M03] * v[M12] * v[M30] - v[M02] * v[M13] * v[M30] - v[M03] * v[M10] * v[M32] + v[M00] * v[M13] * v[M32] + v[M02] * v[M10] * v[M33] - v[M00] * v[M12] * v[M33];\r\n t[M13] = v[M02] * v[M13] * v[M20] - v[M03] * v[M12] * v[M20] + v[M03] * v[M10] * v[M22] - v[M00] * v[M13] * v[M22] - v[M02] * v[M10] * v[M23] + v[M00] * v[M12] * v[M23];\r\n t[M20] = v[M11] * v[M23] * v[M30] - v[M13] * v[M21] * v[M30] + v[M13] * v[M20] * v[M31] - v[M10] * v[M23] * v[M31] - v[M11] * v[M20] * v[M33] + v[M10] * v[M21] * v[M33];\r\n t[M21] = v[M03] * v[M21] * v[M30] - v[M01] * v[M23] * v[M30] - v[M03] * v[M20] * v[M31] + v[M00] * v[M23] * v[M31] + v[M01] * v[M20] * v[M33] - v[M00] * v[M21] * v[M33];\r\n t[M22] = v[M01] * v[M13] * v[M30] - v[M03] * v[M11] * v[M30] + v[M03] * v[M10] * v[M31] - v[M00] * v[M13] * v[M31] - v[M01] * v[M10] * v[M33] + v[M00] * v[M11] * v[M33];\r\n t[M23] = v[M03] * v[M11] * v[M20] - v[M01] * v[M13] * v[M20] - v[M03] * v[M10] * v[M21] + v[M00] * v[M13] * v[M21] + v[M01] * v[M10] * v[M23] - v[M00] * v[M11] * v[M23];\r\n t[M30] = v[M12] * v[M21] * v[M30] - v[M11] * v[M22] * v[M30] - v[M12] * v[M20] * v[M31] + v[M10] * v[M22] * v[M31] + v[M11] * v[M20] * v[M32] - v[M10] * v[M21] * v[M32];\r\n t[M31] = v[M01] * v[M22] * v[M30] - v[M02] * v[M21] * v[M30] + v[M02] * v[M20] * v[M31] - v[M00] * v[M22] * v[M31] - v[M01] * v[M20] * v[M32] + v[M00] * v[M21] * v[M32];\r\n t[M32] = v[M02] * v[M11] * v[M30] - v[M01] * v[M12] * v[M30] - v[M02] * v[M10] * v[M31] + v[M00] * v[M12] * v[M31] + v[M01] * v[M10] * v[M32] - v[M00] * v[M11] * v[M32];\r\n t[M33] = v[M01] * v[M12] * v[M20] - v[M02] * v[M11] * v[M20] + v[M02] * v[M10] * v[M21] - v[M00] * v[M12] * v[M21] - v[M01] * v[M10] * v[M22] + v[M00] * v[M11] * v[M22];\r\n v[M00] = t[M00] * inv_det;\r\n v[M01] = t[M01] * inv_det;\r\n v[M02] = t[M02] * inv_det;\r\n v[M03] = t[M03] * inv_det;\r\n v[M10] = t[M10] * inv_det;\r\n v[M11] = t[M11] * inv_det;\r\n v[M12] = t[M12] * inv_det;\r\n v[M13] = t[M13] * inv_det;\r\n v[M20] = t[M20] * inv_det;\r\n v[M21] = t[M21] * inv_det;\r\n v[M22] = t[M22] * inv_det;\r\n v[M23] = t[M23] * inv_det;\r\n v[M30] = t[M30] * inv_det;\r\n v[M31] = t[M31] * inv_det;\r\n v[M32] = t[M32] * inv_det;\r\n v[M33] = t[M33] * inv_det;\r\n return this;\r\n }\r\n determinant() {\r\n let v = this.values;\r\n return v[M30] * v[M21] * v[M12] * v[M03] - v[M20] * v[M31] * v[M12] * v[M03] - v[M30] * v[M11] * v[M22] * v[M03] + v[M10] * v[M31] * v[M22] * v[M03] + v[M20] * v[M11] * v[M32] * v[M03] - v[M10] * v[M21] * v[M32] * v[M03] - v[M30] * v[M21] * v[M02] * v[M13] + v[M20] * v[M31] * v[M02] * v[M13] + v[M30] * v[M01] * v[M22] * v[M13] - v[M00] * v[M31] * v[M22] * v[M13] - v[M20] * v[M01] * v[M32] * v[M13] + v[M00] * v[M21] * v[M32] * v[M13] + v[M30] * v[M11] * v[M02] * v[M23] - v[M10] * v[M31] * v[M02] * v[M23] - v[M30] * v[M01] * v[M12] * v[M23] + v[M00] * v[M31] * v[M12] * v[M23] + v[M10] * v[M01] * v[M32] * v[M23] - v[M00] * v[M11] * v[M32] * v[M23] - v[M20] * v[M11] * v[M02] * v[M33] + v[M10] * v[M21] * v[M02] * v[M33] + v[M20] * v[M01] * v[M12] * v[M33] - v[M00] * v[M21] * v[M12] * v[M33] - v[M10] * v[M01] * v[M22] * v[M33] + v[M00] * v[M11] * v[M22] * v[M33];\r\n }\r\n translate(x, y, z) {\r\n let v = this.values;\r\n v[M03] += x;\r\n v[M13] += y;\r\n v[M23] += z;\r\n return this;\r\n }\r\n copy() {\r\n return new _Matrix4().set(this.values);\r\n }\r\n projection(near, far, fovy, aspectRatio) {\r\n this.identity();\r\n let l_fd = 1 / Math.tan(fovy * (Math.PI / 180) / 2);\r\n let l_a1 = (far + near) / (near - far);\r\n let l_a2 = 2 * far * near / (near - far);\r\n let v = this.values;\r\n v[M00] = l_fd / aspectRatio;\r\n v[M10] = 0;\r\n v[M20] = 0;\r\n v[M30] = 0;\r\n v[M01] = 0;\r\n v[M11] = l_fd;\r\n v[M21] = 0;\r\n v[M31] = 0;\r\n v[M02] = 0;\r\n v[M12] = 0;\r\n v[M22] = l_a1;\r\n v[M32] = -1;\r\n v[M03] = 0;\r\n v[M13] = 0;\r\n v[M23] = l_a2;\r\n v[M33] = 0;\r\n return this;\r\n }\r\n ortho2d(x, y, width, height) {\r\n return this.ortho(x, x + width, y, y + height, 0, 1);\r\n }\r\n ortho(left, right, bottom, top, near, far) {\r\n this.identity();\r\n let x_orth = 2 / (right - left);\r\n let y_orth = 2 / (top - bottom);\r\n let z_orth = -2 / (far - near);\r\n let tx = -(right + left) / (right - left);\r\n let ty = -(top + bottom) / (top - bottom);\r\n let tz = -(far + near) / (far - near);\r\n let v = this.values;\r\n v[M00] = x_orth;\r\n v[M10] = 0;\r\n v[M20] = 0;\r\n v[M30] = 0;\r\n v[M01] = 0;\r\n v[M11] = y_orth;\r\n v[M21] = 0;\r\n v[M31] = 0;\r\n v[M02] = 0;\r\n v[M12] = 0;\r\n v[M22] = z_orth;\r\n v[M32] = 0;\r\n v[M03] = tx;\r\n v[M13] = ty;\r\n v[M23] = tz;\r\n v[M33] = 1;\r\n return this;\r\n }\r\n multiply(matrix) {\r\n let t = this.temp;\r\n let v = this.values;\r\n let m = matrix.values;\r\n t[M00] = v[M00] * m[M00] + v[M01] * m[M10] + v[M02] * m[M20] + v[M03] * m[M30];\r\n t[M01] = v[M00] * m[M01] + v[M01] * m[M11] + v[M02] * m[M21] + v[M03] * m[M31];\r\n t[M02] = v[M00] * m[M02] + v[M01] * m[M12] + v[M02] * m[M22] + v[M03] * m[M32];\r\n t[M03] = v[M00] * m[M03] + v[M01] * m[M13] + v[M02] * m[M23] + v[M03] * m[M33];\r\n t[M10] = v[M10] * m[M00] + v[M11] * m[M10] + v[M12] * m[M20] + v[M13] * m[M30];\r\n t[M11] = v[M10] * m[M01] + v[M11] * m[M11] + v[M12] * m[M21] + v[M13] * m[M31];\r\n t[M12] = v[M10] * m[M02] + v[M11] * m[M12] + v[M12] * m[M22] + v[M13] * m[M32];\r\n t[M13] = v[M10] * m[M03] + v[M11] * m[M13] + v[M12] * m[M23] + v[M13] * m[M33];\r\n t[M20] = v[M20] * m[M00] + v[M21] * m[M10] + v[M22] * m[M20] + v[M23] * m[M30];\r\n t[M21] = v[M20] * m[M01] + v[M21] * m[M11] + v[M22] * m[M21] + v[M23] * m[M31];\r\n t[M22] = v[M20] * m[M02] + v[M21] * m[M12] + v[M22] * m[M22] + v[M23] * m[M32];\r\n t[M23] = v[M20] * m[M03] + v[M21] * m[M13] + v[M22] * m[M23] + v[M23] * m[M33];\r\n t[M30] = v[M30] * m[M00] + v[M31] * m[M10] + v[M32] * m[M20] + v[M33] * m[M30];\r\n t[M31] = v[M30] * m[M01] + v[M31] * m[M11] + v[M32] * m[M21] + v[M33] * m[M31];\r\n t[M32] = v[M30] * m[M02] + v[M31] * m[M12] + v[M32] * m[M22] + v[M33] * m[M32];\r\n t[M33] = v[M30] * m[M03] + v[M31] * m[M13] + v[M32] * m[M23] + v[M33] * m[M33];\r\n return this.set(this.temp);\r\n }\r\n multiplyLeft(matrix) {\r\n let t = this.temp;\r\n let v = this.values;\r\n let m = matrix.values;\r\n t[M00] = m[M00] * v[M00] + m[M01] * v[M10] + m[M02] * v[M20] + m[M03] * v[M30];\r\n t[M01] = m[M00] * v[M01] + m[M01] * v[M11] + m[M02] * v[M21] + m[M03] * v[M31];\r\n t[M02] = m[M00] * v[M02] + m[M01] * v[M12] + m[M02] * v[M22] + m[M03] * v[M32];\r\n t[M03] = m[M00] * v[M03] + m[M01] * v[M13] + m[M02] * v[M23] + m[M03] * v[M33];\r\n t[M10] = m[M10] * v[M00] + m[M11] * v[M10] + m[M12] * v[M20] + m[M13] * v[M30];\r\n t[M11] = m[M10] * v[M01] + m[M11] * v[M11] + m[M12] * v[M21] + m[M13] * v[M31];\r\n t[M12] = m[M10] * v[M02] + m[M11] * v[M12] + m[M12] * v[M22] + m[M13] * v[M32];\r\n t[M13] = m[M10] * v[M03] + m[M11] * v[M13] + m[M12] * v[M23] + m[M13] * v[M33];\r\n t[M20] = m[M20] * v[M00] + m[M21] * v[M10] + m[M22] * v[M20] + m[M23] * v[M30];\r\n t[M21] = m[M20] * v[M01] + m[M21] * v[M11] + m[M22] * v[M21] + m[M23] * v[M31];\r\n t[M22] = m[M20] * v[M02] + m[M21] * v[M12] + m[M22] * v[M22] + m[M23] * v[M32];\r\n t[M23] = m[M20] * v[M03] + m[M21] * v[M13] + m[M22] * v[M23] + m[M23] * v[M33];\r\n t[M30] = m[M30] * v[M00] + m[M31] * v[M10] + m[M32] * v[M20] + m[M33] * v[M30];\r\n t[M31] = m[M30] * v[M01] + m[M31] * v[M11] + m[M32] * v[M21] + m[M33] * v[M31];\r\n t[M32] = m[M30] * v[M02] + m[M31] * v[M12] + m[M32] * v[M22] + m[M33] * v[M32];\r\n t[M33] = m[M30] * v[M03] + m[M31] * v[M13] + m[M32] * v[M23] + m[M33] * v[M33];\r\n return this.set(this.temp);\r\n }\r\n lookAt(position, direction, up) {\r\n let xAxis = _Matrix4.xAxis, yAxis = _Matrix4.yAxis, zAxis = _Matrix4.zAxis;\r\n zAxis.setFrom(direction).normalize();\r\n xAxis.setFrom(direction).normalize();\r\n xAxis.cross(up).normalize();\r\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\r\n this.identity();\r\n let val = this.values;\r\n val[M00] = xAxis.x;\r\n val[M01] = xAxis.y;\r\n val[M02] = xAxis.z;\r\n val[M10] = yAxis.x;\r\n val[M11] = yAxis.y;\r\n val[M12] = yAxis.z;\r\n val[M20] = -zAxis.x;\r\n val[M21] = -zAxis.y;\r\n val[M22] = -zAxis.z;\r\n _Matrix4.tmpMatrix.identity();\r\n _Matrix4.tmpMatrix.values[M03] = -position.x;\r\n _Matrix4.tmpMatrix.values[M13] = -position.y;\r\n _Matrix4.tmpMatrix.values[M23] = -position.z;\r\n this.multiply(_Matrix4.tmpMatrix);\r\n return this;\r\n }\r\n };\r\n var Matrix42 = _Matrix4;\r\n Matrix42.xAxis = new Vector3();\r\n Matrix42.yAxis = new Vector3();\r\n Matrix42.zAxis = new Vector3();\r\n Matrix42.tmpMatrix = new _Matrix4();\r\n\r\n // spine-webgl/src/Camera.ts\r\n var OrthoCamera = class {\r\n constructor(viewportWidth, viewportHeight) {\r\n this.position = new Vector3(0, 0, 0);\r\n this.direction = new Vector3(0, 0, -1);\r\n this.up = new Vector3(0, 1, 0);\r\n this.near = 0;\r\n this.far = 100;\r\n this.zoom = 1;\r\n this.viewportWidth = 0;\r\n this.viewportHeight = 0;\r\n this.projectionView = new Matrix42();\r\n this.inverseProjectionView = new Matrix42();\r\n this.projection = new Matrix42();\r\n this.view = new Matrix42();\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n this.update();\r\n }\r\n update() {\r\n let projection = this.projection;\r\n let view = this.view;\r\n let projectionView = this.projectionView;\r\n let inverseProjectionView = this.inverseProjectionView;\r\n let zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\r\n projection.ortho(\r\n zoom * (-viewportWidth / 2),\r\n zoom * (viewportWidth / 2),\r\n zoom * (-viewportHeight / 2),\r\n zoom * (viewportHeight / 2),\r\n this.near,\r\n this.far\r\n );\r\n view.lookAt(this.position, this.direction, this.up);\r\n projectionView.set(projection.values);\r\n projectionView.multiply(view);\r\n inverseProjectionView.set(projectionView.values).invert();\r\n }\r\n screenToWorld(screenCoords, screenWidth, screenHeight) {\r\n let x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\r\n screenCoords.x = 2 * x / screenWidth - 1;\r\n screenCoords.y = 2 * y / screenHeight - 1;\r\n screenCoords.z = 2 * screenCoords.z - 1;\r\n screenCoords.project(this.inverseProjectionView);\r\n return screenCoords;\r\n }\r\n worldToScreen(worldCoords, screenWidth, screenHeight) {\r\n worldCoords.project(this.projectionView);\r\n worldCoords.x = screenWidth * (worldCoords.x + 1) / 2;\r\n worldCoords.y = screenHeight * (worldCoords.y + 1) / 2;\r\n worldCoords.z = (worldCoords.z + 1) / 2;\r\n return worldCoords;\r\n }\r\n setViewport(viewportWidth, viewportHeight) {\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n }\r\n };\r\n\r\n // spine-webgl/src/Input.ts\r\n var Input = class {\r\n constructor(element) {\r\n this.mouseX = 0;\r\n this.mouseY = 0;\r\n this.buttonDown = false;\r\n this.touch0 = null;\r\n this.touch1 = null;\r\n this.initialPinchDistance = 0;\r\n this.listeners = new Array();\r\n this.eventListeners = [];\r\n this.element = element;\r\n this.setupCallbacks(element);\r\n }\r\n setupCallbacks(element) {\r\n let mouseDown = (ev) => {\r\n if (ev instanceof MouseEvent) {\r\n let rect = element.getBoundingClientRect();\r\n this.mouseX = ev.clientX - rect.left;\r\n ;\r\n this.mouseY = ev.clientY - rect.top;\r\n this.buttonDown = true;\r\n this.listeners.map((listener) => {\r\n if (listener.down)\r\n listener.down(this.mouseX, this.mouseY);\r\n });\r\n document.addEventListener(\"mousemove\", mouseMove);\r\n document.addEventListener(\"mouseup\", mouseUp);\r\n }\r\n };\r\n let mouseMove = (ev) => {\r\n if (ev instanceof MouseEvent) {\r\n let rect = element.getBoundingClientRect();\r\n this.mouseX = ev.clientX - rect.left;\r\n ;\r\n this.mouseY = ev.clientY - rect.top;\r\n this.listeners.map((listener) => {\r\n if (this.buttonDown) {\r\n if (listener.dragged)\r\n listener.dragged(this.mouseX, this.mouseY);\r\n } else {\r\n if (listener.moved)\r\n listener.moved(this.mouseX, this.mouseY);\r\n }\r\n });\r\n }\r\n };\r\n let mouseUp = (ev) => {\r\n if (ev instanceof MouseEvent) {\r\n let rect = element.getBoundingClientRect();\r\n this.mouseX = ev.clientX - rect.left;\r\n ;\r\n this.mouseY = ev.clientY - rect.top;\r\n this.buttonDown = false;\r\n this.listeners.map((listener) => {\r\n if (listener.up)\r\n listener.up(this.mouseX, this.mouseY);\r\n });\r\n document.removeEventListener(\"mousemove\", mouseMove);\r\n document.removeEventListener(\"mouseup\", mouseUp);\r\n }\r\n };\r\n let mouseWheel = (e) => {\r\n e.preventDefault();\r\n let deltaY = e.deltaY;\r\n if (e.deltaMode == WheelEvent.DOM_DELTA_LINE)\r\n deltaY *= 8;\r\n if (e.deltaMode == WheelEvent.DOM_DELTA_PAGE)\r\n deltaY *= 24;\r\n this.listeners.map((listener) => {\r\n if (listener.wheel)\r\n listener.wheel(e.deltaY);\r\n });\r\n };\r\n element.addEventListener(\"mousedown\", mouseDown, true);\r\n element.addEventListener(\"mousemove\", mouseMove, true);\r\n element.addEventListener(\"mouseup\", mouseUp, true);\r\n element.addEventListener(\"wheel\", mouseWheel, true);\r\n element.addEventListener(\"touchstart\", (ev) => {\r\n if (!this.touch0 || !this.touch1) {\r\n var touches = ev.changedTouches;\r\n let nativeTouch = touches.item(0);\r\n if (!nativeTouch)\r\n return;\r\n let rect = element.getBoundingClientRect();\r\n let x = nativeTouch.clientX - rect.left;\r\n let y = nativeTouch.clientY - rect.top;\r\n let touch = new Touch(nativeTouch.identifier, x, y);\r\n this.mouseX = x;\r\n this.mouseY = y;\r\n this.buttonDown = true;\r\n if (!this.touch0) {\r\n this.touch0 = touch;\r\n this.listeners.map((listener) => {\r\n if (listener.down)\r\n listener.down(touch.x, touch.y);\r\n });\r\n } else if (!this.touch1) {\r\n this.touch1 = touch;\r\n let dx = this.touch1.x - this.touch0.x;\r\n let dy = this.touch1.x - this.touch0.x;\r\n this.initialPinchDistance = Math.sqrt(dx * dx + dy * dy);\r\n this.listeners.map((listener) => {\r\n if (listener.zoom)\r\n listener.zoom(this.initialPinchDistance, this.initialPinchDistance);\r\n });\r\n }\r\n }\r\n ev.preventDefault();\r\n }, false);\r\n element.addEventListener(\"touchmove\", (ev) => {\r\n if (this.touch0) {\r\n var touches = ev.changedTouches;\r\n let rect = element.getBoundingClientRect();\r\n for (var i = 0; i < touches.length; i++) {\r\n var nativeTouch = touches[i];\r\n let x = nativeTouch.clientX - rect.left;\r\n let y = nativeTouch.clientY - rect.top;\r\n if (this.touch0.identifier === nativeTouch.identifier) {\r\n this.touch0.x = this.mouseX = x;\r\n this.touch0.y = this.mouseY = y;\r\n this.listeners.map((listener) => {\r\n if (listener.dragged)\r\n listener.dragged(x, y);\r\n });\r\n }\r\n if (this.touch1 && this.touch1.identifier === nativeTouch.identifier) {\r\n this.touch1.x = this.mouseX = x;\r\n this.touch1.y = this.mouseY = y;\r\n }\r\n }\r\n if (this.touch0 && this.touch1) {\r\n let dx = this.touch1.x - this.touch0.x;\r\n let dy = this.touch1.x - this.touch0.x;\r\n let distance = Math.sqrt(dx * dx + dy * dy);\r\n this.listeners.map((listener) => {\r\n if (listener.zoom)\r\n listener.zoom(this.initialPinchDistance, distance);\r\n });\r\n }\r\n }\r\n ev.preventDefault();\r\n }, false);\r\n let touchEnd = (ev) => {\r\n if (this.touch0) {\r\n var touches = ev.changedTouches;\r\n let rect = element.getBoundingClientRect();\r\n for (var i = 0; i < touches.length; i++) {\r\n var nativeTouch = touches[i];\r\n let x = nativeTouch.clientX - rect.left;\r\n let y = nativeTouch.clientY - rect.top;\r\n if (this.touch0.identifier === nativeTouch.identifier) {\r\n this.touch0 = null;\r\n this.mouseX = x;\r\n this.mouseY = y;\r\n this.listeners.map((listener) => {\r\n if (listener.up)\r\n listener.up(x, y);\r\n });\r\n if (!this.touch1) {\r\n this.buttonDown = false;\r\n break;\r\n } else {\r\n this.touch0 = this.touch1;\r\n this.touch1 = null;\r\n this.mouseX = this.touch0.x;\r\n this.mouseX = this.touch0.x;\r\n this.buttonDown = true;\r\n this.listeners.map((listener) => {\r\n if (listener.down)\r\n listener.down(this.touch0.x, this.touch0.y);\r\n });\r\n }\r\n }\r\n if (this.touch1 && this.touch1.identifier) {\r\n this.touch1 = null;\r\n }\r\n }\r\n }\r\n ev.preventDefault();\r\n };\r\n element.addEventListener(\"touchend\", touchEnd, false);\r\n element.addEventListener(\"touchcancel\", touchEnd);\r\n }\r\n addListener(listener) {\r\n this.listeners.push(listener);\r\n }\r\n removeListener(listener) {\r\n let idx = this.listeners.indexOf(listener);\r\n if (idx > -1) {\r\n this.listeners.splice(idx, 1);\r\n }\r\n }\r\n };\r\n var Touch = class {\r\n constructor(identifier, x, y) {\r\n this.identifier = identifier;\r\n this.x = x;\r\n this.y = y;\r\n }\r\n };\r\n\r\n // spine-webgl/src/CameraController.ts\r\n var CameraController = class {\r\n constructor(canvas, camera) {\r\n this.canvas = canvas;\r\n this.camera = camera;\r\n let cameraX = 0, cameraY = 0, cameraZoom = 0;\r\n let mouseX = 0, mouseY = 0;\r\n let lastX = 0, lastY = 0;\r\n let initialZoom = 0;\r\n new Input(canvas).addListener({\r\n down: (x, y) => {\r\n cameraX = camera.position.x;\r\n cameraY = camera.position.y;\r\n mouseX = lastX = x;\r\n mouseY = lastY = y;\r\n initialZoom = camera.zoom;\r\n },\r\n dragged: (x, y) => {\r\n let deltaX = x - mouseX;\r\n let deltaY = y - mouseY;\r\n let originWorld = camera.screenToWorld(new Vector3(0, 0), canvas.clientWidth, canvas.clientHeight);\r\n let deltaWorld = camera.screenToWorld(new Vector3(deltaX, deltaY), canvas.clientWidth, canvas.clientHeight).sub(originWorld);\r\n camera.position.set(cameraX - deltaWorld.x, cameraY - deltaWorld.y, 0);\r\n camera.update();\r\n lastX = x;\r\n lastY = y;\r\n },\r\n wheel: (delta) => {\r\n let zoomAmount = delta / 200 * camera.zoom;\r\n let newZoom = camera.zoom + zoomAmount;\r\n if (newZoom > 0) {\r\n let x = 0, y = 0;\r\n if (delta < 0) {\r\n x = lastX;\r\n y = lastY;\r\n } else {\r\n let viewCenter = new Vector3(canvas.clientWidth / 2 + 15, canvas.clientHeight / 2);\r\n let mouseToCenterX = lastX - viewCenter.x;\r\n let mouseToCenterY = canvas.clientHeight - 1 - lastY - viewCenter.y;\r\n x = viewCenter.x - mouseToCenterX;\r\n y = canvas.clientHeight - 1 - viewCenter.y + mouseToCenterY;\r\n }\r\n let oldDistance = camera.screenToWorld(new Vector3(x, y), canvas.clientWidth, canvas.clientHeight);\r\n camera.zoom = newZoom;\r\n camera.update();\r\n let newDistance = camera.screenToWorld(new Vector3(x, y), canvas.clientWidth, canvas.clientHeight);\r\n camera.position.add(oldDistance.sub(newDistance));\r\n camera.update();\r\n }\r\n },\r\n zoom: (initialDistance, distance) => {\r\n let newZoom = initialDistance / distance;\r\n camera.zoom = initialZoom * newZoom;\r\n },\r\n up: (x, y) => {\r\n lastX = x;\r\n lastY = y;\r\n },\r\n moved: (x, y) => {\r\n lastX = x;\r\n lastY = y;\r\n }\r\n });\r\n }\r\n };\r\n\r\n // spine-webgl/src/Shader.ts\r\n var _Shader = class {\r\n constructor(context, vertexShader, fragmentShader) {\r\n this.vertexShader = vertexShader;\r\n this.fragmentShader = fragmentShader;\r\n this.vs = null;\r\n this.fs = null;\r\n this.program = null;\r\n this.tmp2x2 = new Float32Array(2 * 2);\r\n this.tmp3x3 = new Float32Array(3 * 3);\r\n this.tmp4x4 = new Float32Array(4 * 4);\r\n this.vsSource = vertexShader;\r\n this.fsSource = fragmentShader;\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n this.context.addRestorable(this);\r\n this.compile();\r\n }\r\n getProgram() {\r\n return this.program;\r\n }\r\n getVertexShader() {\r\n return this.vertexShader;\r\n }\r\n getFragmentShader() {\r\n return this.fragmentShader;\r\n }\r\n getVertexShaderSource() {\r\n return this.vsSource;\r\n }\r\n getFragmentSource() {\r\n return this.fsSource;\r\n }\r\n compile() {\r\n let gl = this.context.gl;\r\n try {\r\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\r\n if (!this.vs)\r\n throw new Error(\"Couldn't compile vertex shader.\");\r\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\r\n if (!this.fs)\r\n throw new Error(\"Couldn#t compile fragment shader.\");\r\n this.program = this.compileProgram(this.vs, this.fs);\r\n } catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n }\r\n compileShader(type, source) {\r\n let gl = this.context.gl;\r\n let shader = gl.createShader(type);\r\n if (!shader)\r\n throw new Error(\"Couldn't create shader.\");\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\r\n let error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\r\n gl.deleteShader(shader);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return shader;\r\n }\r\n compileProgram(vs, fs) {\r\n let gl = this.context.gl;\r\n let program = gl.createProgram();\r\n if (!program)\r\n throw new Error(\"Couldn't compile program.\");\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\r\n let error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\r\n gl.deleteProgram(program);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return program;\r\n }\r\n restore() {\r\n this.compile();\r\n }\r\n bind() {\r\n this.context.gl.useProgram(this.program);\r\n }\r\n unbind() {\r\n this.context.gl.useProgram(null);\r\n }\r\n setUniformi(uniform, value) {\r\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\r\n }\r\n setUniformf(uniform, value) {\r\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\r\n }\r\n setUniform2f(uniform, value, value2) {\r\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\r\n }\r\n setUniform3f(uniform, value, value2, value3) {\r\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\r\n }\r\n setUniform4f(uniform, value, value2, value3, value4) {\r\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\r\n }\r\n setUniform2x2f(uniform, value) {\r\n let gl = this.context.gl;\r\n this.tmp2x2.set(value);\r\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\r\n }\r\n setUniform3x3f(uniform, value) {\r\n let gl = this.context.gl;\r\n this.tmp3x3.set(value);\r\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\r\n }\r\n setUniform4x4f(uniform, value) {\r\n let gl = this.context.gl;\r\n this.tmp4x4.set(value);\r\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\r\n }\r\n getUniformLocation(uniform) {\r\n let gl = this.context.gl;\r\n if (!this.program)\r\n throw new Error(\"Shader not compiled.\");\r\n let location = gl.getUniformLocation(this.program, uniform);\r\n if (!location && !gl.isContextLost())\r\n throw new Error(`Couldn't find location for uniform ${uniform}`);\r\n return location;\r\n }\r\n getAttributeLocation(attribute) {\r\n let gl = this.context.gl;\r\n if (!this.program)\r\n throw new Error(\"Shader not compiled.\");\r\n let location = gl.getAttribLocation(this.program, attribute);\r\n if (location == -1 && !gl.isContextLost())\r\n throw new Error(`Couldn't find location for attribute ${attribute}`);\r\n return location;\r\n }\r\n dispose() {\r\n this.context.removeRestorable(this);\r\n let gl = this.context.gl;\r\n if (this.vs) {\r\n gl.deleteShader(this.vs);\r\n this.vs = null;\r\n }\r\n if (this.fs) {\r\n gl.deleteShader(this.fs);\r\n this.fs = null;\r\n }\r\n if (this.program) {\r\n gl.deleteProgram(this.program);\r\n this.program = null;\r\n }\r\n }\r\n static newColoredTextured(context) {\r\n let vs = `\r\n\t\t\t\tattribute vec4 ${_Shader.POSITION};\r\n\t\t\t\tattribute vec4 ${_Shader.COLOR};\r\n\t\t\t\tattribute vec2 ${_Shader.TEXCOORDS};\r\n\t\t\t\tuniform mat4 ${_Shader.MVP_MATRIX};\r\n\t\t\t\tvarying vec4 v_color;\r\n\t\t\t\tvarying vec2 v_texCoords;\r\n\r\n\t\t\t\tvoid main () {\r\n\t\t\t\t\tv_color = ${_Shader.COLOR};\r\n\t\t\t\t\tv_texCoords = ${_Shader.TEXCOORDS};\r\n\t\t\t\t\tgl_Position = ${_Shader.MVP_MATRIX} * ${_Shader.POSITION};\r\n\t\t\t\t}\r\n\t\t\t`;\r\n let fs = `\r\n\t\t\t\t#ifdef GL_ES\r\n\t\t\t\t\t#define LOWP lowp\r\n\t\t\t\t\tprecision mediump float;\r\n\t\t\t\t#else\r\n\t\t\t\t\t#define LOWP\r\n\t\t\t\t#endif\r\n\t\t\t\tvarying LOWP vec4 v_color;\r\n\t\t\t\tvarying vec2 v_texCoords;\r\n\t\t\t\tuniform sampler2D u_texture;\r\n\r\n\t\t\t\tvoid main () {\r\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\r\n\t\t\t\t}\r\n\t\t\t`;\r\n return new _Shader(context, vs, fs);\r\n }\r\n static newTwoColoredTextured(context) {\r\n let vs = `\r\n\t\t\t\tattribute vec4 ${_Shader.POSITION};\r\n\t\t\t\tattribute vec4 ${_Shader.COLOR};\r\n\t\t\t\tattribute vec4 ${_Shader.COLOR2};\r\n\t\t\t\tattribute vec2 ${_Shader.TEXCOORDS};\r\n\t\t\t\tuniform mat4 ${_Shader.MVP_MATRIX};\r\n\t\t\t\tvarying vec4 v_light;\r\n\t\t\t\tvarying vec4 v_dark;\r\n\t\t\t\tvarying vec2 v_texCoords;\r\n\r\n\t\t\t\tvoid main () {\r\n\t\t\t\t\tv_light = ${_Shader.COLOR};\r\n\t\t\t\t\tv_dark = ${_Shader.COLOR2};\r\n\t\t\t\t\tv_texCoords = ${_Shader.TEXCOORDS};\r\n\t\t\t\t\tgl_Position = ${_Shader.MVP_MATRIX} * ${_Shader.POSITION};\r\n\t\t\t\t}\r\n\t\t\t`;\r\n let fs = `\r\n\t\t\t\t#ifdef GL_ES\r\n\t\t\t\t\t#define LOWP lowp\r\n\t\t\t\t\tprecision mediump float;\r\n\t\t\t\t#else\r\n\t\t\t\t\t#define LOWP\r\n\t\t\t\t#endif\r\n\t\t\t\tvarying LOWP vec4 v_light;\r\n\t\t\t\tvarying LOWP vec4 v_dark;\r\n\t\t\t\tvarying vec2 v_texCoords;\r\n\t\t\t\tuniform sampler2D u_texture;\r\n\r\n\t\t\t\tvoid main () {\r\n\t\t\t\t\tvec4 texColor = texture2D(u_texture, v_texCoords);\r\n\t\t\t\t\tgl_FragColor.a = texColor.a * v_light.a;\r\n\t\t\t\t\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\r\n\t\t\t\t}\r\n\t\t\t`;\r\n return new _Shader(context, vs, fs);\r\n }\r\n static newColored(context) {\r\n let vs = `\r\n\t\t\t\tattribute vec4 ${_Shader.POSITION};\r\n\t\t\t\tattribute vec4 ${_Shader.COLOR};\r\n\t\t\t\tuniform mat4 ${_Shader.MVP_MATRIX};\r\n\t\t\t\tvarying vec4 v_color;\r\n\r\n\t\t\t\tvoid main () {\r\n\t\t\t\t\tv_color = ${_Shader.COLOR};\r\n\t\t\t\t\tgl_Position = ${_Shader.MVP_MATRIX} * ${_Shader.POSITION};\r\n\t\t\t\t}\r\n\t\t\t`;\r\n let fs = `\r\n\t\t\t\t#ifdef GL_ES\r\n\t\t\t\t\t#define LOWP lowp\r\n\t\t\t\t\tprecision mediump float;\r\n\t\t\t\t#else\r\n\t\t\t\t\t#define LOWP\r\n\t\t\t\t#endif\r\n\t\t\t\tvarying LOWP vec4 v_color;\r\n\r\n\t\t\t\tvoid main () {\r\n\t\t\t\t\tgl_FragColor = v_color;\r\n\t\t\t\t}\r\n\t\t\t`;\r\n return new _Shader(context, vs, fs);\r\n }\r\n };\r\n var Shader = _Shader;\r\n Shader.MVP_MATRIX = \"u_projTrans\";\r\n Shader.POSITION = \"a_position\";\r\n Shader.COLOR = \"a_color\";\r\n Shader.COLOR2 = \"a_color2\";\r\n Shader.TEXCOORDS = \"a_texCoords\";\r\n Shader.SAMPLER = \"u_texture\";\r\n\r\n // spine-webgl/src/Mesh.ts\r\n var Mesh = class {\r\n constructor(context, attributes, maxVertices, maxIndices) {\r\n this.attributes = attributes;\r\n this.verticesBuffer = null;\r\n this.verticesLength = 0;\r\n this.dirtyVertices = false;\r\n this.indicesBuffer = null;\r\n this.indicesLength = 0;\r\n this.dirtyIndices = false;\r\n this.elementsPerVertex = 0;\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n this.elementsPerVertex = 0;\r\n for (let i = 0; i < attributes.length; i++) {\r\n this.elementsPerVertex += attributes[i].numElements;\r\n }\r\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\r\n this.indices = new Uint16Array(maxIndices);\r\n this.context.addRestorable(this);\r\n }\r\n getAttributes() {\r\n return this.attributes;\r\n }\r\n maxVertices() {\r\n return this.vertices.length / this.elementsPerVertex;\r\n }\r\n numVertices() {\r\n return this.verticesLength / this.elementsPerVertex;\r\n }\r\n setVerticesLength(length) {\r\n this.dirtyVertices = true;\r\n this.verticesLength = length;\r\n }\r\n getVertices() {\r\n return this.vertices;\r\n }\r\n maxIndices() {\r\n return this.indices.length;\r\n }\r\n numIndices() {\r\n return this.indicesLength;\r\n }\r\n setIndicesLength(length) {\r\n this.dirtyIndices = true;\r\n this.indicesLength = length;\r\n }\r\n getIndices() {\r\n return this.indices;\r\n }\r\n getVertexSizeInFloats() {\r\n let size = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n let attribute = this.attributes[i];\r\n size += attribute.numElements;\r\n }\r\n return size;\r\n }\r\n setVertices(vertices) {\r\n this.dirtyVertices = true;\r\n if (vertices.length > this.vertices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\r\n this.vertices.set(vertices, 0);\r\n this.verticesLength = vertices.length;\r\n }\r\n setIndices(indices) {\r\n this.dirtyIndices = true;\r\n if (indices.length > this.indices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\r\n this.indices.set(indices, 0);\r\n this.indicesLength = indices.length;\r\n }\r\n draw(shader, primitiveType) {\r\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\r\n }\r\n drawWithOffset(shader, primitiveType, offset, count) {\r\n let gl = this.context.gl;\r\n if (this.dirtyVertices || this.dirtyIndices)\r\n this.update();\r\n this.bind(shader);\r\n if (this.indicesLength > 0) {\r\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\r\n } else {\r\n gl.drawArrays(primitiveType, offset, count);\r\n }\r\n this.unbind(shader);\r\n }\r\n bind(shader) {\r\n let gl = this.context.gl;\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n let offset = 0;\r\n for (let i = 0; i < this.attributes.length; i++) {\r\n let attrib = this.attributes[i];\r\n let location = shader.getAttributeLocation(attrib.name);\r\n gl.enableVertexAttribArray(location);\r\n gl.vertexAttribPointer(location, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\r\n offset += attrib.numElements;\r\n }\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n }\r\n unbind(shader) {\r\n let gl = this.context.gl;\r\n for (let i = 0; i < this.attributes.length; i++) {\r\n let attrib = this.attributes[i];\r\n let location = shader.getAttributeLocation(attrib.name);\r\n gl.disableVertexAttribArray(location);\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\r\n }\r\n update() {\r\n let gl = this.context.gl;\r\n if (this.dirtyVertices) {\r\n if (!this.verticesBuffer) {\r\n this.verticesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyVertices = false;\r\n }\r\n if (this.dirtyIndices) {\r\n if (!this.indicesBuffer) {\r\n this.indicesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyIndices = false;\r\n }\r\n }\r\n restore() {\r\n this.verticesBuffer = null;\r\n this.indicesBuffer = null;\r\n this.update();\r\n }\r\n dispose() {\r\n this.context.removeRestorable(this);\r\n let gl = this.context.gl;\r\n gl.deleteBuffer(this.verticesBuffer);\r\n gl.deleteBuffer(this.indicesBuffer);\r\n }\r\n };\r\n var VertexAttribute = class {\r\n constructor(name, type, numElements) {\r\n this.name = name;\r\n this.type = type;\r\n this.numElements = numElements;\r\n }\r\n };\r\n var Position2Attribute = class extends VertexAttribute {\r\n constructor() {\r\n super(Shader.POSITION, VertexAttributeType.Float, 2);\r\n }\r\n };\r\n var Position3Attribute = class extends VertexAttribute {\r\n constructor() {\r\n super(Shader.POSITION, VertexAttributeType.Float, 3);\r\n }\r\n };\r\n var TexCoordAttribute = class extends VertexAttribute {\r\n constructor(unit = 0) {\r\n super(Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2);\r\n }\r\n };\r\n var ColorAttribute = class extends VertexAttribute {\r\n constructor() {\r\n super(Shader.COLOR, VertexAttributeType.Float, 4);\r\n }\r\n };\r\n var Color2Attribute = class extends VertexAttribute {\r\n constructor() {\r\n super(Shader.COLOR2, VertexAttributeType.Float, 4);\r\n }\r\n };\r\n var VertexAttributeType = /* @__PURE__ */ ((VertexAttributeType2) => {\r\n VertexAttributeType2[VertexAttributeType2[\"Float\"] = 0] = \"Float\";\r\n return VertexAttributeType2;\r\n })(VertexAttributeType || {});\r\n\r\n // spine-webgl/src/PolygonBatcher.ts\r\n var _PolygonBatcher = class {\r\n constructor(context, twoColorTint = true, maxVertices = 10920) {\r\n this.drawCalls = 0;\r\n this.isDrawing = false;\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.cullWasEnabled = false;\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n let attributes = twoColorTint ? [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute(), new Color2Attribute()] : [new Position2Attribute(), new ColorAttribute(), new TexCoordAttribute()];\r\n this.mesh = new Mesh(context, attributes, maxVertices, maxVertices * 3);\r\n let gl = this.context.gl;\r\n this.srcColorBlend = gl.SRC_ALPHA;\r\n this.srcAlphaBlend = gl.ONE;\r\n this.dstBlend = gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n begin(shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\r\n this.drawCalls = 0;\r\n this.shader = shader;\r\n this.lastTexture = null;\r\n this.isDrawing = true;\r\n let gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFuncSeparate(this.srcColorBlend, this.dstBlend, this.srcAlphaBlend, this.dstBlend);\r\n this.cullWasEnabled = gl.isEnabled(gl.CULL_FACE);\r\n if (this.cullWasEnabled)\r\n gl.disable(gl.CULL_FACE);\r\n }\r\n setBlendMode(srcColorBlend, srcAlphaBlend, dstBlend) {\r\n if (this.srcColorBlend == srcColorBlend && this.srcAlphaBlend == srcAlphaBlend && this.dstBlend == dstBlend)\r\n return;\r\n this.srcColorBlend = srcColorBlend;\r\n this.srcAlphaBlend = srcAlphaBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n let gl = this.context.gl;\r\n gl.blendFuncSeparate(srcColorBlend, dstBlend, srcAlphaBlend, dstBlend);\r\n }\r\n }\r\n draw(texture, vertices, indices) {\r\n if (texture != this.lastTexture) {\r\n this.flush();\r\n this.lastTexture = texture;\r\n } else if (this.verticesLength + vertices.length > this.mesh.getVertices().length || this.indicesLength + indices.length > this.mesh.getIndices().length) {\r\n this.flush();\r\n }\r\n let indexStart = this.mesh.numVertices();\r\n this.mesh.getVertices().set(vertices, this.verticesLength);\r\n this.verticesLength += vertices.length;\r\n this.mesh.setVerticesLength(this.verticesLength);\r\n let indicesArray = this.mesh.getIndices();\r\n for (let i = this.indicesLength, j = 0; j < indices.length; i++, j++)\r\n indicesArray[i] = indices[j] + indexStart;\r\n this.indicesLength += indices.length;\r\n this.mesh.setIndicesLength(this.indicesLength);\r\n }\r\n flush() {\r\n if (this.verticesLength == 0)\r\n return;\r\n if (!this.lastTexture)\r\n throw new Error(\"No texture set.\");\r\n if (!this.shader)\r\n throw new Error(\"No shader set.\");\r\n this.lastTexture.bind();\r\n this.mesh.draw(this.shader, this.context.gl.TRIANGLES);\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.mesh.setVerticesLength(0);\r\n this.mesh.setIndicesLength(0);\r\n this.drawCalls++;\r\n _PolygonBatcher.globalDrawCalls++;\r\n }\r\n end() {\r\n if (!this.isDrawing)\r\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\r\n if (this.verticesLength > 0 || this.indicesLength > 0)\r\n this.flush();\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.isDrawing = false;\r\n let gl = this.context.gl;\r\n gl.disable(gl.BLEND);\r\n if (this.cullWasEnabled)\r\n gl.enable(gl.CULL_FACE);\r\n }\r\n getDrawCalls() {\r\n return this.drawCalls;\r\n }\r\n static getAndResetGlobalDrawCalls() {\r\n let result = _PolygonBatcher.globalDrawCalls;\r\n _PolygonBatcher.globalDrawCalls = 0;\r\n return result;\r\n }\r\n dispose() {\r\n this.mesh.dispose();\r\n }\r\n };\r\n var PolygonBatcher = _PolygonBatcher;\r\n PolygonBatcher.globalDrawCalls = 0;\r\n\r\n // spine-webgl/src/ShapeRenderer.ts\r\n var ShapeRenderer = class {\r\n constructor(context, maxVertices = 10920) {\r\n this.isDrawing = false;\r\n this.shapeType = ShapeType.Filled;\r\n this.color = new Color(1, 1, 1, 1);\r\n this.shader = null;\r\n this.vertexIndex = 0;\r\n this.tmp = new Vector2();\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n this.mesh = new Mesh(context, [new Position2Attribute(), new ColorAttribute()], maxVertices, 0);\r\n let gl = this.context.gl;\r\n this.srcColorBlend = gl.SRC_ALPHA;\r\n this.srcAlphaBlend = gl.ONE;\r\n this.dstBlend = gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n begin(shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has already been called\");\r\n this.shader = shader;\r\n this.vertexIndex = 0;\r\n this.isDrawing = true;\r\n let gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFuncSeparate(this.srcColorBlend, this.dstBlend, this.srcAlphaBlend, this.dstBlend);\r\n }\r\n setBlendMode(srcColorBlend, srcAlphaBlend, dstBlend) {\r\n this.srcColorBlend = srcColorBlend;\r\n this.srcAlphaBlend = srcAlphaBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n let gl = this.context.gl;\r\n gl.blendFuncSeparate(srcColorBlend, dstBlend, srcAlphaBlend, dstBlend);\r\n }\r\n }\r\n setColor(color) {\r\n this.color.setFromColor(color);\r\n }\r\n setColorWith(r, g, b, a) {\r\n this.color.set(r, g, b, a);\r\n }\r\n point(x, y, color) {\r\n this.check(ShapeType.Point, 1);\r\n if (!color)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n }\r\n line(x, y, x2, y2, color) {\r\n this.check(ShapeType.Line, 2);\r\n let vertices = this.mesh.getVertices();\r\n let idx = this.vertexIndex;\r\n if (!color)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n let vertices = this.mesh.getVertices();\r\n let idx = this.vertexIndex;\r\n if (!color)\r\n color = this.color;\r\n if (!color2)\r\n color2 = this.color;\r\n if (!color3)\r\n color3 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n } else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color);\r\n this.vertex(x3, y3, color2);\r\n this.vertex(x3, y3, color);\r\n this.vertex(x, y, color2);\r\n }\r\n }\r\n quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n let vertices = this.mesh.getVertices();\r\n let idx = this.vertexIndex;\r\n if (!color)\r\n color = this.color;\r\n if (!color2)\r\n color2 = this.color;\r\n if (!color3)\r\n color3 = this.color;\r\n if (!color4)\r\n color4 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n } else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n }\r\n rect(filled, x, y, width, height, color) {\r\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\r\n }\r\n rectLine(filled, x1, y1, x2, y2, width, color) {\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\r\n if (!color)\r\n color = this.color;\r\n let t = this.tmp.set(y2 - y1, x1 - x2);\r\n t.normalize();\r\n width *= 0.5;\r\n let tx = t.x * width;\r\n let ty = t.y * width;\r\n if (!filled) {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n } else {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n }\r\n x(x, y, size) {\r\n this.line(x - size, y - size, x + size, y + size);\r\n this.line(x - size, y + size, x + size, y - size);\r\n }\r\n polygon(polygonVertices, offset, count, color) {\r\n if (count < 3)\r\n throw new Error(\"Polygon must contain at least 3 vertices\");\r\n this.check(ShapeType.Line, count * 2);\r\n if (!color)\r\n color = this.color;\r\n let vertices = this.mesh.getVertices();\r\n let idx = this.vertexIndex;\r\n offset <<= 1;\r\n count <<= 1;\r\n let firstX = polygonVertices[offset];\r\n let firstY = polygonVertices[offset + 1];\r\n let last = offset + count;\r\n for (let i = offset, n = offset + count - 2; i < n; i += 2) {\r\n let x1 = polygonVertices[i];\r\n let y1 = polygonVertices[i + 1];\r\n let x2 = 0;\r\n let y2 = 0;\r\n if (i + 2 >= last) {\r\n x2 = firstX;\r\n y2 = firstY;\r\n } else {\r\n x2 = polygonVertices[i + 2];\r\n y2 = polygonVertices[i + 3];\r\n }\r\n this.vertex(x1, y1, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n }\r\n circle(filled, x, y, radius, color, segments = 0) {\r\n if (segments == 0)\r\n segments = Math.max(1, 6 * MathUtils.cbrt(radius) | 0);\r\n if (segments <= 0)\r\n throw new Error(\"segments must be > 0.\");\r\n if (!color)\r\n color = this.color;\r\n let angle = 2 * MathUtils.PI / segments;\r\n let cos = Math.cos(angle);\r\n let sin = Math.sin(angle);\r\n let cx = radius, cy = 0;\r\n if (!filled) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n for (let i = 0; i < segments; i++) {\r\n this.vertex(x + cx, y + cy, color);\r\n let temp2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x + cx, y + cy, color);\r\n } else {\r\n this.check(ShapeType.Filled, segments * 3 + 3);\r\n segments--;\r\n for (let i = 0; i < segments; i++) {\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n let temp2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n let temp = cx;\r\n cx = radius;\r\n cy = 0;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n if (!color)\r\n color = this.color;\r\n let subdiv_step = 1 / segments;\r\n let subdiv_step2 = subdiv_step * subdiv_step;\r\n let subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\r\n let pre1 = 3 * subdiv_step;\r\n let pre2 = 3 * subdiv_step2;\r\n let pre4 = 6 * subdiv_step2;\r\n let pre5 = 6 * subdiv_step3;\r\n let tmp1x = x1 - cx1 * 2 + cx2;\r\n let tmp1y = y1 - cy1 * 2 + cy2;\r\n let tmp2x = (cx1 - cx2) * 3 - x1 + x2;\r\n let tmp2y = (cy1 - cy2) * 3 - y1 + y2;\r\n let fx = x1;\r\n let fy = y1;\r\n let dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\r\n let dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\r\n let ddfx = tmp1x * pre4 + tmp2x * pre5;\r\n let ddfy = tmp1y * pre4 + tmp2y * pre5;\r\n let dddfx = tmp2x * pre5;\r\n let dddfy = tmp2y * pre5;\r\n while (segments-- > 0) {\r\n this.vertex(fx, fy, color);\r\n fx += dfx;\r\n fy += dfy;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n this.vertex(fx, fy, color);\r\n }\r\n this.vertex(fx, fy, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n vertex(x, y, color) {\r\n let idx = this.vertexIndex;\r\n let vertices = this.mesh.getVertices();\r\n vertices[idx++] = x;\r\n vertices[idx++] = y;\r\n vertices[idx++] = color.r;\r\n vertices[idx++] = color.g;\r\n vertices[idx++] = color.b;\r\n vertices[idx++] = color.a;\r\n this.vertexIndex = idx;\r\n }\r\n end() {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n this.flush();\r\n let gl = this.context.gl;\r\n gl.disable(gl.BLEND);\r\n this.isDrawing = false;\r\n }\r\n flush() {\r\n if (this.vertexIndex == 0)\r\n return;\r\n if (!this.shader)\r\n throw new Error(\"No shader set.\");\r\n this.mesh.setVerticesLength(this.vertexIndex);\r\n this.mesh.draw(this.shader, this.shapeType);\r\n this.vertexIndex = 0;\r\n }\r\n check(shapeType, numVertices) {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n if (this.shapeType == shapeType) {\r\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\r\n this.flush();\r\n else\r\n return;\r\n } else {\r\n this.flush();\r\n this.shapeType = shapeType;\r\n }\r\n }\r\n dispose() {\r\n this.mesh.dispose();\r\n }\r\n };\r\n var ShapeType = /* @__PURE__ */ ((ShapeType2) => {\r\n ShapeType2[ShapeType2[\"Point\"] = 0] = \"Point\";\r\n ShapeType2[ShapeType2[\"Line\"] = 1] = \"Line\";\r\n ShapeType2[ShapeType2[\"Filled\"] = 4] = \"Filled\";\r\n return ShapeType2;\r\n })(ShapeType || {});\r\n\r\n // spine-webgl/src/SkeletonDebugRenderer.ts\r\n var _SkeletonDebugRenderer = class {\r\n constructor(context) {\r\n this.boneLineColor = new Color(1, 0, 0, 1);\r\n this.boneOriginColor = new Color(0, 1, 0, 1);\r\n this.attachmentLineColor = new Color(0, 0, 1, 0.5);\r\n this.triangleLineColor = new Color(1, 0.64, 0, 0.5);\r\n this.pathColor = new Color().setFromString(\"FF7F00\");\r\n this.clipColor = new Color(0.8, 0, 0, 2);\r\n this.aabbColor = new Color(0, 1, 0, 0.5);\r\n this.drawBones = true;\r\n this.drawRegionAttachments = true;\r\n this.drawBoundingBoxes = true;\r\n this.drawMeshHull = true;\r\n this.drawMeshTriangles = true;\r\n this.drawPaths = true;\r\n this.drawSkeletonXY = false;\r\n this.drawClipping = true;\r\n this.premultipliedAlpha = false;\r\n this.scale = 1;\r\n this.boneWidth = 2;\r\n this.bounds = new SkeletonBounds();\r\n this.temp = new Array();\r\n this.vertices = Utils.newFloatArray(2 * 1024);\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n }\r\n draw(shapes, skeleton, ignoredBones) {\r\n let skeletonX = skeleton.x;\r\n let skeletonY = skeleton.y;\r\n let gl = this.context.gl;\r\n let srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\r\n shapes.setBlendMode(srcFunc, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\r\n let bones = skeleton.bones;\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneLineColor);\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n if (!bone.parent)\r\n continue;\r\n let x = bone.data.length * bone.a + bone.worldX;\r\n let y = bone.data.length * bone.c + bone.worldY;\r\n shapes.rectLine(true, bone.worldX, bone.worldY, x, y, this.boneWidth * this.scale);\r\n }\r\n if (this.drawSkeletonXY)\r\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\r\n }\r\n if (this.drawRegionAttachments) {\r\n shapes.setColor(this.attachmentLineColor);\r\n let slots = skeleton.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n let attachment = slot.getAttachment();\r\n if (attachment instanceof RegionAttachment) {\r\n let regionAttachment = attachment;\r\n let vertices = this.vertices;\r\n regionAttachment.computeWorldVertices(slot, vertices, 0, 2);\r\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\r\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\r\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\r\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\r\n }\r\n }\r\n }\r\n if (this.drawMeshHull || this.drawMeshTriangles) {\r\n let slots = skeleton.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let attachment = slot.getAttachment();\r\n if (!(attachment instanceof MeshAttachment))\r\n continue;\r\n let mesh = attachment;\r\n let vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\r\n let triangles = mesh.triangles;\r\n let hullLength = mesh.hullLength;\r\n if (this.drawMeshTriangles) {\r\n shapes.setColor(this.triangleLineColor);\r\n for (let ii = 0, nn = triangles.length; ii < nn; ii += 3) {\r\n let v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\r\n shapes.triangle(\r\n false,\r\n vertices[v1],\r\n vertices[v1 + 1],\r\n vertices[v2],\r\n vertices[v2 + 1],\r\n vertices[v3],\r\n vertices[v3 + 1]\r\n );\r\n }\r\n }\r\n if (this.drawMeshHull && hullLength > 0) {\r\n shapes.setColor(this.attachmentLineColor);\r\n hullLength = (hullLength >> 1) * 2;\r\n let lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\r\n for (let ii = 0, nn = hullLength; ii < nn; ii += 2) {\r\n let x = vertices[ii], y = vertices[ii + 1];\r\n shapes.line(x, y, lastX, lastY);\r\n lastX = x;\r\n lastY = y;\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawBoundingBoxes) {\r\n let bounds = this.bounds;\r\n bounds.update(skeleton, true);\r\n shapes.setColor(this.aabbColor);\r\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\r\n let polygons = bounds.polygons;\r\n let boxes = bounds.boundingBoxes;\r\n for (let i = 0, n = polygons.length; i < n; i++) {\r\n let polygon = polygons[i];\r\n shapes.setColor(boxes[i].color);\r\n shapes.polygon(polygon, 0, polygon.length);\r\n }\r\n }\r\n if (this.drawPaths) {\r\n let slots = skeleton.slots;\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let attachment = slot.getAttachment();\r\n if (!(attachment instanceof PathAttachment))\r\n continue;\r\n let path = attachment;\r\n let nn = path.worldVerticesLength;\r\n let world = this.temp = Utils.setArraySize(this.temp, nn, 0);\r\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n let color = this.pathColor;\r\n let x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\r\n if (path.closed) {\r\n shapes.setColor(color);\r\n let cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\r\n x2 = world[nn - 4];\r\n y2 = world[nn - 3];\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(_SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n }\r\n nn -= 4;\r\n for (let ii = 4; ii < nn; ii += 6) {\r\n let cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\r\n x2 = world[ii + 4];\r\n y2 = world[ii + 5];\r\n shapes.setColor(color);\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(_SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n }\r\n }\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneOriginColor);\r\n for (let i = 0, n = bones.length; i < n; i++) {\r\n let bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n shapes.circle(true, bone.worldX, bone.worldY, 3 * this.scale, this.boneOriginColor, 8);\r\n }\r\n }\r\n if (this.drawClipping) {\r\n let slots = skeleton.slots;\r\n shapes.setColor(this.clipColor);\r\n for (let i = 0, n = slots.length; i < n; i++) {\r\n let slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n let attachment = slot.getAttachment();\r\n if (!(attachment instanceof ClippingAttachment))\r\n continue;\r\n let clip = attachment;\r\n let nn = clip.worldVerticesLength;\r\n let world = this.temp = Utils.setArraySize(this.temp, nn, 0);\r\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n for (let i2 = 0, n2 = world.length; i2 < n2; i2 += 2) {\r\n let x = world[i2];\r\n let y = world[i2 + 1];\r\n let x2 = world[(i2 + 2) % world.length];\r\n let y2 = world[(i2 + 3) % world.length];\r\n shapes.line(x, y, x2, y2);\r\n }\r\n }\r\n }\r\n }\r\n dispose() {\r\n }\r\n };\r\n var SkeletonDebugRenderer = _SkeletonDebugRenderer;\r\n SkeletonDebugRenderer.LIGHT_GRAY = new Color(192 / 255, 192 / 255, 192 / 255, 1);\r\n SkeletonDebugRenderer.GREEN = new Color(0, 1, 0, 1);\r\n\r\n // spine-webgl/src/SkeletonRenderer.ts\r\n var Renderable = class {\r\n constructor(vertices, numVertices, numFloats) {\r\n this.vertices = vertices;\r\n this.numVertices = numVertices;\r\n this.numFloats = numFloats;\r\n }\r\n };\r\n var _SkeletonRenderer = class {\r\n constructor(context, twoColorTint = true) {\r\n this.premultipliedAlpha = false;\r\n this.tempColor = new Color();\r\n this.tempColor2 = new Color();\r\n this.vertexSize = 2 + 2 + 4;\r\n this.twoColorTint = false;\r\n this.renderable = new Renderable([], 0, 0);\r\n this.clipper = new SkeletonClipping();\r\n this.temp = new Vector2();\r\n this.temp2 = new Vector2();\r\n this.temp3 = new Color();\r\n this.temp4 = new Color();\r\n this.twoColorTint = twoColorTint;\r\n if (twoColorTint)\r\n this.vertexSize += 4;\r\n this.vertices = Utils.newFloatArray(this.vertexSize * 1024);\r\n }\r\n draw(batcher, skeleton, slotRangeStart = -1, slotRangeEnd = -1, transformer = null) {\r\n let clipper = this.clipper;\r\n let premultipliedAlpha = this.premultipliedAlpha;\r\n let twoColorTint = this.twoColorTint;\r\n let blendMode = null;\r\n let tempPos = this.temp;\r\n let tempUv = this.temp2;\r\n let tempLight = this.temp3;\r\n let tempDark = this.temp4;\r\n let renderable = this.renderable;\r\n let uvs;\r\n let triangles;\r\n let drawOrder = skeleton.drawOrder;\r\n let attachmentColor;\r\n let skeletonColor = skeleton.color;\r\n let vertexSize = twoColorTint ? 12 : 8;\r\n let inRange = false;\r\n if (slotRangeStart == -1)\r\n inRange = true;\r\n for (let i = 0, n = drawOrder.length; i < n; i++) {\r\n let clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\r\n let slot = drawOrder[i];\r\n if (!slot.bone.active) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\r\n inRange = true;\r\n }\r\n if (!inRange) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\r\n inRange = false;\r\n }\r\n let attachment = slot.getAttachment();\r\n let texture;\r\n if (attachment instanceof RegionAttachment) {\r\n let region = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = 4;\r\n renderable.numFloats = clippedVertexSize << 2;\r\n region.computeWorldVertices(slot, renderable.vertices, 0, clippedVertexSize);\r\n triangles = _SkeletonRenderer.QUAD_TRIANGLES;\r\n uvs = region.uvs;\r\n texture = region.region.renderObject.page.texture;\r\n attachmentColor = region.color;\r\n } else if (attachment instanceof MeshAttachment) {\r\n let mesh = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = mesh.worldVerticesLength >> 1;\r\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\r\n if (renderable.numFloats > renderable.vertices.length) {\r\n renderable.vertices = this.vertices = Utils.newFloatArray(renderable.numFloats);\r\n }\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.page.texture;\r\n uvs = mesh.uvs;\r\n attachmentColor = mesh.color;\r\n } else if (attachment instanceof ClippingAttachment) {\r\n let clip = attachment;\r\n clipper.clipStart(slot, clip);\r\n continue;\r\n } else {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (texture) {\r\n let slotColor = slot.color;\r\n let finalColor = this.tempColor;\r\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\r\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\r\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\r\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n if (premultipliedAlpha) {\r\n finalColor.r *= finalColor.a;\r\n finalColor.g *= finalColor.a;\r\n finalColor.b *= finalColor.a;\r\n }\r\n let darkColor = this.tempColor2;\r\n if (!slot.darkColor)\r\n darkColor.set(0, 0, 0, 1);\r\n else {\r\n if (premultipliedAlpha) {\r\n darkColor.r = slot.darkColor.r * finalColor.a;\r\n darkColor.g = slot.darkColor.g * finalColor.a;\r\n darkColor.b = slot.darkColor.b * finalColor.a;\r\n } else {\r\n darkColor.setFromColor(slot.darkColor);\r\n }\r\n darkColor.a = premultipliedAlpha ? 1 : 0;\r\n }\r\n let slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n batcher.setBlendMode(\r\n WebGLBlendModeConverter.getSourceColorGLBlendMode(blendMode, premultipliedAlpha),\r\n WebGLBlendModeConverter.getSourceAlphaGLBlendMode(blendMode),\r\n WebGLBlendModeConverter.getDestGLBlendMode(blendMode)\r\n );\r\n }\r\n if (clipper.isClipping()) {\r\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\r\n let clippedVertices = new Float32Array(clipper.clippedVertices);\r\n let clippedTriangles = clipper.clippedTriangles;\r\n if (transformer)\r\n transformer(renderable.vertices, renderable.numFloats, vertexSize);\r\n batcher.draw(texture, clippedVertices, clippedTriangles);\r\n } else {\r\n let verts = renderable.vertices;\r\n if (!twoColorTint) {\r\n for (let v = 2, u = 0, n2 = renderable.numFloats; v < n2; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n }\r\n } else {\r\n for (let v = 2, u = 0, n2 = renderable.numFloats; v < n2; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n verts[v + 6] = darkColor.r;\r\n verts[v + 7] = darkColor.g;\r\n verts[v + 8] = darkColor.b;\r\n verts[v + 9] = darkColor.a;\r\n }\r\n }\r\n let view = renderable.vertices.subarray(0, renderable.numFloats);\r\n if (transformer)\r\n transformer(renderable.vertices, renderable.numFloats, vertexSize);\r\n batcher.draw(texture, view, triangles);\r\n }\r\n }\r\n clipper.clipEndWithSlot(slot);\r\n }\r\n clipper.clipEnd();\r\n }\r\n };\r\n var SkeletonRenderer = _SkeletonRenderer;\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n\r\n // spine-webgl/src/SceneRenderer.ts\r\n var quad = [\r\n 0,\r\n 0,\r\n 1,\r\n 1,\r\n 1,\r\n 1,\r\n 0,\r\n 0,\r\n 0,\r\n 0,\r\n 1,\r\n 1,\r\n 1,\r\n 1,\r\n 0,\r\n 0,\r\n 0,\r\n 0,\r\n 1,\r\n 1,\r\n 1,\r\n 1,\r\n 0,\r\n 0,\r\n 0,\r\n 0,\r\n 1,\r\n 1,\r\n 1,\r\n 1,\r\n 0,\r\n 0\r\n ];\r\n var QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n var WHITE = new Color(1, 1, 1, 1);\r\n var SceneRenderer = class {\r\n constructor(canvas, context, twoColorTint = true) {\r\n this.twoColorTint = false;\r\n this.activeRenderer = null;\r\n this.canvas = canvas;\r\n this.context = context instanceof ManagedWebGLRenderingContext ? context : new ManagedWebGLRenderingContext(context);\r\n this.twoColorTint = twoColorTint;\r\n this.camera = new OrthoCamera(canvas.width, canvas.height);\r\n this.batcherShader = twoColorTint ? Shader.newTwoColoredTextured(this.context) : Shader.newColoredTextured(this.context);\r\n this.batcher = new PolygonBatcher(this.context, twoColorTint);\r\n this.shapesShader = Shader.newColored(this.context);\r\n this.shapes = new ShapeRenderer(this.context);\r\n this.skeletonRenderer = new SkeletonRenderer(this.context, twoColorTint);\r\n this.skeletonDebugRenderer = new SkeletonDebugRenderer(this.context);\r\n }\r\n dispose() {\r\n this.batcher.dispose();\r\n this.batcherShader.dispose();\r\n this.shapes.dispose();\r\n this.shapesShader.dispose();\r\n this.skeletonDebugRenderer.dispose();\r\n }\r\n begin() {\r\n this.camera.update();\r\n this.enableRenderer(this.batcher);\r\n }\r\n drawSkeleton(skeleton, premultipliedAlpha = false, slotRangeStart = -1, slotRangeEnd = -1, transform = null) {\r\n this.enableRenderer(this.batcher);\r\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd, transform);\r\n }\r\n drawSkeletonDebug(skeleton, premultipliedAlpha = false, ignoredBones) {\r\n this.enableRenderer(this.shapes);\r\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\r\n }\r\n drawTexture(texture, x, y, width, height, color) {\r\n this.enableRenderer(this.batcher);\r\n if (!color)\r\n color = WHITE;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i] = 0;\r\n }\r\n this.batcher.draw(texture, quad, QUAD_TRIANGLES);\r\n }\r\n drawTextureUV(texture, x, y, width, height, u, v, u2, v2, color) {\r\n this.enableRenderer(this.batcher);\r\n if (!color)\r\n color = WHITE;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i] = 0;\r\n }\r\n this.batcher.draw(texture, quad, QUAD_TRIANGLES);\r\n }\r\n drawTextureRotated(texture, x, y, width, height, pivotX, pivotY, angle, color) {\r\n this.enableRenderer(this.batcher);\r\n if (!color)\r\n color = WHITE;\r\n let worldOriginX = x + pivotX;\r\n let worldOriginY = y + pivotY;\r\n let fx = -pivotX;\r\n let fy = -pivotY;\r\n let fx2 = width - pivotX;\r\n let fy2 = height - pivotY;\r\n let p1x = fx;\r\n let p1y = fy;\r\n let p2x = fx;\r\n let p2y = fy2;\r\n let p3x = fx2;\r\n let p3y = fy2;\r\n let p4x = fx2;\r\n let p4y = fy;\r\n let x1 = 0;\r\n let y1 = 0;\r\n let x2 = 0;\r\n let y2 = 0;\r\n let x3 = 0;\r\n let y3 = 0;\r\n let x4 = 0;\r\n let y4 = 0;\r\n if (angle != 0) {\r\n let cos = MathUtils.cosDeg(angle);\r\n let sin = MathUtils.sinDeg(angle);\r\n x1 = cos * p1x - sin * p1y;\r\n y1 = sin * p1x + cos * p1y;\r\n x4 = cos * p2x - sin * p2y;\r\n y4 = sin * p2x + cos * p2y;\r\n x3 = cos * p3x - sin * p3y;\r\n y3 = sin * p3x + cos * p3y;\r\n x2 = x3 + (x1 - x4);\r\n y2 = y3 + (y1 - y4);\r\n } else {\r\n x1 = p1x;\r\n y1 = p1y;\r\n x4 = p2x;\r\n y4 = p2y;\r\n x3 = p3x;\r\n y3 = p3y;\r\n x2 = p4x;\r\n y2 = p4y;\r\n }\r\n x1 += worldOriginX;\r\n y1 += worldOriginY;\r\n x2 += worldOriginX;\r\n y2 += worldOriginY;\r\n x3 += worldOriginX;\r\n y3 += worldOriginY;\r\n x4 += worldOriginX;\r\n y4 += worldOriginY;\r\n var i = 0;\r\n quad[i++] = x1;\r\n quad[i++] = y1;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x2;\r\n quad[i++] = y2;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x3;\r\n quad[i++] = y3;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x4;\r\n quad[i++] = y4;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i] = 0;\r\n }\r\n this.batcher.draw(texture, quad, QUAD_TRIANGLES);\r\n }\r\n drawRegion(region, x, y, width, height, color) {\r\n this.enableRenderer(this.batcher);\r\n if (!color)\r\n color = WHITE;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i] = 0;\r\n }\r\n this.batcher.draw(region.page.texture, quad, QUAD_TRIANGLES);\r\n }\r\n line(x, y, x2, y2, color, color2) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.line(x, y, x2, y2, color);\r\n }\r\n triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\r\n }\r\n quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\r\n }\r\n rect(filled, x, y, width, height, color) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rect(filled, x, y, width, height, color);\r\n }\r\n rectLine(filled, x1, y1, x2, y2, width, color) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\r\n }\r\n polygon(polygonVertices, offset, count, color) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.polygon(polygonVertices, offset, count, color);\r\n }\r\n circle(filled, x, y, radius, color, segments = 0) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.circle(filled, x, y, radius, color, segments);\r\n }\r\n curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n this.enableRenderer(this.shapes);\r\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\r\n }\r\n end() {\r\n if (this.activeRenderer === this.batcher)\r\n this.batcher.end();\r\n else if (this.activeRenderer === this.shapes)\r\n this.shapes.end();\r\n this.activeRenderer = null;\r\n }\r\n resize(resizeMode) {\r\n let canvas = this.canvas;\r\n var dpr = window.devicePixelRatio || 1;\r\n var w = Math.round(canvas.clientWidth * dpr);\r\n var h = Math.round(canvas.clientHeight * dpr);\r\n if (canvas.width != w || canvas.height != h) {\r\n canvas.width = w;\r\n canvas.height = h;\r\n }\r\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\r\n if (resizeMode === ResizeMode.Expand)\r\n this.camera.setViewport(w, h);\r\n else if (resizeMode === ResizeMode.Fit) {\r\n let sourceWidth = canvas.width, sourceHeight = canvas.height;\r\n let targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\r\n let targetRatio = targetHeight / targetWidth;\r\n let sourceRatio = sourceHeight / sourceWidth;\r\n let scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\r\n this.camera.setViewport(sourceWidth * scale, sourceHeight * scale);\r\n }\r\n this.camera.update();\r\n }\r\n enableRenderer(renderer) {\r\n if (this.activeRenderer === renderer)\r\n return;\r\n this.end();\r\n if (renderer instanceof PolygonBatcher) {\r\n this.batcherShader.bind();\r\n this.batcherShader.setUniform4x4f(Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.batcherShader.setUniformi(\"u_texture\", 0);\r\n this.batcher.begin(this.batcherShader);\r\n this.activeRenderer = this.batcher;\r\n } else if (renderer instanceof ShapeRenderer) {\r\n this.shapesShader.bind();\r\n this.shapesShader.setUniform4x4f(Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.shapes.begin(this.shapesShader);\r\n this.activeRenderer = this.shapes;\r\n } else\r\n this.activeRenderer = this.skeletonDebugRenderer;\r\n }\r\n };\r\n var ResizeMode = /* @__PURE__ */ ((ResizeMode2) => {\r\n ResizeMode2[ResizeMode2[\"Stretch\"] = 0] = \"Stretch\";\r\n ResizeMode2[ResizeMode2[\"Expand\"] = 1] = \"Expand\";\r\n ResizeMode2[ResizeMode2[\"Fit\"] = 2] = \"Fit\";\r\n return ResizeMode2;\r\n })(ResizeMode || {});\r\n\r\n // spine-webgl/src/LoadingScreen.ts\r\n var spinnerImage;\r\n var logoImage;\r\n var loaded = 0;\r\n var FADE_IN = 1;\r\n var FADE_OUT = 1;\r\n var logoWidth = 165;\r\n var logoHeight = 108;\r\n var spinnerSize = 163;\r\n var LoadingScreen = class {\r\n constructor(renderer) {\r\n this.logo = null;\r\n this.spinner = null;\r\n this.angle = 0;\r\n this.fadeOut = 0;\r\n this.fadeIn = 0;\r\n this.timeKeeper = new TimeKeeper();\r\n this.backgroundColor = new Color(0.135, 0.135, 0.135, 1);\r\n this.tempColor = new Color();\r\n this.renderer = renderer;\r\n this.timeKeeper.maxDelta = 9;\r\n if (!logoImage) {\r\n let isSafari = navigator.userAgent.indexOf(\"Safari\") > -1;\r\n let onload = () => loaded++;\r\n logoImage = new Image();\r\n logoImage.src = SPINE_LOGO_DATA;\r\n if (!isSafari)\r\n logoImage.crossOrigin = \"anonymous\";\r\n logoImage.onload = onload;\r\n spinnerImage = new Image();\r\n spinnerImage.src = SPINNER_DATA;\r\n if (!isSafari)\r\n spinnerImage.crossOrigin = \"anonymous\";\r\n spinnerImage.onload = onload;\r\n }\r\n }\r\n dispose() {\r\n var _a, _b;\r\n (_a = this.logo) == null ? void 0 : _a.dispose();\r\n (_b = this.spinner) == null ? void 0 : _b.dispose();\r\n }\r\n draw(complete = false) {\r\n if (loaded < 2 || complete && this.fadeOut > FADE_OUT)\r\n return;\r\n this.timeKeeper.update();\r\n let a = Math.abs(Math.sin(this.timeKeeper.totalTime + 0.25));\r\n this.angle -= this.timeKeeper.delta * 200 * (1 + 1.5 * Math.pow(a, 5));\r\n let tempColor = this.tempColor;\r\n let renderer = this.renderer;\r\n let canvas = renderer.canvas;\r\n let gl = renderer.context.gl;\r\n renderer.resize(1 /* Expand */);\r\n renderer.camera.position.set(canvas.width / 2, canvas.height / 2, 0);\r\n renderer.batcher.setBlendMode(gl.ONE, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\r\n if (complete) {\r\n this.fadeOut += this.timeKeeper.delta * (this.timeKeeper.totalTime < 1 ? 2 : 1);\r\n if (this.fadeOut > FADE_OUT)\r\n return;\r\n tempColor.setFromColor(this.backgroundColor);\r\n a = 1 - this.fadeOut / FADE_OUT;\r\n a = 1 - (a - 1) * (a - 1);\r\n tempColor.a *= a;\r\n if (tempColor.a > 0) {\r\n renderer.camera.zoom = 1;\r\n renderer.begin();\r\n renderer.quad(\r\n true,\r\n 0,\r\n 0,\r\n canvas.width,\r\n 0,\r\n canvas.width,\r\n canvas.height,\r\n 0,\r\n canvas.height,\r\n tempColor,\r\n tempColor,\r\n tempColor,\r\n tempColor\r\n );\r\n renderer.end();\r\n }\r\n } else {\r\n this.fadeIn += this.timeKeeper.delta;\r\n if (this.backgroundColor.a > 0) {\r\n gl.clearColor(this.backgroundColor.r, this.backgroundColor.g, this.backgroundColor.b, this.backgroundColor.a);\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n }\r\n a = 1;\r\n }\r\n a *= Math.min(this.fadeIn / FADE_IN, 1);\r\n tempColor.set(a, a, a, a);\r\n if (!this.logo) {\r\n this.logo = new GLTexture(renderer.context, logoImage);\r\n this.spinner = new GLTexture(renderer.context, spinnerImage);\r\n }\r\n renderer.camera.zoom = Math.max(1, spinnerSize / canvas.height);\r\n renderer.begin();\r\n renderer.drawTexture(this.logo, (canvas.width - logoWidth) / 2, (canvas.height - logoHeight) / 2, logoWidth, logoHeight, tempColor);\r\n if (this.spinner)\r\n renderer.drawTextureRotated(this.spinner, (canvas.width - spinnerSize) / 2, (canvas.height - spinnerSize) / 2, spinnerSize, spinnerSize, spinnerSize / 2, spinnerSize / 2, this.angle, tempColor);\r\n renderer.end();\r\n }\r\n };\r\n var SPINNER_DATA = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAACjCAYAAADmbK6AAAALKElEQVR42u2de2iW5R/GPzuqcwfnnKfNmafl5tTNHWzqNi3DEMQykcAoJSsySkspjSIk0iD/07Kf4R+FnVBDUTshZGpWUEJaaiWFgZlUFmXmIe3HNXthyebeZ77P9H13ffBG8Y8H7ut7vff93N/7fu4vGGPiFZiez/Qtw9lytJajfzfw9z/j+efPOv7cV8W+lUNY2a8T/ayTCRsWFLJA5rtUO1LLkV5p9LJeJizQiHeqnlOtmVFtdTGrrZkJCxYXsTgaI6r9MY4/UpNItW4mFDaXsTlaM6qVZlBq3UwofFrJp0HMWJ9DvXUzobCznJ1BzFjWlTLrZkJh/TDWBzFjTgo51s2EgnKI0Rrx+FiOWzNzVaym91Syx5qZsGBWb2ZFa0ZN6dbMhAWTcpkUrRmXD2K5NTNhgVbH0Zpxbl/mWjMTFvRIo0e0ZpzcncnWzISKtvmiMWNRJ4qslwmVXRXsas2Ix8ZwzFqZsGFREYtaM+Oaa1ljrUzYkJ9G/ok6TlzKjJWZVFor0y7c1Zu7WjLiqiGsskamXdHopyT4vALmzS9k/t19uHtKHlOSIMn6xAtARjIZ1sFcUSZ0Y4La+G6M18hS2IlCn4a+WoC0JNL0d/dUupdnUj40g6EJ2VEdMnhrOG/p5f/jUXz8SgmvaGU6KpNRNsLVQV0OdXf24s63h/P2gWoOrBjMCr2GJFQnnxnIM3q5P1PPmaYv+4ev4/C6UtbpV2gzXCkgL5W8Bwt48OIc6ul6Tp+s4+SyASxLiI4+PYCn1bHzDZxvaQW6vZzto7MYnQIpNkf7kp5EuozYUroqEjcNKHHd0Tl9mBPN1pk+hFeieGBnBtog7UXjsj9pWg+m6duecw2cay1OC/uxMC47KmP9OIYfoz1YoC20J/rzRG4quTZK2EAyJGs20qwUbYw0aNRmUxtvfUW/uEtNzc1NB1/X8LVyd15hh82F43AvD+VlXcsSJEZa1CQ3ejleAO7oxR3RDP0XN91X4+NXYb8nkv7UNTwV7e0YTdu7I3g33t7tuaEbNwSZpps2fSyvs4M2Tjhot+jb0Xzbltj8r5j/xVt/6Z1Ob93U1ZYO691EhhzchcHeXosVjcNZysyezLw4xRZt05R+fTeuj8vOj+zKyG0j2aZcVVs6v+QalnjrMFZASQYl2nBoSyz06e3j/Xk8rgWYmMvEICu2pm1HOTuc7okV8FgRj0XukwzanhvCc/F+72TjoQjdObN1OFuDLmh0xP+WHtxiI10ukJlCprb4guiv1fP+avZrS1C7NAkliHZjDtZwMMgqbukAltpMlwuMy2FcEBPqvfLLar5Uqi0hBdEwryy+Mv5n6zkbjTBa+dlMlwvUZFETZKGiFM7tvbhdJ3gSVRO0wzIjnxmvl/J6a6JsGMYGrahtpssFeqbR841S3mhN80OjOaSDEdqd6SjaMKgzgzRK7q1ib3PT9sYyNo7JZoyNFNvRcVMZmy7WOvIuryv/Zvdmdt90+nY0bRp3AvROohFwdwW7dTG7RFlbwlqdrbOBYg005NAQmZU0HWt1rXMBH1Xw0dQ8pmqzoaPmdhun7bHZjNVe9qP9eFQfO1VkUmHjhAVUZ1GtnKFSbjrkrPfy4i4UW5t/6ZxM54J0CqxFe81KpGsQyE4h23oYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjLna+bdOy+IiFquIpGq16Pb79cNYv3IIK/X/ugx+Ui6TVKvYVU9Nc8gX8od8Ir/IN/KPfCQ/yVfyl/6/pfJvLChkQdD6wyqntquCXYuKWJSfRr6D0dEAxV3xlw/khyD+kd/ku/88cHo+09tS3LBpO1HHCVUqcIA6CqB4K+6X6x35L/JM2loXurlWmUmlA5XogOIcK8/If5HncrSWo7F6cKIWPjT/RXGOlWfkv8hzaWsN4uaaysE6WIkOKM6x8oz8F3kusXqo2vxC5jtYiQ4ozrH0TeS5qIZcrB7qkrwdA8U5Vp6R/yLPZV8V+2L14Cl5THGwEh1QnGPlGfkv8lyUlIzFQ1cNYVVHrcjZ0VCcFe9Y+Eb+izy3ceclUl43aFN52DXXssYpnY6a4qFS8ZcP2uIf+e7inRh6pdFrdTGrm8uiHx/L8T2V7NGWzvJBLJ/bl7mTuzO5qBNFDoiJID/IF/KHfCK/yDfyT3O7d/KbfNfS80hNIrU0g9L6HOq1x5iTQo6FNpeLfCQ/yVfyl3xmXYwxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHNk9z4JwJ0SqKTdQkbyEwhU393T6V7zzR6pieR3tE1ITeVXImhe6BXDGZFdRbVeank2TBhcaEMr0rwbixj49IBLL2/L/ffmMuNHfqO9tFZjJYBd1ewO3Lx+IcVfKhqna5nHZYR6XFPH+5R3eeI5t9fx/fvjeC9Jdew5OKZKqFR/RDVKL6vL/f9PJafmyvHsL+a/ff24V6NmjZQbGchVbY6UM2BluqHv1rCqzVZ1KQlkZboepCdQvacPsz5bjTfXao+yMEaDt7Wk9tSIMVGig3TejCtJSM2bSpkPjWPqd1S6Zao+lORSYWmgkOjORRNwZqd5ezMSiHLRooNr5XwWjS6/1XHX9vL2T67N7M1iyXa9JCrYjVrS1gbpJyw6hBfsmiNCYT0P9/A+Wj1/6qGr5YNYFlJBiWJogEzezLz/ZG8/9s4fgtSyuvNYbyp1IONFBtu7sHNv4/j9yAxUHWrdaWsG9+N8XHd+YxkMpSy+aySz841cC5oXbmHCnnI74yxAgZ3YbDeB4PEQCOpBpFNZWwa2ZWRcdnxLsl00crtRB0n2lLg8JNRfDKoM4NsolgBSmw/UMADba1+qpmqfyf6x1u/0a/og3I+aEunP6/i86osqmygcGarF4p54dex/Bo0LqfqOfVwIQ/HW5/RSkwV1oN2WLlHTc82TljAwM4M1O5LWwYKZTjibYXNS0N5KcjKTe10PadfLObFuJwK4ozp+UzXDBTUjL+M5ZcBnRkQV53dMIwNQTu6bSTbVEzbi5awuVByd2E/FgaN0Tc1fKOzBHHV2aAdVSdv6s5NNkp7cSH/++xAng2yyHx+CM/H21YhfdPp+0U1X0TbSZnXx8faG9Aop0MS0cToh1p+iLcpOkLj9t/JOk5eqoPHxnDsyf486an5yqCDK7XZ1O4oZ4dWyy3FSXHUAYq47uyYbMZoGmhpG3DlEFb6uNiVBhpyaHhnBO8oJmfqOROJjzIiP43hJ8UxITqqX56S2Hur2KsOnq3nrE6PPNKPRwrSKbAZrjTQNZmuE7oxYXMZmxWbw9dxWFu4W4ezVedOE6qzI7oyYkY+M7TPeWsPbk2UX1qioSN+E3OZqOR2cReKE+qQRFN0Pi7y73g/UawU1KzezJpXwLz5hczX1ueUPKYkNb6GJQZ+j7/aAfRZREsv+quGsMoamXZBW2Gt5eU0alorEzYsKmJRa/m4NdeyxlqZsCGa84DKnVorEzboC7podis69DfIJmwufHMc7famvvmxZiYsKOtKWbRm1OcW1syEBboSJFozLh/EcmtmwgIluaM14/phrLdmJixYXMTiaM24p5I91syEBTphFOR7Y2tmwgJNvUFOr+tov3UzoaAv44KYUatv62ZCoemdhtG0+hzqrZsJBR08DWLG0gxKrZu50qvpxos3U5NItW4mFPp1ot+lPlpq2lYXs9qamVBZUMiC1ox4pJYjvlfStAu6GmTLcLboMtPIV4/6im5fFfuUi9QIap2MiWP+D96R1vPmsD/fAAAAAElFTkSuQmCC\";\r\n var SPINE_LOGO_DATA = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKUAAABsCAYAAAALzHKmAAAQ7klEQVR42u3da4xdVRUA4D0zd2Y6nZY59DVtZ1puS9+lzC0YAi2UQ8AAQczFpPgA9VIeIQbirRqJ0cBUBVGjDr/QCKSNRSMmpuODxAdxqhgwxkhFjf6Sxh/+UUNVNGJCzR7uTvas7LXX2q9zzp3em6y0gTN3Zu75utZe5+yztxC9V+/Ve5X9En1Vjd7J6SFbLNF7naPw+l2jh7YHMBWssqMHtlsRdim4qsLtIawaPiHEQOLoNrA9iIkQDnRrVA1qD2LZ8ISoxYqKo13sQAtBWBayQWZUAXGRQM9JjCngDVY0UqJNDbQrMcaGmArdUKpIjbYiQLsCZCyIMQBy8QwnilR4Q5AuCpxFYvRFmBLbEiwKwpsSaWycVQGZBKMrwBjA9BhxDe57u2L2hOoKNCbOrgAZitEVYUxoKSMErQvSxYIzCkguRg5EF4AUhqUlhy/YUKSxcRaKsioYOQhD4I0yYxkR3PcJBcuFysmgsXAWBTMJyBCMIQh9kGGxXIXvexCQXbHGAMrBWTbM2CCpMSMLIxehC77lSJwXGth7M0FzoVJIXXDWQnGmhOkL0ic7YhhtWdGGkAuPAjUWGoF4faCmwBkbZmyUqUCyMqMLRA4+E6IsdTjidUHKBYrh9CnpRcH0ypKxsyOGEYNIIeTCOz91OIJ1QYoB5eAMyZo+MFNnyVTZ0YiRC9EGEMOyAgshxErHsL2XK1gOUgwohtM1a5YNM7Rsu4K0ZkcbRm4mpPBRwFZ5hg9eCqkrUB+csWGGogzNkqEgrdnRhpGLkINudaLgwvVB6oqzCjCTZElb2Y4B0gUjBtEG0ARnDRLjjoG9DwcshtQGlIPTljVjwUySLWNkyRCQVHa0ZUUTRAwgF91a33BEy0VKAcVwwqwZC2bqbOlUurllOxQkJzNyINoAYqjWhYYjWg5SCiiG05Q1U8FMjTIoS8YE6YORi1BHtJ4KIcQEEtTXUWAxpK44YVlPBdO1jCdFWTZIE8bVGEYMIRPcZGBw4HKQcoBiOE1ZMzbMgVQwU6JMAdKEEcuIJogUvg1YCCE2gsCO42DlIIVAKZwpYJaSLVNnSU6XjYHUmxhTmXaFaMO3EYkLqMC+FsLlIoVAKZzMrEnBhJeLfLNlKMrYWRIDCbOkFSSVHbHM6AKRC6/ODUewNqQ+OLlZkxpjUmV8MBbMUJSxyzY3Q1IgTRgxiBRCHdem0KDAUkBh9sRwwjEnAXMMgTnKhFlUtiwkS5rGka4g9SaGgxFmRC7AzTCEEBcyA36dDSsXqAtOLkysjGMwY5XxVChjZ0kuSCo7YlkRQsQQYtDEFsegsLoCxUp7Kpgps2UslFGzJGccSYHUmxhOZqwzEZqAbfUMCisHKIZzgsCpl3MTzMwTpi1bYp2477gyFKUxS7qWbdjY2EBS2dGE0QQRA7gNCyHEdhjE8RhUDlBT9tzgmjWZMFNlSy+Urk1OzCyJlW0XkK4YOQh1cDtcgwBrQmoDWkdgboBZE8mYsJSHlnFbJ+5bwmOPJ7lZkirbC8aRsMvmgtTHjBhGE0QbwJ2egUE1ITVlUC5OmDVdYNrKuN70xM6WoShjlW4464dbtiFIWK6x7GjESEHUUe0iYncnbMdQSE0Z1ITTNOb0hRmjjLtmS9dmJ2rp1jtuKktyyrb6YLEMCUHq2dGG0QQRQ7f72kzc+cJecerne8Wvv7JNPHPvenEkz8Sh3UtFc92QyGt9Yko/HgOLAIUZlItTz5ouMF3KuE+2jFLCQ1D6lm6fLMkBacuOJowYRBUXyfjuHjF3NhdnsfjvAfH6E9vFt9XxKgikEKgJZyyYalzOLeMu2bLbULI6bh+QGwmQ+rgRlumdGEQAao+K56bEL2woVUwOiev0r8OAUjiJrMmFCbvykGxZRAmPitK1dHM7bohyMsuyi/I8f0+e57fJYIKEZXpXo9E4mOf5XTKyLLvCBLETF8uY2SKepkC+dpX4T02Ivepr4HvZcOZ5fmee54fyPL+DmTUhzAs6n4n8bN5dr9f3YdkSg8nsxG0lPBVKVpNjG0/aGhzfLDmRZdnumZmZp8+c+cdZPV555fSr7Xb7s0jJ3i5Pcue4MxKkPPkvvXTqz/B92u32l0wYOzG1fkhcd/py8Rcbyq/vFM/KY1WA95h/3zzP71bfU6JsNpsfgj+P/FlbrdaDGExYyuXvLz8H+DudODH700ajcSM3W6Yu4alQ1spCOTd38jcKocTZbh9+9NixY99XJ8AEUkcpo9W64yH197m5k7+bnZ19QT+J09NHntQhwji/Jg58qi6++ofLxJ8gSFneVw2Ka4QQDfh1Ok4dZavVmtZ/nrm5k7/Vf55O1tRhboUw5+ZOvqyOl5+R/FyOHj32PYVU/tloNG5IXcKrhJIzngwp3fNjomazea/64BuNxts646f50lWv169utw9/DmtqdJQyZFaSJVuV6nq9fqMEof5/vV6/CYBqgJDlee+yAbF/+4i4ZWqZeNfaIfHWzn+Hx0KcEuU9+s8jv3ej0bhVlXOZydX/k0iRMeb8P0D5e6tj8zy/Xb9UJIc56h/yqVOnXul8lmuZ2bJslKmbHG7XrbpCmCXFRLvdfqQD6jTS3Jiy5I4OykM6ADV+1Eu1DmV6evopBORexzDi1L+X/HnGxsb2w3Hm9PSRJ9QxWPOTZdmlKht2hi+w6dkox5bqffI8fye3hDteGqKaHVsHXihKl0tB+h0cY+lute54AGRKDCW89LNTRynHb7ChUWVVjetOnJh9EYBUyPZeNCoOtsbFQwdXi4/esELcd+tq8cCHJ8UXp+viy9efLz7AgamjlKXc1AA1m83DoIRDlFubzeb96hhZLVTlgJ24gttutx+ONa50bHZKRenaeTs1OfpAfnr6yOOdE7EZdNwmlKocntXLNkA5JTGq47Ds+Lf94lWsyfnXleLfnIwJUN4DOnNYwuUxh2A3Ln9XULrfK8t3J27Tu3BVwiOjXJqoAy8UZej1yclGo3GTLN+gu3w+z/P3YaWbQqk3Ne12e4ZC+c8rxWsYytcPiP9RpZxCqWDKnxOiBNlyAUpOnGsoh4tA2Rm8X9xqtT6md5wyZmYe+0YRKL+1S/wYQ3n8zctBl5SBUv5djivfjMOPduIzcizeiYfr9foVvUwZG+XCuzibZKnSceZ5/v4QlKp8y7ElhnJlTeTP7BI/kllRYfzrfvHqFy4UX1vaL/aVlSmROzwbwdS29T2UcEwZF+V8ozM2lu1VY812u/15akypGh3TmFJesJbHHD167IdUxz3YJy5bNySuX1mbvy55CbMLtzU6tjGlsdFptVqfUMc0Go23F4wy1l2dSnbfvpMwVPe9WWVLDsrOJaF9MFu2Wq1PqmNkGce67xiXhTjdNwdlvV6/BgxfbPfBfVCetxi6b9/rlCup65QzM48dl2OjLMv26CibzeZ96sTIzEFdpwQXz9U1yrtVlpR/Zll2Fec65Y6l4pbbx8XHH9kknvzJlPjlHy8Tp29eKT5ou0aJoIT3w3dBlLDzVpfAJEZ1XOdaJZxnOSlvPMjPzxFljIvng914RwebsjYO7uhMyHu46sOfnf3Oz2TXDW6vvYxdFoIXz3Wc8J5zs9n8iOn2IrxTc2BM3Glqdp7dI553uaOjxrhwcob+MyuUpjs6WZZdon8OcigjPx8V+u+GTWFTSWEx3WYcdJ225jNDSE4q0GHCzlueHOyujn6bUWYgeb9ZZUaQPe+GzQ+Gc8+oOGhC+c1d4gfI16n3XDAhQ7+9qE9l01E2Go132GYKyXE1NiFDTcpoNpv3LOYJGWXNErJNW9sEp63p2RKiVPMn1bS1DgxsyhoGdGpmizj+xtXiDYnx7/vFmce3iWdW1cTVGEY4hQ2ZW0nNq8Qm/M6XbXm3S100lwGedFybuvNOibLI+ZS2ceU4eAxiEuvCkfmU8ycToDxETe6FgCBQHeqyAbFvfEhcO7BwDuXFCEbTZF840XeHK0jYcbs2OIGle0mVJ/mmnClEPQqxyTY5I8/zFhif7fSZee4bnrPOU4AssnRXHaVTCTd14dRDY3UbTIiSeFhsN/aMjgnqthFx880rxX3yATL5p3y4LPXzOaBkUyBjZMlYpbtQlIOBD475ZEusjMNSvkXe6VEoJVDkeZ2dzIfIFsRzU+JF2OyM9M9fTC/6SUYOyFQPjQ2nWiUjxnPfw5EeHqMWIqAeIFsAU847lJM2JM6xsewt1OIDLs99P7ZFHNdB/upS8XtPiD7PfLuCXJNolYyyFiNI/Zit65ItrOVafFbHcFohY7hPTN21Tjz4uc3iqfsnxKdX1MTl1OoYRFaMsToGB6Trw2JFP/OdZC2hJZ7ZkrMoAbbSGmelDJ91hFKuJeS7jlBMkJnrAqqJlgMUZS/dArPlGHNdSg5M3xXXtvquuEatvIYtDRhpxbUJuIgqsU5lGWtUploK0KuEU9mSW8YpmFQ556xNuYW7NiW13B+FkMiKHIy+C6eGgBxJvMR0oSv5hi6+z4HJyZoU0M2RVvDlrOQbcxVfX5AhZbuqy0v7ZstYMLHlAVlLTF9ALLbvu9Y5Zylpn/XOsd0ibIvxr2KCLHpp6SCUIdnSZSF+WzfOhem6GD+1KwR3Z4jNjrtDpNoZwmWd8yrupZN6Hx3fbMmFSe0Swdq2ZIPjxk1112Duo8OBGLrBkw/IoncdK2XHsdC9dHz204m50xh3tzFq1zFqtzHXrfCw7OgDsqyNnZLszVijsmXgrmNcmGtS78lIoMX2aJz03fKO2sDJddPQSCDPiQ1DfWBycY6XtXstc2PQKuxgG2McmXTPb9/9vmuJYXKyJrWjbeg+3xPM4O73nWqvbyw7xgZZSJbEUBa157cNJjdr2vb+5iA1YV3HxYscj30PDCEHIgcjtfm8K8hSsmRotkwFk5s1TTghUAopB6xrjHMBBkI0YYTZ0dZlxwLpkiWDULpmy5gwqayZgZNkA7oKQQCxctByYg0XIIEQQuRitGVHblMTA2ShKGPDpC6wu+DEgJqg2rDGDBtAF4Q6RAojp1xXGmSMbImVcR+YWNY04eQCtUG1ofUJ2/uvcETIgUhhdAE5GAlkKShjwHTNmhhODKgJqQ2sC14uOgyfD0IbRF+MlQaZAiZWyn2yJsTJATqGnHQO2Jhh+xlsACFCG0QbRtdyzQFZCZSxYPpmTS7Q5cjJHYNBYIkZpu99HoUQ/o4QIYSIZUZfjJ4ZMjZI32wZBDMU5yhy8pZTULl4XYP5fagMyEVoy4oupTpGduwnkloSlKEwY+AcQU4MhRTD6ovXBRwFzwWgCSEF0QVjJUGmgEllTS5OLlCIlIN1mS9mx/cZ5eLDALpCTI2RAhkTZQqYoTgpoCPECbaBHQ2ETL3PUl98ECAXYijG0OyYAmQoTG7W5ODkAF1CnVgm2JQx4okPA+gCMTbGskBGgRmaOblAh5GTORIrfKFx4VH4EIAxIXIxlg2SBbMvECY3e7oApbDaIgQu5/2HmeEKEINYiwSRi7EQkLFgumZOCuggctKGI4ULZN/vMeSLj0AYMytWEqMLzFg4fYDaoKaC6wvOFR4FkIPQFaILxrJAOsHsc/zlfYDWXE8qF22s8Pz5KHxcgEVALBtjJXBSSEOwFhk1Zgy4hitCT4hVw+gFs8/zwxqIBbUgyK7fcyA0PD9XX4iVxhiC0xdof6STWCsoBmKF7+cVCWFXQYyBMxRpf+STX1b0x45AhN0OMSrOGEirhrY/dfQAdjvS7oy+WCF6r1RIFxXWvlTRg1YVqFWBmxZbD99ig9pt0YPQw9rD1nstVri9V+/Ve3XrS/wfim4P5fIFxLoAAAAASUVORK5CYII=\";\r\n\r\n // spine-webgl/src/SpineCanvas.ts\r\n var SpineCanvas = class {\r\n constructor(canvas, config) {\r\n this.time = new TimeKeeper();\r\n if (!config.pathPrefix)\r\n config.pathPrefix = \"\";\r\n if (!config.app)\r\n config.app = {\r\n loadAssets: () => {\r\n },\r\n initialize: () => {\r\n },\r\n update: () => {\r\n },\r\n render: () => {\r\n },\r\n error: () => {\r\n }\r\n };\r\n if (config.webglConfig)\r\n config.webglConfig = { alpha: true };\r\n this.htmlCanvas = canvas;\r\n this.context = new ManagedWebGLRenderingContext(canvas, config.webglConfig);\r\n this.renderer = new SceneRenderer(canvas, this.context);\r\n this.gl = this.context.gl;\r\n this.assetManager = new AssetManager(this.context, config.pathPrefix);\r\n this.input = new Input(canvas);\r\n if (config.app.loadAssets)\r\n config.app.loadAssets(this);\r\n let loop = () => {\r\n requestAnimationFrame(loop);\r\n this.time.update();\r\n if (config.app.update)\r\n config.app.update(this, this.time.delta);\r\n if (config.app.render)\r\n config.app.render(this);\r\n };\r\n let waitForAssets = () => {\r\n if (this.assetManager.isLoadingComplete()) {\r\n if (this.assetManager.hasErrors()) {\r\n if (config.app.error)\r\n config.app.error(this, this.assetManager.getErrors());\r\n } else {\r\n if (config.app.initialize)\r\n config.app.initialize(this);\r\n loop();\r\n }\r\n return;\r\n }\r\n requestAnimationFrame(waitForAssets);\r\n };\r\n requestAnimationFrame(waitForAssets);\r\n }\r\n clear(r, g, b, a) {\r\n this.gl.clearColor(r, g, b, a);\r\n this.gl.clear(this.gl.COLOR_BUFFER_BIT);\r\n }\r\n };\r\n return __toCommonJS(src_exports);\r\n})();\r\n//# sourceMappingURL=spine-webgl.js.map\r\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\r\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\r\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\r\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\r\nvar MultiFile = require('../../../src/loader/MultiFile.js');\r\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\r\n\r\n/**\r\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\r\n *\r\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Spine File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\r\n *\r\n * @class SpineFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar SpineFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\r\n {\r\n var i;\r\n var json;\r\n var atlas;\r\n var files = [];\r\n var cache = loader.cacheManager.custom.spine;\r\n\r\n // atlas can be an array of atlas files, not just a single one\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n json = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'jsonURL'),\r\n extension: GetFastValue(config, 'jsonExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\r\n });\r\n\r\n atlasURL = GetFastValue(config, 'atlasURL');\r\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, {\r\n key: key + '!' + i,\r\n url: atlasURL[i],\r\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n else\r\n {\r\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, key + '!' + i, atlasURL[i], atlasXhrSettings);\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n\r\n files.unshift(json);\r\n\r\n MultiFile.call(this, loader, 'spine', key, files);\r\n\r\n this.config.preMultipliedAlpha = preMultipliedAlpha;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'text')\r\n {\r\n // Inspect the data for the files to now load\r\n var content = file.data.split('\\n');\r\n\r\n // Extract the textures\r\n var textures = [ content[0] ];\r\n\r\n for (var t = 0; t < content.length; t++)\r\n {\r\n var line = content[t];\r\n\r\n if (line.trim() === '' && t < content.length - 1)\r\n {\r\n line = content[t + 1];\r\n\r\n textures.push(line);\r\n }\r\n }\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\r\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\r\n var prefix = GetFastValue(config, 'prefix', this.prefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n var textureURL = textures[i];\r\n\r\n var key = textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n if (!loader.keyExists(image))\r\n {\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\r\n * @since 3.19.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var atlasCache;\r\n var atlasKey = '';\r\n var combinedAtlasData = '';\r\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\r\n var textureManager = this.loader.textureManager;\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'text')\r\n {\r\n atlasKey = file.key.replace(/![\\d]$/, '');\r\n\r\n atlasCache = file.cache;\r\n\r\n combinedAtlasData = combinedAtlasData.concat(file.data);\r\n }\r\n else\r\n {\r\n var src = file.key.trim();\r\n var pos = src.indexOf('!');\r\n var key = src.substr(pos + 1);\r\n\r\n if (!textureManager.exists(key))\r\n {\r\n textureManager.addImage(key, file.data);\r\n }\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetValue = require('../../../src/utils/object/GetValue');\r\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\r\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\r\nvar SpineCanvas = require('SpineCanvas');\r\nvar SpineWebgl = require('SpineWebgl');\r\nvar Spine = {\r\n canvas: SpineCanvas,\r\n webgl: SpineWebgl\r\n};\r\nvar SpineFile = require('./SpineFile');\r\nvar SpineGameObject = require('./gameobject/SpineGameObject');\r\nvar SpineContainer = require('./container/SpineContainer');\r\nvar NOOP = require('../../../src/utils/NOOP');\r\n\r\n/**\r\n * @classdesc\r\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\r\n *\r\n * Find more details about Spine itself at http://esotericsoftware.com/.\r\n *\r\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\r\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\r\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\r\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\r\n *\r\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\r\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\r\n *\r\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\r\n *\r\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\r\n *\r\n * ```javascript\r\n * import * as SpinePlugin from './SpinePlugin.js';\r\n * ```\r\n *\r\n * and then adding it to your Phaser Game configuration:\r\n *\r\n * ```javascript\r\n * plugins: {\r\n * scene: [\r\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\r\n * ]\r\n * }\r\n * ```\r\n *\r\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\r\n * Game Configuration object, like this:\r\n *\r\n * ```javascript\r\n * scene: {\r\n * preload: preload,\r\n * create: create,\r\n * pack: {\r\n * files: [\r\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\r\n * ]\r\n * }\r\n * }\r\n * ```\r\n *\r\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\r\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\r\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\r\n * subsequent Scenes.\r\n *\r\n * ## A note about inlined data:\r\n *\r\n * If you need to load Spine assets from inline / base64 encoded data, then you should not use the Loader\r\n * at all. Instead, call the functions directly as required:\r\n *\r\n * scene.cache.json.add\r\n * scene.cache.custom.spine.add\r\n * scene.textures.addBase64\r\n *\r\n * ## Using the plugin\r\n *\r\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\r\n *\r\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\r\n * Spine files directly, i.e.:\r\n *\r\n * ```javascript\r\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\r\n * ```\r\n *\r\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\r\n * and Spine Containers:\r\n *\r\n * ```javascript\r\n * const man = this.add.spine(512, 650, 'stretchyman');\r\n *\r\n * const container = this.add.spineContainer();\r\n *\r\n * container.add(man);\r\n * ```\r\n *\r\n * The first argument is the key which you used when importing the Spine data. There are lots of\r\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\r\n * see the respective documentation and examples for further details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\r\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\r\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\r\n * load arguments, or you may see black outlines around skeleton textures.\r\n *\r\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\r\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\r\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\r\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\r\n * game, regardless if the Scene loaded the Spine data or not.\r\n *\r\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\r\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\r\n *\r\n * ```javascript\r\n * this.plugins.removeScenePlugin('SpinePlugin');\r\n * ```\r\n *\r\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\r\n *\r\n * @class SpinePlugin\r\n * @extends Phaser.Plugins.ScenePlugin\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar SpinePlugin = new Class({\r\n\r\n Extends: ScenePlugin,\r\n\r\n initialize:\r\n\r\n function SpinePlugin (scene, pluginManager, pluginKey)\r\n {\r\n ScenePlugin.call(this, scene, pluginManager, pluginKey);\r\n\r\n var game = pluginManager.game;\r\n\r\n /**\r\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\r\n *\r\n * @name SpinePlugin#isWebGL\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isWebGL = (game.config.renderType === 2);\r\n\r\n /**\r\n * A custom cache that stores the Spine atlas data.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.cache = game.cache.addCustom('spine');\r\n\r\n /**\r\n * A custom cache that stores the Spine Textures.\r\n *\r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#spineTextures\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.spineTextures = game.cache.addCustom('spineTextures');\r\n\r\n /**\r\n * A reference to the global JSON Cache.\r\n *\r\n * @name SpinePlugin#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.json = game.cache.json;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name SpinePlugin#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.19.0\r\n */\r\n this.textures = game.textures;\r\n\r\n /**\r\n * A flag that sets if the Skeleton Renderers will render debug information over the top\r\n * of the skeleton or not.\r\n *\r\n * @name SpinePlugin#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The underlying WebGL context of the Phaser renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.19.0\r\n */\r\n this.gl;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name SpinePlugin#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.renderer;\r\n\r\n /**\r\n * An instance of the Spine WebGL Scene Renderer.\r\n *\r\n * There is only one instance of the Scene Renderer shared across the whole plugin.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#sceneRenderer\r\n * @type {spine.webgl.SceneRenderer}\r\n * @since 3.19.0\r\n */\r\n this.sceneRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Renderer.\r\n *\r\n * @name SpinePlugin#skeletonRenderer\r\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.skeletonRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Debug Renderer.\r\n *\r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#skeletonDebugRenderer\r\n * @type {spine.webgl.skeletonDebugRenderer}\r\n * @since 3.19.0\r\n */\r\n this.skeletonDebugRenderer;\r\n\r\n /**\r\n * A reference to the Spine runtime.\r\n * This is the runtime created by Esoteric Software.\r\n *\r\n * @name SpinePlugin#plugin\r\n * @type {spine}\r\n * @since 3.19.0\r\n */\r\n this.plugin = Spine;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp1\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp1;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp2\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp2;\r\n\r\n if (this.isWebGL)\r\n {\r\n this.runtime = Spine.webgl;\r\n\r\n this.renderer = game.renderer;\r\n this.gl = game.renderer.gl;\r\n\r\n this.getAtlas = this.getAtlasWebGL;\r\n }\r\n else\r\n {\r\n this.runtime = Spine.canvas;\r\n\r\n this.renderer = game.renderer;\r\n\r\n this.getAtlas = this.getAtlasCanvas;\r\n }\r\n\r\n // Headless mode?\r\n if (!this.renderer)\r\n {\r\n this.renderer = {\r\n width: game.scale.width,\r\n height: game.scale.height,\r\n preRender: NOOP,\r\n postRender: NOOP,\r\n render: NOOP,\r\n destroy: NOOP\r\n };\r\n }\r\n\r\n var add = function (x, y, key, animationName, loop)\r\n {\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, x, y, key, animationName, loop);\r\n\r\n this.displayList.add(spineGO);\r\n this.updateList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var make = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetValue(config, 'key', null);\r\n var animationName = GetValue(config, 'animationName', null);\r\n var loop = GetValue(config, 'loop', false);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineGameObject(this.scene, spinePlugin, 0, 0, key, animationName, loop);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, spineGO, config);\r\n\r\n // Spine specific\r\n var skinName = GetValue(config, 'skinName', false);\r\n\r\n if (skinName)\r\n {\r\n spineGO.setSkinByName(skinName);\r\n }\r\n\r\n var slotName = GetValue(config, 'slotName', false);\r\n var attachmentName = GetValue(config, 'attachmentName', null);\r\n\r\n if (slotName)\r\n {\r\n spineGO.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return spineGO.refresh();\r\n };\r\n\r\n var addContainer = function (x, y, children)\r\n {\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var spineGO = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n this.displayList.add(spineGO);\r\n\r\n return spineGO;\r\n };\r\n\r\n var makeContainer = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetValue(config, 'x', 0);\r\n var y = GetValue(config, 'y', 0);\r\n var children = GetValue(config, 'children', null);\r\n\r\n var spinePlugin = this.scene.sys[pluginKey];\r\n var container = new SpineContainer(this.scene, spinePlugin, x, y, children);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n\r\n return container;\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\r\n },\r\n\r\n /**\r\n * Internal boot handler.\r\n *\r\n * @method SpinePlugin#boot\r\n * @private\r\n * @since 3.19.0\r\n */\r\n boot: function ()\r\n {\r\n if (this.isWebGL)\r\n {\r\n this.bootWebGL();\r\n this.onResize();\r\n this.game.scale.on(ResizeEvent, this.onResize, this);\r\n }\r\n else\r\n {\r\n this.bootCanvas();\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n eventEmitter.once('destroy', this.destroy, this);\r\n\r\n this.game.events.once('destroy', this.gameDestroy, this);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the Canvas Renderer.\r\n *\r\n * @method SpinePlugin#bootCanvas\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootCanvas: function ()\r\n {\r\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the WebGL Renderer.\r\n *\r\n * @method SpinePlugin#bootWebGL\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootWebGL: function ()\r\n {\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (!sceneRenderer)\r\n {\r\n sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n\r\n this.renderer.spineSceneRenderer = sceneRenderer;\r\n }\r\n\r\n // All scene share the same instance\r\n this.sceneRenderer = sceneRenderer;\r\n this.skeletonRenderer = sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = sceneRenderer.skeletonDebugRenderer;\r\n\r\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\r\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasCanvas\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasCanvas: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n atlas = new this.runtime.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage());\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasWebGL\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine Atlas to create.\r\n *\r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasWebGL: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n var gl = this.sceneRenderer.context.gl;\r\n\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n\r\n atlas = new this.runtime.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false);\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\r\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\r\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\r\n * outlines around skeleton textures.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\r\n * Loading a file using a key that is already taken will result in a warning.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.spine({\r\n * key: 'mainmenu',\r\n * jsonURL: 'boy.json',\r\n * atlasURL: 'boy.atlas',\r\n * preMultipliedAlpha: true\r\n * });\r\n * ```\r\n *\r\n * If you need to load multiple Spine atlas files, provide them as an array:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\r\n * }\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the data from the Spine plugin.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spine\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.19.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {object} [settings] - An external Settings configuration object { prefix: '' }\r\n * \r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings, settings)\r\n {\r\n var multifile;\r\n settings = settings || {};\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new SpineFile(this, key[i]);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n \r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\r\n\r\n // Support prefix key\r\n multifile.prefix = multifile.prefix || settings.prefix || '';\r\n \r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#worldToLocal\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The screen space x coordinate to convert.\r\n * @param {number} y - The screen space y coordinate to convert.\r\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\r\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\r\n *\r\n * @return {spine.Vector2} A Vector2 containing the translated point.\r\n */\r\n worldToLocal: function (x, y, skeleton, bone)\r\n {\r\n var temp1 = this.temp1;\r\n var temp2 = this.temp2;\r\n var camera = this.sceneRenderer.camera;\r\n\r\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\r\n\r\n var width = camera.viewportWidth;\r\n var height = camera.viewportHeight;\r\n\r\n camera.screenToWorld(temp1, width, height);\r\n\r\n if (bone && bone.parent !== null)\r\n {\r\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\r\n\r\n return new this.runtime.Vector2(temp2.x, temp2.y);\r\n }\r\n else if (bone)\r\n {\r\n return new this.runtime.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\r\n }\r\n else\r\n {\r\n return new this.runtime.Vector2(temp1.x, temp1.y);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x and y values.\r\n *\r\n * @method SpinePlugin#getVector2\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector2: function (x, y)\r\n {\r\n return new this.runtime.Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x, y and z values.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#getVector3\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n * @param {number} z - The Vector z value.\r\n *\r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector3: function (x, y, z)\r\n {\r\n return new Spine.webgl.Vector3(x, y, z);\r\n },\r\n\r\n /**\r\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBones\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBones: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBones = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugRegionAttachments\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugRegionAttachments: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawRegionAttachments = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBoundingBoxes\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBoundingBoxes: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshHull\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshHull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshHull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshTriangles\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshTriangles: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshTriangles = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugPaths\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugPaths: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawPaths = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugSkeletonXY\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugSkeletonXY: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawSkeletonXY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugClipping\r\n * @since 3.19.0\r\n *\r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugClipping: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawClipping = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the given vertex effect on the Spine Skeleton Renderer.\r\n *\r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setEffect\r\n * @since 3.19.0\r\n *\r\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\r\n *\r\n * @return {this} This Spine Plugin.\r\n */\r\n setEffect: function (effect)\r\n {\r\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\r\n *\r\n * The Skeleton data should have already been loaded before calling this method.\r\n *\r\n * @method SpinePlugin#createSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\r\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\r\n *\r\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\r\n */\r\n createSkeleton: function (key, skeletonJSON)\r\n {\r\n var atlasKey = key;\r\n var jsonKey = key;\r\n var split = (key.indexOf('.') !== -1);\r\n\r\n if (split)\r\n {\r\n var parts = key.split('.');\r\n\r\n atlasKey = parts.shift();\r\n jsonKey = parts.join('.');\r\n }\r\n\r\n var atlasData = this.cache.get(atlasKey);\r\n var atlas = this.getAtlas(atlasKey);\r\n\r\n if (!atlas)\r\n {\r\n return null;\r\n }\r\n\r\n if (!this.spineTextures.has(atlasKey))\r\n {\r\n var gl = this.gl;\r\n var i;\r\n var atlasPage;\r\n var realTextureKey;\r\n\r\n if (this.isWebGL)\r\n {\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n }\r\n\r\n for (i = 0; i < atlas.pages.length; i ++)\r\n {\r\n atlasPage = atlas.pages[i];\r\n realTextureKey = atlasData.prefix ? atlasData.prefix + atlasPage.name : atlasPage.name;\r\n if (this.isWebGL)\r\n {\r\n atlasPage.setTexture(new this.runtime.GLTexture(gl, this.textures.get(realTextureKey).getSourceImage(), false));\r\n }\r\n else\r\n {\r\n atlasPage.setTexture(new this.runtime.CanvasTexture(this.textures.get(realTextureKey).getSourceImage()));\r\n }\r\n }\r\n \r\n this.spineTextures.add(atlasKey, atlas);\r\n }\r\n\r\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\r\n\r\n var atlasLoader = new this.runtime.AtlasAttachmentLoader(atlas);\r\n\r\n var skeletonJson = new this.runtime.SkeletonJson(atlasLoader);\r\n\r\n var data;\r\n\r\n if (skeletonJSON)\r\n {\r\n data = skeletonJSON;\r\n }\r\n else\r\n {\r\n var json = this.json.get(atlasKey);\r\n\r\n data = (split) ? GetValue(json, jsonKey) : json;\r\n }\r\n\r\n if (data)\r\n {\r\n var skeletonData = skeletonJson.readSkeletonData(data);\r\n\r\n var skeleton = new this.runtime.Skeleton(skeletonData);\r\n\r\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Animation State and Animation State Data for the given skeleton.\r\n *\r\n * The returned object contains two properties: `state` and `stateData` respectively.\r\n *\r\n * @method SpinePlugin#createAnimationState\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\r\n *\r\n * @return {any} An object containing the Animation State and Animation State Data instances.\r\n */\r\n createAnimationState: function (skeleton)\r\n {\r\n var stateData = new this.runtime.AnimationStateData(skeleton.data);\r\n\r\n var state = new this.runtime.AnimationState(stateData);\r\n\r\n return { stateData: stateData, state: state };\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpinePlugin#getBounds\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function (skeleton)\r\n {\r\n var offset = new this.runtime.Vector2();\r\n var size = new this.runtime.Vector2();\r\n\r\n skeleton.getBounds(offset, size, []);\r\n\r\n return { offset: offset, size: size };\r\n },\r\n\r\n /**\r\n * Internal handler for when the renderer resizes.\r\n *\r\n * Only called if running in WebGL.\r\n *\r\n * @method SpinePlugin#onResize\r\n * @since 3.19.0\r\n */\r\n onResize: function ()\r\n {\r\n var renderer = this.renderer;\r\n var sceneRenderer = this.sceneRenderer;\r\n\r\n var viewportWidth = renderer.width;\r\n var viewportHeight = renderer.height;\r\n\r\n sceneRenderer.camera.position.x = viewportWidth / 2;\r\n sceneRenderer.camera.position.y = viewportHeight / 2;\r\n\r\n sceneRenderer.camera.setViewport(viewportWidth, viewportHeight);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n *\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method SpinePlugin#shutdown\r\n * @private\r\n * @since 3.19.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n if (this.isWebGL)\r\n {\r\n this.game.scale.off(ResizeEvent, this.onResize, this);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n *\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method SpinePlugin#destroy\r\n * @private\r\n * @since 3.19.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.cache = null;\r\n this.spineTextures = null;\r\n this.json = null;\r\n this.textures = null;\r\n this.skeletonRenderer = null;\r\n this.gl = null;\r\n },\r\n\r\n /**\r\n * The Game that owns this plugin is being destroyed.\r\n *\r\n * Dispose of the Scene Renderer and remove the Game Objects.\r\n *\r\n * @method SpinePlugin#gameDestroy\r\n * @private\r\n * @since 3.50.0\r\n */\r\n gameDestroy: function ()\r\n {\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n this.pluginManager.removeGameObject('spineContainer', true, true);\r\n\r\n this.pluginManager = null;\r\n\r\n var sceneRenderer = this.renderer.spineSceneRenderer;\r\n\r\n if (sceneRenderer)\r\n {\r\n sceneRenderer.dispose();\r\n }\r\n\r\n this.renderer.spineSceneRenderer = null;\r\n this.sceneRenderer = null;\r\n }\r\n\r\n});\r\n\r\nSpinePlugin.SpineGameObject = SpineGameObject;\r\nSpinePlugin.SpineContainer = SpineContainer;\r\n\r\n/**\r\n * Creates a new Spine Game Object and adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\r\n *\r\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\r\n *\r\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\r\n * name, then use `SpinePlugin.make` instead.\r\n *\r\n * @method SpinePlugin#add\r\n * @since 3.19.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\n/**\r\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\r\n *\r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n *\r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 500, y: 500, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-idle', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * @method SpinePlugin#make\r\n * @since 3.19.0\r\n *\r\n * @param {any} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\nmodule.exports = SpinePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../../src/utils/Class');\r\nvar Container = require('../../../../src/gameobjects/container/Container');\r\nvar SpineContainerRender = require('./SpineContainerRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\r\n *\r\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\r\n * for Spine Game Objects. You must only add ever Spine Game Objects, or other Spine Containers, to this type of Container.\r\n * Although Phaser will not prevent you from adding other types, they will not render and are likely to throw runtime errors.\r\n *\r\n * To create one in a Scene, use the factory methods:\r\n *\r\n * ```javascript\r\n * this.add.spineContainer();\r\n * ```\r\n *\r\n * or\r\n *\r\n * ```javascript\r\n * this.make.spineContainer();\r\n * ```\r\n *\r\n * Note that you should not nest Spine Containers inside regular Containers if you wish to use masks on the\r\n * container children. You can, however, mask children of Spine Containers if they are embedded within other\r\n * Spine Containers. In short, if you need masking, don't mix and match the types.\r\n *\r\n * See the Container documentation for further details about what Containers can do.\r\n *\r\n * @class SpineContainer\r\n * @extends Phaser.GameObjects.Container\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\r\n */\r\nvar SpineContainer = new Class({\r\n\r\n Extends: Container,\r\n\r\n Mixins: [\r\n SpineContainerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineContainer (scene, plugin, x, y, children)\r\n {\r\n Container.call(this, scene, x, y, children);\r\n\r\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\r\n this.type = 'Spine';\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineContainer#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.50.0\r\n */\r\n this.plugin = plugin;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineContainer#preDestroy\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineContainer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n camera.addToRenderList(container);\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n if (container.mask)\r\n {\r\n container.mask.preRenderCanvas(renderer, null, camera);\r\n }\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n }\r\n\r\n if (container.mask)\r\n {\r\n container.mask.postRenderCanvas(renderer);\r\n }\r\n};\r\n\r\nmodule.exports = SpineContainerCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = require('../../../../src/utils/NOOP');\r\nvar renderCanvas = require('../../../../src/utils/NOOP');\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./SpineContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./SpineContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineContainerWebGLRenderer#renderWebGL\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineContainer} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n var plugin = container.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n }\r\n\r\n return;\r\n }\r\n\r\n camera.addToRenderList(container);\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var rendererNextType = renderer.nextTypeMatch;\r\n\r\n // Force these to avoid batch flushing during SpineGameObject.renderWebGL\r\n renderer.nextTypeMatch = true;\r\n renderer.newType = false;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (child.willRender(camera, container))\r\n {\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.preRenderWebGL(renderer, child, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n if (mask)\r\n {\r\n sceneRenderer.end();\r\n\r\n renderer.pipelines.rebind();\r\n\r\n mask.postRenderWebGL(renderer, camera);\r\n\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n }\r\n }\r\n\r\n renderer.nextTypeMatch = rendererNextType;\r\n\r\n if (!rendererNextType)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineContainerWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Complete Event.\r\n *\r\n * @event SpinePluginEvents#COMPLETE\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Dispose Event.\r\n *\r\n * @event SpinePluginEvents#DISPOSE\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'dispose';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The End Event.\r\n *\r\n * @event SpinePluginEvents#END\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'end';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Custom Event Event.\r\n *\r\n * @event SpinePluginEvents#EVENT\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'event';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Interrupted Event.\r\n *\r\n * @event SpinePluginEvents#INTERRUPTED\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'interrupted';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Start Event.\r\n *\r\n * @event SpinePluginEvents#START\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace SpinePluginEvents\r\n */\r\n\r\nmodule.exports = {\r\n\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n DISPOSE: require('./DISPOSE_EVENT'),\r\n END: require('./END_EVENT'),\r\n EVENT: require('./EVENT_EVENT'),\r\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AngleBetween = require('../../../../src/math/angle/Between');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar Class = require('../../../../src/utils/Class');\r\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\r\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\r\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\r\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\r\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\r\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar DegToRad = require('../../../../src/math/DegToRad');\r\nvar GameObject = require('../../../../src/gameobjects/GameObject');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar SpineEvents = require('../events/');\r\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\r\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\r\n * easily change the skin, slot attachment, bone positions and more.\r\n *\r\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\r\n * You can only create them if the Spine plugin has been loaded into Phaser.\r\n *\r\n * The quickest way is the Game Object Factory:\r\n *\r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n *\r\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\r\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\r\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\r\n * animation to loop. Look at the documentation for further details on each of these options.\r\n *\r\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\r\n * Configuration object:\r\n *\r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 512, y: 550, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-think', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\r\n * overall scale.\r\n *\r\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\r\n * update and render, it must be added to the display and update lists of your Scene:\r\n *\r\n * ```javascript\r\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\r\n * this.sys.displayList.add(jelly);\r\n * this.sys.updateList.add(jelly);\r\n * ```\r\n *\r\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\r\n * the bounds of the skeletons current pose to create the hit area from. Ensure that your setup\r\n * post in the Spine Editor does _not_ have everything turned off, or the runtimes will be unable\r\n * to get an accurate bounds. You can make use of the `InputPlugin.enableDebug` method to view the\r\n * input shape being created. If it's not suitable, provide your own shape to the `setInteractive` method.\r\n *\r\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\r\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\r\n * Object position with it. See the examples for further details.\r\n *\r\n * If your Spine Game Object has black outlines around the different parts of the texture when it\r\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\r\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\r\n *\r\n * @class SpineGameObject\r\n * @extends Phaser.GameObjects.GameObject\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n */\r\nvar SpineGameObject = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsComputedSize,\r\n ComponentsDepth,\r\n ComponentsFlip,\r\n ComponentsScrollFactor,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n SpineGameObjectRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\r\n {\r\n GameObject.call(this, scene, 'Spine');\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineGameObject#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.19.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The Spine Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeleton\r\n * @type {spine.Skeleton}\r\n * @since 3.19.0\r\n */\r\n this.skeleton = null;\r\n\r\n /**\r\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeletonData\r\n * @type {spine.SkeletonData}\r\n * @since 3.19.0\r\n */\r\n this.skeletonData = null;\r\n\r\n /**\r\n * The Spine Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#state\r\n * @type {spine.AnimationState}\r\n * @since 3.19.0\r\n */\r\n this.state = null;\r\n\r\n /**\r\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#stateData\r\n * @type {spine.AnimationStateData}\r\n * @since 3.19.0\r\n */\r\n this.stateData = null;\r\n\r\n /**\r\n * A reference to the root bone of the Skeleton.\r\n *\r\n * @name SpineGameObject#root\r\n * @type {spine.Bone}\r\n * @since 3.19.0\r\n */\r\n this.root = null;\r\n\r\n /**\r\n * This object holds the calculated bounds of the current\r\n * pose, as set when a new Skeleton is applied.\r\n *\r\n * @name SpineGameObject#bounds\r\n * @type {any}\r\n * @since 3.19.0\r\n */\r\n this.bounds = null;\r\n\r\n /**\r\n * A Game Object level flag that allows you to enable debug drawing\r\n * to the Skeleton Debug Renderer by toggling it.\r\n *\r\n * @name SpineGameObject#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The factor to scale the Animation update time by.\r\n *\r\n * @name SpineGameObject#timeScale\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginX\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginY\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * A flag that stores if the texture associated with the current\r\n * Skin being used by this Game Object, has its alpha pre-multiplied\r\n * into it, or not.\r\n *\r\n * @name SpineGameObject#preMultipliedAlpha\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.preMultipliedAlpha = false;\r\n\r\n /**\r\n * A default Blend Mode. You cannot change the blend mode of a\r\n * Spine Game Object.\r\n *\r\n * @name SpineGameObject#blendMode\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.blendMode = -1;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key)\r\n {\r\n this.setSkeleton(key, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Returns `true` if this Spine Game Object both has a skeleton and\r\n * also passes the render tests for the given Camera.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n *\r\n * @return {boolean} `true` if this Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function (camera, container)\r\n {\r\n var GameObjectRenderMask = 15;\r\n\r\n var result = (!this.skeleton || !(GameObjectRenderMask !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))));\r\n\r\n if (!container && !result && this.parentContainer)\r\n {\r\n var plugin = this.plugin;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (plugin.gl && sceneRenderer.batcher.isDrawing)\r\n {\r\n sceneRenderer.end();\r\n\r\n plugin.renderer.pipelines.rebind();\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Set the Alpha level for the whole Skeleton of this Game Object.\r\n *\r\n * The alpha controls the opacity of the Game Object as it renders.\r\n *\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method SpineGameObject#setAlpha\r\n * @since 3.19.0\r\n *\r\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value, slotName)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n slot.color.a = Clamp(value, 0, 1);\r\n }\r\n }\r\n else\r\n {\r\n this.alpha = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#alpha\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.a = v;\r\n }\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~2;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 2;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of red used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#red\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.r = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of green used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#green\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.g = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of blue used when rendering the Skeleton.\r\n *\r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#blue\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.b = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\r\n *\r\n * @method SpineGameObject#setColor\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\r\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setColor: function (color, slotName)\r\n {\r\n if (color === undefined) { color = 0xffffff; }\r\n\r\n var red = (color >> 16 & 0xFF) / 255;\r\n var green = (color >> 8 & 0xFF) / 255;\r\n var blue = (color & 0xFF) / 255;\r\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\r\n\r\n var target = this.skeleton;\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n target = slot;\r\n }\r\n }\r\n\r\n target.color.r = red;\r\n target.color.g = green;\r\n target.color.b = blue;\r\n\r\n if (alpha !== null)\r\n {\r\n target.color.a = alpha;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\r\n * that contains the Skeleton data.\r\n *\r\n * @method SpineGameObject#setSkeletonFromJSON\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\r\n {\r\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on its cache key.\r\n *\r\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\r\n * or slot attachment, or any other property to adjust it.\r\n *\r\n * @method SpineGameObject#setSkeleton\r\n * @since 3.19.0\r\n *\r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n * @param {object} [skeletonJSON] - The JSON data for the Skeleton.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\r\n\r\n this.skeletonData = data.skeletonData;\r\n\r\n this.preMultipliedAlpha = data.preMultipliedAlpha;\r\n\r\n var skeleton = data.skeleton;\r\n\r\n skeleton.setSkin();\r\n skeleton.setToSetupPose();\r\n\r\n this.skeleton = skeleton;\r\n\r\n // AnimationState\r\n data = this.plugin.createAnimationState(skeleton);\r\n\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.state = data.state;\r\n this.stateData = data.stateData;\r\n\r\n this.state.addListener({\r\n event: this.onEvent.bind(this),\r\n complete: this.onComplete.bind(this),\r\n start: this.onStart.bind(this),\r\n end: this.onEnd.bind(this),\r\n dispose: this.onDispose.bind(this),\r\n interrupted: this.onInterrupted.bind(this)\r\n });\r\n\r\n if (animationName)\r\n {\r\n this.setAnimation(0, animationName, loop);\r\n }\r\n\r\n this.root = this.getRootBone();\r\n\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.state.apply(skeleton);\r\n\r\n skeleton.updateCache();\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onComplete event via this Game Object.\r\n *\r\n * @method SpineGameObject#onComplete\r\n * @fires SpinePluginEvents#COMPLETE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onComplete: function (entry)\r\n {\r\n this.emit(SpineEvents.COMPLETE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onDispose event via this Game Object.\r\n *\r\n * @method SpineGameObject#onDispose\r\n * @fires SpinePluginEvents#DISPOSE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onDispose: function (entry)\r\n {\r\n this.emit(SpineEvents.DISPOSE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onEnd event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEnd\r\n * @fires SpinePluginEvents#END\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onEnd: function (entry)\r\n {\r\n this.emit(SpineEvents.END, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine Event event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEvent\r\n * @fires SpinePluginEvents#EVENT\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n * @param {spine.Event} event - The Spine event.\r\n */\r\n onEvent: function (entry, event)\r\n {\r\n this.emit(SpineEvents.EVENT, entry, event);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\r\n *\r\n * @method SpineGameObject#onInterrupted\r\n * @fires SpinePluginEvents#INTERRUPTED\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onInterrupted: function (entry)\r\n {\r\n this.emit(SpineEvents.INTERRUPTED, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onStart event via this Game Object.\r\n *\r\n * @method SpineGameObject#onStart\r\n * @fires SpinePluginEvents#START\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onStart: function (entry)\r\n {\r\n this.emit(SpineEvents.START, entry);\r\n },\r\n\r\n /**\r\n * Refreshes the data about the current Skeleton.\r\n *\r\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\r\n *\r\n * Call this method if you need to access the Skeleton data directly, and it may have changed\r\n * recently.\r\n *\r\n * @method SpineGameObject#refresh\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n refresh: function ()\r\n {\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.updateSize();\r\n\r\n this.skeleton.updateCache();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n *\r\n * If no arguments are given it uses the current skeleton data dimensions.\r\n *\r\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\r\n * when the skeleton data doesn't match what is required in-game.\r\n *\r\n * @method SpineGameObject#setSize\r\n * @since 3.19.0\r\n *\r\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\r\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSize: function (width, height, offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (width === undefined) { width = skeleton.data.width; }\r\n if (height === undefined) { height = skeleton.data.height; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of this Game Object from the Skeleton position.\r\n *\r\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\r\n *\r\n * @method SpineGameObject#setOffset\r\n * @since 3.19.0\r\n *\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setOffset: function (offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\r\n * It then syncs the skeleton bounds back to this Game Object.\r\n *\r\n * This method is called automatically as needed internally, however, it's also exposed should\r\n * you require overriding the size settings.\r\n *\r\n * @method SpineGameObject#updateSize\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n updateSize: function ()\r\n {\r\n var skeleton = this.skeleton;\r\n var renderer = this.plugin.renderer;\r\n\r\n var height = renderer.height;\r\n\r\n var oldScaleX = this.scaleX;\r\n var oldScaleY = this.scaleY;\r\n\r\n skeleton.x = this.x;\r\n skeleton.y = height - this.y;\r\n skeleton.scaleX = 1;\r\n skeleton.scaleY = 1;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n var bounds = this.getBounds();\r\n\r\n this.width = bounds.size.x;\r\n this.height = bounds.size.y;\r\n\r\n this.displayOriginX = this.x - bounds.offset.x;\r\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\r\n\r\n skeleton.scaleX = oldScaleX;\r\n skeleton.scaleY = oldScaleY;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the bones in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getBoneList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\r\n */\r\n getBoneList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.bones.length; i++)\r\n {\r\n output.push(skeletonData.bones[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the skins in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getSkinList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\r\n */\r\n getSkinList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.skins.length; i++)\r\n {\r\n output.push(skeletonData.skins[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the slots in the Skeleton.\r\n *\r\n * @method SpineGameObject#getSlotList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\r\n */\r\n getSlotList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeleton = this.skeleton;\r\n\r\n for (var i = 0; i < skeleton.slots.length; i++)\r\n {\r\n output.push(skeleton.slots[i].data.name);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the animations in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getAnimationList\r\n * @since 3.19.0\r\n *\r\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\r\n */\r\n getAnimationList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.animations.length; i++)\r\n {\r\n output.push(skeletonData.animations[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the current animation being played on the given track, if any.\r\n *\r\n * @method SpineGameObject#getCurrentAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\r\n *\r\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\r\n */\r\n getCurrentAnimation: function (trackIndex)\r\n {\r\n if (trackIndex === undefined) { trackIndex = 0; }\r\n\r\n var current = this.state.getCurrent(trackIndex);\r\n\r\n if (current)\r\n {\r\n return current.animation;\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#play\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\r\n */\r\n play: function (animationName, loop, ignoreIfPlaying)\r\n {\r\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#setAnimation\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to play the animation on.\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n\r\n if (ignoreIfPlaying && this.state)\r\n {\r\n var currentTrack = this.state.getCurrent(trackIndex);\r\n\r\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (this.findAnimation(animationName))\r\n {\r\n return this.state.setAnimation(trackIndex, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an animation to be played after the current or last queued animation for a track.\r\n * If the track is empty, it is equivalent to calling setAnimation.\r\n *\r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\r\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\r\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\r\n * If the previous entry is looping, its next loop completion is used instead of its duration.\r\n *\r\n * @method SpineGameObject#addAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {string} animationName - The string-based key of the animation to add.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n addAnimation: function (trackIndex, animationName, loop, delay)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (delay === undefined) { delay = 0; }\r\n\r\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\r\n },\r\n\r\n /**\r\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\r\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n *\r\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\r\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\r\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\r\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\r\n * A mix duration of 0 still mixes out over one frame.\r\n *\r\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\r\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\r\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\r\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\r\n * property to the value keyed in the new animation.\r\n *\r\n * @method SpineGameObject#setEmptyAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {spine.TrackEntry} The returned Track Entry.\r\n */\r\n setEmptyAnimation: function (trackIndex, mixDuration)\r\n {\r\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\r\n },\r\n\r\n /**\r\n * Removes all animations from the track, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTrack\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTrack: function (trackIndex)\r\n {\r\n this.state.clearTrack(trackIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all animations from all tracks, leaving skeletons in their current pose.\r\n *\r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTracks\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTracks: function ()\r\n {\r\n this.state.clearTracks();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkinByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to set.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkinByName: function (skinName)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkinByName(skinName);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n *\r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n *\r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkin\r\n * @since 3.19.0\r\n *\r\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkin: function (newSkin)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkin(newSkin);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mix duration when changing from the specified animation to the other.\r\n *\r\n * @method SpineGameObject#setMix\r\n * @since 3.19.0\r\n *\r\n * @param {string} fromName - The animation to mix from.\r\n * @param {string} toName - The animation to mix to.\r\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMix: function (fromName, toName, duration)\r\n {\r\n this.stateData.setMix(fromName, toName, duration);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot\r\n * index and attachment name. First the skin is checked and if the attachment was not found,\r\n * the default skin is checked.\r\n *\r\n * @method SpineGameObject#getAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {integer} slotIndex - The slot index to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachment: function (slotIndex, attachmentName)\r\n {\r\n return this.skeleton.getAttachment(slotIndex, attachmentName);\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\r\n *\r\n * @method SpineGameObject#getAttachmentByName\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachmentByName: function (slotName, attachmentName)\r\n {\r\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n },\r\n\r\n /**\r\n * A convenience method to set an attachment by finding the slot with findSlot,\r\n * finding the attachment with getAttachment, then setting the slot's attachment.\r\n *\r\n * @method SpineGameObject#setAttachment\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The slot name to add the attachment to.\r\n * @param {string} attachmentName - The attachment name to add.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAttachment: function (slotName, attachmentName)\r\n {\r\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\r\n {\r\n for (var i = 0; i < slotName.length; i++)\r\n {\r\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\r\n }\r\n }\r\n else\r\n {\r\n this.skeleton.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setToSetupPose: function ()\r\n {\r\n this.skeleton.setToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the slots and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setSlotsToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSlotsToSetupPose: function ()\r\n {\r\n this.skeleton.setSlotsToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones and constraints to their setup pose values.\r\n *\r\n * @method SpineGameObject#setBonesToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBonesToSetupPose: function ()\r\n {\r\n this.skeleton.setBonesToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the root bone, or null.\r\n *\r\n * @method SpineGameObject#getRootBone\r\n * @since 3.19.0\r\n *\r\n * @return {spine.Bone} The root bone, or null.\r\n */\r\n getRootBone: function ()\r\n {\r\n return this.skeleton.getRootBone();\r\n },\r\n\r\n /**\r\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\r\n * towards the given position. You can set an optional angle offset, should the bone be\r\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\r\n *\r\n * @method SpineGameObject#angleBoneToXY\r\n * @since 3.19.0\r\n *\r\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\r\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\r\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\r\n * @param {number} [offset=0] - An offset to add to the rotation angle.\r\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\r\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n if (minAngle === undefined) { minAngle = 0; }\r\n if (maxAngle === undefined) { maxAngle = 360; }\r\n\r\n var renderer = this.plugin.renderer;\r\n var height = renderer.height;\r\n\r\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\r\n\r\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBone\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {spine.Bone} The bone, or null.\r\n */\r\n findBone: function (boneName)\r\n {\r\n return this.skeleton.findBone(boneName);\r\n },\r\n\r\n /**\r\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBoneIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {integer} The bone index. Or -1 if the bone was not found.\r\n */\r\n findBoneIndex: function (boneName)\r\n {\r\n return this.skeleton.findBoneIndex(boneName);\r\n },\r\n\r\n /**\r\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlot\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {spine.Slot} The Slot. May be null.\r\n */\r\n findSlot: function (slotName)\r\n {\r\n return this.skeleton.findSlot(slotName);\r\n },\r\n\r\n /**\r\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlotIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {integer} The slot index. Or -1 if the Slot was not found.\r\n */\r\n findSlotIndex: function (slotName)\r\n {\r\n return this.skeleton.findSlotIndex(slotName);\r\n },\r\n\r\n /**\r\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\r\n * this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSkin\r\n * @since 3.19.0\r\n *\r\n * @param {string} skinName - The name of the skin to find.\r\n *\r\n * @return {spine.Skin} The Skin. May be null.\r\n */\r\n findSkin: function (skinName)\r\n {\r\n return this.skeletonData.findSkin(skinName);\r\n },\r\n\r\n /**\r\n * Finds an event by comparing each events's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findEvent\r\n * @since 3.19.0\r\n *\r\n * @param {string} eventDataName - The name of the event to find.\r\n *\r\n * @return {spine.EventData} The Event Data. May be null.\r\n */\r\n findEvent: function (eventDataName)\r\n {\r\n return this.skeletonData.findEvent(eventDataName);\r\n },\r\n\r\n /**\r\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The name of the animation to find.\r\n *\r\n * @return {spine.Animation} The Animation. May be null.\r\n */\r\n findAnimation: function (animationName)\r\n {\r\n return this.skeletonData.findAnimation(animationName);\r\n },\r\n\r\n /**\r\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findIkConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.IkConstraintData} The IK constraint. May be null.\r\n */\r\n findIkConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findIkConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds an transform constraint by comparing each transform constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findTransformConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\r\n */\r\n findTransformConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findTransformConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraint\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.PathConstraintData} The path constraint. May be null.\r\n */\r\n findPathConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds the index of a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraintIndex\r\n * @since 3.19.0\r\n *\r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\r\n */\r\n findPathConstraintIndex: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraintIndex(constraintName);\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n *\r\n * The returned object contains two properties: `offset` and `size`:\r\n *\r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpineGameObject#getBounds\r\n * @since 3.19.0\r\n *\r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function ()\r\n {\r\n return this.plugin.getBounds(this.skeleton);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method SpineGameObject#preUpdate\r\n * @protected\r\n * @since 3.19.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n this.state.update((delta / 1000) * this.timeScale);\r\n\r\n this.state.apply(skeleton);\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineGameObject#preDestroy\r\n * @protected\r\n * @since 3.19.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.plugin = null;\r\n\r\n this.skeleton = null;\r\n this.skeletonData = null;\r\n\r\n this.state = null;\r\n this.stateData = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderCanvas\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatrix)\r\n{\r\n var context = renderer.currentContext;\r\n\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var skeletonRenderer = plugin.skeletonRenderer;\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n camera.addToRenderList(src);\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n\r\n // Inverse or we get upside-down skeletons\r\n skeleton.scaleY = calcMatrix.scaleY * -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n if (camera.renderToTexture)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n skeletonRenderer.ctx = context;\r\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\r\n\r\n context.save();\r\n\r\n skeletonRenderer.draw(skeleton);\r\n\r\n context.restore();\r\n};\r\n\r\nmodule.exports = SpineGameObjectCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar renderWebGL = require('../../../../src/utils/NOOP');\r\nvar renderCanvas = require('../../../../src/utils/NOOP');\r\nvar renderDirect = require('../../../../src/utils/NOOP');\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\r\n renderDirect = require('./SpineGameObjectWebGLDirect');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas,\r\n renderDirect: renderDirect\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Directly renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderDirect\r\n * @since 3.50.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n }\r\n\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLDirect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2022 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar GetCalcMatrix = require('../../../../src/gameobjects/GetCalcMatrix');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderWebGL\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {SpineContainer} [container] - If this Spine object is in a Spine Container, this is a reference to it.\r\n */\r\nvar SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix, container)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n if (renderer.newType)\r\n {\r\n // flush + clear previous pipeline if this is a new type\r\n renderer.pipelines.clear();\r\n\r\n sceneRenderer.begin();\r\n }\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n var alpha = skeleton.color.a;\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = container.scrollFactorX;\r\n src.scrollFactorY = container.scrollFactorY;\r\n\r\n skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);\r\n }\r\n\r\n camera.addToRenderList(src);\r\n\r\n var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n // -180 degrees to account for the difference in Spine vs. Phaser rotation when inversely scaled\r\n src.root.rotation = Wrap(RadToDeg(calcMatrix.rotationNormalized) - 180, 0, 360);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n /*\r\n if (renderer.currentFramebuffer !== null)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n */\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n // Draw the current skeleton\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (container)\r\n {\r\n src.scrollFactorX = scrollFactorX;\r\n src.scrollFactorY = scrollFactorY;\r\n skeleton.color.a = alpha;\r\n }\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n }\r\n\r\n if (!renderer.nextTypeMatch)\r\n {\r\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\r\n sceneRenderer.end();\r\n\r\n // And rebind the previous pipeline\r\n renderer.pipelines.rebind();\r\n }\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Global constants.\r\n *\r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Phaser Release Version\r\n *\r\n * @name Phaser.VERSION\r\n * @const\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n VERSION: '3.60.0',\r\n\r\n BlendModes: require('./renderer/BlendModes'),\r\n\r\n ScaleModes: require('./renderer/ScaleModes'),\r\n\r\n /**\r\n * This setting will auto-detect if the browser is capable of suppporting WebGL.\r\n * If it is, it will use the WebGL Renderer. If not, it will fall back to the Canvas Renderer.\r\n *\r\n * @name Phaser.AUTO\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n AUTO: 0,\r\n\r\n /**\r\n * Forces Phaser to only use the Canvas Renderer, regardless if the browser supports\r\n * WebGL or not.\r\n *\r\n * @name Phaser.CANVAS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n CANVAS: 1,\r\n\r\n /**\r\n * Forces Phaser to use the WebGL Renderer. If the browser does not support it, there is\r\n * no fallback to Canvas with this setting, so you should trap it and display a suitable\r\n * message to the user.\r\n *\r\n * @name Phaser.WEBGL\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n WEBGL: 2,\r\n\r\n /**\r\n * A Headless Renderer doesn't create either a Canvas or WebGL Renderer. However, it still\r\n * absolutely relies on the DOM being present and available. This mode is meant for unit testing,\r\n * not for running Phaser on the server, which is something you really shouldn't do.\r\n *\r\n * @name Phaser.HEADLESS\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n HEADLESS: 3,\r\n\r\n /**\r\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\r\n * to help you remember what the value is doing in your code.\r\n *\r\n * @name Phaser.FOREVER\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FOREVER: -1,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.NONE\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n NONE: 4,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.UP\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n UP: 5,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.DOWN\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DOWN: 6,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.LEFT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LEFT: 7,\r\n\r\n /**\r\n * Direction constant.\r\n *\r\n * @name Phaser.RIGHT\r\n * @const\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 8\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n *\r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once(Events.DESTROY, this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n *\r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {number} [data=1] - The amount to increase the given key by. Pass a negative value to decrease the key.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n\r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n *\r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n *\r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n *\r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Data Manager instance.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.on('changedata', listener)`.\r\n *\r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Data Manager Destroy Event.\r\n *\r\n * The Data Manager will listen for the destroy event from its parent, and then close itself down.\r\n *\r\n * @event Phaser.Data.Events#DESTROY\r\n * @type {string}\r\n * @since 3.50.0\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n *\r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n *\r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.audio` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Audio\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} audioData - Can this device play HTML Audio tags?\r\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\r\n * @property {boolean} m4a - Can this device can play m4a files.\r\n * @property {boolean} aac - Can this device can play aac files.\r\n * @property {boolean} flac - Can this device can play flac files.\r\n * @property {boolean} mp3 - Can this device play mp3 files?\r\n * @property {boolean} ogg - Can this device play ogg files?\r\n * @property {boolean} opus - Can this device play opus files?\r\n * @property {boolean} wav - Can this device play wav files?\r\n * @property {boolean} webAudio - Does this device have the Web Audio API?\r\n * @property {boolean} webm - Can this device play webm files?\r\n */\r\nvar Audio = {\r\n\r\n flac: false,\r\n aac: false,\r\n audioData: false,\r\n dolby: false,\r\n m4a: false,\r\n mp3: false,\r\n ogg: false,\r\n opus: false,\r\n wav: false,\r\n webAudio: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Audio;\r\n }\r\n\r\n Audio.audioData = !!(window['Audio']);\r\n\r\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\r\n\r\n var audioElement = document.createElement('audio');\r\n var result = !!audioElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n var CanPlay = function (type1, type2)\r\n {\r\n var canPlayType1 = audioElement.canPlayType('audio/' + type1).replace(/^no$/, '');\r\n\r\n if (type2)\r\n {\r\n return Boolean(canPlayType1 || audioElement.canPlayType('audio/' + type2).replace(/^no$/, ''));\r\n }\r\n else\r\n {\r\n return Boolean(canPlayType1);\r\n }\r\n };\r\n\r\n // wav Mimetypes accepted:\r\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\r\n\r\n Audio.ogg = CanPlay('ogg; codecs=\"vorbis\"');\r\n Audio.opus = CanPlay('ogg; codecs=\"opus\"', 'opus');\r\n Audio.mp3 = CanPlay('mpeg');\r\n Audio.wav = CanPlay('wav');\r\n Audio.m4a = CanPlay('x-m4a');\r\n Audio.aac = CanPlay('aac');\r\n Audio.flac = CanPlay('flac', 'x-flac');\r\n Audio.webm = CanPlay('webm; codecs=\"vorbis\"');\r\n\r\n if (audioElement.canPlayType('audio/mp4; codecs=\"ec-3\"') !== '')\r\n {\r\n if (Browser.edge)\r\n {\r\n Audio.dolby = true;\r\n }\r\n else if (Browser.safari && Browser.safariVersion >= 9)\r\n {\r\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\r\n {\r\n var major = parseInt(RegExp.$1, 10);\r\n var minor = parseInt(RegExp.$2, 10);\r\n\r\n if ((major === 10 && minor >= 11) || major > 10)\r\n {\r\n Audio.dolby = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do here\r\n }\r\n\r\n return Audio;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\n\r\n/**\r\n * Determines the browser type and version running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.browser` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Browser\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} chrome - Set to true if running in Chrome.\r\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\r\n * @property {boolean} firefox - Set to true if running in Firefox.\r\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\r\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\r\n * @property {boolean} opera - Set to true if running in Opera.\r\n * @property {boolean} safari - Set to true if running in Safari.\r\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\r\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\r\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\r\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\r\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\r\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\r\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\r\n */\r\nvar Browser = {\r\n\r\n chrome: false,\r\n chromeVersion: 0,\r\n edge: false,\r\n firefox: false,\r\n firefoxVersion: 0,\r\n ie: false,\r\n ieVersion: 0,\r\n mobileSafari: false,\r\n opera: false,\r\n safari: false,\r\n safariVersion: 0,\r\n silk: false,\r\n trident: false,\r\n tridentVersion: 0,\r\n es2019: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Edg\\/\\d+/).test(ua))\r\n {\r\n Browser.edge = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/OPR/).test(ua))\r\n {\r\n Browser.opera = true;\r\n Browser.es2019 = true;\r\n }\r\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.chrome = true;\r\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.chromeVersion > 69);\r\n }\r\n else if ((/Firefox\\D+(\\d+)/).test(ua))\r\n {\r\n Browser.firefox = true;\r\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.firefoxVersion > 10);\r\n }\r\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\r\n {\r\n Browser.mobileSafari = true;\r\n }\r\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.ieVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Version\\/(\\d+\\.\\d+) Safari/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.safari = true;\r\n Browser.safariVersion = parseInt(RegExp.$1, 10);\r\n Browser.es2019 = (Browser.safariVersion > 10);\r\n }\r\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.trident = true;\r\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\r\n Browser.ieVersion = parseInt(RegExp.$3, 10);\r\n }\r\n\r\n // Silk gets its own if clause because its ua also contains 'Safari'\r\n if ((/Silk/).test(ua))\r\n {\r\n Browser.silk = true;\r\n }\r\n\r\n return Browser;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the canvas features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.CanvasFeatures\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\r\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\r\n */\r\nvar CanvasFeatures = {\r\n\r\n supportInverseAlpha: false,\r\n supportNewBlendModes: false\r\n\r\n};\r\n\r\nfunction checkBlendMode ()\r\n{\r\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\r\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\r\n\r\n var magenta = new Image();\r\n\r\n magenta.onload = function ()\r\n {\r\n var yellow = new Image();\r\n\r\n yellow.onload = function ()\r\n {\r\n var canvas = CanvasPool.create2D(yellow, 6);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.globalCompositeOperation = 'multiply';\r\n\r\n context.drawImage(magenta, 0, 0);\r\n context.drawImage(yellow, 2, 0);\r\n\r\n if (!context.getImageData(2, 0, 1, 1))\r\n {\r\n return false;\r\n }\r\n\r\n var data = context.getImageData(2, 0, 1, 1).data;\r\n\r\n CanvasPool.remove(yellow);\r\n\r\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\r\n };\r\n\r\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\r\n };\r\n\r\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\r\n\r\n return false;\r\n}\r\n\r\nfunction checkInverseAlpha ()\r\n{\r\n var canvas = CanvasPool.create2D(this, 2);\r\n var context = canvas.getContext('2d', { willReadFrequently: true });\r\n\r\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\r\n\r\n // Draw a single pixel\r\n context.fillRect(0, 0, 1, 1);\r\n\r\n // Get the color values\r\n var s1 = context.getImageData(0, 0, 1, 1);\r\n\r\n if (s1 === null)\r\n {\r\n return false;\r\n }\r\n\r\n // Plot them to x2\r\n context.putImageData(s1, 1, 0);\r\n\r\n // Get those values\r\n var s2 = context.getImageData(1, 0, 1, 1);\r\n\r\n var result = (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\r\n\r\n CanvasPool.remove(this);\r\n\r\n // Compare and return\r\n return result;\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts !== 'function' && document !== undefined)\r\n {\r\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\r\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\r\n }\r\n\r\n return CanvasFeatures;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = require('./OS');\r\nvar Browser = require('./Browser');\r\nvar CanvasPool = require('../display/canvas/CanvasPool');\r\n\r\n/**\r\n * Determines the features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.features` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Features\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} canvas - Is canvas available?\r\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\r\n * @property {boolean} file - Is file available?\r\n * @property {boolean} fileSystem - Is fileSystem available?\r\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\r\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\r\n * @property {boolean} localStorage - Is localStorage available?\r\n * @property {boolean} pointerLock - Is Pointer Lock available?\r\n * @property {boolean} stableSort - Is Array.sort stable?\r\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\r\n * @property {boolean} vibration - Does the device support the Vibration API?\r\n * @property {boolean} webGL - Is webGL available?\r\n * @property {boolean} worker - Is worker available?\r\n */\r\nvar Features = {\r\n\r\n canvas: false,\r\n canvasBitBltShift: null,\r\n file: false,\r\n fileSystem: false,\r\n getUserMedia: true,\r\n littleEndian: false,\r\n localStorage: false,\r\n pointerLock: false,\r\n stableSort: false,\r\n support32bit: false,\r\n vibration: false,\r\n webGL: false,\r\n worker: false\r\n\r\n};\r\n\r\n// Check Little or Big Endian system.\r\n// @author Matt DesLauriers (@mattdesl)\r\nfunction checkIsLittleEndian ()\r\n{\r\n var a = new ArrayBuffer(4);\r\n var b = new Uint8Array(a);\r\n var c = new Uint32Array(a);\r\n\r\n b[0] = 0xa1;\r\n b[1] = 0xb2;\r\n b[2] = 0xc3;\r\n b[3] = 0xd4;\r\n\r\n if (c[0] === 0xd4c3b2a1)\r\n {\r\n return true;\r\n }\r\n\r\n if (c[0] === 0xa1b2c3d4)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n // Could not determine endianness\r\n return null;\r\n }\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Features;\r\n }\r\n\r\n Features.canvas = !!window['CanvasRenderingContext2D'];\r\n\r\n try\r\n {\r\n Features.localStorage = !!localStorage.getItem;\r\n }\r\n catch (error)\r\n {\r\n Features.localStorage = false;\r\n }\r\n\r\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\r\n Features.fileSystem = !!window['requestFileSystem'];\r\n\r\n var isUint8 = false;\r\n\r\n var testWebGL = function ()\r\n {\r\n if (window['WebGLRenderingContext'])\r\n {\r\n try\r\n {\r\n var canvas = CanvasPool.createWebGL(this);\r\n\r\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\r\n\r\n var canvas2D = CanvasPool.create2D(this);\r\n\r\n var ctx2D = canvas2D.getContext('2d', { willReadFrequently: true });\r\n\r\n // Can't be done on a webgl context\r\n var image = ctx2D.createImageData(1, 1);\r\n\r\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\r\n // @author Matt DesLauriers (@mattdesl)\r\n isUint8 = image.data instanceof Uint8ClampedArray;\r\n\r\n CanvasPool.remove(canvas);\r\n CanvasPool.remove(canvas2D);\r\n\r\n return !!ctx;\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n Features.webGL = testWebGL();\r\n\r\n Features.worker = !!window['Worker'];\r\n\r\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\r\n\r\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\r\n\r\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\r\n\r\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\r\n\r\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\r\n if (Browser.firefox && Browser.firefoxVersion < 21)\r\n {\r\n Features.getUserMedia = false;\r\n }\r\n\r\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\r\n // is safer to not try and use the fast copy-over method.\r\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\r\n {\r\n Features.canvasBitBltShift = true;\r\n }\r\n\r\n // Known not to work\r\n if (Browser.safari || Browser.mobileSafari)\r\n {\r\n Features.canvasBitBltShift = false;\r\n }\r\n\r\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\r\n\r\n if (navigator.vibrate)\r\n {\r\n Features.vibration = true;\r\n }\r\n\r\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\r\n {\r\n Features.littleEndian = checkIsLittleEndian();\r\n }\r\n\r\n Features.support32bit = (\r\n typeof ArrayBuffer !== 'undefined' &&\r\n typeof Uint8ClampedArray !== 'undefined' &&\r\n typeof Int32Array !== 'undefined' &&\r\n Features.littleEndian !== null &&\r\n isUint8\r\n );\r\n\r\n return Features;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the full screen support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.fullscreen` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Fullscreen\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} available - Does the browser support the Full Screen API?\r\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\r\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\r\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\r\n */\r\nvar Fullscreen = {\r\n\r\n available: false,\r\n cancel: '',\r\n keyboard: false,\r\n request: ''\r\n\r\n};\r\n\r\n/**\r\n* Checks for support of the Full Screen API.\r\n*\r\n* @ignore\r\n*/\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Fullscreen;\r\n }\r\n\r\n var i;\r\n\r\n var suffix1 = 'Fullscreen';\r\n var suffix2 = 'FullScreen';\r\n\r\n var fs = [\r\n 'request' + suffix1,\r\n 'request' + suffix2,\r\n 'webkitRequest' + suffix1,\r\n 'webkitRequest' + suffix2,\r\n 'msRequest' + suffix1,\r\n 'msRequest' + suffix2,\r\n 'mozRequest' + suffix2,\r\n 'mozRequest' + suffix1\r\n ];\r\n\r\n for (i = 0; i < fs.length; i++)\r\n {\r\n if (document.documentElement[fs[i]])\r\n {\r\n Fullscreen.available = true;\r\n Fullscreen.request = fs[i];\r\n break;\r\n }\r\n }\r\n\r\n var cfs = [\r\n 'cancel' + suffix2,\r\n 'exit' + suffix1,\r\n 'webkitCancel' + suffix2,\r\n 'webkitExit' + suffix1,\r\n 'msCancel' + suffix2,\r\n 'msExit' + suffix1,\r\n 'mozCancel' + suffix2,\r\n 'mozExit' + suffix1\r\n ];\r\n\r\n if (Fullscreen.available)\r\n {\r\n for (i = 0; i < cfs.length; i++)\r\n {\r\n if (document[cfs[i]])\r\n {\r\n Fullscreen.cancel = cfs[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Keyboard Input?\r\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\r\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\r\n {\r\n Fullscreen.keyboard = true;\r\n }\r\n\r\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\r\n\r\n return Fullscreen;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = require('./Browser');\r\n\r\n/**\r\n * Determines the input support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.input` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.Input\r\n * @since 3.0.0\r\n *\r\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\r\n * @property {boolean} gamepads - Is navigator.getGamepads available?\r\n * @property {boolean} mspointer - Is mspointer available?\r\n * @property {boolean} touch - Is touch available?\r\n */\r\nvar Input = {\r\n\r\n gamepads: false,\r\n mspointer: false,\r\n touch: false,\r\n wheelEvent: null\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Input;\r\n }\r\n\r\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\r\n {\r\n Input.touch = true;\r\n }\r\n\r\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\r\n {\r\n Input.mspointer = true;\r\n }\r\n\r\n if (navigator.getGamepads)\r\n {\r\n Input.gamepads = true;\r\n }\r\n\r\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\r\n {\r\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\r\n Input.wheelEvent = 'wheel';\r\n }\r\n else if ('onmousewheel' in window)\r\n {\r\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\r\n Input.wheelEvent = 'mousewheel';\r\n }\r\n else if (Browser.firefox && 'MouseScrollEvent' in window)\r\n {\r\n // FF prior to 17. This should probably be scrubbed.\r\n Input.wheelEvent = 'DOMMouseScroll';\r\n }\r\n\r\n return Input;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the operating system of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.os` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.OS\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} android - Is running on android?\r\n * @property {boolean} chromeOS - Is running on chromeOS?\r\n * @property {boolean} cordova - Is the game running under Apache Cordova?\r\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\r\n * @property {boolean} desktop - Is running on a desktop?\r\n * @property {boolean} ejecta - Is the game running under Ejecta?\r\n * @property {boolean} electron - Is the game running under GitHub Electron?\r\n * @property {boolean} iOS - Is running on iOS?\r\n * @property {boolean} iPad - Is running on iPad?\r\n * @property {boolean} iPhone - Is running on iPhone?\r\n * @property {boolean} kindle - Is running on an Amazon Kindle?\r\n * @property {boolean} linux - Is running on linux?\r\n * @property {boolean} macOS - Is running on macOS?\r\n * @property {boolean} node - Is the game running under Node.js?\r\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\r\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\r\n * @property {boolean} windows - Is running on windows?\r\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\r\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\r\n * @property {number} pixelRatio - PixelRatio of the host device?\r\n */\r\nvar OS = {\r\n\r\n android: false,\r\n chromeOS: false,\r\n cordova: false,\r\n crosswalk: false,\r\n desktop: false,\r\n ejecta: false,\r\n electron: false,\r\n iOS: false,\r\n iOSVersion: 0,\r\n iPad: false,\r\n iPhone: false,\r\n kindle: false,\r\n linux: false,\r\n macOS: false,\r\n node: false,\r\n nodeWebkit: false,\r\n pixelRatio: 1,\r\n webApp: false,\r\n windows: false,\r\n windowsPhone: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return OS;\r\n }\r\n\r\n var ua = navigator.userAgent;\r\n\r\n if ((/Windows/).test(ua))\r\n {\r\n OS.windows = true;\r\n }\r\n else if ((/Mac OS/).test(ua) && !((/like Mac OS/).test(ua)))\r\n {\r\n // Because iOS 13 identifies as Mac OS:\r\n if (navigator.maxTouchPoints && navigator.maxTouchPoints > 2)\r\n {\r\n OS.iOS = true;\r\n OS.iPad = true;\r\n\r\n (navigator.appVersion).match(/Version\\/(\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else\r\n {\r\n OS.macOS = true;\r\n }\r\n }\r\n else if ((/Android/).test(ua))\r\n {\r\n OS.android = true;\r\n }\r\n else if ((/Linux/).test(ua))\r\n {\r\n OS.linux = true;\r\n }\r\n else if ((/iP[ao]d|iPhone/i).test(ua))\r\n {\r\n OS.iOS = true;\r\n\r\n (navigator.appVersion).match(/OS (\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n\r\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\r\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\r\n }\r\n else if ((/Kindle/).test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\r\n {\r\n OS.kindle = true;\r\n\r\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\r\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\r\n }\r\n else if ((/CrOS/).test(ua))\r\n {\r\n OS.chromeOS = true;\r\n }\r\n\r\n if ((/Windows Phone/i).test(ua) || (/IEMobile/i).test(ua))\r\n {\r\n OS.android = false;\r\n OS.iOS = false;\r\n OS.macOS = false;\r\n OS.windows = true;\r\n OS.windowsPhone = true;\r\n }\r\n\r\n var silk = (/Silk/).test(ua);\r\n\r\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\r\n {\r\n OS.desktop = true;\r\n }\r\n\r\n // Windows Phone / Table reset\r\n if (OS.windowsPhone || (((/Windows NT/i).test(ua)) && ((/Touch/i).test(ua))))\r\n {\r\n OS.desktop = false;\r\n }\r\n\r\n // WebApp mode in iOS\r\n if (navigator.standalone)\r\n {\r\n OS.webApp = true;\r\n }\r\n\r\n if (typeof importScripts !== 'function')\r\n {\r\n if (window.cordova !== undefined)\r\n {\r\n OS.cordova = true;\r\n }\r\n\r\n if (window.ejecta !== undefined)\r\n {\r\n OS.ejecta = true;\r\n }\r\n }\r\n\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\r\n {\r\n OS.node = true;\r\n }\r\n\r\n if (OS.node && typeof process.versions === 'object')\r\n {\r\n OS.nodeWebkit = !!process.versions['node-webkit'];\r\n\r\n OS.electron = !!process.versions.electron;\r\n }\r\n\r\n if ((/Crosswalk/).test(ua))\r\n {\r\n OS.crosswalk = true;\r\n }\r\n\r\n OS.pixelRatio = window['devicePixelRatio'] || 1;\r\n\r\n return OS;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\n\r\n/**\r\n * Determines the video support of the browser running this Phaser Game instance.\r\n *\r\n * These values are read-only and populated during the boot sequence of the game.\r\n *\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.video` from within any Scene.\r\n *\r\n * In Phaser 3.20 the properties were renamed to drop the 'Video' suffix.\r\n *\r\n * @typedef {object} Phaser.Device.Video\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} h264 - Can this device play h264 mp4 video files?\r\n * @property {boolean} hls - Can this device play hls video files?\r\n * @property {boolean} mp4 - Can this device play h264 mp4 video files?\r\n * @property {boolean} m4v - Can this device play m4v (typically mp4) video files?\r\n * @property {boolean} ogg - Can this device play ogg video files?\r\n * @property {boolean} vp9 - Can this device play vp9 video files?\r\n * @property {boolean} webm - Can this device play webm video files?\r\n * @property {function} getVideoURL - Returns the first video URL that can be played by this browser.\r\n */\r\nvar Video = {\r\n\r\n h264: false,\r\n hls: false,\r\n mp4: false,\r\n m4v: false,\r\n ogg: false,\r\n vp9: false,\r\n webm: false,\r\n hasRequestVideoFrame: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n if (typeof importScripts === 'function')\r\n {\r\n return Video;\r\n }\r\n\r\n var videoElement = document.createElement('video');\r\n var result = !!videoElement.canPlayType;\r\n var no = /^no$/;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(no, ''))\r\n {\r\n Video.ogg = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\r\n Video.h264 = true;\r\n Video.mp4 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/x-m4v').replace(no, ''))\r\n {\r\n Video.m4v = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(no, ''))\r\n {\r\n Video.webm = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(no, ''))\r\n {\r\n Video.vp9 = true;\r\n }\r\n\r\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(no, ''))\r\n {\r\n Video.hls = true;\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do\r\n }\r\n\r\n if (videoElement.parentNode)\r\n {\r\n videoElement.parentNode.removeChild(videoElement);\r\n }\r\n\r\n Video.getVideoURL = function (urls)\r\n {\r\n if (!Array.isArray(urls))\r\n {\r\n urls = [ urls ];\r\n }\r\n\r\n for (var i = 0; i < urls.length; i++)\r\n {\r\n var url = GetFastValue(urls[i], 'url', urls[i]);\r\n\r\n if (url.indexOf('blob:') === 0)\r\n {\r\n return {\r\n url: url,\r\n type: ''\r\n };\r\n }\r\n\r\n var videoType;\r\n\r\n if (url.indexOf('data:') === 0)\r\n {\r\n videoType = url.split(',')[0].match(/\\/(.*?);/);\r\n }\r\n else\r\n {\r\n videoType = url.match(/\\.([a-zA-Z0-9]+)($|\\?)/);\r\n }\r\n\r\n videoType = GetFastValue(urls[i], 'type', (videoType) ? videoType[1] : '').toLowerCase();\r\n\r\n if (Video[videoType])\r\n {\r\n return {\r\n url: url,\r\n type: videoType\r\n };\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n return Video;\r\n}\r\n\r\nmodule.exports = init();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// This singleton is instantiated as soon as Phaser loads,\r\n// before a Phaser.Game instance has even been created.\r\n// Which means all instances of Phaser Games can share it,\r\n// without having to re-poll the device all over again\r\n\r\n/**\r\n * @namespace Phaser.Device\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.DeviceConf\r\n *\r\n * @property {Phaser.Device.OS} os - The OS Device functions.\r\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\r\n * @property {Phaser.Device.Features} features - The Features Device functions.\r\n * @property {Phaser.Device.Input} input - The Input Device functions.\r\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\r\n * @property {Phaser.Device.Video} video - The Video Device functions.\r\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\r\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\r\n */\r\n\r\nmodule.exports = {\r\n\r\n os: require('./OS'),\r\n browser: require('./Browser'),\r\n features: require('./Features'),\r\n input: require('./Input'),\r\n audio: require('./Audio'),\r\n video: require('./Video'),\r\n fullscreen: require('./Fullscreen'),\r\n canvasFeatures: require('./CanvasFeatures')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar tempMatrix = new Float32Array(20);\r\n\r\n/**\r\n * @classdesc\r\n * The ColorMatrix class creates a 5x4 matrix that can be used in shaders and graphics\r\n * operations. It provides methods required to modify the color values, such as adjusting\r\n * the brightness, setting a sepia tone, hue rotation and more.\r\n *\r\n * Use the method `getData` to return a Float32Array containing the current color values.\r\n *\r\n * @class ColorMatrix\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.50.0\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function ColorMatrix ()\r\n {\r\n /**\r\n * Internal ColorMatrix array.\r\n *\r\n * @name Phaser.Display.ColorMatrix#_matrix\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._matrix = new Float32Array(20);\r\n\r\n /**\r\n * The value that determines how much of the original color is used\r\n * when mixing the colors. A value between 0 (all original) and 1 (all final)\r\n *\r\n * @name Phaser.Display.ColorMatrix#alpha\r\n * @type {number}\r\n * @since 3.50.0\r\n */\r\n this.alpha = 1;\r\n\r\n /**\r\n * Is the ColorMatrix array dirty?\r\n *\r\n * @name Phaser.Display.ColorMatrix#_dirty\r\n * @type {boolean}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._dirty = true;\r\n\r\n /**\r\n * The matrix data as a Float32Array.\r\n *\r\n * Returned by the `getData` method.\r\n *\r\n * @name Phaser.Display.ColorMatrix#data\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.50.0\r\n */\r\n this._data = new Float32Array(20);\r\n\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix from the given array of color values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#set\r\n * @since 3.50.0\r\n *\r\n * @param {(number[]|Float32Array)} value - The ColorMatrix values to set. Must have 20 elements.\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n set: function (value)\r\n {\r\n this._matrix.set(value);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the ColorMatrix to default values and also resets\r\n * the `alpha` property back to 1.\r\n *\r\n * @method Phaser.Display.ColorMatrix#reset\r\n * @since 3.50.0\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n reset: function ()\r\n {\r\n var m = this._matrix;\r\n\r\n m.fill(0);\r\n\r\n m[0] = 1;\r\n m[6] = 1;\r\n m[12] = 1;\r\n m[18] = 1;\r\n\r\n this.alpha = 1;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the ColorMatrix as a Float32Array.\r\n *\r\n * Can be used directly as a 1fv shader uniform value.\r\n *\r\n * @method Phaser.Display.ColorMatrix#getData\r\n * @since 3.50.0\r\n *\r\n * @return {Float32Array} The ColorMatrix as a Float32Array.\r\n */\r\n getData: function ()\r\n {\r\n var data = this._data;\r\n\r\n if (this._dirty)\r\n {\r\n data.set(this._matrix);\r\n\r\n data[4] /= 255;\r\n data[9] /= 255;\r\n data[14] /= 255;\r\n data[19] /= 255;\r\n\r\n this._dirty = false;\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Changes the brightness of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brightness\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of brightness to apply to this ColorMatrix. Between 0 (black) and 1.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brightness: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var b = value;\r\n\r\n return this.multiply([\r\n b, 0, 0, 0, 0,\r\n 0, b, 0, 0, 0,\r\n 0, 0, b, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Changes the saturation of this ColorMatrix by the given amount.\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturate\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of saturation to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n saturate: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var x = (value * 2 / 3) + 1;\r\n var y = ((x - 1) * -0.5);\r\n\r\n return this.multiply([\r\n x, y, y, 0, 0,\r\n y, x, y, 0, 0,\r\n y, y, x, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Desaturates this ColorMatrix (removes color from it).\r\n *\r\n * @method Phaser.Display.ColorMatrix#saturation\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturate: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-1, multiply);\r\n },\r\n\r\n /**\r\n * Rotates the hues of this ColorMatrix by the value given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#hue\r\n * @since 3.50.0\r\n *\r\n * @param {number} [rotation=0] - The amount of hue rotation to apply to this ColorMatrix, in degrees.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n hue: function (rotation, multiply)\r\n {\r\n if (rotation === undefined) { rotation = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n rotation = rotation / 180 * Math.PI;\r\n\r\n var cos = Math.cos(rotation);\r\n var sin = Math.sin(rotation);\r\n var lumR = 0.213;\r\n var lumG = 0.715;\r\n var lumB = 0.072;\r\n\r\n return this.multiply([\r\n lumR + cos * (1 - lumR) + sin * (-lumR),lumG + cos * (-lumG) + sin * (-lumG),lumB + cos * (-lumB) + sin * (1 - lumB), 0, 0,\r\n lumR + cos * (-lumR) + sin * (0.143),lumG + cos * (1 - lumG) + sin * (0.140),lumB + cos * (-lumB) + sin * (-0.283), 0, 0,\r\n lumR + cos * (-lumR) + sin * (-(1 - lumR)),lumG + cos * (-lumG) + sin * (lumG),lumB + cos * (1 - lumB) + sin * (lumB), 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be grayscale.\r\n *\r\n * @method Phaser.Display.ColorMatrix#grayscale\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=1] - The grayscale scale (0 is black).\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n grayscale: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.saturate(-value, multiply);\r\n },\r\n\r\n /**\r\n * Sets this ColorMatrix to be black and white.\r\n *\r\n * @method Phaser.Display.ColorMatrix#blackWhite\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n blackWhite: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BLACK_WHITE, multiply);\r\n },\r\n\r\n /**\r\n * Change the contrast of this ColorMatrix by the amount given.\r\n *\r\n * @method Phaser.Display.ColorMatrix#contrast\r\n * @since 3.50.0\r\n *\r\n * @param {number} [value=0] - The amount of contrast to apply to this ColorMatrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n contrast: function (value, multiply)\r\n {\r\n if (value === undefined) { value = 0; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n var v = value + 1;\r\n var o = -0.5 * (v - 1);\r\n\r\n return this.multiply([\r\n v, 0, 0, 0, o,\r\n 0, v, 0, 0, o,\r\n 0, 0, v, 0, o,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Converts this ColorMatrix to have negative values.\r\n *\r\n * @method Phaser.Display.ColorMatrix#negative\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n negative: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.NEGATIVE, multiply);\r\n },\r\n\r\n /**\r\n * Apply a desaturated luminance to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#desaturateLuminance\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n desaturateLuminance: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.DESATURATE_LUMINANCE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a sepia tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#sepia\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n sepia: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SEPIA, multiply);\r\n },\r\n\r\n /**\r\n * Applies a night vision tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#night\r\n * @since 3.50.0\r\n *\r\n * @param {number} [intensity=0.1] - The intensity of this effect.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n night: function (intensity, multiply)\r\n {\r\n if (intensity === undefined) { intensity = 0.1; }\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply([\r\n intensity * (-2.0), -intensity, 0, 0, 0,\r\n -intensity, 0, intensity, 0, 0,\r\n 0, intensity, intensity * 2.0, 0, 0,\r\n 0, 0, 0, 1, 0\r\n ], multiply);\r\n },\r\n\r\n /**\r\n * Applies a trippy color tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#lsd\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n lsd: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.LSD, multiply);\r\n },\r\n\r\n /**\r\n * Applies a brown tone to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#brown\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n brown: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.BROWN, multiply);\r\n },\r\n\r\n /**\r\n * Applies a vintage pinhole color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#vintagePinhole\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n vintagePinhole: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.VINTAGE, multiply);\r\n },\r\n\r\n /**\r\n * Applies a kodachrome color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#kodachrome\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n kodachrome: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.KODACHROME, multiply);\r\n },\r\n\r\n /**\r\n * Applies a technicolor color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#technicolor\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n technicolor: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.TECHNICOLOR, multiply);\r\n },\r\n\r\n /**\r\n * Applies a polaroid color effect to this ColorMatrix.\r\n *\r\n * @method Phaser.Display.ColorMatrix#polaroid\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n polaroid: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.POLAROID, multiply);\r\n },\r\n\r\n /**\r\n * Shifts the values of this ColorMatrix into BGR order.\r\n *\r\n * @method Phaser.Display.ColorMatrix#shiftToBGR\r\n * @since 3.50.0\r\n *\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n shiftToBGR: function (multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n return this.multiply(ColorMatrix.SHIFT_BGR, multiply);\r\n },\r\n\r\n /**\r\n * Multiplies the two given matrices.\r\n *\r\n * @method Phaser.Display.ColorMatrix#multiply\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} a - The 5x4 array to multiply with ColorMatrix._matrix.\r\n * @param {boolean} [multiply=false] - Multiply the resulting ColorMatrix (`true`), or set it (`false`) ?\r\n *\r\n * @return {this} This ColorMatrix instance.\r\n */\r\n multiply: function (a, multiply)\r\n {\r\n if (multiply === undefined) { multiply = false; }\r\n\r\n // Duplicate _matrix into c\r\n\r\n if (!multiply)\r\n {\r\n this.reset();\r\n }\r\n\r\n var m = this._matrix;\r\n var c = tempMatrix;\r\n\r\n // copy _matrix to tempMatrox\r\n c.set(m);\r\n\r\n m.set([\r\n // R\r\n (c[0] * a[0]) + (c[1] * a[5]) + (c[2] * a[10]) + (c[3] * a[15]),\r\n (c[0] * a[1]) + (c[1] * a[6]) + (c[2] * a[11]) + (c[3] * a[16]),\r\n (c[0] * a[2]) + (c[1] * a[7]) + (c[2] * a[12]) + (c[3] * a[17]),\r\n (c[0] * a[3]) + (c[1] * a[8]) + (c[2] * a[13]) + (c[3] * a[18]),\r\n (c[0] * a[4]) + (c[1] * a[9]) + (c[2] * a[14]) + (c[3] * a[19]) + c[4],\r\n\r\n // G\r\n (c[5] * a[0]) + (c[6] * a[5]) + (c[7] * a[10]) + (c[8] * a[15]),\r\n (c[5] * a[1]) + (c[6] * a[6]) + (c[7] * a[11]) + (c[8] * a[16]),\r\n (c[5] * a[2]) + (c[6] * a[7]) + (c[7] * a[12]) + (c[8] * a[17]),\r\n (c[5] * a[3]) + (c[6] * a[8]) + (c[7] * a[13]) + (c[8] * a[18]),\r\n (c[5] * a[4]) + (c[6] * a[9]) + (c[7] * a[14]) + (c[8] * a[19]) + c[9],\r\n\r\n // B\r\n (c[10] * a[0]) + (c[11] * a[5]) + (c[12] * a[10]) + (c[13] * a[15]),\r\n (c[10] * a[1]) + (c[11] * a[6]) + (c[12] * a[11]) + (c[13] * a[16]),\r\n (c[10] * a[2]) + (c[11] * a[7]) + (c[12] * a[12]) + (c[13] * a[17]),\r\n (c[10] * a[3]) + (c[11] * a[8]) + (c[12] * a[13]) + (c[13] * a[18]),\r\n (c[10] * a[4]) + (c[11] * a[9]) + (c[12] * a[14]) + (c[13] * a[19]) + c[14],\r\n\r\n // A\r\n (c[15] * a[0]) + (c[16] * a[5]) + (c[17] * a[10]) + (c[18] * a[15]),\r\n (c[15] * a[1]) + (c[16] * a[6]) + (c[17] * a[11]) + (c[18] * a[16]),\r\n (c[15] * a[2]) + (c[16] * a[7]) + (c[17] * a[12]) + (c[18] * a[17]),\r\n (c[15] * a[3]) + (c[16] * a[8]) + (c[17] * a[13]) + (c[18] * a[18]),\r\n (c[15] * a[4]) + (c[16] * a[9]) + (c[17] * a[14]) + (c[18] * a[19]) + c[19]\r\n\r\n ]);\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for black_white operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BLACK_WHITE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BLACK_WHITE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for negative operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.NEGATIVE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.NEGATIVE = [ -1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for desatured luminance operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.DESATURATE_LUMINANCE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.DESATURATE_LUMINANCE = [ 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0.2764723, 0.9297080, 0.0938197, 0, -37.1, 0, 0, 0, 1, 0 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for sepia operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SEPIA\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SEPIA = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for lsd operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.LSD\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.LSD = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for brown operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.BROWN\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.BROWN = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for vintage pinhole operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.VINTAGE\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.VINTAGE = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for kodachrome operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.KODACHROME\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.KODACHROME = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for technicolor operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.TECHNICOLOR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.TECHNICOLOR = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for polaroid shift operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.POLAROID\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.POLAROID = [ 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 ];\r\n\r\n/**\r\n * A constant array used by the ColorMatrix class for shift BGR operations.\r\n *\r\n * @name Phaser.Display.ColorMatrix.SHIFT_BGR\r\n * @const\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\nColorMatrix.SHIFT_BGR = [ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0 ];\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../../const');\r\nvar Smoothing = require('./Smoothing');\r\n\r\n// The pool into which the canvas elements are placed.\r\nvar pool = [];\r\n\r\n// Automatically apply smoothing(false) to created Canvas elements\r\nvar _disableContextSmoothing = false;\r\n\r\n/**\r\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\r\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again,\r\n * which is useless for some of the Phaser pipelines / renderer.\r\n *\r\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\r\n * Which means all instances of Phaser Games on the same page can share the one single pool.\r\n *\r\n * @namespace Phaser.Display.Canvas.CanvasPool\r\n * @since 3.0.0\r\n */\r\nvar CanvasPool = function ()\r\n{\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\r\n *\r\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\r\n */\r\n var create = function (parent, width, height, canvasType, selfParent)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = 1; }\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n if (selfParent === undefined) { selfParent = false; }\r\n\r\n var canvas;\r\n var container = first(canvasType);\r\n\r\n if (container === null)\r\n {\r\n container = {\r\n parent: parent,\r\n canvas: document.createElement('canvas'),\r\n type: canvasType\r\n };\r\n\r\n if (canvasType === CONST.CANVAS)\r\n {\r\n pool.push(container);\r\n }\r\n\r\n canvas = container.canvas;\r\n }\r\n else\r\n {\r\n container.parent = parent;\r\n\r\n canvas = container.canvas;\r\n }\r\n\r\n if (selfParent)\r\n {\r\n container.parent = canvas;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\r\n {\r\n Smoothing.disable(canvas.getContext('2d', { willReadFrequently: false }));\r\n }\r\n\r\n return canvas;\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create2D\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created canvas.\r\n */\r\n var create2D = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.CANVAS);\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {number} [width=1] - The width of the Canvas.\r\n * @param {number} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created WebGL canvas.\r\n */\r\n var createWebGL = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.WEBGL);\r\n };\r\n\r\n /**\r\n * Gets the first free canvas index from the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.first\r\n * @since 3.0.0\r\n *\r\n * @param {number} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n *\r\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\r\n */\r\n var first = function (canvasType)\r\n {\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n\r\n if (canvasType === CONST.WEBGL)\r\n {\r\n return null;\r\n }\r\n\r\n for (var i = 0; i < pool.length; i++)\r\n {\r\n var container = pool[i];\r\n\r\n if (!container.parent && container.type === canvasType)\r\n {\r\n return container;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\r\n * The canvas has its width and height set to 1, and its parent attribute nulled.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.remove\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The canvas or the parent of the canvas to free.\r\n */\r\n var remove = function (parent)\r\n {\r\n // Check to see if the parent is a canvas object\r\n var isCanvas = parent instanceof HTMLCanvasElement;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\r\n {\r\n container.parent = null;\r\n container.canvas.width = 1;\r\n container.canvas.height = 1;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the total number of used canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.total\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of used canvases.\r\n */\r\n var total = function ()\r\n {\r\n var c = 0;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if (container.parent)\r\n {\r\n c++;\r\n }\r\n });\r\n\r\n return c;\r\n };\r\n\r\n /**\r\n * Gets the total number of free canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.free\r\n * @since 3.0.0\r\n *\r\n * @return {number} The number of free canvases.\r\n */\r\n var free = function ()\r\n {\r\n return pool.length - total();\r\n };\r\n\r\n /**\r\n * Disable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\r\n * @since 3.0.0\r\n */\r\n var disableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = true;\r\n };\r\n\r\n /**\r\n * Enable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\r\n * @since 3.0.0\r\n */\r\n var enableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = false;\r\n };\r\n\r\n return {\r\n create2D: create2D,\r\n create: create,\r\n createWebGL: createWebGL,\r\n disableSmoothing: disableSmoothing,\r\n enableSmoothing: enableSmoothing,\r\n first: first,\r\n free: free,\r\n pool: pool,\r\n remove: remove,\r\n total: total\r\n };\r\n};\r\n\r\n// If we export the called function here, it'll only be invoked once (not every time it's required).\r\nmodule.exports = CanvasPool();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Browser specific prefix, so not going to change between contexts, only between browsers\r\nvar prefix = '';\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.Smoothing\r\n * @since 3.0.0\r\n */\r\nvar Smoothing = function ()\r\n{\r\n /**\r\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\r\n *\r\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\r\n */\r\n var getPrefix = function (context)\r\n {\r\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\r\n\r\n for (var i = 0; i < vendors.length; i++)\r\n {\r\n var s = vendors[i] + 'mageSmoothingEnabled';\r\n\r\n if (s in context)\r\n {\r\n return s;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.enable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var enable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = true;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.disable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var disable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = false;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\r\n * Returns null if no smoothing prefix is available.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\r\n *\r\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\r\n */\r\n var isEnabled = function (context)\r\n {\r\n return (prefix !== null) ? context[prefix] : null;\r\n };\r\n\r\n return {\r\n disable: disable,\r\n enable: enable,\r\n getPrefix: getPrefix,\r\n isEnabled: isEnabled\r\n };\r\n\r\n};\r\n\r\nmodule.exports = Smoothing();\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GameObjectFactory = require('../../gameobjects/GameObjectFactory');\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object or Dynamic Texture to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects.\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this mask is being added.\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, maskObject, x, y, texture, frame)\r\n {\r\n if (!maskObject)\r\n {\r\n maskObject = scene.sys.make.image({ x: x, y: y, key: texture, frame: frame, add: false });\r\n }\r\n\r\n /**\r\n * The Game Object that is used as the mask. Must use a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = maskObject;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel.\r\n *\r\n * Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask? This is false by default and should not be changed.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n },\r\n\r\n /**\r\n * Sets a new Game Object or Dynamic Texture for this Bitmap Mask to use.\r\n *\r\n * If a Game Object it must have a texture, such as a Sprite.\r\n *\r\n * You can update the source of the mask as often as you like.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} maskObject - The Game Object or Dynamic Texture that will be used as the mask. If a Game Object, it must have a texture, such as a Sprite.\r\n */\r\n setBitmap: function (maskObject)\r\n {\r\n this.bitmapMask = maskObject;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n * @param {Phaser.Renderer.WebGL.RenderTarget} [renderTarget] - Optional WebGL RenderTarget.\r\n */\r\n postRenderWebGL: function (renderer, camera, renderTarget)\r\n {\r\n renderer.pipelines.BITMAPMASK_PIPELINE.endMask(this, camera, renderTarget);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object, or Dynamic Texture, to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * Note: You cannot combine Bitmap Masks and Blend Modes on the same Game Object. You can, however,\r\n * combine Geometry Masks and Blend Modes together.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#bitmapMask\r\n * @since 3.60.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} The Bitmap Mask that was created.\r\n */\r\nGameObjectFactory.register('bitmapMask', function (maskObject, x, y, key, frame)\r\n{\r\n return new BitmapMask(this.scene, maskObject, x, y, key, frame);\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level. This can change dynamically at runtime\r\n * and is set in the applyStencil method.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n *\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * This is a WebGL only feature.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n *\r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n var mask = 0xff;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n\r\n // Do this _after_ we set the stencilFunc\r\n level++;\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, mask);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n this.level = level;\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, mask);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, mask);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var current = renderer.currentMask;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n current.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n current.mask = prev.mask;\r\n current.camera = prev.camera;\r\n }\r\n else\r\n {\r\n current.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Barrel FX Controller.\r\n *\r\n * This FX controller manages the barrel distortion effect for a Game Object.\r\n *\r\n * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to\r\n * a Game Object. The amount of the effect can be modified in real-time.\r\n *\r\n * A Barrel effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBarrel();\r\n * sprite.postFX.addBarrel();\r\n * ```\r\n *\r\n * @class Barrel\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n */\r\nvar Barrel = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Barrel (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.BARREL, gameObject);\r\n\r\n /**\r\n * The amount of distortion applied to the barrel effect.\r\n *\r\n * Typically keep this within the range 1 (no distortion) to +- 1.\r\n *\r\n * @name Phaser.FX.Barrel#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Barrel;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Bloom FX Controller.\r\n *\r\n * This FX controller manages the bloom effect for a Game Object.\r\n *\r\n * Bloom is an effect used to reproduce an imaging artifact of real-world cameras.\r\n * The effect produces fringes of light extending from the borders of bright areas in an image,\r\n * contributing to the illusion of an extremely bright light overwhelming the\r\n * camera or eye capturing the scene.\r\n *\r\n * A Bloom effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBloom();\r\n * sprite.postFX.addBloom();\r\n * ```\r\n *\r\n * @class Bloom\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color=0xffffff] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n */\r\nvar Bloom = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bloom (gameObject, color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n if (offsetX === undefined) { offsetX = 1; }\r\n if (offsetY === undefined) { offsetY = 1; }\r\n if (blurStrength === undefined) { blurStrength = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLOOM, gameObject);\r\n\r\n /**\r\n * The number of steps to run the Bloom effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the Bloom,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Bloom#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The horizontal offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetX = offsetX;\r\n\r\n /**\r\n * The vertical offset of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#offsetY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.offsetY = offsetY;\r\n\r\n /**\r\n * The strength of the blur process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#blurStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurStrength = blurStrength;\r\n\r\n /**\r\n * The strength of the blend process of the bloom effect.\r\n *\r\n * @name Phaser.FX.Bloom#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Bloom#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the bloom as a number value.\r\n *\r\n * @name Phaser.FX.Bloom#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bloom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Blur FX Controller.\r\n *\r\n * This FX controller manages the blur effect for a Game Object.\r\n *\r\n * A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect,\r\n * typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a\r\n * smooth blur resembling that of viewing the image through a translucent screen, distinctly different\r\n * from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.\r\n *\r\n * A Blur effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBlur();\r\n * sprite.postFX.addBlur();\r\n * ```\r\n *\r\n * @class Blur\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n */\r\nvar Blur = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Blur (gameObject, quality, x, y, strength, color, steps)\r\n {\r\n if (quality === undefined) { quality = 0; }\r\n if (x === undefined) { x = 2; }\r\n if (y === undefined) { y = 2; }\r\n if (strength === undefined) { strength = 1; }\r\n if (steps === undefined) { steps = 4; }\r\n\r\n Controller.call(this, FX_CONST.BLUR, gameObject);\r\n\r\n /**\r\n * The quality of the blur effect.\r\n *\r\n * This can be:\r\n *\r\n * 0 for Low Quality\r\n * 1 for Medium Quality\r\n * 2 for High Quality\r\n *\r\n * The higher the quality, the more complex shader is used\r\n * and the more processing time is spent on the GPU calculating\r\n * the final blur. This value is used in conjunction with the\r\n * `steps` value, as one has a direct impact on the other.\r\n *\r\n * Keep this value as low as you can, while still achieving the\r\n * desired effect you need for your game.\r\n *\r\n * @name Phaser.FX.Blur#quality\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.quality = 0;\r\n\r\n /**\r\n * The horizontal offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The number of steps to run the Blur effect for.\r\n *\r\n * This value should always be an integer.\r\n *\r\n * It defaults to 4. The higher the value, the smoother the blur,\r\n * but at the cost of exponentially more gl operations.\r\n *\r\n * Keep this to the lowest possible number you can have it, while\r\n * still looking correct for your game.\r\n *\r\n * @name Phaser.FX.Blur#steps\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.steps = steps;\r\n\r\n /**\r\n * The strength of the blur effect.\r\n *\r\n * @name Phaser.FX.Blur#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Blur#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the blur as a number value.\r\n *\r\n * @name Phaser.FX.Blur#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Blur;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Bokeh FX Controller.\r\n *\r\n * This FX controller manages the bokeh effect for a Game Object.\r\n *\r\n * Bokeh refers to a visual effect that mimics the photographic technique of creating a shallow depth of field.\r\n * This effect is used to emphasize the game's main subject or action, by blurring the background or foreground\r\n * elements, resulting in a more immersive and visually appealing experience. It is achieved through rendering\r\n * techniques that simulate the out-of-focus areas, giving a sense of depth and realism to the game's graphics.\r\n *\r\n * This effect can also be used to generate a Tilt Shift effect, which is a technique used to create a miniature\r\n * effect by blurring everything except a small area of the image. This effect is achieved by blurring the\r\n * top and bottom elements, while keeping the center area in focus.\r\n *\r\n * A Bokeh effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addBokeh();\r\n * sprite.postFX.addBokeh();\r\n * ```\r\n *\r\n * @class Bokeh\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {boolean} [isTiltShift=false] - Is this a bokeh or Tile Shift effect?\r\n * @param {number} [blurX=1] - If Tilt Shift, the amount of horizontal blur.\r\n * @param {number} [blurY=1] - If Tilt Shift, the amount of vertical blur.\r\n * @param {number} [strength=1] - If Tilt Shift, the strength of the blur.\r\n */\r\nvar Bokeh = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Bokeh (gameObject, radius, amount, contrast, isTiltShift, blurX, blurY, strength)\r\n {\r\n if (radius === undefined) { radius = 0.5; }\r\n if (amount === undefined) { amount = 1; }\r\n if (contrast === undefined) { contrast = 0.2; }\r\n if (isTiltShift === undefined) { isTiltShift = false; }\r\n if (blurX === undefined) { blurX = 1; }\r\n if (blurY === undefined) { blurY = 1; }\r\n if (strength === undefined) { strength = 1; }\r\n\r\n Controller.call(this, FX_CONST.BOKEH, gameObject);\r\n\r\n /**\r\n * The radius of the bokeh effect.\r\n *\r\n * This is a float value, where a radius of 0 will result in no effect being applied,\r\n * and a radius of 1 will result in a strong bokeh. However, you can exceed this value\r\n * for even stronger effects.\r\n *\r\n * @name Phaser.FX.Bokeh#radius\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The amount, or strength, of the bokeh effect. Defaults to 1.\r\n *\r\n * @name Phaser.FX.Bokeh#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n\r\n /**\r\n * The color contrast, or brightness, of the bokeh effect. Defaults to 0.2.\r\n *\r\n * @name Phaser.FX.Bokeh#contrast\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.contrast = contrast;\r\n\r\n /**\r\n * Is this a Tilt Shift effect or a standard bokeh effect?\r\n *\r\n * @name Phaser.FX.Bokeh#isTiltShift\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.isTiltShift = isTiltShift;\r\n\r\n /**\r\n * If a Tilt Shift effect this controls the strength of the blur.\r\n *\r\n * Setting this value on a non-Tilt Shift effect will have no effect.\r\n *\r\n * @name Phaser.FX.Bokeh#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n\r\n /**\r\n * If a Tilt Shift effect this controls the amount of horizontal blur.\r\n *\r\n * Setting this value on a non-Tilt Shift effect will have no effect.\r\n *\r\n * @name Phaser.FX.Bokeh#blurX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurX = blurX;\r\n\r\n /**\r\n * If a Tilt Shift effect this controls the amount of vertical blur.\r\n *\r\n * Setting this value on a non-Tilt Shift effect will have no effect.\r\n *\r\n * @name Phaser.FX.Bokeh#blurY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.blurY = blurY;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bokeh;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Circle FX Controller.\r\n *\r\n * This FX controller manages the circle effect for a Game Object.\r\n *\r\n * This effect will draw a circle around the texture of the Game Object, effectively masking off\r\n * any area outside of the circle without the need for an actual mask. You can control the thickness\r\n * of the circle, the color of the circle and the color of the background, should the texture be\r\n * transparent. You can also control the feathering applied to the circle, allowing for a harsh or soft edge.\r\n *\r\n * Please note that adding this effect to a Game Object will not change the input area or physics body of\r\n * the Game Object, should it have one.\r\n *\r\n * A Circle effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addCircle();\r\n * sprite.postFX.addCircle();\r\n * ```\r\n *\r\n * @class Circle\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=0xfeedb6] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n */\r\nvar Circle = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Circle (gameObject, thickness, color, backgroundColor, scale, feather)\r\n {\r\n if (thickness === undefined) { thickness = 8; }\r\n if (scale === undefined) { scale = 1; }\r\n if (feather === undefined) { feather = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.CIRCLE, gameObject);\r\n\r\n /**\r\n * The scale of the circle. The default scale is 1, which is a circle\r\n * the full size of the underlying texture. Reduce this value to create\r\n * a smaller circle, or increase it to create a circle that extends off\r\n * the edges of the texture.\r\n *\r\n * @name Phaser.FX.Circle#scale\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.scale = scale;\r\n\r\n /**\r\n * The amount of feathering to apply to the circle from the ring,\r\n * extending into the middle of the circle. The default is 0.005,\r\n * which is a very low amount of feathering just making sure the ring\r\n * has a smooth edge. Increase this amount to a value such as 0.5\r\n * or 0.025 for larger amounts of feathering.\r\n *\r\n * @name Phaser.FX.Circle#feather\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.feather = feather;\r\n\r\n /**\r\n * The width of the circle around the texture, in pixels. This value\r\n * doesn't factor in the feather, which can extend the thickness\r\n * internally depending on its value.\r\n *\r\n * @name Phaser.FX.Circle#thickness\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.thickness = thickness;\r\n\r\n /**\r\n * The internal gl color array for the ring color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 0.2, 0.7 ];\r\n\r\n /**\r\n * The internal gl color array for the background color.\r\n *\r\n * @name Phaser.FX.Circle#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 1, 0, 0, 0.4 ];\r\n\r\n if (color !== undefined && color !== null)\r\n {\r\n this.color = color;\r\n }\r\n\r\n if (backgroundColor !== undefined && backgroundColor !== null)\r\n {\r\n this.backgroundColor = backgroundColor;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the circular ring, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of the background, behind the texture, given as a number value.\r\n *\r\n * @name Phaser.FX.Circle#backgroundColor\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n backgroundColor: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Circle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar BaseColorMatrix = require('../display/ColorMatrix');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The ColorMatrix FX Controller.\r\n *\r\n * This FX controller manages the color matrix effect for a Game Object.\r\n *\r\n * The color matrix effect is a visual technique that involves manipulating the colors of an image\r\n * or scene using a mathematical matrix. This process can adjust hue, saturation, brightness, and contrast,\r\n * allowing developers to create various stylistic appearances or mood settings within the game.\r\n * Common applications include simulating different lighting conditions, applying color filters,\r\n * or achieving a specific visual style.\r\n *\r\n * A ColorMatrix effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addColorMatrix();\r\n * sprite.postFX.addColorMatrix();\r\n * ```\r\n *\r\n * @class ColorMatrix\r\n * @extends Phaser.Display.ColorMatrix\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar ColorMatrix = new Class({\r\n\r\n Extends: BaseColorMatrix,\r\n\r\n initialize:\r\n\r\n function ColorMatrix (gameObject)\r\n {\r\n BaseColorMatrix.call(this);\r\n\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = FX_CONST.COLOR_MATRIX;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.ColorMatrix#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * @name Phaser.FX.ColorMatrix#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this._matrix = null;\r\n this._data = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ColorMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * FX Controller is the base class that all built-in FX use.\r\n *\r\n * You should not normally create an instance of this class directly, but instead use one of the built-in FX that extend it.\r\n *\r\n * @class Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {number} type - The FX Type constant.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n */\r\nvar Controller = new Class({\r\n\r\n initialize:\r\n\r\n function Controller (type, gameObject)\r\n {\r\n /**\r\n * The FX_CONST type of this effect.\r\n *\r\n * @name Phaser.FX.Controller#type\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * A reference to the Game Object that owns this effect.\r\n *\r\n * @name Phaser.FX.Controller#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Toggle this boolean to enable or disable this effect,\r\n * without removing and adding it from the Game Object.\r\n *\r\n * Only works for Pre FX.\r\n *\r\n * Post FX are always active.\r\n *\r\n * @name Phaser.FX.Controller#active\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.active = true;\r\n },\r\n\r\n /**\r\n * Sets the active state of this FX Controller.\r\n *\r\n * A disabled FX Controller will not be updated.\r\n *\r\n * @method Phaser.FX.Controller#setActive\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} value - `true` to enable this FX Controller, or `false` to disable it.\r\n *\r\n * @return {this} This FX Controller instance.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this FX Controller.\r\n *\r\n * @method Phaser.FX.Controller#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.gameObject = null;\r\n this.active = false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Controller;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Displacement FX Controller.\r\n *\r\n * This FX controller manages the displacement effect for a Game Object.\r\n *\r\n * The displacement effect is a visual technique that alters the position of pixels in an image\r\n * or texture based on the values of a displacement map. This effect is used to create the illusion\r\n * of depth, surface irregularities, or distortion in otherwise flat elements. It can be applied to\r\n * characters, objects, or backgrounds to enhance realism, convey movement, or achieve various\r\n * stylistic appearances.\r\n *\r\n * A Displacement effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addDisplacement();\r\n * sprite.postFX.addDisplacement();\r\n * ```\r\n *\r\n * @class Displacement\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply. A very small float number, such as 0.005.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply. A very small float number, such as 0.005.\r\n */\r\nvar Displacement = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Displacement (gameObject, texture, x, y)\r\n {\r\n if (texture === undefined) { texture = '__WHITE'; }\r\n if (x === undefined) { x = 0.005; }\r\n if (y === undefined) { y = 0.005; }\r\n\r\n Controller.call(this, FX_CONST.DISPLACEMENT, gameObject);\r\n\r\n /**\r\n * The amount of horizontal displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The amount of vertical displacement to apply.\r\n *\r\n * @name Phaser.FX.Displacement#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The underlying WebGLTexture used for displacement.\r\n *\r\n * @name Phaser.FX.Displacement#glTexture\r\n * @type {WebGLTexture}\r\n * @since 3.60.0\r\n */\r\n this.glTexture;\r\n\r\n this.setTexture(texture);\r\n },\r\n\r\n /**\r\n * Sets the Texture to be used for the displacement effect.\r\n *\r\n * You can only use a whole texture, not a frame from a texture atlas or sprite sheet.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setTexture\r\n * @since 3.60.0\r\n *\r\n * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n *\r\n * @return {this} This FX Controller.\r\n */\r\n setTexture: function (texture)\r\n {\r\n var phaserTexture = this.gameObject.scene.sys.textures.getFrame(texture);\r\n\r\n if (phaserTexture)\r\n {\r\n this.glTexture = phaserTexture.glTexture;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Displacement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Glow FX Controller.\r\n *\r\n * This FX controller manages the glow effect for a Game Object.\r\n *\r\n * The glow effect is a visual technique that creates a soft, luminous halo around game objects,\r\n * characters, or UI elements. This effect is used to emphasize importance, enhance visual appeal,\r\n * or convey a sense of energy, magic, or otherworldly presence. The effect can also be set on\r\n * the inside of the Game Object. The color and strength of the glow can be modified.\r\n *\r\n * A Glow effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addGlow();\r\n * sprite.postFX.addGlow();\r\n * ```\r\n *\r\n * @class Glow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n */\r\nvar Glow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Glow (gameObject, color, outerStrength, innerStrength, knockout)\r\n {\r\n if (outerStrength === undefined) { outerStrength = 4; }\r\n if (innerStrength === undefined) { innerStrength = 0; }\r\n if (knockout === undefined) { knockout = false; }\r\n\r\n Controller.call(this, FX_CONST.GLOW, gameObject);\r\n\r\n /**\r\n * The strength of the glow outward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#outerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.outerStrength = outerStrength;\r\n\r\n /**\r\n * The strength of the glow inward from the edge of the Sprite.\r\n *\r\n * @name Phaser.FX.Glow#innerStrength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.innerStrength = innerStrength;\r\n\r\n /**\r\n * If `true` only the glow is drawn, not the texture itself.\r\n *\r\n * @name Phaser.FX.Glow#knockout\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.knockout = knockout;\r\n\r\n /**\r\n * A 4 element array of gl color values.\r\n *\r\n * @name Phaser.FX.Glow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 1, 1, 1, 1 ];\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the glow as a number value.\r\n *\r\n * @name Phaser.FX.Glow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Glow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Gradient FX Controller.\r\n *\r\n * This FX controller manages the gradient effect for a Game Object.\r\n *\r\n * The gradient overlay effect is a visual technique where a smooth color transition is applied over Game Objects,\r\n * such as sprites or UI components. This effect is used to enhance visual appeal, emphasize depth, or create\r\n * stylistic and atmospheric variations. It can also be utilized to convey information, such as representing\r\n * progress or health status through color changes.\r\n *\r\n * A Gradient effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addGradient();\r\n * sprite.postFX.addGradient();\r\n * ```\r\n *\r\n * @class Gradient\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n */\r\nvar Gradient = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Gradient (gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n if (alpha === undefined) { alpha = 0.2; }\r\n if (fromX === undefined) { fromX = 0; }\r\n if (fromY === undefined) { fromY = 0; }\r\n if (toX === undefined) { toX = 0; }\r\n if (toY === undefined) { toY = 1; }\r\n if (size === undefined) { size = 0; }\r\n\r\n Controller.call(this, FX_CONST.GRADIENT, gameObject);\r\n\r\n /**\r\n * The alpha value of the gradient effect.\r\n *\r\n * @name Phaser.FX.Gradient#alpha\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.alpha = alpha;\r\n\r\n /**\r\n * Sets how many 'chunks' the gradient is divided in to, as spread over the\r\n * entire height of the texture. Leave this at zero for a smooth gradient,\r\n * or set to a higher number to split the gradient into that many sections, giving\r\n * a more banded 'retro' effect.\r\n *\r\n * @name Phaser.FX.Gradient#size\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.size = size;\r\n\r\n /**\r\n * The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromX = fromX;\r\n\r\n /**\r\n * The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#fromY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.fromY = fromY;\r\n\r\n /**\r\n * The horizontal position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toX\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toX = toX;\r\n\r\n /**\r\n * The vertical position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels.\r\n *\r\n * @name Phaser.FX.Gradient#toY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.toY = toY;\r\n\r\n /**\r\n * The internal gl color array for the starting color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor1\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor1 = [ 255, 0, 0 ];\r\n\r\n /**\r\n * The internal gl color array for the ending color.\r\n *\r\n * @name Phaser.FX.Gradient#glcolor2\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor2 = [ 0, 255, 0 ];\r\n\r\n if (color1 !== undefined && color1 !== null)\r\n {\r\n this.color1 = color1;\r\n }\r\n\r\n if (color2 !== undefined && color2 !== null)\r\n {\r\n this.color2 = color2;\r\n }\r\n },\r\n\r\n /**\r\n * The first gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color1\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color1: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor1;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor1;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The second gradient color, given as a number value.\r\n *\r\n * @name Phaser.FX.Gradient#color2\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color2: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor2;\r\n\r\n return (((color[0]) << 16) + ((color[1]) << 8) + (color[2] | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor2;\r\n\r\n color[0] = ((value >> 16) & 0xFF);\r\n color[1] = ((value >> 8) & 0xFF);\r\n color[2] = (value & 0xFF);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Gradient;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Pixelate FX Controller.\r\n *\r\n * This FX controller manages the pixelate effect for a Game Object.\r\n *\r\n * The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image,\r\n * creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic\r\n * purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as\r\n * during a transition or to censor specific content.\r\n *\r\n * A Pixelate effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addPixelate();\r\n * sprite.postFX.addPixelate();\r\n * ```\r\n *\r\n * @class Pixelate\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n */\r\nvar Pixelate = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Pixelate (gameObject, amount)\r\n {\r\n if (amount === undefined) { amount = 1; }\r\n\r\n Controller.call(this, FX_CONST.PIXELATE, gameObject);\r\n\r\n /**\r\n * The amount of pixelation to apply.\r\n *\r\n * @name Phaser.FX.Pixelate#amount\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.amount = amount;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pixelate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Shadow FX Controller.\r\n *\r\n * This FX controller manages the shadow effect for a Game Object.\r\n *\r\n * The shadow effect is a visual technique used to create the illusion of depth and realism by adding darker,\r\n * offset silhouettes or shapes beneath game objects, characters, or environments. These simulated shadows\r\n * help to enhance the visual appeal and immersion, making the 2D game world appear more dynamic and three-dimensional.\r\n *\r\n * A Shadow effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addShadow();\r\n * sprite.postFX.addShadow();\r\n * ```\r\n *\r\n * @class Shadow\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n */\r\nvar Shadow = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shadow (gameObject, x, y, decay, power, color, samples, intensity)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (decay === undefined) { decay = 0.1; }\r\n if (power === undefined) { power = 1; }\r\n if (samples === undefined) { samples = 6; }\r\n if (intensity === undefined) { intensity = 1; }\r\n\r\n Controller.call(this, FX_CONST.SHADOW, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The amount of decay for the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#decay\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.decay = decay;\r\n\r\n /**\r\n * The power of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#power\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.power = power;\r\n\r\n /**\r\n * The internal gl color array.\r\n *\r\n * @name Phaser.FX.Shadow#glcolor\r\n * @type {number[]}\r\n * @since 3.60.0\r\n */\r\n this.glcolor = [ 0, 0, 0, 1 ];\r\n\r\n /**\r\n * The number of samples that the shadow effect will run for.\r\n *\r\n * This should be an integer with a minimum value of 1 and a maximum of 12.\r\n *\r\n * @name Phaser.FX.Shadow#samples\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.samples = samples;\r\n\r\n /**\r\n * The intensity of the shadow effect.\r\n *\r\n * @name Phaser.FX.Shadow#intensity\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.intensity = intensity;\r\n\r\n if (color !== undefined)\r\n {\r\n this.color = color;\r\n }\r\n },\r\n\r\n /**\r\n * The color of the shadow.\r\n *\r\n * @name Phaser.FX.Shadow#color\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n var color = this.glcolor;\r\n\r\n return (((color[0] * 255) << 16) + ((color[1] * 255) << 8) + (color[2] * 255 | 0));\r\n },\r\n\r\n set: function (value)\r\n {\r\n var color = this.glcolor;\r\n\r\n color[0] = ((value >> 16) & 0xFF) / 255;\r\n color[1] = ((value >> 8) & 0xFF) / 255;\r\n color[2] = (value & 0xFF) / 255;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shadow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Shine FX Controller.\r\n *\r\n * This FX controller manages the shift effect for a Game Object.\r\n *\r\n * The shine effect is a visual technique that simulates the appearance of reflective\r\n * or glossy surfaces by passing a light beam across a Game Object. This effect is used to\r\n * enhance visual appeal, emphasize certain features, and create a sense of depth or\r\n * material properties.\r\n *\r\n * A Shine effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addShine();\r\n * sprite.postFX.addShine();\r\n * ```\r\n *\r\n * @class Shine\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n */\r\nvar Shine = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Shine (gameObject, speed, lineWidth, gradient, reveal)\r\n {\r\n if (speed === undefined) { speed = 0.5; }\r\n if (lineWidth === undefined) { lineWidth = 0.5; }\r\n if (gradient === undefined) { gradient = 3; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.SHINE, gameObject);\r\n\r\n /**\r\n * The speed of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#speed\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.speed = speed;\r\n\r\n /**\r\n * The line width of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#lineWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.lineWidth = lineWidth;\r\n\r\n /**\r\n * The gradient of the Shine effect.\r\n *\r\n * @name Phaser.FX.Shine#gradient\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.gradient = gradient;\r\n\r\n /**\r\n * Does this Shine effect reveal or get added to its target?\r\n *\r\n * @name Phaser.FX.Shine#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shine;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Vignette FX Controller.\r\n *\r\n * This FX controller manages the vignette effect for a Game Object.\r\n *\r\n * The vignette effect is a visual technique where the edges of the screen, or a Game Object, gradually darken or blur,\r\n * creating a frame-like appearance. This effect is used to draw the player's focus towards the central action or subject,\r\n * enhance immersion, and provide a cinematic or artistic quality to the game's visuals.\r\n *\r\n * A Vignette effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addVignette();\r\n * sprite.postFX.addVignette();\r\n * ```\r\n *\r\n * @class Vignette\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n */\r\nvar Vignette = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Vignette (gameObject, x, y, radius, strength)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = 0.5; }\r\n if (radius === undefined) { radius = 0.5; }\r\n if (strength === undefined) { strength = 0.5; }\r\n\r\n Controller.call(this, FX_CONST.VIGNETTE, gameObject);\r\n\r\n /**\r\n * The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#x\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#y\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Vignette#radius\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The strength of the vignette effect.\r\n *\r\n * @name Phaser.FX.Vignette#strength\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.strength = strength;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Vignette;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Controller = require('./Controller');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @classdesc\r\n * The Wipe FX Controller.\r\n *\r\n * This FX controller manages the wipe effect for a Game Object.\r\n *\r\n * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements\r\n * in the game, such as images, text, or scene transitions. This effect is often used to create\r\n * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition\r\n * between game states.\r\n *\r\n * You can set both the direction and the axis of the wipe effect. The following combinations are possible:\r\n *\r\n * * left to right: direction 0, axis 0\r\n * * right to left: direction 1, axis 0\r\n * * top to bottom: direction 1, axis 1\r\n * * bottom to top: direction 1, axis 0\r\n *\r\n * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect.\r\n *\r\n * A Wipe effect is added to a Game Object via the FX component:\r\n *\r\n * ```js\r\n * const sprite = this.add.sprite();\r\n *\r\n * sprite.preFX.addWipe();\r\n * sprite.postFX.addWipe();\r\n * sprite.preFX.addReveal();\r\n * sprite.postFX.addReveal();\r\n * ```\r\n *\r\n * @class Wipe\r\n * @extends Phaser.FX.Controller\r\n * @memberof Phaser.FX\r\n * @constructor\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that has this fx.\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n * @param {boolean} [reveal=false] - Is this a reveal (true) or a fade (false) effect?\r\n */\r\nvar Wipe = new Class({\r\n\r\n Extends: Controller,\r\n\r\n initialize:\r\n\r\n function Wipe (gameObject, wipeWidth, direction, axis, reveal)\r\n {\r\n if (wipeWidth === undefined) { wipeWidth = 0.1; }\r\n if (direction === undefined) { direction = 0; }\r\n if (axis === undefined) { axis = 0; }\r\n if (reveal === undefined) { reveal = false; }\r\n\r\n Controller.call(this, FX_CONST.WIPE, gameObject);\r\n\r\n /**\r\n * The progress of the Wipe effect. This value is normalized to the range 0 to 1.\r\n *\r\n * Adjust this value to make the wipe transition (i.e. via a Tween)\r\n *\r\n * @name Phaser.FX.Wipe#progress\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n *\r\n * @name Phaser.FX.Wipe#wipeWidth\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.wipeWidth = wipeWidth;\r\n\r\n /**\r\n * The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n *\r\n * @name Phaser.FX.Wipe#direction\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.direction = direction;\r\n\r\n /**\r\n * The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @name Phaser.FX.Wipe#axis\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.axis = axis;\r\n\r\n /**\r\n * Is this a reveal (true) or a fade (false) effect?\r\n *\r\n * @name Phaser.FX.Wipe#reveal\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.reveal = reveal;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Wipe;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FX_CONST = {\r\n\r\n /**\r\n * The Glow FX.\r\n *\r\n * @name Phaser.FX.GLOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GLOW: 4,\r\n\r\n /**\r\n * The Shadow FX.\r\n *\r\n * @name Phaser.FX.SHADOW\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHADOW: 5,\r\n\r\n /**\r\n * The Pixelate FX.\r\n *\r\n * @name Phaser.FX.PIXELATE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n PIXELATE: 6,\r\n\r\n /**\r\n * The Vignette FX.\r\n *\r\n * @name Phaser.FX.VIGNETTE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n VIGNETTE: 7,\r\n\r\n /**\r\n * The Shine FX.\r\n *\r\n * @name Phaser.FX.SHINE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n SHINE: 8,\r\n\r\n /**\r\n * The Blur FX.\r\n *\r\n * @name Phaser.FX.BLUR\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLUR: 9, // uses 3 shaders, slots 9, 10 and 11\r\n\r\n /**\r\n * The Gradient FX.\r\n *\r\n * @name Phaser.FX.GRADIENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n GRADIENT: 12,\r\n\r\n /**\r\n * The Bloom FX.\r\n *\r\n * @name Phaser.FX.BLOOM\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BLOOM: 13,\r\n\r\n /**\r\n * The Color Matrix FX.\r\n *\r\n * @name Phaser.FX.COLOR_MATRIX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n COLOR_MATRIX: 14,\r\n\r\n /**\r\n * The Circle FX.\r\n *\r\n * @name Phaser.FX.CIRCLE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n CIRCLE: 15,\r\n\r\n /**\r\n * The Barrel FX.\r\n *\r\n * @name Phaser.FX.BARREL\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BARREL: 16,\r\n\r\n /**\r\n * The Displacement FX.\r\n *\r\n * @name Phaser.FX.DISPLACEMENT\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DISPLACEMENT: 17,\r\n\r\n /**\r\n * The Wipe FX.\r\n *\r\n * @name Phaser.FX.WIPE\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n WIPE: 18,\r\n\r\n /**\r\n * The Bokeh and Tilt Shift FX.\r\n *\r\n * @name Phaser.FX.BOKEH\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n BOKEH: 19\r\n\r\n};\r\n\r\nmodule.exports = FX_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar FX_CONST = require('./const');\r\n\r\n/**\r\n * @namespace Phaser.FX\r\n */\r\n\r\nvar FX = {\r\n\r\n Barrel: require('./Barrel'),\r\n Controller: require('./Controller'),\r\n Bloom: require('./Bloom'),\r\n Blur: require('./Blur'),\r\n Bokeh: require('./Bokeh'),\r\n Circle: require('./Circle'),\r\n ColorMatrix: require('./ColorMatrix'),\r\n Displacement: require('./Displacement'),\r\n Glow: require('./Glow'),\r\n Gradient: require('./Gradient'),\r\n Pixelate: require('./Pixelate'),\r\n Shadow: require('./Shadow'),\r\n Shine: require('./Shine'),\r\n Vignette: require('./Vignette'),\r\n Wipe: require('./Wipe')\r\n\r\n};\r\n\r\nFX = Extend(false, FX, FX_CONST);\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar ComponentsToJSON = require('./components/ToJSON');\r\nvar DataManager = require('../data/DataManager');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The base class that all Game Objects extend.\r\n * You don't create GameObjects directly and they cannot be added to the display list.\r\n * Instead, use them as the base for your own custom classes.\r\n *\r\n * @class GameObject\r\n * @memberof Phaser.GameObjects\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\r\n */\r\nvar GameObject = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GameObject (scene, type)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene to which this Game Object belongs.\r\n *\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * You should consider this property as being read-only. You cannot move a\r\n * Game Object to another Scene by simply changing it.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Holds a reference to the Display List that contains this Game Object.\r\n *\r\n * This is set automatically when this Game Object is added to a Scene or Layer.\r\n *\r\n * You should treat this property as being read-only.\r\n *\r\n * @name Phaser.GameObjects.GameObject#displayList\r\n * @type {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)}\r\n * @default null\r\n * @since 3.50.0\r\n */\r\n this.displayList = null;\r\n\r\n /**\r\n * A textual representation of this Game Object, i.e. `sprite`.\r\n * Used internally by Phaser but is available for your own custom classes to populate.\r\n *\r\n * @name Phaser.GameObjects.GameObject#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The current state of this Game Object.\r\n *\r\n * Phaser itself will never modify this value, although plugins may do so.\r\n *\r\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\r\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\r\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @name Phaser.GameObjects.GameObject#state\r\n * @type {(number|string)}\r\n * @since 3.16.0\r\n */\r\n this.state = 0;\r\n\r\n /**\r\n * The parent Container of this Game Object, if it has one.\r\n *\r\n * @name Phaser.GameObjects.GameObject#parentContainer\r\n * @type {Phaser.GameObjects.Container}\r\n * @since 3.4.0\r\n */\r\n this.parentContainer = null;\r\n\r\n /**\r\n * The name of this Game Object.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.GameObject#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The active state of this Game Object.\r\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\r\n * An active object is one which is having its logic and internal systems updated.\r\n *\r\n * @name Phaser.GameObjects.GameObject#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The Tab Index of the Game Object.\r\n * Reserved for future use by plugins and the Input Manager.\r\n *\r\n * @name Phaser.GameObjects.GameObject#tabIndex\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.tabIndex = -1;\r\n\r\n /**\r\n * A Data Manager.\r\n * It allows you to store, query and get key/value paired information specific to this Game Object.\r\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#data\r\n * @type {Phaser.Data.DataManager}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.data = null;\r\n\r\n /**\r\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\r\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\r\n * If those components are not used by your custom class then you can use this bitmask as you wish.\r\n *\r\n * @name Phaser.GameObjects.GameObject#renderFlags\r\n * @type {number}\r\n * @default 15\r\n * @since 3.0.0\r\n */\r\n this.renderFlags = 15;\r\n\r\n /**\r\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\r\n * Not usually set directly, instead call `Camera.ignore`, however you can\r\n * set this property directly using the Camera.id property:\r\n *\r\n * @example\r\n * this.cameraFilter |= camera.id\r\n *\r\n * @name Phaser.GameObjects.GameObject#cameraFilter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cameraFilter = 0;\r\n\r\n /**\r\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\r\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#input\r\n * @type {?Phaser.Types.Input.InteractiveObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.input = null;\r\n\r\n /**\r\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\r\n * This includes calls that may come from a Group, Container or the Scene itself.\r\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\r\n * responsible for managing references to and from this Game Object.\r\n *\r\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.ignoreDestroy = false;\r\n\r\n this.on(Events.ADDED_TO_SCENE, this.addedToScene, this);\r\n this.on(Events.REMOVED_FROM_SCENE, this.removedFromScene, this);\r\n\r\n // Tell the Scene to re-sort the children\r\n scene.sys.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\r\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\r\n * The `name` property is not populated by Phaser and is presented for your own use.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The name to be given to this Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setName: function (value)\r\n {\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current state of this Game Object.\r\n *\r\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\r\n *\r\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\r\n * The state value should typically be an integer (ideally mapped to a constant\r\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setState\r\n * @since 3.16.0\r\n *\r\n * @param {(number|string)} value - The state of the Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setState: function (value)\r\n {\r\n this.state = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a Data Manager component to this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setDataEnabled\r\n * @since 3.0.0\r\n * @see Phaser.Data.DataManager\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setDataEnabled: function ()\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Allows you to store a key value pair within this Game Objects Data Manager.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * sprite.setData('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `getData`:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setData\r\n * @since 3.0.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.set(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#incData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n incData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.inc(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toggleData\r\n * @since 3.23.0\r\n *\r\n * @generic {any} T\r\n * @genericUse {(string|T)} - [key]\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n toggleData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.toggle(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * sprite.getData([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n getData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this.data.get(key);\r\n },\r\n\r\n /**\r\n * Pass this Game Object to the Input Manager to enable it for Input.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @example\r\n * sprite.setInteractive();\r\n *\r\n * @example\r\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\r\n *\r\n * @example\r\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\r\n *\r\n * @method Phaser.GameObjects.GameObject#setInteractive\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\r\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will disable it.\r\n *\r\n * An object that is disabled for input stops processing or being considered for\r\n * input events, but can be turned back on again at any time by simply calling\r\n * `setInteractive()` with no arguments provided.\r\n *\r\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#disableInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n disableInteractive: function ()\r\n {\r\n this.scene.sys.input.disable(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will queue it\r\n * for removal, causing it to no longer be interactive. The removal happens on\r\n * the next game step, it is not immediate.\r\n *\r\n * The Interactive Object that was assigned to this Game Object will be destroyed,\r\n * removed from the Input Manager and cleared from this Game Object.\r\n *\r\n * If you wish to re-enable this Game Object at a later date you will need to\r\n * re-create its InteractiveObject by calling `setInteractive` again.\r\n *\r\n * If you wish to only temporarily stop an object from receiving input then use\r\n * `disableInteractive` instead, as that toggles the interactive state, where-as\r\n * this erases it completely.\r\n *\r\n * If you wish to resize a hit area, don't remove and then set it as being\r\n * interactive. Instead, access the hitarea object directly and resize the shape\r\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\r\n * shape is a Rectangle, which it is by default.)\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n removeInteractive: function ()\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is added to a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to add themselves into the Update List.\r\n *\r\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addedToScene\r\n * @since 3.50.0\r\n */\r\n addedToScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is removed from a Scene.\r\n *\r\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\r\n * will use this, such as Sprites, to removed themselves from the Update List.\r\n *\r\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removedFromScene\r\n * @since 3.50.0\r\n */\r\n removedFromScene: function ()\r\n {\r\n },\r\n\r\n /**\r\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\r\n *\r\n * @method Phaser.GameObjects.GameObject#update\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - args\r\n */\r\n update: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Returns a JSON representation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n return ComponentsToJSON(this);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.GameObject#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n var listWillRender = (this.displayList && this.displayList.active) ? this.displayList.willRender(camera) : true;\r\n\r\n return !(!listWillRender || GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n },\r\n\r\n /**\r\n * Returns an array containing the display list index of either this Game Object, or if it has one,\r\n * its parent Container. It then iterates up through all of the parent containers until it hits the\r\n * root of the display list (which is index 0 in the returned array).\r\n *\r\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\r\n * this Game Object and all of its ancestors.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getIndexList\r\n * @since 3.4.0\r\n *\r\n * @return {number[]} An array of display list position indexes.\r\n */\r\n getIndexList: function ()\r\n {\r\n // eslint-disable-next-line consistent-this\r\n var child = this;\r\n var parent = this.parentContainer;\r\n\r\n var indexes = [];\r\n\r\n while (parent)\r\n {\r\n indexes.unshift(parent.getIndex(child));\r\n\r\n child = parent;\r\n\r\n if (!parent.parentContainer)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n parent = parent.parentContainer;\r\n }\r\n }\r\n\r\n if (this.displayList)\r\n {\r\n indexes.unshift(this.displayList.getIndex(child));\r\n }\r\n else\r\n {\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n }\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the given Display List.\r\n *\r\n * If no Display List is specified, it will default to the Display List owned by the Scene to which\r\n * this Game Object belongs.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely between them.\r\n *\r\n * If this Game Object is already on another Display List when this method is called, it will first\r\n * be removed from it, before being added to the new list.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any display list, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToDisplayList\r\n * @fires Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.GameObjects.DisplayList|Phaser.GameObjects.Layer)} [displayList] - The Display List to add to. Defaults to the Scene Display List.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToDisplayList: function (displayList)\r\n {\r\n if (displayList === undefined) { displayList = this.scene.sys.displayList; }\r\n\r\n if (this.displayList && this.displayList !== displayList)\r\n {\r\n this.removeFromDisplayList();\r\n }\r\n\r\n // Don't repeat if it's already on this list\r\n if (!displayList.exists(this))\r\n {\r\n this.displayList = displayList;\r\n\r\n displayList.add(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.emit(Events.ADDED_TO_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.ADDED_TO_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds this Game Object to the Update List belonging to the Scene.\r\n *\r\n * When a Game Object is added to the Update List it will have its `preUpdate` method called\r\n * every game frame. This method is passed two parameters: `delta` and `time`.\r\n *\r\n * If you wish to run your own logic within `preUpdate` then you should always call\r\n * `super.preUpdate(delta, time)` within it, or it may fail to process required operations,\r\n * such as Sprite animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#addToUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n addToUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Display List it is currently on.\r\n *\r\n * A Game Object can only exist on one Display List at any given time, but may move freely removed\r\n * and added back at a later stage.\r\n *\r\n * You can query which list it is on by looking at the `Phaser.GameObjects.GameObject#displayList` property.\r\n *\r\n * If a Game Object isn't on any Display List, it will not be rendered. If you just wish to temporarly\r\n * disable it from rendering, consider using the `setVisible` method, instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromDisplayList\r\n * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromDisplayList: function ()\r\n {\r\n var displayList = this.displayList || this.scene.sys.displayList;\r\n\r\n if (displayList && displayList.exists(this))\r\n {\r\n displayList.remove(this, true);\r\n\r\n displayList.queueDepthSort();\r\n\r\n this.displayList = null;\r\n\r\n this.emit(Events.REMOVED_FROM_SCENE, this, this.scene);\r\n\r\n displayList.events.emit(SceneEvents.REMOVED_FROM_SCENE, this, this.scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes this Game Object from the Scene's Update List.\r\n *\r\n * When a Game Object is on the Update List, it will have its `preUpdate` method called\r\n * every game frame. Calling this method will remove it from the list, preventing this.\r\n *\r\n * Removing a Game Object from the Update List will stop most internal functions working.\r\n * For example, removing a Sprite from the Update List will prevent it from being able to\r\n * run animations.\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeFromUpdateList\r\n * @since 3.53.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removeFromUpdateList: function ()\r\n {\r\n if (this.scene && this.preUpdate)\r\n {\r\n this.scene.sys.updateList.remove(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Game Object removing it from the Display List and Update List and\r\n * severing all ties to parent resources.\r\n *\r\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\r\n *\r\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\r\n * As long as no reference to it exists within your own code it should become free for\r\n * garbage collection by the browser.\r\n *\r\n * If you just want to temporarily disable an object then look at using the\r\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\r\n *\r\n * @method Phaser.GameObjects.GameObject#destroy\r\n * @fires Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [fromScene=false] - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\n destroy: function (fromScene)\r\n {\r\n // This Game Object has already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n if (fromScene === undefined) { fromScene = false; }\r\n\r\n if (this.preDestroy)\r\n {\r\n this.preDestroy.call(this);\r\n }\r\n\r\n this.emit(Events.DESTROY, this, fromScene);\r\n\r\n this.removeAllListeners();\r\n\r\n if (this.postPipelines)\r\n {\r\n this.resetPostPipeline(true);\r\n }\r\n\r\n this.removeFromDisplayList();\r\n this.removeFromUpdateList();\r\n\r\n if (this.input)\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n }\r\n\r\n if (this.data)\r\n {\r\n this.data.destroy();\r\n\r\n this.data = undefined;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.body.destroy();\r\n\r\n this.body = undefined;\r\n }\r\n\r\n if (this.preFX)\r\n {\r\n this.preFX.destroy();\r\n\r\n this.preFX = undefined;\r\n }\r\n\r\n if (this.postFX)\r\n {\r\n this.postFX.destroy();\r\n\r\n this.postFX = undefined;\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n this.parentContainer = undefined;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\r\n *\r\n * @constant {number} RENDER_MASK\r\n * @memberof Phaser.GameObjects.GameObject\r\n * @default\r\n */\r\nGameObject.RENDER_MASK = 15;\r\n\r\nmodule.exports = GameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar PluginCache = require('../plugins/PluginCache');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and have them automatically registered with the Scene.\r\n *\r\n * Game Objects directly register themselves with the Factory and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectFactory\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectFactory = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectFactory (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Factory belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @protected\r\n * @since 3.50.0\r\n */\r\n this.events = scene.sys.events;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n this.events.once(SceneEvents.BOOT, this.boot, this);\r\n this.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Game Object to this Scene.\r\n *\r\n * If the Game Object renders, it will be added to the Display List.\r\n * If it has a `preUpdate` method, it will be added to the Update List.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#existing\r\n * @since 3.0.0\r\n *\r\n * @generic {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} G - [child,$return]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.Group|Phaser.GameObjects.Layer)} child - The child to be added to this Scene.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\r\n */\r\n existing: function (child)\r\n {\r\n if (child.renderCanvas || child.renderWebGL)\r\n {\r\n this.displayList.add(child);\r\n }\r\n\r\n // For when custom objects have overridden `preUpdate` but don't hook into the ADDED_TO_SCENE event:\r\n // Adding to the list multiple times is safe, as it won't add duplicates into the list anyway.\r\n if (child.preUpdate)\r\n {\r\n this.updateList.add(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.events = null;\r\n\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can register a custom GameObject factory in the GameObjectFactory,\r\n * providing a name (`factoryType`) and the constructor (`factoryFunction`) in order\r\n * to be called when you call to Phaser.Scene.add[ factoryType ] method.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.register\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you will use to call to Phaser.Scene.add[ factoryType ] method.\r\n * @param {function} factoryFunction - The constructor function to be called when you invoke to the Phaser.Scene.add method.\r\n */\r\nGameObjectFactory.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectFactory.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\n/**\r\n * Static method called directly by the Game Object factory functions.\r\n * With this method you can remove a custom GameObject factory registered in the GameObjectFactory,\r\n * providing a its `factoryType`.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory.remove\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {string} factoryType - The key of the factory that you want to remove from the GameObjectFactory.\r\n */\r\nGameObjectFactory.remove = function (factoryType)\r\n{\r\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectFactory.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register('GameObjectFactory', GameObjectFactory, 'add');\r\n\r\nmodule.exports = GameObjectFactory;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TransformMatrix = require('./components/TransformMatrix');\r\n\r\nvar tempMatrix1 = new TransformMatrix();\r\nvar tempMatrix2 = new TransformMatrix();\r\nvar tempMatrix3 = new TransformMatrix();\r\n\r\nvar result = { camera: tempMatrix1, sprite: tempMatrix2, calc: tempMatrix3 };\r\n\r\n/**\r\n * Calculates the Transform Matrix of the given Game Object and Camera, factoring in\r\n * the parent matrix if provided.\r\n *\r\n * Note that the object this results contains _references_ to the Transform Matrices,\r\n * not new instances of them. Therefore, you should use their values immediately, or\r\n * copy them to your own matrix, as they will be replaced as soon as another Game\r\n * Object is rendered.\r\n *\r\n * @function Phaser.GameObjects.GetCalcMatrix\r\n * @memberof Phaser.GameObjects\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} src - The Game Object to calculate the transform matrix for.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera being used to render the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - The transform matrix of the parent container, if any.\r\n *\r\n * @return {Phaser.Types.GameObjects.GetCalcMatrixResults} The results object containing the updated transform matrices.\r\n */\r\nvar GetCalcMatrix = function (src, camera, parentMatrix)\r\n{\r\n var camMatrix = tempMatrix1;\r\n var spriteMatrix = tempMatrix2;\r\n var calcMatrix = tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = GetCalcMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha property of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.AlphaSingle\r\n * @since 3.22.0\r\n */\r\n\r\nvar AlphaSingle = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = AlphaSingle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../../renderer/BlendModes');\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string|number)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * NORMAL\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes|number)} value - The BlendMode value. Either a string, a CONST or a number.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.displayList)\r\n {\r\n this.displayList.queueDepthSort();\r\n }\r\n\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n *\r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n *\r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The depth of this Game Object. Ensure this value is only ever a number data-type.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Effects = require('../../fx/');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * @classdesc\r\n * The FX Component features a set of methods used for applying a range of special built-in effects to a Game Object.\r\n *\r\n * The effects include the following:\r\n *\r\n * * Barrel Distortion\r\n * * Bloom\r\n * * Blur\r\n * * Bokeh / Tilt Shift\r\n * * Circle Outline\r\n * * Color Matrix\r\n * * Glow\r\n * * Displacement\r\n * * Gradient\r\n * * Pixelate\r\n * * Shine\r\n * * Shadow\r\n * * Vignette\r\n * * Wipe / Reveal\r\n *\r\n * All Game Objects support Post FX. These are effects applied after the Game Object has been rendered.\r\n *\r\n * Texture-based Game Objects also support Pre FX, including:\r\n *\r\n * * Image\r\n * * Sprite\r\n * * TileSprite\r\n * * Text\r\n * * RenderTexture\r\n * * Video\r\n *\r\n * And any Game Object that extends the above.\r\n *\r\n * The difference between Pre FX and Post FX are that all Post FX take place in a canvas (renderer) sized frame buffer,\r\n * after the Game Object has been rendered. Pre FX, however, take place in a texture sized frame buffer, which is sized\r\n * based on the Game Object itself. The end result is then composited back to the main game canvas. For intensive effects,\r\n * such as blur, bloom or glow, which can require many iterations, this is a much more efficient way to apply the effect,\r\n * as only it only has to work on a Game Object sized texture and not all pixels in the canvas.\r\n *\r\n * In short, you should always try and use a Pre FX if you can.\r\n *\r\n * Due to the way that FX work they can be stacked-up. For example, you can apply a blur to a Game Object, then apply\r\n * a bloom effect to the same Game Object. The bloom effect will be applied to the blurred texture, not the original.\r\n * Keep the order in mind when stacking effects.\r\n *\r\n * All effects are WebGL only and do not have canvas counterparts.\r\n *\r\n * As you can appreciate, some effects are more expensive than others. For example, a bloom effect is going to be more\r\n * expensive than a simple color matrix effect, so please consider using them wisely and performance test your target\r\n * platforms early on in production.\r\n *\r\n * This component is created automatically by the `PostPipeline` class and does not need to be instantiated directly.\r\n *\r\n * @class FX\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.60.0\r\n * @webglOnly\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that owns this FX Component.\r\n * @param {boolean} isPost - Is this a Pre or Post FX Component?\r\n */\r\nvar FX = new Class({\r\n\r\n initialize:\r\n\r\n function FX (gameObject, isPost)\r\n {\r\n /**\r\n * A reference to the Game Object that owns this FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.60.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Is this a Post FX Controller? or a Pre FX Controller?\r\n *\r\n * @name Phaser.GameObjects.Components.FX#isPost\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.60.0\r\n */\r\n this.isPost = isPost;\r\n\r\n /**\r\n * Has this FX Component been enabled?\r\n *\r\n * You should treat this property as read-only, although it is toggled\r\n * automaticaly during internal use.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#enabled\r\n * @type {boolean}\r\n * @since 3.60.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * An array containing all of the Pre FX Controllers that\r\n * have been added to this FX Component. They are processed in\r\n * the order they are added.\r\n *\r\n * This array is empty if this is a Post FX Component.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#list\r\n * @type {Phaser.FX.Controller[]}\r\n * @since 3.60.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * The amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * You do not need to set this if you're only using Post FX.\r\n *\r\n * @name Phaser.GameObjects.Components.FX#padding\r\n * @type {number}\r\n * @default 0\r\n * @since 3.60.0\r\n */\r\n this.padding = 0;\r\n },\r\n\r\n /**\r\n * Sets the amount of extra padding to be applied to this Game Object\r\n * when it is being rendered by a PreFX Pipeline.\r\n *\r\n * Lots of FX require additional spacing added to the texture the\r\n * Game Object uses, for example a glow or shadow effect, and this\r\n * method allows you to control how much extra padding is included\r\n * in addition to the texture size.\r\n *\r\n * You do not need to set this if you're only using Post FX.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#setPadding\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPadding: function (padding)\r\n {\r\n if (padding === undefined) { padding = 0; }\r\n\r\n this.padding = padding;\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is copied by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `copySprite` method.\r\n *\r\n * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFXCopy\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFXCopy: function ()\r\n {\r\n },\r\n\r\n /**\r\n * This callback is invoked when this Game Object is rendered by a PreFX Pipeline.\r\n *\r\n * This happens when the pipeline uses its `drawSprite` method.\r\n *\r\n * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#onFX\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback.\r\n */\r\n onFX: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Enables this FX Component and applies the FXPipeline to the parent Game Object.\r\n *\r\n * This is called automatically whenever you call a method such as `addBloom`, etc.\r\n *\r\n * You can check the `enabled` property to see if the Game Object is already enabled, or not.\r\n *\r\n * This only applies to Pre FX. Post FX are always enabled.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#enable\r\n * @since 3.60.0\r\n *\r\n * @param {number} [padding=0] - The amount of padding to add to this Game Object.\r\n */\r\n enable: function (padding)\r\n {\r\n if (this.isPost)\r\n {\r\n return;\r\n }\r\n\r\n var renderer = this.gameObject.scene.sys.renderer;\r\n\r\n if (renderer && renderer.pipelines)\r\n {\r\n this.gameObject.pipeline = renderer.pipelines.FX_PIPELINE;\r\n\r\n if (padding !== undefined)\r\n {\r\n this.padding = padding;\r\n }\r\n\r\n this.enabled = true;\r\n }\r\n else\r\n {\r\n this.enabled = false;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys and removes all FX Controllers that are part of this FX Component,\r\n * then disables it.\r\n *\r\n * If this is a Pre FX Component it will only remove Pre FX.\r\n * If this is a Post FX Component it will only remove Post FX.\r\n *\r\n * To remove both at once use the `GameObject.clearFX` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#clear\r\n * @since 3.60.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clear: function ()\r\n {\r\n if (this.isPost)\r\n {\r\n this.gameObject.resetPostPipeline(true);\r\n }\r\n else\r\n {\r\n var list = this.list;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].destroy();\r\n }\r\n\r\n this.list = [];\r\n }\r\n\r\n this.enabled = false;\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * Searches for the given FX Controller within this FX Component.\r\n *\r\n * If found, the controller is removed from this component and then destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#remove\r\n * @since 3.60.0\r\n *\r\n * @generic {Phaser.FX.Controller} T\r\n * @genericUse {T} - [fx]\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX Component.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n remove: function (fx)\r\n {\r\n var i;\r\n\r\n if (this.isPost)\r\n {\r\n var pipelines = this.gameObject.getPostPipeline(String(fx.type));\r\n\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (i = 0; i < pipelines.length; i++)\r\n {\r\n var pipeline = pipelines[i];\r\n\r\n if (pipeline.controller === fx)\r\n {\r\n this.gameObject.removePostPipeline(pipeline);\r\n\r\n fx.destroy();\r\n\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n var list = this.list;\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n if (list[i] === fx)\r\n {\r\n SpliceOne(list, i);\r\n\r\n fx.destroy();\r\n }\r\n }\r\n }\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * Disables this FX Component.\r\n *\r\n * This will reset the pipeline on the Game Object that owns this component back to its\r\n * default and flag this component as disabled.\r\n *\r\n * You can re-enable it again by calling `enable` for Pre FX or by adding an FX for Post FX.\r\n *\r\n * Optionally, set `clear` to destroy all current FX Controllers.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#disable\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [clear=false] - Destroy and remove all FX Controllers that are part of this component.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n disable: function (clear)\r\n {\r\n if (clear === undefined) { clear = false; }\r\n\r\n if (!this.isPost)\r\n {\r\n this.gameObject.resetPipeline();\r\n }\r\n\r\n this.enabled = false;\r\n\r\n if (clear)\r\n {\r\n this.clear();\r\n }\r\n\r\n return this.gameObject;\r\n },\r\n\r\n /**\r\n * Adds the given FX Controler to this FX Component.\r\n *\r\n * Note that adding an FX Controller does not remove any existing FX. They all stack-up\r\n * on-top of each other. If you don't want this, make sure to call either `remove` or\r\n * `clear` first.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#add\r\n * @since 3.60.0\r\n *\r\n * @generic {Phaser.FX.Controller} T\r\n * @genericUse {T} - [fx]\r\n *\r\n * @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX Component.\r\n * @param {object} [config] - Optional configuration object that is passed to the pipeline during instantiation.\r\n *\r\n * @return {Phaser.FX.Controller} The FX Controller.\r\n */\r\n add: function (fx, config)\r\n {\r\n if (this.isPost)\r\n {\r\n var type = String(fx.type);\r\n\r\n this.gameObject.setPostPipeline(type, config);\r\n\r\n var pipeline = this.gameObject.getPostPipeline(type);\r\n\r\n if (pipeline)\r\n {\r\n if (Array.isArray(pipeline))\r\n {\r\n pipeline = pipeline.pop();\r\n }\r\n\r\n pipeline.controller = fx;\r\n\r\n return fx;\r\n }\r\n }\r\n else\r\n {\r\n if (!this.enabled)\r\n {\r\n this.enable();\r\n }\r\n\r\n this.list.push(fx);\r\n\r\n return fx;\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Glow effect.\r\n *\r\n * The glow effect is a visual technique that creates a soft, luminous halo around game objects,\r\n * characters, or UI elements. This effect is used to emphasize importance, enhance visual appeal,\r\n * or convey a sense of energy, magic, or otherworldly presence. The effect can also be set on\r\n * the inside of the Game Object. The color and strength of the glow can be modified.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGlow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color=0xffffff] - The color of the glow effect as a number value.\r\n * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite.\r\n * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite.\r\n * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself.\r\n * @param {number} [quality=0.1] - Only available for PostFX. Sets the quality of this Glow effect. Default is 0.1. Cannot be changed post-creation.\r\n * @param {number} [distance=10] - Only available for PostFX. Sets the distance of this Glow effect. Default is 10. Cannot be changed post-creation.\r\n *\r\n * @return {Phaser.FX.Glow} The Glow FX Controller.\r\n */\r\n addGlow: function (color, outerStrength, innerStrength, knockout, quality, distance)\r\n {\r\n return this.add(new Effects.Glow(this.gameObject, color, outerStrength, innerStrength, knockout), { quality: quality, distance: distance });\r\n },\r\n\r\n /**\r\n * Adds a Shadow effect.\r\n *\r\n * The shadow effect is a visual technique used to create the illusion of depth and realism by adding darker,\r\n * offset silhouettes or shapes beneath game objects, characters, or environments. These simulated shadows\r\n * help to enhance the visual appeal and immersion, making the 2D game world appear more dynamic and three-dimensional.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShadow\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0] - The horizontal offset of the shadow effect.\r\n * @param {number} [y=0] - The vertical offset of the shadow effect.\r\n * @param {number} [decay=0.1] - The amount of decay for shadow effect.\r\n * @param {number} [power=1] - The power of the shadow effect.\r\n * @param {number} [color=0x000000] - The color of the shadow.\r\n * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12.\r\n * @param {number} [intensity=1] - The intensity of the shadow effect.\r\n *\r\n * @return {Phaser.FX.Shadow} The Shadow FX Controller.\r\n */\r\n addShadow: function (x, y, decay, power, color, samples, intensity)\r\n {\r\n return this.add(new Effects.Shadow(this.gameObject, x, y, decay, power, color, samples, intensity));\r\n },\r\n\r\n /**\r\n * Adds a Pixelate effect.\r\n *\r\n * The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image,\r\n * creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic\r\n * purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as\r\n * during a transition or to censor specific content.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addPixelate\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of pixelation to apply.\r\n *\r\n * @return {Phaser.FX.Pixelate} The Pixelate FX Controller.\r\n */\r\n addPixelate: function (amount)\r\n {\r\n return this.add(new Effects.Pixelate(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Vignette effect.\r\n *\r\n * The vignette effect is a visual technique where the edges of the screen, or a Game Object, gradually darken or blur,\r\n * creating a frame-like appearance. This effect is used to draw the player's focus towards the central action or subject,\r\n * enhance immersion, and provide a cinematic or artistic quality to the game's visuals.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addVignette\r\n * @since 3.60.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1.\r\n * @param {number} [strength=0.5] - The strength of the vignette effect.\r\n *\r\n * @return {Phaser.FX.Vignette} The Vignette FX Controller.\r\n */\r\n addVignette: function (x, y, radius, strength)\r\n {\r\n return this.add(new Effects.Vignette(this.gameObject, x, y, radius, strength));\r\n },\r\n\r\n /**\r\n * Adds a Shine effect.\r\n *\r\n * The shine effect is a visual technique that simulates the appearance of reflective\r\n * or glossy surfaces by passing a light beam across a Game Object. This effect is used to\r\n * enhance visual appeal, emphasize certain features, and create a sense of depth or\r\n * material properties.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addShine\r\n * @since 3.60.0\r\n *\r\n * @param {number} [speed=0.5] - The speed of the Shine effect.\r\n * @param {number} [lineWidth=0.5] - The line width of the Shine effect.\r\n * @param {number} [gradient=3] - The gradient of the Shine effect.\r\n * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target?\r\n *\r\n * @return {Phaser.FX.Shine} The Shine FX Controller.\r\n */\r\n addShine: function (speed, lineWidth, gradient, reveal)\r\n {\r\n return this.add(new Effects.Shine(this.gameObject, speed, lineWidth, gradient, reveal));\r\n },\r\n\r\n /**\r\n * Adds a Blur effect.\r\n *\r\n * A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect,\r\n * typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a\r\n * smooth blur resembling that of viewing the image through a translucent screen, distinctly different\r\n * from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBlur\r\n * @since 3.60.0\r\n *\r\n * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality.\r\n * @param {number} [x=2] - The horizontal offset of the blur effect.\r\n * @param {number} [y=2] - The vertical offset of the blur effect.\r\n * @param {number} [strength=1] - The strength of the blur effect.\r\n * @param {number} [color=0xffffff] - The color of the blur, as a hex value.\r\n * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Blur} The Blur FX Controller.\r\n */\r\n addBlur: function (quality, x, y, strength, color, steps)\r\n {\r\n return this.add(new Effects.Blur(this.gameObject, quality, x, y, strength, color, steps));\r\n },\r\n\r\n /**\r\n * Adds a Gradient effect.\r\n *\r\n * The gradient overlay effect is a visual technique where a smooth color transition is applied over Game Objects,\r\n * such as sprites or UI components. This effect is used to enhance visual appeal, emphasize depth, or create\r\n * stylistic and atmospheric variations. It can also be utilized to convey information, such as representing\r\n * progress or health status through color changes.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addGradient\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color1=0xff0000] - The first gradient color, given as a number value.\r\n * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value.\r\n * @param {number} [alpha=0.2] - The alpha value of the gradient effect.\r\n * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels.\r\n * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect.\r\n *\r\n * @return {Phaser.FX.Gradient} The Gradient FX Controller.\r\n */\r\n addGradient: function (color1, color2, alpha, fromX, fromY, toX, toY, size)\r\n {\r\n return this.add(new Effects.Gradient(this.gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size));\r\n },\r\n\r\n /**\r\n * Adds a Bloom effect.\r\n *\r\n * Bloom is an effect used to reproduce an imaging artifact of real-world cameras.\r\n * The effect produces fringes of light extending from the borders of bright areas in an image,\r\n * contributing to the illusion of an extremely bright light overwhelming the\r\n * camera or eye capturing the scene.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBloom\r\n * @since 3.60.0\r\n *\r\n * @param {number} [color] - The color of the Bloom, as a hex value.\r\n * @param {number} [offsetX=1] - The horizontal offset of the bloom effect.\r\n * @param {number} [offsetY=1] - The vertical offset of the bloom effect.\r\n * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect.\r\n * @param {number} [strength=1] - The strength of the blend process of the bloom effect.\r\n * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer.\r\n *\r\n * @return {Phaser.FX.Bloom} The Bloom FX Controller.\r\n */\r\n addBloom: function (color, offsetX, offsetY, blurStrength, strength, steps)\r\n {\r\n return this.add(new Effects.Bloom(this.gameObject, color, offsetX, offsetY, blurStrength, strength, steps));\r\n },\r\n\r\n /**\r\n * Adds a ColorMatrix effect.\r\n *\r\n * The color matrix effect is a visual technique that involves manipulating the colors of an image\r\n * or scene using a mathematical matrix. This process can adjust hue, saturation, brightness, and contrast,\r\n * allowing developers to create various stylistic appearances or mood settings within the game.\r\n * Common applications include simulating different lighting conditions, applying color filters,\r\n * or achieving a specific visual style.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addColorMatrix\r\n * @since 3.60.0\r\n *\r\n * @return {Phaser.FX.ColorMatrix} The ColorMatrix FX Controller.\r\n */\r\n addColorMatrix: function ()\r\n {\r\n return this.add(new Effects.ColorMatrix(this.gameObject));\r\n },\r\n\r\n /**\r\n * Adds a Circle effect.\r\n *\r\n * This effect will draw a circle around the texture of the Game Object, effectively masking off\r\n * any area outside of the circle without the need for an actual mask. You can control the thickness\r\n * of the circle, the color of the circle and the color of the background, should the texture be\r\n * transparent. You can also control the feathering applied to the circle, allowing for a harsh or soft edge.\r\n *\r\n * Please note that adding this effect to a Game Object will not change the input area or physics body of\r\n * the Game Object, should it have one.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addCircle\r\n * @since 3.60.0\r\n *\r\n * @param {number} [thickness=8] - The width of the circle around the texture, in pixels.\r\n * @param {number} [color=0xfeedb6] - The color of the circular ring, given as a number value.\r\n * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value.\r\n * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture.\r\n * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring.\r\n *\r\n * @return {Phaser.FX.Circle} The Circle FX Controller.\r\n */\r\n addCircle: function (thickness, color, backgroundColor, scale, feather)\r\n {\r\n return this.add(new Effects.Circle(this.gameObject, thickness, color, backgroundColor, scale, feather));\r\n },\r\n\r\n /**\r\n * Adds a Barrel effect.\r\n *\r\n * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to\r\n * a Game Object. The amount of the effect can be modified in real-time.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBarrel\r\n * @since 3.60.0\r\n *\r\n * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.\r\n *\r\n * @return {Phaser.FX.Barrel} The Barrel FX Controller.\r\n */\r\n addBarrel: function (amount)\r\n {\r\n return this.add(new Effects.Barrel(this.gameObject, amount));\r\n },\r\n\r\n /**\r\n * Adds a Displacement effect.\r\n *\r\n * The displacement effect is a visual technique that alters the position of pixels in an image\r\n * or texture based on the values of a displacement map. This effect is used to create the illusion\r\n * of depth, surface irregularities, or distortion in otherwise flat elements. It can be applied to\r\n * characters, objects, or backgrounds to enhance realism, convey movement, or achieve various\r\n * stylistic appearances.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addDisplacement\r\n * @since 3.60.0\r\n *\r\n * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager.\r\n * @param {number} [x=0.005] - The amount of horizontal displacement to apply. A very small float number, such as 0.005.\r\n * @param {number} [y=0.005] - The amount of vertical displacement to apply. A very small float number, such as 0.005.\r\n *\r\n * @return {Phaser.FX.Displacement} The Displacement FX Controller.\r\n */\r\n addDisplacement: function (texture, x, y)\r\n {\r\n return this.add(new Effects.Displacement(this.gameObject, texture, x, y));\r\n },\r\n\r\n /**\r\n * Adds a Wipe effect.\r\n *\r\n * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements\r\n * in the game, such as images, text, or scene transitions. This effect is often used to create\r\n * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition\r\n * between game states.\r\n *\r\n * You can set both the direction and the axis of the wipe effect. The following combinations are possible:\r\n *\r\n * * left to right: direction 0, axis 0\r\n * * right to left: direction 1, axis 0\r\n * * top to bottom: direction 1, axis 1\r\n * * bottom to top: direction 1, axis 0\r\n *\r\n * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addWipe\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addWipe: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis));\r\n },\r\n\r\n /**\r\n * Adds a Reveal Wipe effect.\r\n *\r\n * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements\r\n * in the game, such as images, text, or scene transitions. This effect is often used to create\r\n * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition\r\n * between game states.\r\n *\r\n * You can set both the direction and the axis of the wipe effect. The following combinations are possible:\r\n *\r\n * * left to right: direction 0, axis 0\r\n * * right to left: direction 1, axis 0\r\n * * top to bottom: direction 1, axis 1\r\n * * bottom to top: direction 1, axis 0\r\n *\r\n * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addReveal\r\n * @since 3.60.0\r\n *\r\n * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1.\r\n * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property.\r\n * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property.\r\n *\r\n * @return {Phaser.FX.Wipe} The Wipe FX Controller.\r\n */\r\n addReveal: function (wipeWidth, direction, axis)\r\n {\r\n return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis, true));\r\n },\r\n\r\n /**\r\n * Adds a Bokeh effect.\r\n *\r\n * Bokeh refers to a visual effect that mimics the photographic technique of creating a shallow depth of field.\r\n * This effect is used to emphasize the game's main subject or action, by blurring the background or foreground\r\n * elements, resulting in a more immersive and visually appealing experience. It is achieved through rendering\r\n * techniques that simulate the out-of-focus areas, giving a sense of depth and realism to the game's graphics.\r\n *\r\n * See also Tilt Shift.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addBokeh\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh FX Controller.\r\n */\r\n addBokeh: function (radius, amount, contrast)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast));\r\n },\r\n\r\n /**\r\n * Adds a Tilt Shift effect.\r\n *\r\n * This Bokeh effect can also be used to generate a Tilt Shift effect, which is a technique used to create a miniature\r\n * effect by blurring everything except a small area of the image. This effect is achieved by blurring the\r\n * top and bottom elements, while keeping the center area in focus.\r\n *\r\n * See also Bokeh.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#addTiltShift\r\n * @since 3.60.0\r\n *\r\n * @param {number} [radius=0.5] - The radius of the bokeh effect.\r\n * @param {number} [amount=1] - The amount of the bokeh effect.\r\n * @param {number} [contrast=0.2] - The color contrast of the bokeh effect.\r\n * @param {number} [blurX=1] - The amount of horizontal blur.\r\n * @param {number} [blurY=1] - The amount of vertical blur.\r\n * @param {number} [strength=1] - The strength of the blur.\r\n *\r\n * @return {Phaser.FX.Bokeh} The Bokeh TiltShift FX Controller.\r\n */\r\n addTiltShift: function (radius, amount, contrast, blurX, blurY, strength)\r\n {\r\n return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast, true, blurX, blurY, strength));\r\n },\r\n\r\n /**\r\n * Destroys this FX Component.\r\n *\r\n * Called automatically when Game Objects are destroyed.\r\n *\r\n * @method Phaser.GameObjects.Components.FX#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.clear();\r\n\r\n this.gameObject = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FX;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n *\r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n *\r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n *\r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar RotateAround = require('../../math/RotateAround');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getCenter: function (output, includeParent)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n *\r\n * The returned point is calculated in local space and does not factor in any parent Containers,\r\n * unless the `includeParent` argument is set to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} O - [output,$return]\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n *\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is\r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = require('../../display/mask/BitmapMask');\r\nvar GeometryMask = require('../../display/mask/GeometryMask');\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n *\r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n *\r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one, or a Dynamic Texture.\r\n *\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable texture-based Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G\r\n * @generic {Phaser.Textures.DynamicTexture} T\r\n * @genericUse {(G|T|null)} [maskObject]\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.Textures.DynamicTexture)} [maskObject] - The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments.\r\n * @param {number} [x] - If creating a Game Object, the horizontal position in the world.\r\n * @param {number} [y] - If creating a Game Object, the vertical position in the world.\r\n * @param {(string|Phaser.Textures.Texture)} [texture] - If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager.\r\n * @param {(string|number|Phaser.Textures.Frame)} [frame] - If creating a Game Object, an optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (maskObject, x, y, texture, frame)\r\n {\r\n if (maskObject === undefined && (this.texture || this.shader || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n maskObject = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, maskObject, x, y, texture, frame);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n *\r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G\r\n * @generic {Phaser.GameObjects.Shape} S\r\n * @genericUse {(G|S)} [graphics]\r\n *\r\n * @param {Phaser.GameObjects.Graphics|Phaser.GameObjects.Shape} [graphics] - A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && (this.type === 'Graphics' || this.geom))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n * Set this value with `setOrigin()`.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @readonly\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = require('../../math/DegToRad');\r\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar TWEEN_CONST = require('../../tweens/tween/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The distance the follower has traveled from the previous point to the current one, at the last update.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathDelta\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.23.0\r\n */\r\n pathDelta: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.setTargetValue();\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n if (!this.pathDelta)\r\n {\r\n this.pathDelta = new Vector2();\r\n }\r\n\r\n this.pathDelta.reset();\r\n\r\n config.persist = true;\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n var pathDelta = this.pathDelta;\r\n var pathVector = this.pathVector;\r\n\r\n pathDelta.copy(pathVector).negate();\r\n\r\n if (tweenData.state === TWEEN_CONST.COMPLETE)\r\n {\r\n this.path.getPoint(tweenData.end, pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n return;\r\n }\r\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * If you call `resetPipeline` on this Game Object, the pipeline is reset to this default.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.50.0\r\n */\r\n pipelineData: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n *\r\n * This should only be called during the instantiation of the Game Object. After that, use `setPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipeline)\r\n {\r\n this.pipelineData = {};\r\n\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return false;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n if (pipeline === undefined)\r\n {\r\n pipeline = pipelines.default;\r\n }\r\n\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.defaultPipeline = instance;\r\n this.pipeline = instance;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the main WebGL Pipeline of this Game Object.\r\n *\r\n * Also sets the `pipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `pipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `pipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipeline, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelines = renderer.pipelines;\r\n\r\n if (pipelines)\r\n {\r\n var instance = pipelines.get(pipeline);\r\n\r\n if (instance)\r\n {\r\n this.pipeline = instance;\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.pipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `pipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipelineData\r\n * @webglOnly\r\n * @since 3.50.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipelineData: function (key, value)\r\n {\r\n var data = this.pipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `pipelineData` object to being an empty object?\r\n *\r\n * @return {boolean} `true` if the pipeline was reset successfully, otherwise `false`.\r\n */\r\n resetPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n this.pipeline = this.defaultPipeline;\r\n\r\n if (resetData)\r\n {\r\n this.pipelineData = {};\r\n }\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DeepCopy = require('../../utils/object/DeepCopy');\r\nvar FX = require('../components/FX');\r\nvar SpliceOne = require('../../utils/array/SpliceOne');\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering post pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n\r\nvar PostPipeline = {\r\n\r\n /**\r\n * Does this Game Object have any Post Pipelines set?\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#hasPostPipeline\r\n * @type {boolean}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n hasPostPipeline: false,\r\n\r\n /**\r\n * The WebGL Post FX Pipelines this Game Object uses for post-render effects.\r\n *\r\n * The pipelines are processed in the order in which they appear in this array.\r\n *\r\n * If you modify this array directly, be sure to set the\r\n * `hasPostPipeline` property accordingly.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelines\r\n * @type {Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[]}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelines: null,\r\n\r\n /**\r\n * An object to store pipeline specific data in, to be read by the pipelines this Game Object uses.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postPipelineData\r\n * @type {object}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postPipelineData: null,\r\n\r\n /**\r\n * The Pre FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.preFX.addBloom();\r\n * ```\r\n *\r\n * Only the following Game Objects support Pre FX:\r\n *\r\n * * Image\r\n * * Sprite\r\n * * TileSprite\r\n * * Text\r\n * * RenderTexture\r\n * * Video\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#preFX\r\n * @type {?Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n preFX: null,\r\n\r\n /**\r\n * The Post FX component of this Game Object.\r\n *\r\n * This component allows you to apply a variety of built-in effects to this Game Object, such\r\n * as glow, blur, bloom, displacements, vignettes and more. You access them via this property,\r\n * for example:\r\n *\r\n * ```js\r\n * const player = this.add.sprite();\r\n * player.postFX.addBloom();\r\n * ```\r\n *\r\n * All FX are WebGL only and do not have Canvas counterparts.\r\n *\r\n * Please see the FX Class for more details and available methods.\r\n *\r\n * This property is always `null` until the `initPostPipeline` method is called.\r\n *\r\n * @name Phaser.GameObjects.Components.PostPipeline#postFX\r\n * @type {Phaser.GameObjects.Components.FX}\r\n * @webglOnly\r\n * @since 3.60.0\r\n */\r\n postFX: null,\r\n\r\n /**\r\n * This should only be called during the instantiation of the Game Object.\r\n *\r\n * It is called by default by all core Game Objects and doesn't need\r\n * calling again.\r\n *\r\n * After that, use `setPostPipeline`.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#initPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [preFX=false] - Does this Game Object support Pre FX?\r\n */\r\n initPostPipeline: function (preFX)\r\n {\r\n this.postPipelines = [];\r\n this.postPipelineData = {};\r\n\r\n this.postFX = new FX(this, true);\r\n\r\n if (preFX)\r\n {\r\n this.preFX = new FX(this, false);\r\n }\r\n },\r\n\r\n /**\r\n * Sets one, or more, Post Pipelines on this Game Object.\r\n *\r\n * Post Pipelines are invoked after this Game Object has rendered to its target and\r\n * are commonly used for post-fx.\r\n *\r\n * The post pipelines are appended to the `postPipelines` array belonging to this\r\n * Game Object. When the renderer processes this Game Object, it iterates through the post\r\n * pipelines in the order in which they appear in the array. If you are stacking together\r\n * multiple effects, be aware that the order is important.\r\n *\r\n * If you call this method multiple times, the new pipelines will be appended to any existing\r\n * post pipelines already set. Use the `resetPostPipeline` method to clear them first, if required.\r\n *\r\n * You can optionally also set the `postPipelineData` property, if the parameter is given.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|string[]|function|function[]|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} pipelines - Either the string-based name of the pipeline, or a pipeline instance, or class, or an array of them.\r\n * @param {object} [pipelineData] - Optional pipeline data object that is set in to the `postPipelineData` property of this Game Object.\r\n * @param {boolean} [copyData=true] - Should the pipeline data object be _deep copied_ into the `postPipelineData` property of this Game Object? If `false` it will be set by reference instead.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipeline: function (pipelines, pipelineData, copyData)\r\n {\r\n var renderer = this.scene.sys.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return this;\r\n }\r\n\r\n var pipelineManager = renderer.pipelines;\r\n\r\n if (pipelineManager)\r\n {\r\n if (!Array.isArray(pipelines))\r\n {\r\n pipelines = [ pipelines ];\r\n }\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelineManager.getPostPipeline(pipelines[i], this, pipelineData);\r\n\r\n if (instance)\r\n {\r\n this.postPipelines.push(instance);\r\n }\r\n }\r\n\r\n if (pipelineData)\r\n {\r\n this.postPipelineData = (copyData) ? DeepCopy(pipelineData) : pipelineData;\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an entry to the `postPipelineData` object belonging to this Game Object.\r\n *\r\n * If the 'key' already exists, its value is updated. If it doesn't exist, it is created.\r\n *\r\n * If `value` is undefined, and `key` exists, `key` is removed from the data object.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#setPostPipelineData\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string} key - The key of the pipeline data to set, update, or delete.\r\n * @param {any} [value] - The value to be set with the key. If `undefined` then `key` will be deleted from the object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPostPipelineData: function (key, value)\r\n {\r\n var data = this.postPipelineData;\r\n\r\n if (value === undefined)\r\n {\r\n delete data[key];\r\n }\r\n else\r\n {\r\n data[key] = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Post Pipeline instance from this Game Object, based on the given name, and returns it.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#getPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {(string|function|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline)} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {(Phaser.Renderer.WebGL.Pipelines.PostFXPipeline|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline[])} An array of all the Post Pipelines matching the name. This array will be empty if there was no match. If there was only one single match, that pipeline is returned directly, not in an array.\r\n */\r\n getPostPipeline: function (pipeline)\r\n {\r\n var isString = (typeof pipeline === 'string');\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n var results = [];\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if ((isString && instance.name === pipeline) || (!isString && instance instanceof pipeline))\r\n {\r\n results.push(instance);\r\n }\r\n }\r\n\r\n return (results.length === 1) ? results[0] : results;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Post Pipelines of this Game Object. It does this by calling\r\n * the `destroy` method on each post pipeline and then clearing the local array.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#resetPostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {boolean} [resetData=false] - Reset the `postPipelineData` object to being an empty object?\r\n */\r\n resetPostPipeline: function (resetData)\r\n {\r\n if (resetData === undefined) { resetData = false; }\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = 0; i < pipelines.length; i++)\r\n {\r\n pipelines[i].destroy();\r\n }\r\n\r\n this.postPipelines = [];\r\n this.hasPostPipeline = false;\r\n\r\n if (resetData)\r\n {\r\n this.postPipelineData = {};\r\n }\r\n },\r\n\r\n /**\r\n * Removes a type of Post Pipeline instances from this Game Object, based on the given name, and destroys them.\r\n *\r\n * If you wish to remove all Post Pipelines use the `resetPostPipeline` method instead.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#removePostPipeline\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @param {string|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} pipeline - The string-based name of the pipeline, or a pipeline class.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n removePostPipeline: function (pipeline)\r\n {\r\n var isString = (typeof pipeline === 'string');\r\n\r\n var pipelines = this.postPipelines;\r\n\r\n for (var i = pipelines.length - 1; i >= 0; i--)\r\n {\r\n var instance = pipelines[i];\r\n\r\n if (\r\n (isString && instance.name === pipeline) ||\r\n (!isString && instance === pipeline))\r\n {\r\n instance.destroy();\r\n\r\n SpliceOne(pipelines, i);\r\n }\r\n }\r\n\r\n this.hasPostPipeline = (this.postPipelines.length > 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Pre and Post FX Controllers from this Game Object.\r\n *\r\n * If you wish to remove a single controller, use the `preFX.remove(fx)` or `postFX.remove(fx)` methods instead.\r\n *\r\n * If you wish to clear a single controller, use the `preFX.clear()` or `postFX.clear()` methods instead.\r\n *\r\n * @method Phaser.GameObjects.Components.PostPipeline#clearFX\r\n * @webglOnly\r\n * @since 3.60.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearFX: function ()\r\n {\r\n if (this.preFX)\r\n {\r\n this.preFX.clear();\r\n }\r\n\r\n if (this.postFX)\r\n {\r\n this.postFX.clear();\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PostPipeline;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleX * this.frame.realWidth);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n *\r\n * This value takes into account the scale factor.\r\n *\r\n * Setting this value will adjust the Game Object's scale property.\r\n *\r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleY * this.frame.realHeight);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame|boolean} [frame] - The frame to base the size of this Game Object on.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (!frame) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n var input = this.input;\r\n\r\n if (input && !input.customHitArea)\r\n {\r\n input.hitArea.width = this.width;\r\n input.hitArea.height = this.height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n *\r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n *\r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n *\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Frame = require('../../textures/Frame');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n *\r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n *\r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n *\r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n *\r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n *\r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n *\r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n *\r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n *\r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|number)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * If you pass a string or index then the Frame has to belong to the current Texture being used\r\n * by this Game Object.\r\n *\r\n * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n *\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Textures.Frame)} frame - The name or index of the frame within the Texture, or a Frame instance.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n if (frame instanceof Frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(frame.texture.key);\r\n\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.texture.get(frame);\r\n }\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the tint of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Tint\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Tint = {\r\n\r\n /**\r\n * The tint value being applied to the top-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the top-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintTopRight: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-left vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomLeft: 0xffffff,\r\n\r\n /**\r\n * The tint value being applied to the bottom-right vertice of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.0.0\r\n */\r\n tintBottomRight: 0xffffff,\r\n\r\n /**\r\n * The tint fill mode.\r\n *\r\n * `false` = An additive tint (the default), where vertices colors are blended with the texture.\r\n * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n tintFill: false,\r\n\r\n /**\r\n * Clears all tint values associated with this Game Object.\r\n *\r\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\r\n * which results in no visible change to the texture.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#clearTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearTint: function ()\r\n {\r\n this.setTint(0xffffff);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an additive tint on this Game Object.\r\n *\r\n * The tint works by taking the pixel color values from the Game Objects texture, and then\r\n * multiplying it by the color value of the tint. You can provide either one color value,\r\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\r\n * per corner. The colors are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 0xffffff; }\r\n\r\n if (topRight === undefined)\r\n {\r\n topRight = topLeft;\r\n bottomLeft = topLeft;\r\n bottomRight = topLeft;\r\n }\r\n\r\n this.tintTopLeft = topLeft;\r\n this.tintTopRight = topRight;\r\n this.tintBottomLeft = bottomLeft;\r\n this.tintBottomRight = bottomRight;\r\n\r\n this.tintFill = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a fill-based tint on this Game Object.\r\n *\r\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\r\n * with those in the tint. You can use this for effects such as making a player flash 'white'\r\n * if hit by something. You can provide either one color value, in which case the whole\r\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\r\n * are blended together across the extent of the Game Object.\r\n *\r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n *\r\n * To remove a tint call `clearTint`.\r\n *\r\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTintFill\r\n * @webglOnly\r\n * @since 3.11.0\r\n *\r\n * @param {number} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {number} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {number} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {number} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n\r\n this.tintFill = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The tint value being applied to the whole of the Game Object.\r\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#tint\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tint: {\r\n\r\n set: function (value)\r\n {\r\n this.setTint(value, value, value, value);\r\n }\r\n },\r\n\r\n /**\r\n * Does this Game Object have a tint applied?\r\n *\r\n * It checks to see if the 4 tint properties are set to the value 0xffffff\r\n * and that the `tintFill` property is `false`. This indicates that a Game Object isn't tinted.\r\n *\r\n * @name Phaser.GameObjects.Components.Tint#isTinted\r\n * @type {boolean}\r\n * @webglOnly\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n isTinted: {\r\n\r\n get: function ()\r\n {\r\n var white = 0xffffff;\r\n\r\n return (\r\n this.tintFill ||\r\n this.tintTopLeft !== white ||\r\n this.tintTopRight !== white ||\r\n this.tintBottomLeft !== white ||\r\n this.tintBottomRight !== white\r\n );\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Tint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../../math/const');\r\nvar TransformMatrix = require('./TransformMatrix');\r\nvar TransformXY = require('../../math/TransformXY');\r\nvar WrapAngle = require('../../math/angle/Wrap');\r\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Transform\r\n * @since 3.0.0\r\n */\r\n\r\nvar Transform = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#hasTransformComponent\r\n * @type {boolean}\r\n * @readonly\r\n * @default true\r\n * @since 3.60.0\r\n */\r\n hasTransformComponent: true,\r\n\r\n /**\r\n * Private internal value. Holds the horizontal scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleX\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleX: 1,\r\n\r\n /**\r\n * Private internal value. Holds the vertical scale value.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_scaleY\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleY: 1,\r\n\r\n /**\r\n * Private internal value. Holds the rotation value in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _rotation: 0,\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: 0,\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: 0,\r\n\r\n /**\r\n * The z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: 0,\r\n\r\n /**\r\n * The w position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: 0,\r\n\r\n /**\r\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\r\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\r\n *\r\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\r\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.18.0\r\n */\r\n scale: {\r\n\r\n get: function ()\r\n {\r\n return (this._scaleX + this._scaleY) / 2;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleY !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else if (this._scaleX !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The angle of this Game Object as expressed in degrees.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in radians, see the `rotation` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * The angle of this Game Object in radians.\r\n *\r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\r\n * and -PI/2 is up.\r\n *\r\n * If you prefer to work in degrees, see the `angle` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#rotation\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of this Game Object.\r\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\r\n * @param {number} [z=0] - The z position of this Game Object.\r\n * @param {number} [w=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPosition: function (x, y, z, w)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n if (z === undefined) { z = 0; }\r\n if (w === undefined) { w = 0; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies an object's coordinates to this Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#copyPosition\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Types.Math.Vector2Like|Phaser.Types.Math.Vector3Like|Phaser.Types.Math.Vector4Like)} source - An object with numeric 'x', 'y', 'z', or 'w' properties. Undefined values are not copied.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n copyPosition: function (source)\r\n {\r\n if (source.x !== undefined) { this.x = source.x; }\r\n if (source.y !== undefined) { this.y = source.y; }\r\n if (source.z !== undefined) { this.z = source.z; }\r\n if (source.w !== undefined) { this.w = source.w; }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object to be a random position within the confines of\r\n * the given area.\r\n *\r\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\r\n *\r\n * The position does not factor in the size of this Game Object, meaning that only the origin is\r\n * guaranteed to be within the area.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\r\n * @since 3.8.0\r\n *\r\n * @param {number} [x=0] - The x position of the top-left of the random area.\r\n * @param {number} [y=0] - The y position of the top-left of the random area.\r\n * @param {number} [width] - The width of the random area.\r\n * @param {number} [height] - The height of the random area.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRandomPosition: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n\r\n this.x = x + (Math.random() * width);\r\n this.y = y + (Math.random() * height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this.rotation = radians;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=1] - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScale: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scaleX = x;\r\n this.scaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the x position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The x position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setX: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the y position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The y position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setY: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the z position of this Game Object.\r\n *\r\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\r\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The z position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setZ: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.z = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the w position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setW\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setW: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.w = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the local transform matrix for this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getLocalTransformMatrix: function (tempMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n },\r\n\r\n /**\r\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n var parent = this.parentContainer;\r\n\r\n if (!parent)\r\n {\r\n return this.getLocalTransformMatrix(tempMatrix);\r\n }\r\n\r\n if (!parentMatrix)\r\n {\r\n parentMatrix = new TransformMatrix();\r\n }\r\n\r\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n\r\n while (parent)\r\n {\r\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\r\n\r\n parentMatrix.multiply(tempMatrix, tempMatrix);\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return tempMatrix;\r\n },\r\n\r\n /**\r\n * Takes the given `x` and `y` coordinates and converts them into local space for this\r\n * Game Object, taking into account parent and local transforms, and the Display Origin.\r\n *\r\n * The returned Vector2 contains the translated point in its properties.\r\n *\r\n * A Camera needs to be provided in order to handle modified scroll factors. If no\r\n * camera is specified, it will use the `main` camera from the Scene to which this\r\n * Game Object belongs.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\r\n *\r\n * @return {Phaser.Math.Vector2} The translated point.\r\n */\r\n getLocalPoint: function (x, y, point, camera)\r\n {\r\n if (!point) { point = new Vector2(); }\r\n if (!camera) { camera = this.scene.sys.cameras.main; }\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n var px = x + (csx * this.scrollFactorX) - csx;\r\n var py = y + (csy * this.scrollFactorY) - csy;\r\n\r\n if (this.parentContainer)\r\n {\r\n this.getWorldTransformMatrix().applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\r\n }\r\n\r\n // Normalize origin\r\n if (this._originComponent)\r\n {\r\n point.x += this._displayOriginX;\r\n point.y += this._displayOriginY;\r\n }\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Gets the sum total rotation of all of this Game Objects parent Containers.\r\n *\r\n * The returned value is in radians and will be zero if this Game Object has no parent container.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\r\n * @since 3.18.0\r\n *\r\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\r\n */\r\n getParentRotation: function ()\r\n {\r\n var rotation = 0;\r\n\r\n var parent = this.parentContainer;\r\n\r\n while (parent)\r\n {\r\n rotation += parent.rotation;\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return rotation;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n\r\n /**\r\n * The temporary quad value cache.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#quad\r\n * @type {Float32Array}\r\n * @since 3.60.0\r\n */\r\n this.quad = new Float32Array(8);\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n\r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n\r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? matrix : out.matrix;\r\n\r\n destinationMatrix[0] = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix[1] = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix[2] = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix[3] = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix[4] = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix[5] = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n *\r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point in to the local space of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {Phaser.Types.Math.Vector2Like} [point] - Optional Point object to store the transformed coordinates in.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n *\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n *\r\n * The result must be applied in the following order to reproduce the current matrix:\r\n *\r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.DecomposeMatrixResults} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n *\r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Performs the 8 calculations required to create the vertices of\r\n * a quad based on this matrix and the given x/y/xw/yh values.\r\n *\r\n * The result is stored in `TransformMatrix.quad`, which is returned\r\n * from this method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setQuad\r\n * @since 3.60.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} xw - The xw value.\r\n * @param {number} yh - The yh value.\r\n * @param {boolean} roundPixels - Pass the results via Math.round?\r\n * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array.\r\n *\r\n * @return {Float32Array} The quad Float32Array.\r\n */\r\n setQuad: function (x, y, xw, yh, roundPixels, quad)\r\n {\r\n if (quad === undefined) { quad = this.quad; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var e = matrix[4];\r\n var f = matrix[5];\r\n\r\n quad[0] = x * a + y * c + e;\r\n quad[1] = x * b + y * d + f;\r\n\r\n quad[2] = x * a + yh * c + e;\r\n quad[3] = x * b + yh * d + f;\r\n\r\n quad[4] = xw * a + yh * c + e;\r\n quad[5] = xw * b + yh * d + f;\r\n\r\n quad[6] = xw * a + y * c + e;\r\n quad[7] = xw * b + y * d + f;\r\n\r\n if (roundPixels)\r\n {\r\n quad.forEach(function (value, index)\r\n {\r\n quad[index] = Math.round(value);\r\n });\r\n }\r\n\r\n return quad;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n *\r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.quad = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: require('./Alpha'),\r\n AlphaSingle: require('./AlphaSingle'),\r\n BlendMode: require('./BlendMode'),\r\n ComputedSize: require('./ComputedSize'),\r\n Crop: require('./Crop'),\r\n Depth: require('./Depth'),\r\n Flip: require('./Flip'),\r\n FX: require('./FX'),\r\n GetBounds: require('./GetBounds'),\r\n Mask: require('./Mask'),\r\n Origin: require('./Origin'),\r\n PathFollower: require('./PathFollower'),\r\n Pipeline: require('./Pipeline'),\r\n PostPipeline: require('./PostPipeline'),\r\n ScrollFactor: require('./ScrollFactor'),\r\n Size: require('./Size'),\r\n Texture: require('./Texture'),\r\n TextureCrop: require('./TextureCrop'),\r\n Tint: require('./Tint'),\r\n ToJSON: require('./ToJSON'),\r\n Transform: require('./Transform'),\r\n TransformMatrix: require('./TransformMatrix'),\r\n Visible: require('./Visible')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = require('../../utils/array');\r\nvar BlendModes = require('../../renderer/BlendModes');\r\nvar Class = require('../../utils/Class');\r\nvar Components = require('../components');\r\nvar Events = require('../events');\r\nvar GameObject = require('../GameObject');\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar Render = require('./ContainerRender');\r\nvar Union = require('../../geom/rectangle/Union');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * The transform point of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\r\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\r\n * the Container, and position children positively and negative around it as required.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * If input enabling a _child_ you should not set both the `origin` and a **negative** scale factor on the child,\r\n * or the input area will become misaligned.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.AlphaSingle\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.PostPipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.AlphaSingle,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.PostPipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {number}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n *\r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.initPostPipeline();\r\n\r\n this.setPosition(x, y);\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @override\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {this} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\r\n\r\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\r\n }\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n var hasSetFirst = false;\r\n\r\n output.setEmpty();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n\r\n if (!hasSetFirst)\r\n {\r\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\r\n hasSetFirst = true;\r\n }\r\n else\r\n {\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.parentContainer = this;\r\n\r\n gameObject.removeFromDisplayList();\r\n\r\n gameObject.addedToScene();\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n\r\n gameObject.removedFromScene();\r\n\r\n gameObject.addToDisplayList();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} source - The Source Point to be transformed.\r\n * @param {Phaser.Types.Math.Vector2Like} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n this.parentContainer.pointToContainer(source, output);\r\n }\r\n else\r\n {\r\n output.x = source.x;\r\n output.y = source.y;\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n *\r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {number} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {number} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {number} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {number} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object above another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveAbove\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move above base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveAbove: function (child1, child2)\r\n {\r\n ArrayUtils.MoveAbove(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object below another one within this Container.\r\n *\r\n * These 2 Game Objects must already be children of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#moveBelow\r\n * @since 3.55.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The Game Object to move below base Game Object.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The base Game Object.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveBelow: function (child1, child2)\r\n {\r\n ArrayUtils.MoveBelow(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {(T|T[])} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {number} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var list = this.list;\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n if (list[i] && list[i].scene)\r\n {\r\n list[i].off(Events.DESTROY, this.remove, this);\r\n\r\n list[i].destroy();\r\n }\r\n }\r\n\r\n this.list = [];\r\n }\r\n else\r\n {\r\n ArrayUtils.RemoveBetween(list, 0, list.length, this.removeHandler, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [oldChild,newChild]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} T\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {this} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n *\r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Container#setScrollFactor\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerCanvasRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n if (container.mask)\r\n {\r\n container.mask.preRenderCanvas(renderer, null, camera);\r\n }\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n }\r\n\r\n if (container.mask)\r\n {\r\n container.mask.postRenderCanvas(renderer);\r\n }\r\n};\r\n\r\nmodule.exports = ContainerCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar NOOP = require('../../utils/NOOP');\r\nvar renderWebGL = NOOP;\r\nvar renderCanvas = NOOP;\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./ContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./ContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderWebGL\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix)\r\n{\r\n camera.addToRenderList(container);\r\n\r\n var children = container.list;\r\n var childCount = children.length;\r\n\r\n if (childCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n\r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n renderer.pipelines.preBatch(container);\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container.alpha;\r\n\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlphaTopLeft;\r\n var childAlphaTopRight;\r\n var childAlphaBottomLeft;\r\n var childAlphaBottomRight;\r\n\r\n if (child.alphaTopLeft !== undefined)\r\n {\r\n childAlphaTopLeft = child.alphaTopLeft;\r\n childAlphaTopRight = child.alphaTopRight;\r\n childAlphaBottomLeft = child.alphaBottomLeft;\r\n childAlphaBottomRight = child.alphaBottomRight;\r\n }\r\n else\r\n {\r\n var childAlpha = child.alpha;\r\n\r\n childAlphaTopLeft = childAlpha;\r\n childAlphaTopRight = childAlpha;\r\n childAlphaBottomLeft = childAlpha;\r\n childAlphaBottomRight = childAlpha;\r\n }\r\n\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n mask.preRenderWebGL(renderer, child, camera);\r\n }\r\n\r\n var type = child.type;\r\n\r\n if (type !== renderer.currentType)\r\n {\r\n renderer.newType = true;\r\n renderer.currentType = type;\r\n }\r\n\r\n renderer.nextTypeMatch = (i < childCount - 1) ? (children[i + 1].type === renderer.currentType) : false;\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n\r\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\r\n\r\n // Render\r\n child.renderWebGL(renderer, child, camera, transformMatrix, container);\r\n\r\n // Restore original values\r\n\r\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\r\n\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n\r\n if (mask)\r\n {\r\n mask.postRenderWebGL(renderer, camera);\r\n }\r\n\r\n renderer.newType = false;\r\n }\r\n\r\n renderer.pipelines.postBatch(container);\r\n};\r\n\r\nmodule.exports = ContainerWebGLRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n *\r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n * @param {boolean} fromScene - `True` if this Game Object is being destroyed by the Scene, `false` if not.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n *\r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n *\r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n *\r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n *\r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {number} width - The width of the video.\r\n * @param {number} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n *\r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {DOMException|string} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Locked Event.\r\n *\r\n * This event is dispatched when a Video was attempted to be played, but the browser prevented it\r\n * from doing so due to the Media Engagement Interaction policy.\r\n *\r\n * If you get this event you will need to wait for the user to interact with the browser before\r\n * the video will play. This is a browser security measure to prevent autoplaying videos with\r\n * audio. An interaction includes a mouse click, a touch, or a key press.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('locked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOCKED\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'locked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n *\r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n *\r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Playing Event.\r\n *\r\n * The playing event is fired after playback is first started,\r\n * and whenever it is restarted. For example it is fired when playback\r\n * resumes after having been paused or delayed due to lack of data.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('playing', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAYING\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'playing';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n *\r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n *\r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n *\r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stalled Event.\r\n *\r\n * This event is dispatched by a Video Game Object when the video playback stalls.\r\n *\r\n * This can happen if the video is buffering.\r\n *\r\n * If will fire for any of the following native DOM events:\r\n *\r\n * `stalled`\r\n * `suspend`\r\n * `waiting`\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('stalled', listener)`.\r\n *\r\n * Note that being stalled isn't always a negative thing. A video can be stalled if it\r\n * has downloaded enough data in to its buffer to not need to download any more until\r\n * the current batch of frames have rendered.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STALLED\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'stalled';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n *\r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Texture Ready Event.\r\n *\r\n * This event is dispatched by a Video Game Object when it has finished creating its texture.\r\n *\r\n * This happens when the video has finished loading enough data for its first frame.\r\n *\r\n * If you wish to use the Video texture elsewhere in your game, such as as a Sprite texture,\r\n * then you should listen for this event first, before creating the Sprites that use it.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('textureready', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TEXTURE\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object that emitted the event.\r\n * @param {Phaser.Textures.Texture} texture - The Texture that was created.\r\n */\r\nmodule.exports = 'textureready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n *\r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @type {string}\r\n * @since 3.20.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unsupported Event.\r\n *\r\n * This event is dispatched by a Video Game Object if the media source\r\n * (which may be specified as a MediaStream, MediaSource, Blob, or File,\r\n * for example) doesn't represent a supported media format.\r\n *\r\n * Listen for it from a Video Game Object instance using `Video.on('unsupported', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNSUPPORTED\r\n * @type {string}\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n * @param {DOMException|string} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'unsupported';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\r\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\r\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\r\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\r\n VIDEO_LOCKED: require('./VIDEO_LOCKED_EVENT'),\r\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\r\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\r\n VIDEO_PLAYING: require('./VIDEO_PLAYING_EVENT'),\r\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\r\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\r\n VIDEO_STALLED: require('./VIDEO_STALLED_EVENT'),\r\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\r\n VIDEO_TEXTURE: require('./VIDEO_TEXTURE_EVENT'),\r\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT'),\r\n VIDEO_UNSUPPORTED: require('./VIDEO_UNSUPPORTED_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n *\r\n * @name Phaser.Geom.CIRCLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n *\r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n *\r\n * @name Phaser.Geom.LINE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n *\r\n * @name Phaser.Geom.POINT\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n *\r\n * @name Phaser.Geom.POLYGON\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n *\r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = require('./Length');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Random = require('./Random');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GEOM_CONST = require('../const');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {this} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = require('./Perimeter');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = require('./GetPoint');\r\nvar Perimeter = require('./Perimeter');\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\r\n * @param {number} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Contains = require('./Contains');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Line = require('../line/Line');\r\nvar Random = require('./Random');\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n *\r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n *\r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {number} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('./Rectangle');\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\nvar GetURL = require('./GetURL');\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\nvar XHRLoader = require('./XHRLoader');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * @classdesc\r\n * The base File class used by all File Types that the Loader can support.\r\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class File\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\r\n */\r\nvar File = new Class({\r\n\r\n initialize:\r\n\r\n function File (loader, fileConfig)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.File#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\r\n *\r\n * @name Phaser.Loader.File#cache\r\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\r\n * @since 3.7.0\r\n */\r\n this.cache = GetFastValue(fileConfig, 'cache', false);\r\n\r\n /**\r\n * The file type string (image, json, etc) for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.File#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(fileConfig, 'type', false);\r\n\r\n if (!this.type)\r\n {\r\n throw new Error('Invalid File type: ' + this.type);\r\n }\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.File#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = GetFastValue(fileConfig, 'key', false);\r\n\r\n var loadKey = this.key;\r\n\r\n if (loader.prefix && loader.prefix !== '')\r\n {\r\n this.key = loader.prefix + loadKey;\r\n }\r\n\r\n if (!this.key)\r\n {\r\n throw new Error('Invalid File key: ' + this.key);\r\n }\r\n\r\n var url = GetFastValue(fileConfig, 'url');\r\n\r\n if (url === undefined)\r\n {\r\n url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof url === 'string' && !url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n url = loader.path + url;\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n *\r\n * Automatically has Loader.path prepended to it if a string.\r\n *\r\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {object|string}\r\n * @since 3.0.0\r\n */\r\n this.url = url;\r\n\r\n /**\r\n * The final URL this file will load from, including baseURL and path.\r\n * Set automatically when the Loader calls 'load' on this file.\r\n *\r\n * @name Phaser.Loader.File#src\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.src = '';\r\n\r\n /**\r\n * The merged XHRSettings for this file.\r\n *\r\n * @name Phaser.Loader.File#xhrSettings\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\r\n\r\n if (GetFastValue(fileConfig, 'xhrSettings', false))\r\n {\r\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\r\n }\r\n\r\n /**\r\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\r\n *\r\n * @name Phaser.Loader.File#xhrLoader\r\n * @type {?XMLHttpRequest}\r\n * @since 3.0.0\r\n */\r\n this.xhrLoader = null;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.File#state\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\r\n\r\n /**\r\n * The total size of this file.\r\n * Set by onProgress and only if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesTotal\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bytesTotal = 0;\r\n\r\n /**\r\n * Updated as the file loads.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesLoaded\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.bytesLoaded = -1;\r\n\r\n /**\r\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#percentComplete\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.percentComplete = -1;\r\n\r\n /**\r\n * For CORs based loading.\r\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\r\n *\r\n * @name Phaser.Loader.File#crossOrigin\r\n * @type {(string|undefined)}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = undefined;\r\n\r\n /**\r\n * The processed file data, stored here after the file has loaded.\r\n *\r\n * @name Phaser.Loader.File#data\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.data = undefined;\r\n\r\n /**\r\n * A config object that can be used by file types to store transitional data.\r\n *\r\n * @name Phaser.Loader.File#config\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.config = GetFastValue(fileConfig, 'config', {});\r\n\r\n /**\r\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\r\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\r\n *\r\n * @name Phaser.Loader.File#multiFile\r\n * @type {?Phaser.Loader.MultiFile}\r\n * @since 3.7.0\r\n */\r\n this.multiFile;\r\n\r\n /**\r\n * Does this file have an associated linked file? Such as an image and a normal map.\r\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\r\n * actually bound by data, where-as a linkFile is.\r\n *\r\n * @name Phaser.Loader.File#linkFile\r\n * @type {?Phaser.Loader.File}\r\n * @since 3.7.0\r\n */\r\n this.linkFile;\r\n },\r\n\r\n /**\r\n * Links this File with another, so they depend upon each other for loading and processing.\r\n *\r\n * @method Phaser.Loader.File#setLink\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\r\n */\r\n setLink: function (fileB)\r\n {\r\n this.linkFile = fileB;\r\n\r\n fileB.linkFile = this;\r\n },\r\n\r\n /**\r\n * Resets the XHRLoader instance this file is using.\r\n *\r\n * @method Phaser.Loader.File#resetXHR\r\n * @since 3.0.0\r\n */\r\n resetXHR: function ()\r\n {\r\n if (this.xhrLoader)\r\n {\r\n this.xhrLoader.onload = undefined;\r\n this.xhrLoader.onerror = undefined;\r\n this.xhrLoader.onprogress = undefined;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.File#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\r\n this.loader.nextFile(this, true);\r\n }\r\n else\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n // The creation of this XHRLoader starts the load process going.\r\n // It will automatically call the following, based on the load outcome:\r\n //\r\n // xhr.onload = this.onLoad\r\n // xhr.onerror = this.onError\r\n // xhr.onprogress = this.onProgress\r\n\r\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onLoad\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\r\n */\r\n onLoad: function (xhr, event)\r\n {\r\n var isLocalFile = xhr.responseURL && this.loader.localSchemes.some(function (scheme)\r\n {\r\n return xhr.responseURL.indexOf(scheme) === 0;\r\n });\r\n\r\n var localFileOk = (isLocalFile && event.target.status === 0);\r\n\r\n var success = !(event.target && event.target.status !== 200) || localFileOk;\r\n\r\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\r\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\r\n {\r\n success = false;\r\n }\r\n\r\n this.state = CONST.FILE_LOADED;\r\n\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, success);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onError\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\r\n */\r\n onError: function ()\r\n {\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n *\r\n * @param {ProgressEvent} event - The DOM ProgressEvent.\r\n */\r\n onProgress: function (event)\r\n {\r\n if (event.lengthComputable)\r\n {\r\n this.bytesLoaded = event.loaded;\r\n this.bytesTotal = event.total;\r\n\r\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\r\n *\r\n * @method Phaser.Loader.File#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessComplete\r\n * @since 3.7.0\r\n */\r\n onProcessComplete: function ()\r\n {\r\n this.state = CONST.FILE_COMPLETE;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileComplete(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing but it generated an error.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessError\r\n * @since 3.7.0\r\n */\r\n onProcessError: function ()\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Failed to process file: %s \"%s\"', this.type, this.key);\r\n\r\n this.state = CONST.FILE_ERRORED;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileFailed(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Checks if a key matching the one used by this file exists in the target Cache or not.\r\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\r\n * loaded or will conflict.\r\n *\r\n * @method Phaser.Loader.File#hasCacheConflict\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\r\n */\r\n hasCacheConflict: function ()\r\n {\r\n return (this.cache && this.cache.exists(this.key));\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n * This method is often overridden by specific file types.\r\n *\r\n * @method Phaser.Loader.File#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.cache && this.data)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\r\n },\r\n\r\n /**\r\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.File#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.7.0\r\n */\r\n pendingDestroy: function (data)\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n if (data === undefined) { data = this.data; }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this File and any references it holds.\r\n *\r\n * @method Phaser.Loader.File#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.cache = null;\r\n this.xhrSettings = null;\r\n this.multiFile = null;\r\n this.linkFile = null;\r\n this.data = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\r\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\r\n *\r\n * @method Phaser.Loader.File.createObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\r\n * @param {Blob} blob - A Blob object to create an object URL for.\r\n * @param {string} defaultType - Default mime type used if blob type is not available.\r\n */\r\nFile.createObjectURL = function (image, blob, defaultType)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n image.src = URL.createObjectURL(blob);\r\n }\r\n else\r\n {\r\n var reader = new FileReader();\r\n\r\n reader.onload = function ()\r\n {\r\n image.removeAttribute('crossOrigin');\r\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\r\n };\r\n\r\n reader.onerror = image.onerror;\r\n\r\n reader.readAsDataURL(blob);\r\n }\r\n};\r\n\r\n/**\r\n * Static method for releasing an existing object URL which was previously created\r\n * by calling {@link File#createObjectURL} method.\r\n *\r\n * @method Phaser.Loader.File.revokeObjectURL\r\n * @static\r\n * @since 3.7.0\r\n *\r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\r\n */\r\nFile.revokeObjectURL = function (image)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n URL.revokeObjectURL(image.src);\r\n }\r\n};\r\n\r\nmodule.exports = File;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n *\r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n *\r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|capacitor:\\/\\/|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n *\r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n var finalFiles = [];\r\n\r\n // Clean out any potential 'null' or 'undefined' file entries\r\n files.forEach(function (file)\r\n {\r\n if (file)\r\n {\r\n finalFiles.push(file);\r\n }\r\n });\r\n\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {number}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = finalFiles;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.MultiFile#state\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n this.state = CONST.FILE_PENDING;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {number}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = finalFiles.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < finalFiles.length; i++)\r\n {\r\n finalFiles[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n\r\n // eslint-disable-next-line no-console\r\n console.error('File failed: %s \"%s\" (via %s \"%s\")', this.type, this.key, file.type, file.key);\r\n }\r\n },\r\n\r\n /**\r\n * Called once all children of this multi file have been added to their caches and is now\r\n * ready for deletion from the Loader.\r\n *\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.MultiFile#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.60.0\r\n */\r\n pendingDestroy: function ()\r\n {\r\n if (this.state === CONST.FILE_PENDING_DESTROY)\r\n {\r\n return;\r\n }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type);\r\n\r\n this.loader.flagForRemoval(this);\r\n\r\n for (var i = 0; i < this.files.length; i++)\r\n {\r\n this.files[i].pendingDestroy();\r\n }\r\n\r\n this.state = CONST.FILE_PENDING_DESTROY;\r\n },\r\n\r\n /**\r\n * Destroy this Multi File and any references it holds.\r\n *\r\n * @method Phaser.Loader.MultiFile#destroy\r\n * @since 3.60.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.files = null;\r\n this.config = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {number} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n *\r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n *\r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n *\r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n *\r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n *\r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n *\r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n *\r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing.\r\n *\r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load.\r\n *\r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n *\r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n *\r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n *\r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request.\r\n *\r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19,\r\n\r\n /**\r\n * File is pending being destroyed.\r\n *\r\n * @name Phaser.Loader.FILE_PENDING_DESTROY\r\n * @type {number}\r\n * @since 3.60.0\r\n */\r\n FILE_PENDING_DESTROY: 20\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n *\r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n *\r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n *\r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {number} totalComplete - The total number of files that successfully loaded.\r\n * @param {number} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when _any_ file in the queue finishes loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n *\r\n * Make sure you remove this listener when you have finished, or it will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n *\r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n *\r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-atlasjson-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Make sure you remove your listeners when you have finished, or they will continue to fire if the Scene reloads.\r\n *\r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} [data] - The raw data the file contained. If the file was a multi-file, like an atlas or bitmap font, this parameter will be undefined.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n *\r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n *\r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n *\r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n *\r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n *\r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n *\r\n * This event is dispatched even if there aren't any files in the load queue.\r\n *\r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\nvar GetURL = require('../GetURL');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n\r\n this.useImageElementLoad = loader.imageLoadType === 'HTMLImageElement';\r\n\r\n if (this.useImageElementLoad)\r\n {\r\n this.load = this.loadImage;\r\n this.onProcess = this.onProcessImage;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Handles image load processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcessImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n onProcessImage: function ()\r\n {\r\n var result = this.state;\r\n\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n if (result === CONST.FILE_LOADED)\r\n {\r\n this.onProcessComplete();\r\n }\r\n else\r\n {\r\n this.onProcessError();\r\n }\r\n },\r\n\r\n /**\r\n * Loads the image using either XHR or an Image tag.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#loadImage\r\n * @private\r\n * @since 3.60.0\r\n */\r\n loadImage: function ()\r\n {\r\n this.state = CONST.FILE_LOADING;\r\n\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n _this.state = CONST.FILE_LOADED;\r\n\r\n _this.loader.nextFile(_this, true);\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n _this.loader.nextFile(_this, false);\r\n };\r\n\r\n this.data.src = this.src;\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n // Check if we have a linked normal map\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile)\r\n {\r\n // We do, but has it loaded?\r\n if (linkFile.state >= CONST.FILE_COMPLETE)\r\n {\r\n // Both files have loaded\r\n if (this.type === 'normalMap')\r\n {\r\n // linkFile.data = Image\r\n // this.data = Normal Map\r\n this.cache.addImage(this.key, linkFile.data, this.data);\r\n }\r\n else\r\n {\r\n // linkFile.data = Normal Map\r\n // this.data = Image\r\n this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n }\r\n\r\n // Nothing to do here, we'll use the linkFile `addToCache` call\r\n // to process this pair\r\n }\r\n else\r\n {\r\n this.cache.addImage(this.key, this.data);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * In Phaser 3.60 a new property was added that allows you to control how images are loaded. By default, images are loaded via XHR as Blobs.\r\n * However, you can set `loader.imageLoadType: \"HTMLImageElement\"` in the Game Configuration and instead, the Loader will load all images\r\n * via the Image tag instead.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\r\n *\r\n * @class JSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar JSONFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function JSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n var extension = 'json';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataKey = GetFastValue(config, 'dataKey', dataKey);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'json',\r\n cache: loader.cacheManager.json,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: dataKey\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // A JSON object has been provided (instead of a URL), so we'll use it directly as the File.data. No need to load it.\r\n if (IsPlainObject(url))\r\n {\r\n if (dataKey)\r\n {\r\n this.data = GetValue(url, dataKey);\r\n }\r\n else\r\n {\r\n this.data = url;\r\n }\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n try\r\n {\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n catch (e)\r\n {\r\n this.onProcessError();\r\n\r\n throw e;\r\n }\r\n\r\n var key = this.config;\r\n\r\n if (typeof key === 'string')\r\n {\r\n this.data = GetValue(json, key, json);\r\n }\r\n else\r\n {\r\n this.data = json;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON file, or array of JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.json({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n *\r\n * ```json\r\n * {\r\n * \"level1\": {\r\n * \"baddies\": {\r\n * \"aliens\": {},\r\n * \"boss\": {}\r\n * }\r\n * },\r\n * \"level2\": {},\r\n * \"level3\": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#json\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new JSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = JSONFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var type = 'text';\r\n var extension = 'txt';\r\n var cache = loader.cacheManager.text;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n type = GetFastValue(config, 'type', type);\r\n cache = GetFastValue(config, 'cache', cache);\r\n }\r\n\r\n var fileConfig = {\r\n type: type,\r\n cache: cache,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {number} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\nvar Class = require('../utils/Class');\r\nvar Matrix4 = require('./Matrix4');\r\nvar NOOP = require('../utils/NOOP');\r\n\r\nvar tempMatrix = new Matrix4();\r\n\r\n/**\r\n * @classdesc\r\n *\r\n * @class Euler\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.50.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Euler = new Class({\r\n\r\n initialize:\r\n\r\n function Euler (x, y, z, order)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (z === undefined) { z = 0; }\r\n if (order === undefined) { order = Euler.DefaultOrder; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback = NOOP;\r\n },\r\n\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n order: {\r\n get: function ()\r\n {\r\n return this._order;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._order = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n set: function (x, y, z, order)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n copy: function (euler)\r\n {\r\n return this.set(euler.x, euler.y, euler.z, euler.order);\r\n },\r\n\r\n setFromQuaternion: function (quaternion, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n tempMatrix.fromQuat(quaternion);\r\n\r\n return this.setFromRotationMatrix(tempMatrix, order, update);\r\n },\r\n\r\n setFromRotationMatrix: function (matrix, order, update)\r\n {\r\n if (order === undefined) { order = this._order; }\r\n if (update === undefined) { update = false; }\r\n\r\n var elements = matrix.val;\r\n\r\n // Upper 3x3 of matrix is un-scaled rotation matrix\r\n var m11 = elements[0];\r\n var m12 = elements[4];\r\n var m13 = elements[8];\r\n var m21 = elements[1];\r\n var m22 = elements[5];\r\n var m23 = elements[9];\r\n var m31 = elements[2];\r\n var m32 = elements[6];\r\n var m33 = elements[10];\r\n\r\n var x = 0;\r\n var y = 0;\r\n var z = 0;\r\n var epsilon = 0.99999;\r\n\r\n switch (order)\r\n {\r\n case 'XYZ':\r\n {\r\n y = Math.asin(Clamp(m13, -1, 1));\r\n\r\n if (Math.abs(m13) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m33);\r\n z = Math.atan2(-m12, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(m32, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n x = Math.asin(-Clamp(m23, -1, 1));\r\n\r\n if (Math.abs(m23) < epsilon)\r\n {\r\n y = Math.atan2(m13, m33);\r\n z = Math.atan2(m21, m22);\r\n }\r\n else\r\n {\r\n y = Math.atan2(-m31, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n x = Math.asin(Clamp(m32, -1, 1));\r\n\r\n if (Math.abs(m32) < epsilon)\r\n {\r\n y = Math.atan2(-m31, m33);\r\n z = Math.atan2(-m12, m22);\r\n }\r\n else\r\n {\r\n z = Math.atan2(m21, m11);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n y = Math.asin(-Clamp(m31, -1, 1));\r\n\r\n if (Math.abs(m31) < epsilon)\r\n {\r\n x = Math.atan2(m32, m33);\r\n z = Math.atan2(m21, m11);\r\n }\r\n else\r\n {\r\n z = Math.atan2(-m12, m22);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n z = Math.asin(Clamp(m21, -1, 1));\r\n\r\n if (Math.abs(m21) < epsilon)\r\n {\r\n x = Math.atan2(-m23, m22);\r\n y = Math.atan2(-m31, m11);\r\n }\r\n else\r\n {\r\n y = Math.atan2(m13, m33);\r\n }\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n z = Math.asin(-Clamp(m12, -1, 1));\r\n\r\n if (Math.abs(m12) < epsilon)\r\n {\r\n x = Math.atan2(m32, m22);\r\n y = Math.atan2(m13, m11);\r\n }\r\n else\r\n {\r\n x = Math.atan2(-m23, m33);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n this._z = z;\r\n this._order = order;\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nEuler.RotationOrders = [ 'XYZ', 'YXZ', 'ZXY', 'ZYX', 'YZX', 'XZY' ];\r\n\r\nEuler.DefaultOrder = 'XYZ';\r\n\r\nmodule.exports = Euler;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent + min;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {number} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Greg McLean \r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Interpolates two given Vectors and returns a new Vector between them.\r\n *\r\n * Does not modify either of the passed Vectors.\r\n *\r\n * @function Phaser.Math.LinearXY\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector1 - Starting vector\r\n * @param {Phaser.Math.Vector2} vector2 - Ending vector\r\n * @param {number} [t=0] - The percentage between vector1 and vector2 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} The step t% of the way between vector1 and vector2.\r\n */\r\nvar LinearXY = function (vector1, vector2, t)\r\n{\r\n if (t === undefined) { t = 0; }\r\n\r\n return vector1.clone().lerp(vector2, t);\r\n};\r\n\r\nmodule.exports = LinearXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n * and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Sets all values of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#setValues\r\n * @since 3.50.0\r\n *\r\n * @param {number} m00 - The m00 value.\r\n * @param {number} m01 - The m01 value.\r\n * @param {number} m02 - The m02 value.\r\n * @param {number} m03 - The m03 value.\r\n * @param {number} m10 - The m10 value.\r\n * @param {number} m11 - The m11 value.\r\n * @param {number} m12 - The m12 value.\r\n * @param {number} m13 - The m13 value.\r\n * @param {number} m20 - The m20 value.\r\n * @param {number} m21 - The m21 value.\r\n * @param {number} m22 - The m22 value.\r\n * @param {number} m23 - The m23 value.\r\n * @param {number} m30 - The m30 value.\r\n * @param {number} m31 - The m31 value.\r\n * @param {number} m32 - The m32 value.\r\n * @param {number} m33 - The m33 value.\r\n *\r\n * @return {this} This Matrix4 instance.\r\n */\r\n setValues: function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = m00;\r\n out[1] = m01;\r\n out[2] = m02;\r\n out[3] = m03;\r\n out[4] = m10;\r\n out[5] = m11;\r\n out[6] = m12;\r\n out[7] = m13;\r\n out[8] = m20;\r\n out[9] = m21;\r\n out[10] = m22;\r\n out[11] = m23;\r\n out[12] = m30;\r\n out[13] = m31;\r\n out[14] = m32;\r\n out[15] = m33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var a = src.val;\r\n\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} a - The array to copy the values from. Must have at least 16 elements.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n return this.setValues(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n return this.setValues(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Generates a transform matrix based on the given position, scale and rotation.\r\n *\r\n * @method Phaser.Math.Matrix4#transform\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {Phaser.Math.Vector3} scale - The scale vector.\r\n * @param {Phaser.Math.Quaternion} rotation - The rotation quaternion.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transform: function (position, scale, rotation)\r\n {\r\n var rotMatrix = _tempMat1.fromQuat(rotation);\r\n\r\n var rm = rotMatrix.val;\r\n\r\n var sx = scale.x;\r\n var sy = scale.y;\r\n var sz = scale.z;\r\n\r\n return this.setValues(\r\n rm[0] * sx,\r\n rm[1] * sx,\r\n rm[2] * sx,\r\n 0,\r\n\r\n rm[4] * sy,\r\n rm[5] * sy,\r\n rm[6] * sy,\r\n 0,\r\n\r\n rm[8] * sz,\r\n rm[9] * sz,\r\n rm[10] * sz,\r\n 0,\r\n\r\n position.x,\r\n position.y,\r\n position.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n return this.setValues(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies the given Matrix4 into this Matrix and then inverses it.\r\n *\r\n * @method Phaser.Math.Matrix4#getInverse\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to invert into this Matrix4.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n getInverse: function (m)\r\n {\r\n this.copy(m);\r\n\r\n return this.invert();\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return this;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n return this.setValues(\r\n (a11 * b11 - a12 * b10 + a13 * b09) * det,\r\n (a02 * b10 - a01 * b11 - a03 * b09) * det,\r\n (a31 * b05 - a32 * b04 + a33 * b03) * det,\r\n (a22 * b04 - a21 * b05 - a23 * b03) * det,\r\n (a12 * b08 - a10 * b11 - a13 * b07) * det,\r\n (a00 * b11 - a02 * b08 + a03 * b07) * det,\r\n (a32 * b02 - a30 * b05 - a33 * b01) * det,\r\n (a20 * b05 - a22 * b02 + a23 * b01) * det,\r\n (a10 * b10 - a11 * b08 + a13 * b06) * det,\r\n (a01 * b08 - a00 * b10 - a03 * b06) * det,\r\n (a30 * b04 - a31 * b02 + a33 * b00) * det,\r\n (a21 * b02 - a20 * b04 - a23 * b00) * det,\r\n (a11 * b07 - a10 * b09 - a12 * b06) * det,\r\n (a00 * b09 - a01 * b07 + a02 * b06) * det,\r\n (a31 * b01 - a30 * b03 - a32 * b00) * det,\r\n (a20 * b03 - a21 * b01 + a22 * b00) * det\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n return this.setValues(\r\n (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22)),\r\n -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22)),\r\n (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12)),\r\n -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12)),\r\n -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22)),\r\n (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22)),\r\n -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12)),\r\n (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12)),\r\n (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21)),\r\n -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21)),\r\n (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11)),\r\n -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11)),\r\n -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21)),\r\n (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21)),\r\n -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11)),\r\n (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11))\r\n );\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n return this.setValues(\r\n a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12],\r\n a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13],\r\n a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14],\r\n a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15],\r\n\r\n a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12],\r\n a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13],\r\n a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14],\r\n a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15],\r\n\r\n a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12],\r\n a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13],\r\n a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14],\r\n a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15],\r\n\r\n a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12],\r\n a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13],\r\n a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14],\r\n a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15]\r\n );\r\n },\r\n\r\n /**\r\n * Multiplies the given Matrix4 object with this Matrix.\r\n *\r\n * This is the same as calling `multiplyMatrices(m, this)`.\r\n *\r\n * @method Phaser.Math.Matrix4#premultiply\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to multiply with this one.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n premultiply: function (m)\r\n {\r\n return this.multiplyMatrices(m, this);\r\n },\r\n\r\n /**\r\n * Multiplies the two given Matrix4 objects and stores the results in this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyMatrices\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} a - The first Matrix4 to multiply.\r\n * @param {Phaser.Math.Matrix4} b - The second Matrix4 to multiply.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n multiplyMatrices: function (a, b)\r\n {\r\n var am = a.val;\r\n var bm = b.val;\r\n\r\n var a11 = am[0];\r\n var a12 = am[4];\r\n var a13 = am[8];\r\n var a14 = am[12];\r\n var a21 = am[1];\r\n var a22 = am[5];\r\n var a23 = am[9];\r\n var a24 = am[13];\r\n var a31 = am[2];\r\n var a32 = am[6];\r\n var a33 = am[10];\r\n var a34 = am[14];\r\n var a41 = am[3];\r\n var a42 = am[7];\r\n var a43 = am[11];\r\n var a44 = am[15];\r\n\r\n var b11 = bm[0];\r\n var b12 = bm[4];\r\n var b13 = bm[8];\r\n var b14 = bm[12];\r\n var b21 = bm[1];\r\n var b22 = bm[5];\r\n var b23 = bm[9];\r\n var b24 = bm[13];\r\n var b31 = bm[2];\r\n var b32 = bm[6];\r\n var b33 = bm[10];\r\n var b34 = bm[14];\r\n var b41 = bm[3];\r\n var b42 = bm[7];\r\n var b43 = bm[11];\r\n var b44 = bm[15];\r\n\r\n return this.setValues(\r\n a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41,\r\n a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41,\r\n a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41,\r\n a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41,\r\n a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42,\r\n a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42,\r\n a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42,\r\n a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42,\r\n a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43,\r\n a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43,\r\n a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43,\r\n a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43,\r\n a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44,\r\n a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44,\r\n a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44,\r\n a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44\r\n );\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n return this.translateXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n return this.scaleXYZ(v.x, v.y, v.z);\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n return this.setValues(\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n );\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return this;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n return this.setValues(\r\n a00 * b00 + a10 * b01 + a20 * b02,\r\n a01 * b00 + a11 * b01 + a21 * b02,\r\n a02 * b00 + a12 * b01 + a22 * b02,\r\n a03 * b00 + a13 * b01 + a23 * b02,\r\n a00 * b10 + a10 * b11 + a20 * b12,\r\n a01 * b10 + a11 * b11 + a21 * b12,\r\n a02 * b10 + a12 * b11 + a22 * b12,\r\n a03 * b10 + a13 * b11 + a23 * b12,\r\n a00 * b20 + a10 * b21 + a20 * b22,\r\n a01 * b20 + a11 * b21 + a21 * b22,\r\n a02 * b20 + a12 * b21 + a22 * b22,\r\n a03 * b20 + a13 * b21 + a23 * b22,\r\n a30, a31, a32, a33\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n v.x,\r\n v.y,\r\n v.z,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n return this.setValues(\r\n 1 - (yy + zz),\r\n xy + wz,\r\n xz - wy,\r\n 0,\r\n\r\n xy - wz,\r\n 1 - (xx + zz),\r\n yz + wx,\r\n 0,\r\n\r\n xz + wy,\r\n yz - wx,\r\n 1 - (xx + yy),\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 0,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n (near * 2) * rl,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (near * 2) * tb,\r\n 0,\r\n 0,\r\n\r\n (right + left) * rl,\r\n (top + bottom) * tb,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (far * near * 2) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n return this.setValues(\r\n f / aspect,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n f,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n (far + near) * nf,\r\n -1,\r\n\r\n 0,\r\n 0,\r\n (2 * far * near) * nf,\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n return this.setValues(\r\n (2 * near) / width,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n (2 * near) / height,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n -far / (near - far),\r\n 1,\r\n\r\n 0,\r\n 0,\r\n (near * far) / (near - far),\r\n 0\r\n );\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n return this.setValues(\r\n -2 * lr,\r\n 0,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n -2 * bt,\r\n 0,\r\n 0,\r\n\r\n 0,\r\n 0,\r\n 2 * nf,\r\n 0,\r\n\r\n (left + right) * lr,\r\n (top + bottom) * bt,\r\n (far + near) * nf,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Generate a right-handed look-at matrix with the given eye position, target and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAtRH\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer.\r\n * @param {Phaser.Math.Vector3} target - Point the viewer is looking at.\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAtRH: function (eye, target, up)\r\n {\r\n var m = this.val;\r\n\r\n _z.subVectors(eye, target);\r\n\r\n if (_z.getLengthSquared() === 0)\r\n {\r\n // eye and target are in the same position\r\n _z.z = 1;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n\r\n if (_x.getLengthSquared() === 0)\r\n {\r\n // up and z are parallel\r\n\r\n if (Math.abs(up.z) === 1)\r\n {\r\n _z.x += 0.0001;\r\n }\r\n else\r\n {\r\n _z.z += 0.0001;\r\n }\r\n\r\n _z.normalize();\r\n _x.crossVectors(up, _z);\r\n }\r\n\r\n _x.normalize();\r\n _y.crossVectors(_z, _x);\r\n\r\n m[0] = _x.x;\r\n m[1] = _x.y;\r\n m[2] = _x.z;\r\n m[4] = _y.x;\r\n m[5] = _y.y;\r\n m[6] = _y.z;\r\n m[8] = _z.x;\r\n m[9] = _z.y;\r\n m[10] = _z.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n return this.setValues(\r\n x0,\r\n y0,\r\n z0,\r\n 0,\r\n\r\n x1,\r\n y1,\r\n z1,\r\n 0,\r\n\r\n x2,\r\n y2,\r\n z2,\r\n 0,\r\n\r\n -(x0 * eyex + x1 * eyey + x2 * eyez),\r\n -(y0 * eyex + y1 * eyey + y2 * eyez),\r\n -(z0 * eyex + z1 * eyey + z2 * eyez),\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Matrix4 by the given `src` Matrix4 and stores the results in the `out` Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyToMat4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix4 to multiply with this one.\r\n * @param {Phaser.Math.Matrix4} out - The receiving Matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This `out` Matrix4.\r\n */\r\n multiplyToMat4: function (src, out)\r\n {\r\n var a = this.val;\r\n var b = src.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b03 = b[3];\r\n var b10 = b[4];\r\n var b11 = b[5];\r\n var b12 = b[6];\r\n var b13 = b[7];\r\n var b20 = b[8];\r\n var b21 = b[9];\r\n var b22 = b[10];\r\n var b23 = b[11];\r\n var b30 = b[12];\r\n var b31 = b[13];\r\n var b32 = b[14];\r\n var b33 = b[15];\r\n\r\n return out.setValues(\r\n b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30,\r\n b01 * a01 + b01 * a11 + b02 * a21 + b03 * a31,\r\n b02 * a02 + b01 * a12 + b02 * a22 + b03 * a32,\r\n b03 * a03 + b01 * a13 + b02 * a23 + b03 * a33,\r\n\r\n b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30,\r\n b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31,\r\n b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32,\r\n b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33,\r\n\r\n b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30,\r\n b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31,\r\n b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32,\r\n b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33,\r\n\r\n b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30,\r\n b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31,\r\n b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32,\r\n b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33\r\n );\r\n },\r\n\r\n /**\r\n * Takes the rotation and position vectors and builds this Matrix4 from them.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationXYTranslation\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation vector.\r\n * @param {Phaser.Math.Vector3} position - The position vector.\r\n * @param {boolean} translateFirst - Should the operation translate then rotate (`true`), or rotate then translate? (`false`)\r\n *\r\n * @return {this} This Matrix4.\r\n */\r\n fromRotationXYTranslation: function (rotation, position, translateFirst)\r\n {\r\n var x = position.x;\r\n var y = position.y;\r\n var z = position.z;\r\n\r\n var sx = Math.sin(rotation.x);\r\n var cx = Math.cos(rotation.x);\r\n\r\n var sy = Math.sin(rotation.y);\r\n var cy = Math.cos(rotation.y);\r\n\r\n var a30 = x;\r\n var a31 = y;\r\n var a32 = z;\r\n\r\n // Rotate X\r\n\r\n var b21 = -sx;\r\n\r\n // Rotate Y\r\n\r\n var c01 = 0 - b21 * sy;\r\n\r\n var c02 = 0 - cx * sy;\r\n\r\n var c21 = b21 * cy;\r\n\r\n var c22 = cx * cy;\r\n\r\n // Translate\r\n if (!translateFirst)\r\n {\r\n // a30 = cy * x + 0 * y + sy * z;\r\n a30 = cy * x + sy * z;\r\n a31 = c01 * x + cx * y + c21 * z;\r\n a32 = c02 * x + sx * y + c22 * z;\r\n }\r\n\r\n return this.setValues(\r\n cy,\r\n c01,\r\n c02,\r\n 0,\r\n 0,\r\n cx,\r\n sx,\r\n 0,\r\n sy,\r\n c21,\r\n c22,\r\n 0,\r\n a30,\r\n a31,\r\n a32,\r\n 1\r\n );\r\n },\r\n\r\n /**\r\n * Returns the maximum axis scale from this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#getMaxScaleOnAxis\r\n * @since 3.50.0\r\n *\r\n * @return {number} The maximum axis scale.\r\n */\r\n getMaxScaleOnAxis: function ()\r\n {\r\n var m = this.val;\r\n\r\n var scaleXSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];\r\n var scaleYSq = m[4] * m[4] + m[5] * m[5] + m[6] * m[6];\r\n var scaleZSq = m[8] * m[8] + m[9] * m[9] + m[10] * m[10];\r\n\r\n return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\r\n }\r\n\r\n});\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat1 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _tempMat2 = new Matrix4();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _x = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _y = new Vector3();\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar _z = new Vector3();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Vladislav Forsh \r\n * @copyright 2021 RoboWhale\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the median of the given values. The values are sorted and the middle value is returned.\r\n * In case of an even number of values, the average of the two middle values is returned.\r\n *\r\n * @function Phaser.Math.Median\r\n * @since 3.54.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The median value.\r\n */\r\nvar Median = function (values)\r\n{\r\n var valuesNum = values.length;\r\n if (valuesNum === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n values.sort(function (a, b) { return a - b; });\r\n\r\n var halfIndex = Math.floor(valuesNum / 2);\r\n\r\n return valuesNum % 2 === 0\r\n ? (values[halfIndex] + values[halfIndex - 1]) / 2\r\n : values[halfIndex];\r\n};\r\n\r\nmodule.exports = Median;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Matrix3 = require('./Matrix3');\r\nvar NOOP = require('../utils/NOOP');\r\nvar Vector3 = require('./Vector3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x component.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=1] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_x\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_y\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_z\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#_w\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.50.0\r\n */\r\n\r\n /**\r\n * This callback is invoked, if set, each time a value in this quaternion is changed.\r\n * The callback is passed one argument, a reference to this quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#onChangeCallback\r\n * @type {function}\r\n * @since 3.50.0\r\n */\r\n this.onChangeCallback = NOOP;\r\n\r\n this.set(x, y, z, w);\r\n },\r\n\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: {\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: {\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: {\r\n get: function ()\r\n {\r\n return this._z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._z = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: {\r\n get: function ()\r\n {\r\n return this._w;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._w = value;\r\n\r\n this.onChangeCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n return this.set(src);\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion and optionally call the `onChangeCallback`.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n * @param {boolean} [update=true] - Call the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w, update)\r\n {\r\n if (update === undefined) { update = true; }\r\n\r\n if (typeof x === 'object')\r\n {\r\n this._x = x.x || 0;\r\n this._y = x.y || 0;\r\n this._z = x.z || 0;\r\n this._w = x.w || 0;\r\n }\r\n else\r\n {\r\n this._x = x || 0;\r\n this._y = y || 0;\r\n this._z = z || 0;\r\n this._w = w || 0;\r\n }\r\n\r\n if (update)\r\n {\r\n this.onChangeCallback(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this._x += v.x;\r\n this._y += v.y;\r\n this._z += v.z;\r\n this._w += v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this._x -= v.x;\r\n this._y -= v.y;\r\n this._z -= v.z;\r\n this._w -= v.w;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this._x *= scale;\r\n this._y *= scale;\r\n this._z *= scale;\r\n this._w *= scale;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this._x = x * len;\r\n this._y = y * len;\r\n this._z = z * len;\r\n this._w = w * len;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n return this.set(\r\n ax + t * (v.x - ax),\r\n ay + t * (v.y - ay),\r\n az + t * (v.z - az),\r\n aw + t * (v.w - aw)\r\n );\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n return this.set(0, 0, 0, 1);\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this._x = tmpvec.x;\r\n this._y = tmpvec.y;\r\n this._z = tmpvec.z;\r\n this._w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n return this.set(0, 0, 0, 1);\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n return this.set(\r\n s * axis.x,\r\n s * axis.y,\r\n s * axis.z,\r\n Math.cos(rad)\r\n );\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n return this.set(\r\n ax * bw + aw * bx + ay * bz - az * by,\r\n ay * bw + aw * by + az * bx - ax * bz,\r\n az * bw + aw * bz + ax * by - ay * bx,\r\n aw * bw - ax * bx - ay * by - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n return this.set(\r\n scale0 * ax + scale1 * bx,\r\n scale0 * ay + scale1 * by,\r\n scale0 * az + scale1 * bz,\r\n scale0 * aw + scale1 * bw\r\n );\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n return this.set(\r\n -a0 * invDot,\r\n -a1 * invDot,\r\n -a2 * invDot,\r\n a3 * invDot\r\n );\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this._x = -this.x;\r\n this._y = -this.y;\r\n this._z = -this.z;\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + aw * bx,\r\n ay * bw + az * bx,\r\n az * bw - ay * bx,\r\n aw * bw - ax * bx\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw - az * by,\r\n ay * bw + aw * by,\r\n az * bw + ax * by,\r\n aw * bw - ay * by\r\n );\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n return this.set(\r\n ax * bw + ay * bz,\r\n ay * bw - ax * bz,\r\n az * bw + aw * bz,\r\n aw * bw - az * bz\r\n );\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set this Quaternion from the given Euler, based on Euler order.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromEuler\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Euler} euler - The Euler to convert from.\r\n * @param {boolean} [update=true] - Run the `onChangeCallback`?\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromEuler: function (euler, update)\r\n {\r\n var x = euler.x / 2;\r\n var y = euler.y / 2;\r\n var z = euler.z / 2;\r\n\r\n var c1 = Math.cos(x);\r\n var c2 = Math.cos(y);\r\n var c3 = Math.cos(z);\r\n\r\n var s1 = Math.sin(x);\r\n var s2 = Math.sin(y);\r\n var s3 = Math.sin(z);\r\n\r\n switch (euler.order)\r\n {\r\n case 'XYZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YXZ':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZXY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'ZYX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'YZX':\r\n {\r\n this.set(\r\n s1 * c2 * c3 + c1 * s2 * s3,\r\n c1 * s2 * c3 + s1 * c2 * s3,\r\n c1 * c2 * s3 - s1 * s2 * c3,\r\n c1 * c2 * c3 - s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n\r\n case 'XZY':\r\n {\r\n this.set(\r\n s1 * c2 * c3 - c1 * s2 * s3,\r\n c1 * s2 * c3 - s1 * c2 * s3,\r\n c1 * c2 * s3 + s1 * s2 * c3,\r\n c1 * c2 * c3 + s1 * s2 * s3,\r\n update\r\n );\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Quaternion from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Quaternion#setFromRotationMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to set the rotation from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setFromRotationMatrix: function (mat4)\r\n {\r\n var m = mat4.val;\r\n\r\n var m11 = m[0];\r\n var m12 = m[4];\r\n var m13 = m[8];\r\n var m21 = m[1];\r\n var m22 = m[5];\r\n var m23 = m[9];\r\n var m31 = m[2];\r\n var m32 = m[6];\r\n var m33 = m[10];\r\n\r\n var trace = m11 + m22 + m33;\r\n var s;\r\n\r\n if (trace > 0)\r\n {\r\n s = 0.5 / Math.sqrt(trace + 1.0);\r\n\r\n this.set(\r\n (m32 - m23) * s,\r\n (m13 - m31) * s,\r\n (m21 - m12) * s,\r\n 0.25 / s\r\n );\r\n }\r\n else if (m11 > m22 && m11 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\r\n\r\n this.set(\r\n 0.25 * s,\r\n (m12 + m21) / s,\r\n (m13 + m31) / s,\r\n (m32 - m23) / s\r\n );\r\n }\r\n else if (m22 > m33)\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\r\n\r\n this.set(\r\n (m12 + m21) / s,\r\n 0.25 * s,\r\n (m23 + m32) / s,\r\n (m13 - m31) / s\r\n );\r\n }\r\n else\r\n {\r\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\r\n\r\n this.set(\r\n (m13 + m31) / s,\r\n (m23 + m32) / s,\r\n 0.25 * s,\r\n (m21 - m12) / s\r\n );\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this._x = (m[7] - m[5]) * fRoot;\r\n this._y = (m[2] - m[6]) * fRoot;\r\n this._z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this._x = tmp[0];\r\n this._y = tmp[1];\r\n this._z = tmp[2];\r\n this._w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n this.onChangeCallback(this);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {number} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n *\r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n *\r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {number} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n *\r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n *\r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {number} index - The position within the grid to get the x/y value for.\r\n * @param {number} width - The width of the grid.\r\n * @param {number} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n }\r\n\r\n return out.set(x, y);\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x=0] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y=x] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n },\r\n\r\n /**\r\n * Project this Vector onto another.\r\n *\r\n * @method Phaser.Math.Vector2#project\r\n * @since 3.60.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The vector to project onto.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n project: function (src)\r\n {\r\n var scalar = this.dot(src) / src.dot(src);\r\n\r\n return this.copy(src).scale(scalar);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.min` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#min\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the minimum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n min: function (v)\r\n {\r\n this.x = Math.min(this.x, v.x);\r\n this.y = Math.min(this.y, v.y);\r\n this.z = Math.min(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector to be the `Math.max` result from the given vector.\r\n *\r\n * @method Phaser.Math.Vector3#max\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to check the maximum values against.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n max: function (v)\r\n {\r\n this.x = Math.max(this.x, v.x);\r\n this.y = Math.max(this.y, v.y);\r\n this.z = Math.max(this.z, v.z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Adds the two given Vector3s and sets the results into this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#addVectors\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to add.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to add.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addVectors: function (a, b)\r\n {\r\n this.x = a.x + b.x;\r\n this.y = a.y + b.y;\r\n this.z = a.z + b.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the position of the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixPosition\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the position from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixPosition: function (m)\r\n {\r\n return this.fromArray(m.val, 12);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the Matrix4 column specified.\r\n *\r\n * @method Phaser.Math.Vector3#setFromMatrixColumn\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to get the column from.\r\n * @param {number} index - The column index.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n setFromMatrixColumn: function (mat4, index)\r\n {\r\n return this.fromArray(mat4.val, index * 4);\r\n },\r\n\r\n /**\r\n * Sets the components of this Vector3 from the given array, based on the offset.\r\n *\r\n * Vector3.x = array[offset]\r\n * Vector3.y = array[offset + 1]\r\n * Vector3.z = array[offset + 2]\r\n *\r\n * @method Phaser.Math.Vector3#fromArray\r\n * @since 3.50.0\r\n *\r\n * @param {number[]} array - The array of values to get this Vector from.\r\n * @param {number} [offset=0] - The offset index into the array.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n fromArray: function (array, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.x = array[offset];\r\n this.y = array[offset + 1];\r\n this.z = array[offset + 2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add the given value to each component of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#addScalar\r\n * @since 3.50.0\r\n *\r\n * @param {number} s - The amount to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScalar: function (s)\r\n {\r\n this.x += s;\r\n this.y += s;\r\n this.z += s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add and scale a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#addScale\r\n * @since 3.50.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n * @param {number} scale - The amount to scale `v` by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n addScale: function (v, scale)\r\n {\r\n this.x += v.x * scale;\r\n this.y += v.y * scale;\r\n this.z += v.z * scale || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix3 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix3\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat3 - The Matrix3 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix3: function (mat3)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat3.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6] * z;\r\n this.y = m[1] * x + m[4] * y + m[7] * z;\r\n this.z = m[2] * x + m[5] * y + m[8] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Matrix4 and applies it to this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#applyMatrix4\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - The Matrix4 to apply to this Vector3.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n applyMatrix4: function (mat4)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat4.val;\r\n\r\n var w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\r\n\r\n this.x = (m[0] * x + m[4] * y + m[8] * z + m[12]) * w;\r\n this.y = (m[1] * x + m[5] * y + m[9] * z + m[13]) * w;\r\n this.z = (m[2] * x + m[6] * y + m[10] * z + m[14]) * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given view and projection matrices.\r\n *\r\n * @method Phaser.Math.Vector3#projectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} viewMatrix - A View Matrix.\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - A Projection Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n projectViewMatrix: function (viewMatrix, projectionMatrix)\r\n {\r\n return this.applyMatrix4(viewMatrix).applyMatrix4(projectionMatrix);\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the given inversed projection matrix and world matrix.\r\n *\r\n * @method Phaser.Math.Vector3#unprojectViewMatrix\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.Math.Matrix4} projectionMatrix - An inversed Projection Matrix.\r\n * @param {Phaser.Math.Matrix4} worldMatrix - A World View Matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unprojectViewMatrix: function (projectionMatrix, worldMatrix)\r\n {\r\n return this.applyMatrix4(projectionMatrix).applyMatrix4(worldMatrix);\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max`.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n if (value >= min && value <= max)\r\n {\r\n // Skip modulo if already in range\r\n return value;\r\n }\r\n\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n *\r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n *\r\n * Yes, we understand that this should actually be PI * 2, but\r\n * it has been like this for so long we can't change it now.\r\n * If you need PI * 2, use the PI2 constant instead.\r\n *\r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n *\r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n *\r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n *\r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n *\r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n *\r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Euler: require('./Euler'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n LinearXY: require('./LinearXY'),\r\n MaxAdd: require('./MaxAdd'),\r\n Median: require('./Median'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {number} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n *\r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n *\r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n *\r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar corePlugins = {};\r\n\r\n// Contains the plugins that the dev has loaded into their game\r\n// These are the source objects, not instantiated.\r\nvar customPlugins = {};\r\n\r\nvar PluginCache = {};\r\n\r\n/**\r\n * @namespace Phaser.Plugins.PluginCache\r\n */\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @method Phaser.Plugins.PluginCache.register\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\r\n */\r\nPluginCache.register = function (key, plugin, mapping, custom)\r\n{\r\n if (custom === undefined) { custom = false; }\r\n\r\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\r\n};\r\n\r\n/**\r\n * Stores a custom plugin in the global plugin cache.\r\n * The key must be unique, within the scope of the cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.registerCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {?any} data - A value to be passed to the plugin's `init` method.\r\n */\r\nPluginCache.registerCustom = function (key, plugin, mapping, data)\r\n{\r\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the core plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\r\n */\r\nPluginCache.hasCore = function (key)\r\n{\r\n return corePlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the custom plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\r\n */\r\nPluginCache.hasCustom = function (key)\r\n{\r\n return customPlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Returns the core plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCore\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\r\n */\r\nPluginCache.getCore = function (key)\r\n{\r\n return corePlugins[key];\r\n};\r\n\r\n/**\r\n * Returns the custom plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\r\n */\r\nPluginCache.getCustom = function (key)\r\n{\r\n return customPlugins[key];\r\n};\r\n\r\n/**\r\n * Returns an object from the custom cache based on the given key that can be instantiated.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustomClass\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {function} The custom plugin object.\r\n */\r\nPluginCache.getCustomClass = function (key)\r\n{\r\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\r\n};\r\n\r\n/**\r\n * Removes a core plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.remove\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the core plugin to remove.\r\n */\r\nPluginCache.remove = function (key)\r\n{\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes a custom plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.removeCustom\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the custom plugin to remove.\r\n */\r\nPluginCache.removeCustom = function (key)\r\n{\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Core Plugins.\r\n *\r\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\r\n * So be sure you only call this if you do not wish to run Phaser again.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCorePlugins = function ()\r\n{\r\n for (var key in corePlugins)\r\n {\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Custom Plugins.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCustomPlugins = function ()\r\n{\r\n for (var key in customPlugins)\r\n {\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = PluginCache;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2013-2023 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n * @param {string} pluginKey - The key under which this plugin has been installed into the Scene Systems.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager, pluginKey)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The key under which this plugin was installed into the Scene Systems.\r\n *\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#pluginKey\r\n * @type {string}\r\n * @readonly\r\n * @since 3.54.0\r\n */\r\n this.pluginKey = pluginKey;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n *\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n *\r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n *\r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.ADD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n *\r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n *\r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n *\r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n *\r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n *\r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n *\r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n *\r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n *\r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n *\r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n *\r\n * @name Phaser.BlendModes.HUE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.COLOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n *\r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n *\r\n * @name Phaser.BlendModes.ERASE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n *\r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n *\r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n *\r\n * @name Phaser.BlendModes.COPY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n *\r\n * @name Phaser.BlendModes.XOR\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Modes.\r\n *\r\n * @namespace Phaser.ScaleModes\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScaleModes = {\r\n\r\n /**\r\n * Default Scale Mode (Linear).\r\n *\r\n * @name Phaser.ScaleModes.DEFAULT\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n DEFAULT: 0,\r\n\r\n /**\r\n * Linear Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.LINEAR\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest Scale Mode.\r\n *\r\n * @name Phaser.ScaleModes.NEAREST\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n\r\n};\r\n\r\nmodule.exports = ScaleModes;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n *\r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @type {string}\r\n * @since 3.16.1\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Added to Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is added to a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('addedtoscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\r\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\r\n */\r\nmodule.exports = 'addedtoscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('boot', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#BOOT\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n *\r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n *\r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n *\r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('create', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#CREATE\r\n * @type {string}\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('destroy', listener)`.\r\n *\r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n *\r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n *\r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('pause', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('postupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author samme\r\n * @copyright 2021 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre-Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to this event from a Scene using `this.events.on('prerender', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * This event is dispatched after the Scene Display List is sorted and before the Scene is rendered.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_RENDER\r\n * @type {string}\r\n * @since 3.53.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'prerender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('preupdate', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('ready', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#READY\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Removed from Scene Event.\r\n *\r\n * This event is dispatched when a Game Object is removed from a Scene.\r\n *\r\n * Listen for it from a Scene using `this.events.on('removedfromscene', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\r\n * @type {string}\r\n * @since 3.50.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\r\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\r\n */\r\nmodule.exports = 'removedfromscene';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('render', listener)`.\r\n *\r\n * A Scene will only render if it is visible.\r\n *\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n *\r\n * @event Phaser.Scenes.Events#RENDER\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n *\r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('resume', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#RESUME\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n *\r\n * Listen to it from a Scene using `this.events.on('shutdown', listener)`.\r\n *\r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n *\r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n *\r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('sleep', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n *\r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n *\r\n * Listen to it from a Scene using `this.events.on('start', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#START\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioncomplete', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition.\r\n *\r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitioninit', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n *\r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionout', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n *\r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n *\r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionstart', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n *\r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n *\r\n * Listen to it from a Scene using `this.events.on('transitionwake', listener)`.\r\n *\r\n * The Scene Transition event flow is as follows:\r\n *\r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n *\r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @type {string}\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n *\r\n * This event is dispatched by a Scene during the main game loop step.\r\n *\r\n * The event flow for a single step of a Scene is as follows:\r\n *\r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists and the Scene is in a Running state, otherwise this is skipped.\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [PRE_RENDER]{@linkcode Phaser.Scenes.Events#event:PRE_RENDER}\r\n * 6. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n *\r\n * Listen to it from a Scene using `this.events.on('update', listener)`.\r\n *\r\n * A Scene will only run its step if it is active.\r\n *\r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n *\r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n *\r\n * Listen to it from a Scene using `this.events.on('wake', listener)`.\r\n *\r\n * @event Phaser.Scenes.Events#WAKE\r\n * @type {string}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\r\n BOOT: require('./BOOT_EVENT'),\r\n CREATE: require('./CREATE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n PAUSE: require('./PAUSE_EVENT'),\r\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\r\n RENDER: require('./RENDER_EVENT'),\r\n RESUME: require('./RESUME_EVENT'),\r\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\r\n SLEEP: require('./SLEEP_EVENT'),\r\n START: require('./START_EVENT'),\r\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\r\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\r\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\r\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\r\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\r\n UPDATE: require('./UPDATE_EVENT'),\r\n WAKE: require('./WAKE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Clamp = require('../math/Clamp');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @classdesc\r\n * A Frame is a section of a Texture.\r\n *\r\n * @class Frame\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\r\n * @param {(number|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {number} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n */\r\nvar Frame = new Class({\r\n\r\n initialize:\r\n\r\n function Frame (texture, name, sourceIndex, x, y, width, height)\r\n {\r\n /**\r\n * The Texture this Frame is a part of.\r\n *\r\n * @name Phaser.Textures.Frame#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The name of this Frame.\r\n * The name is unique within the Texture.\r\n *\r\n * @name Phaser.Textures.Frame#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The TextureSource this Frame is part of.\r\n *\r\n * @name Phaser.Textures.Frame#source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @since 3.0.0\r\n */\r\n this.source = texture.source[sourceIndex];\r\n\r\n /**\r\n * The index of the TextureSource in the Texture sources array.\r\n *\r\n * @name Phaser.Textures.Frame#sourceIndex\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.sourceIndex = sourceIndex;\r\n\r\n /**\r\n * A reference to the Texture Source WebGL Texture that this Frame is using.\r\n *\r\n * @name Phaser.Textures.Frame#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this.glTexture = this.source.glTexture;\r\n\r\n /**\r\n * X position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutX;\r\n\r\n /**\r\n * Y position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutY;\r\n\r\n /**\r\n * The width of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutWidth;\r\n\r\n /**\r\n * The height of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.cutHeight;\r\n\r\n /**\r\n * The X rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The Y rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The rendering width of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width;\r\n\r\n /**\r\n * The rendering height of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height;\r\n\r\n /**\r\n * Half the width, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth;\r\n\r\n /**\r\n * Half the height, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight;\r\n\r\n /**\r\n * The x center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerX;\r\n\r\n /**\r\n * The y center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.centerY;\r\n\r\n /**\r\n * The horizontal pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotX = 0;\r\n\r\n /**\r\n * The vertical pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotY = 0;\r\n\r\n /**\r\n * Does this Frame have a custom pivot point?\r\n *\r\n * @name Phaser.Textures.Frame#customPivot\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customPivot = false;\r\n\r\n /**\r\n * **CURRENTLY UNSUPPORTED**\r\n *\r\n * Is this frame is rotated or not in the Texture?\r\n * Rotation allows you to use rotated frames in texture atlas packing.\r\n * It has nothing to do with Sprite rotation.\r\n *\r\n * @name Phaser.Textures.Frame#rotated\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rotated = false;\r\n\r\n /**\r\n * Over-rides the Renderer setting.\r\n * -1 = use Renderer Setting\r\n * 0 = No rounding\r\n * 1 = Round\r\n *\r\n * @name Phaser.Textures.Frame#autoRound\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.autoRound = -1;\r\n\r\n /**\r\n * Any Frame specific custom data can be stored here.\r\n *\r\n * @name Phaser.Textures.Frame#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * WebGL UV u0 value.\r\n *\r\n * @name Phaser.Textures.Frame#u0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u0 = 0;\r\n\r\n /**\r\n * WebGL UV v0 value.\r\n *\r\n * @name Phaser.Textures.Frame#v0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v0 = 0;\r\n\r\n /**\r\n * WebGL UV u1 value.\r\n *\r\n * @name Phaser.Textures.Frame#u1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u1 = 0;\r\n\r\n /**\r\n * WebGL UV v1 value.\r\n *\r\n * @name Phaser.Textures.Frame#v1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v1 = 0;\r\n\r\n /**\r\n * The un-modified source frame, trim and UV data.\r\n *\r\n * @name Phaser.Textures.Frame#data\r\n * @type {object}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n cut: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n trim: false,\r\n sourceSize: {\r\n w: 0,\r\n h: 0\r\n },\r\n spriteSourceSize: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n radius: 0,\r\n drawImage: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n }\r\n };\r\n\r\n this.setSize(width, height, x, y);\r\n },\r\n\r\n /**\r\n * Sets the width, height, x and y of this Frame.\r\n *\r\n * This is called automatically by the constructor\r\n * and should rarely be changed on-the-fly.\r\n *\r\n * @method Phaser.Textures.Frame#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {number} width - The width of the frame before being trimmed.\r\n * @param {number} height - The height of the frame before being trimmed.\r\n * @param {number} [x=0] - The x coordinate of the top-left of this Frame.\r\n * @param {number} [y=0] - The y coordinate of the top-left of this Frame.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setSize: function (width, height, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.cutX = x;\r\n this.cutY = y;\r\n this.cutWidth = width;\r\n this.cutHeight = height;\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width * 0.5);\r\n this.halfHeight = Math.floor(height * 0.5);\r\n\r\n this.centerX = Math.floor(width / 2);\r\n this.centerY = Math.floor(height / 2);\r\n\r\n var data = this.data;\r\n var cut = data.cut;\r\n\r\n cut.x = x;\r\n cut.y = y;\r\n cut.w = width;\r\n cut.h = height;\r\n cut.r = x + width;\r\n cut.b = y + height;\r\n\r\n data.sourceSize.w = width;\r\n data.sourceSize.h = height;\r\n\r\n data.spriteSourceSize.w = width;\r\n data.spriteSourceSize.h = height;\r\n\r\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\r\n\r\n var drawImage = data.drawImage;\r\n\r\n drawImage.x = x;\r\n drawImage.y = y;\r\n drawImage.width = width;\r\n drawImage.height = height;\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\r\n *\r\n * @method Phaser.Textures.Frame#setTrim\r\n * @since 3.0.0\r\n *\r\n * @param {number} actualWidth - The width of the frame before being trimmed.\r\n * @param {number} actualHeight - The height of the frame before being trimmed.\r\n * @param {number} destX - The destination X position of the trimmed frame for display.\r\n * @param {number} destY - The destination Y position of the trimmed frame for display.\r\n * @param {number} destWidth - The destination width of the trimmed frame for display.\r\n * @param {number} destHeight - The destination height of the trimmed frame for display.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\r\n {\r\n var data = this.data;\r\n var ss = data.spriteSourceSize;\r\n\r\n // Store actual values\r\n\r\n data.trim = true;\r\n\r\n data.sourceSize.w = actualWidth;\r\n data.sourceSize.h = actualHeight;\r\n\r\n ss.x = destX;\r\n ss.y = destY;\r\n ss.w = destWidth;\r\n ss.h = destHeight;\r\n ss.r = destX + destWidth;\r\n ss.b = destY + destHeight;\r\n\r\n // Adjust properties\r\n this.x = destX;\r\n this.y = destY;\r\n\r\n this.width = destWidth;\r\n this.height = destHeight;\r\n\r\n this.halfWidth = destWidth * 0.5;\r\n this.halfHeight = destHeight * 0.5;\r\n\r\n this.centerX = Math.floor(destWidth / 2);\r\n this.centerY = Math.floor(destHeight / 2);\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * Takes a crop data object and, based on the rectangular region given, calculates the\r\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\r\n *\r\n * This is called directly by the Game Object Texture Components `setCrop` method.\r\n * Please use that method to crop a Game Object.\r\n *\r\n * @method Phaser.Textures.Frame#setCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\r\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\r\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\r\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\r\n {\r\n // Clamp the input values\r\n\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n var rw = this.realWidth;\r\n var rh = this.realHeight;\r\n\r\n x = Clamp(x, 0, rw);\r\n y = Clamp(y, 0, rh);\r\n\r\n width = Clamp(width, 0, rw - x);\r\n height = Clamp(height, 0, rh - y);\r\n\r\n var ox = cx + x;\r\n var oy = cy + y;\r\n var ow = width;\r\n var oh = height;\r\n\r\n var data = this.data;\r\n\r\n if (data.trim)\r\n {\r\n var ss = data.spriteSourceSize;\r\n\r\n // Need to check for intersection between the cut area and the crop area\r\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\r\n\r\n width = Clamp(width, 0, cw - x);\r\n height = Clamp(height, 0, ch - y);\r\n\r\n var cropRight = x + width;\r\n var cropBottom = y + height;\r\n\r\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\r\n\r\n if (intersects)\r\n {\r\n var ix = Math.max(ss.x, x);\r\n var iy = Math.max(ss.y, y);\r\n var iw = Math.min(ss.r, cropRight) - ix;\r\n var ih = Math.min(ss.b, cropBottom) - iy;\r\n\r\n ow = iw;\r\n oh = ih;\r\n\r\n if (flipX)\r\n {\r\n ox = cx + (cw - (ix - ss.x) - iw);\r\n }\r\n else\r\n {\r\n ox = cx + (ix - ss.x);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - (iy - ss.y) - ih);\r\n }\r\n else\r\n {\r\n oy = cy + (iy - ss.y);\r\n }\r\n\r\n x = ix;\r\n y = iy;\r\n\r\n width = iw;\r\n height = ih;\r\n }\r\n else\r\n {\r\n ox = 0;\r\n oy = 0;\r\n ow = 0;\r\n oh = 0;\r\n }\r\n }\r\n else\r\n {\r\n if (flipX)\r\n {\r\n ox = cx + (cw - x - width);\r\n }\r\n\r\n if (flipY)\r\n {\r\n oy = cy + (ch - y - height);\r\n }\r\n }\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n // Map the given coordinates into UV space, clamping to the 0-1 range.\r\n\r\n crop.u0 = Math.max(0, ox / tw);\r\n crop.v0 = Math.max(0, oy / th);\r\n crop.u1 = Math.min(1, (ox + ow) / tw);\r\n crop.v1 = Math.min(1, (oy + oh) / th);\r\n\r\n crop.x = x;\r\n crop.y = y;\r\n\r\n crop.cx = ox;\r\n crop.cy = oy;\r\n crop.cw = ow;\r\n crop.ch = oh;\r\n\r\n crop.width = width;\r\n crop.height = height;\r\n\r\n crop.flipX = flipX;\r\n crop.flipY = flipY;\r\n\r\n return crop;\r\n },\r\n\r\n /**\r\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\r\n * Called automatically by `setFrame`.\r\n *\r\n * @method Phaser.Textures.Frame#updateCropUVs\r\n * @since 3.11.0\r\n *\r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n updateCropUVs: function (crop, flipX, flipY)\r\n {\r\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\r\n },\r\n\r\n /**\r\n * Directly sets the canvas and WebGL UV data for this frame.\r\n *\r\n * Use this if you need to override the values that are generated automatically\r\n * when the Frame is created.\r\n *\r\n * @method Phaser.Textures.Frame#setUVs\r\n * @since 3.50.0\r\n *\r\n * @param {number} width - Width of this frame for the Canvas data.\r\n * @param {number} height - Height of this frame for the Canvas data.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n setUVs: function (width, height, u0, v0, u1, v1)\r\n {\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = width;\r\n cd.height = height;\r\n\r\n // WebGL data\r\n\r\n this.u0 = u0;\r\n this.v0 = v0;\r\n\r\n this.u1 = u1;\r\n this.v1 = v1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache and the drawImage cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVs\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVs: function ()\r\n {\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = cw;\r\n cd.height = ch;\r\n\r\n // WebGL data\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = cx / tw;\r\n this.v0 = cy / th;\r\n\r\n this.u1 = (cx + cw) / tw;\r\n this.v1 = (cy + ch) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVsInverted\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Frame object.\r\n */\r\n updateUVsInverted: function ()\r\n {\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = (this.cutX + this.cutHeight) / tw;\r\n this.v0 = this.cutY / th;\r\n\r\n this.u1 = this.cutX / tw;\r\n this.v1 = (this.cutY + this.cutWidth) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clones this Frame into a new Frame object.\r\n *\r\n * @method Phaser.Textures.Frame#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} A clone of this Frame.\r\n */\r\n clone: function ()\r\n {\r\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\r\n\r\n clone.cutX = this.cutX;\r\n clone.cutY = this.cutY;\r\n clone.cutWidth = this.cutWidth;\r\n clone.cutHeight = this.cutHeight;\r\n\r\n clone.x = this.x;\r\n clone.y = this.y;\r\n\r\n clone.width = this.width;\r\n clone.height = this.height;\r\n\r\n clone.halfWidth = this.halfWidth;\r\n clone.halfHeight = this.halfHeight;\r\n\r\n clone.centerX = this.centerX;\r\n clone.centerY = this.centerY;\r\n\r\n clone.rotated = this.rotated;\r\n\r\n clone.data = Extend(true, clone.data, this.data);\r\n\r\n clone.updateUVs();\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\r\n *\r\n * @method Phaser.Textures.Frame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.source = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n this.customData = null;\r\n this.data = null;\r\n },\r\n\r\n /**\r\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.w;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.h;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\r\n *\r\n * @name Phaser.Textures.Frame#radius\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.data.radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Frame trimmed or not?\r\n *\r\n * @name Phaser.Textures.Frame#trimmed\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n trimmed: {\r\n\r\n get: function ()\r\n {\r\n return this.data.trim;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Canvas drawImage data object.\r\n *\r\n * @name Phaser.Textures.Frame#canvasData\r\n * @type {object}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canvasData: {\r\n\r\n get: function ()\r\n {\r\n return this.data.drawImage;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Frame;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {boolean} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {boolean} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Tween States.\r\n *\r\n * @namespace Phaser.Tweens.States\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\n/**\r\n * Phaser Tween state constants.\r\n *\r\n * @typedef {Phaser.Tweens.States} Phaser.Tweens.StateType\r\n * @memberof Phaser.Tweens\r\n * @since 3.60.0\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.CREATED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n // 1 used to be INIT prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n // 3 used to be OFFSET_DELAY prior to 3.60\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_RENDER\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_FORWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.PLAYING_BACKWARD\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.HOLD_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.REPEAT_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state. The Tween has been created but has not yet been added to the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING: 20,\r\n\r\n /**\r\n * Tween state. The Tween is active within the Tween Manager. This means it is either playing,\r\n * or was playing and is currently paused, but in both cases it's still being processed by\r\n * the Tween Manager, so is considered 'active'.\r\n *\r\n * @name Phaser.Tweens.States.ACTIVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 21,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a loop countdown to elapse.\r\n *\r\n * @name Phaser.Tweens.States.LOOP_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a complete delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.COMPLETE_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 23,\r\n\r\n /**\r\n * Tween state. The Tween is waiting for a starting delay to elapse.\r\n *\r\n * @name Phaser.Tweens.States.START_DELAY\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n START_DELAY: 24,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback and is waiting to be removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.PENDING_REMOVE\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state. The Tween has been removed from the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.REMOVED\r\n * @type {number}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26,\r\n\r\n /**\r\n * Tween state. The Tween has finished playback but was flagged as 'persistent' during creation,\r\n * so will not be automatically removed by the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.FINISHED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n FINISHED: 27,\r\n\r\n /**\r\n * Tween state. The Tween has been destroyed and can no longer be played by a Tween Manager.\r\n *\r\n * @name Phaser.Tweens.States.DESTROYED\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n DESTROYED: 28,\r\n\r\n /**\r\n * A large integer value used for 'infinite' style countdowns.\r\n *\r\n * Similar use-case to Number.MAX_SAFE_INTEGER but we cannot use that because it's not\r\n * supported on IE.\r\n *\r\n * @name Phaser.Tweens.States.MAX\r\n * @type {number}\r\n * @const\r\n * @since 3.60.0\r\n */\r\n MAX: 999999999999\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @ignore\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @ignore\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * Existing elements in the array are shifted up.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {number} [index=0] - The index in the array where the item will be inserted.\r\n * @param {number} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {number} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {number} startIndex - The start index to search from.\r\n * @param {number} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array and flattens it, returning a shallow-copy flattened array.\r\n *\r\n * @function Phaser.Utils.Array.Flatten\r\n * @since 3.60.0\r\n *\r\n * @param {array} array - The array to flatten.\r\n * @param {array} [output] - An array to hold the results in.\r\n *\r\n * @return {array} The flattened output array.\r\n */\r\nvar Flatten = function (array, output)\r\n{\r\n if (output === undefined) { output = []; }\r\n\r\n for (var i = 0; i < array.length; i++)\r\n {\r\n if (Array.isArray(array[i]))\r\n {\r\n Flatten(array[i], output);\r\n }\r\n else\r\n {\r\n output.push(array[i]);\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = Flatten;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {number} [startIndex=0] - An optional start index to search from.\r\n * @param {number} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {number} [startIndex=0] - An optional start index.\r\n * @param {number} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element above another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveAbove\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move above base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveAbove = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex > baseIndex)\r\n {\r\n // item1 is already above item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === array.length - 1)\r\n {\r\n array.push(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveAbove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element below another one in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveBelow\r\n * @since 3.55.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The element to move below base element.\r\n * @param {*} item2 - The base element.\r\n *\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveBelow = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var currentIndex = array.indexOf(item1);\r\n var baseIndex = array.indexOf(item2);\r\n\r\n if (currentIndex < 0 || baseIndex < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n if (currentIndex < baseIndex)\r\n {\r\n // item1 is already below item2\r\n return array;\r\n }\r\n\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n if (baseIndex === 0)\r\n {\r\n array.unshift(item1);\r\n }\r\n else\r\n {\r\n array.splice(baseIndex, 0, item1);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveBelow;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {number} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]`\n * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]`\n *\n * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n var i;\n var asString = false;\n\n if (prefix || suffix)\n {\n asString = true;\n\n if (!prefix)\n {\n prefix = '';\n }\n\n if (!suffix)\n {\n suffix = '';\n }\n }\n\n if (end < start)\n {\n for (i = start; i >= end; i--)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n else\n {\n for (i = start; i <= end; i++)\n {\n if (asString)\n {\n result.push(prefix + i.toString() + suffix);\n }\n else\n {\n result.push(i);\n }\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\r\n\r\n/**\r\n * Create an array of numbers (positive and/or negative) progressing from `start`\r\n * up to but not including `end` by advancing by `step`.\r\n *\r\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\r\n *\r\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\r\n * for forward compatibility make sure to pass in actual numbers.\r\n *\r\n * @example\r\n * NumberArrayStep(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * NumberArrayStep(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * NumberArrayStep(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * NumberArrayStep(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * NumberArrayStep(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * NumberArrayStep(0);\r\n * // => []\r\n *\r\n * @function Phaser.Utils.Array.NumberArrayStep\r\n * @since 3.0.0\r\n *\r\n * @param {number} [start=0] - The start of the range.\r\n * @param {number} [end=null] - The end of the range.\r\n * @param {number} [step=1] - The value to increment or decrement by.\r\n *\r\n * @return {number[]} The array of number values.\r\n */\r\nvar NumberArrayStep = function (start, end, step)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (end === undefined) { end = null; }\r\n if (step === undefined) { step = 1; }\r\n\r\n if (end === null)\r\n {\r\n end = start;\r\n start = 0;\r\n }\r\n\r\n var result = [];\r\n\r\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n result.push(start);\r\n start += step;\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArrayStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {number} k - The k-th element index.\r\n * @param {number} [left=0] - The index of the left part of the range.\r\n * @param {number} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = require('../object/GetValue');\r\nvar Shuffle = require('./Shuffle');\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n *\r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n *\r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n *\r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n *\r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n *\r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n *\r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n *\r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n var removed = [];\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n removed.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return removed;\r\n};\r\n\r\nmodule.exports = Remove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n *\r\n * The array is modified in-place.\r\n *\r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {number} startIndex - The start index to remove from.\r\n * @param {number} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {number} [start=0] - The array index to start the search from.\r\n * @param {number} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search within.\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The \"rotation\" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The \"rotation\" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {number} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n *\r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {number} startIndex - The start index.\r\n * @param {number} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {number} [startIndex] - An optional start index to search from.\r\n * @param {number} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n","/**\n * @author Richard Davey \n * @copyright 2013-2023 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given array and runs a numeric sort on it, ignoring any non-digits that\n * may be in the entries.\n *\n * You should only run this on arrays containing strings.\n *\n * @function Phaser.Utils.Array.SortByDigits\n * @since 3.50.0\n *\n * @param {string[]} array - The input array of strings.\n *\n * @return {string[]} The sorted input array.\n */\nvar SortByDigits = function (array)\n{\n var re = /\\D/g;\n\n array.sort(function (a, b)\n {\n return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10));\n });\n\n return array;\n};\n\nmodule.exports = SortByDigits;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {number} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n","/**\r\n * @author Richard Davey \r\n * @author Angry Bytes (and contributors)\r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Device = require('../../device');\r\n\r\n/**\r\n * The comparator function.\r\n *\r\n * @ignore\r\n *\r\n * @param {*} a - The first item to test.\r\n * @param {*} b - The second itemt to test.\r\n *\r\n * @return {boolean} True if they localCompare, otherwise false.\r\n */\r\nfunction Compare (a, b)\r\n{\r\n return String(a).localeCompare(b);\r\n}\r\n\r\n/**\r\n * Process the array contents.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} array - The array to process.\r\n * @param {function} compare - The comparison function.\r\n *\r\n * @return {array} - The processed array.\r\n */\r\nfunction Process (array, compare)\r\n{\r\n // Short-circuit when there's nothing to sort.\r\n var len = array.length;\r\n\r\n if (len <= 1)\r\n {\r\n return array;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n\r\n for (var chk = 1; chk < len; chk *= 2)\r\n {\r\n RunPass(array, compare, chk, buffer);\r\n\r\n var tmp = array;\r\n\r\n array = buffer;\r\n\r\n buffer = tmp;\r\n }\r\n\r\n return array;\r\n}\r\n\r\n/**\r\n * Run a single pass with the given chunk size.\r\n *\r\n * @ignore\r\n *\r\n * @param {array} arr - The array to run the pass on.\r\n * @param {function} comp - The comparison function.\r\n * @param {number} chk - The number of iterations.\r\n * @param {array} result - The array to store the result in.\r\n */\r\nfunction RunPass (arr, comp, chk, result)\r\n{\r\n var len = arr.length;\r\n var i = 0;\r\n\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl)\r\n {\r\n r = l + chk;\r\n e = r + chk;\r\n\r\n if (r > len)\r\n {\r\n r = len;\r\n }\r\n\r\n if (e > len)\r\n {\r\n e = len;\r\n }\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n\r\n while (true)\r\n {\r\n // Compare the chunks.\r\n if (li < r && ri < e)\r\n {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0)\r\n {\r\n result[i++] = arr[li++];\r\n }\r\n else\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n else if (li < r)\r\n {\r\n // Nothing to compare, just flush what's left.\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e)\r\n {\r\n result[i++] = arr[ri++];\r\n }\r\n else\r\n {\r\n // Both iterators are at the chunk ends.\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * An in-place stable array sort, because `Array#sort()` is not guaranteed stable.\r\n *\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The input array to be sorted.\r\n * @param {function} [compare] - The comparison function.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar StableSort = function (array, compare)\r\n{\r\n if (compare === undefined) { compare = Compare; }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n if (!array || array.length < 2)\r\n {\r\n return array;\r\n }\r\n\r\n if (Device.features.stableSort)\r\n {\r\n return array.sort(compare);\r\n }\r\n\r\n var result = Process(array, compare);\r\n\r\n // This simply copies back if the result isn't in the original array, which happens on an odd number of passes.\r\n if (result !== array)\r\n {\r\n RunPass(result, null, array.length, array);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = StableSort;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return array;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: require('./matrix'),\r\n\r\n Add: require('./Add'),\r\n AddAt: require('./AddAt'),\r\n BringToTop: require('./BringToTop'),\r\n CountAllMatching: require('./CountAllMatching'),\r\n Each: require('./Each'),\r\n EachInRange: require('./EachInRange'),\r\n FindClosestInSorted: require('./FindClosestInSorted'),\r\n Flatten: require('./Flatten'),\r\n GetAll: require('./GetAll'),\r\n GetFirst: require('./GetFirst'),\r\n GetRandom: require('./GetRandom'),\r\n MoveDown: require('./MoveDown'),\r\n MoveTo: require('./MoveTo'),\r\n MoveUp: require('./MoveUp'),\r\n MoveAbove: require('./MoveAbove'),\r\n MoveBelow: require('./MoveBelow'),\r\n NumberArray: require('./NumberArray'),\r\n NumberArrayStep: require('./NumberArrayStep'),\r\n QuickSelect: require('./QuickSelect'),\r\n Range: require('./Range'),\r\n Remove: require('./Remove'),\r\n RemoveAt: require('./RemoveAt'),\r\n RemoveBetween: require('./RemoveBetween'),\r\n RemoveRandomElement: require('./RemoveRandomElement'),\r\n Replace: require('./Replace'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateRight: require('./RotateRight'),\r\n SafeRange: require('./SafeRange'),\r\n SendToBack: require('./SendToBack'),\r\n SetAll: require('./SetAll'),\r\n Shuffle: require('./Shuffle'),\r\n SortByDigits: require('./SortByDigits'),\r\n SpliceOne: require('./SpliceOne'),\r\n StableSort: require('./StableSort'),\r\n Swap: require('./Swap')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = require('../../string/Pad');\r\nvar CheckMatrix = require('./CheckMatrix');\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = require('./CheckMatrix');\r\nvar TransposeMatrix = require('./TransposeMatrix');\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateLeft = require('../RotateLeft');\r\nvar RotateRight = require('../RotateRight');\r\n\r\n/**\r\n * Translates the given Array Matrix by shifting each column and row the\r\n * amount specified.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Translate\r\n * @since 3.50.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to translate.\r\n * @param {number} [x=0] - The amount to horizontally translate the matrix by.\r\n * @param {number} [y=0] - The amount to vertically translate the matrix by.\r\n *\r\n * @return {T[][]} The translated matrix.\r\n */\r\nvar TranslateMatrix = function (matrix, x, y)\r\n{\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n // Vertical translation\r\n\r\n if (y !== 0)\r\n {\r\n if (y < 0)\r\n {\r\n // Shift Up\r\n RotateLeft(matrix, Math.abs(y));\r\n }\r\n else\r\n {\r\n // Shift Down\r\n RotateRight(matrix, y);\r\n }\r\n }\r\n\r\n // Horizontal translation\r\n\r\n if (x !== 0)\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n var row = matrix[i];\r\n\r\n if (x < 0)\r\n {\r\n RotateLeft(row, Math.abs(x));\r\n }\r\n else\r\n {\r\n RotateRight(row, x);\r\n }\r\n }\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = TranslateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)\r\n * have the same length. There must be at least two rows. This is an example matrix:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n *\r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: require('./CheckMatrix'),\r\n MatrixToString: require('./MatrixToString'),\r\n ReverseColumns: require('./ReverseColumns'),\r\n ReverseRows: require('./ReverseRows'),\r\n Rotate180: require('./Rotate180'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateMatrix: require('./RotateMatrix'),\r\n RotateRight: require('./RotateRight'),\r\n Translate: require('./TranslateMatrix'),\r\n TransposeMatrix: require('./TransposeMatrix')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Deep Copy the given object or array.\r\n *\r\n * @function Phaser.Utils.Objects.DeepCopy\r\n * @since 3.50.0\r\n *\r\n * @param {object} obj - The object to deep copy.\r\n *\r\n * @return {object} A deep copy of the original object.\r\n */\r\nvar DeepCopy = function (inObject)\r\n{\r\n var outObject;\r\n var value;\r\n var key;\r\n\r\n if (typeof inObject !== 'object' || inObject === null)\r\n {\r\n // inObject is not an object\r\n return inObject;\r\n }\r\n\r\n // Create an array or object to hold the values\r\n outObject = Array.isArray(inObject) ? [] : {};\r\n\r\n for (key in inObject)\r\n {\r\n value = inObject[key];\r\n\r\n // Recursively (deep) copy for nested objects, including arrays\r\n outObject[key] = DeepCopy(value);\r\n }\r\n\r\n return outObject;\r\n};\r\n\r\nmodule.exports = DeepCopy;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n *\r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n *\r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves a value from an object, or an alternative object, falling to a back-up default value if not found.\r\n *\r\n * The key is a string, which can be split based on the use of the period character.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * const source = {\r\n * lives: 3,\r\n * render: {\r\n * screen: {\r\n * width: 1024\r\n * }\r\n * }\r\n * }\r\n *\r\n * const lives = GetValue(source, 'lives', 1);\r\n * const width = GetValue(source, 'render.screen.width', 800);\r\n * const height = GetValue(source, 'render.screen.height', 600);\r\n * ```\r\n *\r\n * In the code above, `lives` will be 3 because it's defined at the top level of `source`.\r\n * The `width` value will be 1024 because it can be found inside the `render.screen` object.\r\n * The `height` value will be 600, the default value, because it is missing from the `render.screen` object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The primary object to try to retrieve the value from. If not found in here, `altSource` is checked.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n * @param {object} [altSource] - An alternative object to retrieve the value from. If the property exists in `source` then `altSource` will not be used.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue, altSource)\r\n{\r\n if ((!source && !altSource) || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source && source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (altSource && altSource.hasOwnProperty(key))\r\n {\r\n return altSource[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parentA = source;\r\n var parentB = altSource;\r\n var valueA = defaultValue;\r\n var valueB = defaultValue;\r\n var valueAFound = true;\r\n var valueBFound = true;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parentA && parentA.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentA has a key property, let's carry on down\r\n valueA = parentA[keys[i]];\r\n parentA = parentA[keys[i]];\r\n }\r\n else\r\n {\r\n valueAFound = false;\r\n }\r\n\r\n if (parentB && parentB.hasOwnProperty(keys[i]))\r\n {\r\n // Yes parentB has a key property, let's carry on down\r\n valueB = parentB[keys[i]];\r\n parentB = parentB[keys[i]];\r\n }\r\n else\r\n {\r\n valueBFound = false;\r\n }\r\n }\r\n\r\n if (valueAFound)\r\n {\r\n return valueA;\r\n }\r\n else if (valueBFound)\r\n {\r\n return valueB;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (!obj || typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2013-2023 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and pads it out, to the length required, using the character\r\n * specified. For example if you need a string to be 6 characters long, you can call:\r\n *\r\n * `pad('bob', 6, '-', 2)`\r\n *\r\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\r\n *\r\n * You can also use it to pad numbers (they are always returned as strings):\r\n *\r\n * `pad(512, 6, '0', 1)`\r\n *\r\n * Would return: `000512` with the string padded to the left.\r\n *\r\n * If you don't specify a direction it'll pad to both sides:\r\n *\r\n * `pad('c64', 7, '*')`\r\n *\r\n * Would return: `**c64**`\r\n *\r\n * @function Phaser.Utils.String.Pad\r\n * @since 3.0.0\r\n *\r\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\r\n * @param {number} [len=0] - The number of characters to be added.\r\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\r\n * @param {number} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\r\n *\r\n * @return {string} The padded string.\r\n */\r\nvar Pad = function (str, len, pad, dir)\r\n{\r\n if (len === undefined) { len = 0; }\r\n if (pad === undefined) { pad = ' '; }\r\n if (dir === undefined) { dir = 3; }\r\n\r\n str = str.toString();\r\n\r\n var padlen = 0;\r\n\r\n if (len + 1 >= str.length)\r\n {\r\n switch (dir)\r\n {\r\n case 1:\r\n str = new Array(len + 1 - str.length).join(pad) + str;\r\n break;\r\n\r\n case 3:\r\n var right = Math.ceil((padlen = len - str.length) / 2);\r\n var left = padlen - right;\r\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\r\n break;\r\n\r\n default:\r\n str = str + new Array(len + 1 - str.length).join(pad);\r\n break;\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = Pad;\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./SpinePlugin.js\");\n",""],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/spine4.1/dist/SpineWebGLPlugin.js b/plugins/spine4.1/dist/SpineWebGLPlugin.js index 99901af33..709cded7b 100644 --- a/plugins/spine4.1/dist/SpineWebGLPlugin.js +++ b/plugins/spine4.1/dist/SpineWebGLPlugin.js @@ -24960,7 +24960,7 @@ var FX = new Class({ pipeline = pipeline.pop(); } - if (pipeline) pipeline.controller = fx; + pipeline.controller = fx; return fx; } @@ -54612,4 +54612,4 @@ module.exports = Pad; /******/ window.SpinePlugin = __webpack_exports__; /******/ /******/ })() -; +; \ No newline at end of file diff --git a/src/gameobjects/components/FX.js b/src/gameobjects/components/FX.js index 033a97d1c..191345ac3 100644 --- a/src/gameobjects/components/FX.js +++ b/src/gameobjects/components/FX.js @@ -10,8 +10,7 @@ var SpliceOne = require('../../utils/array/SpliceOne'); /** * @classdesc - * The FX Component features a set of methods used for applying a range of - * special built-in effects to a Game Object. + * The FX Component features a set of methods used for applying a range of special built-in effects to a Game Object. * * The effects include the following: * @@ -30,8 +29,7 @@ var SpliceOne = require('../../utils/array/SpliceOne'); * * Vignette * * Wipe / Reveal * - * All Game Objects support Post FX. These are effects applied after the Game - * Object has been rendered. + * All Game Objects support Post FX. These are effects applied after the Game Object has been rendered. * * Texture-based Game Objects also support Pre FX, including: * @@ -44,31 +42,25 @@ var SpliceOne = require('../../utils/array/SpliceOne'); * * And any Game Object that extends the above. * - * The difference between Pre FX and Post FX are that all Post FX take place in - * a canvas (renderer) sized frame buffer, after the Game Object has been - * rendered. Pre FX, however, take place in a texture sized frame buffer, which - * is sized based on the Game Object itself. The end result is then composited - * back to the main game canvas. For intensive effects, such as blur, bloom or - * glow, which can require many iterations, this is a much more efficient way to - * apply the effect, as only it only has to work on a Game Object sized texture - * and not all pixels in the canvas. + * The difference between Pre FX and Post FX are that all Post FX take place in a canvas (renderer) sized frame buffer, + * after the Game Object has been rendered. Pre FX, however, take place in a texture sized frame buffer, which is sized + * based on the Game Object itself. The end result is then composited back to the main game canvas. For intensive effects, + * such as blur, bloom or glow, which can require many iterations, this is a much more efficient way to apply the effect, + * as only it only has to work on a Game Object sized texture and not all pixels in the canvas. * * In short, you should always try and use a Pre FX if you can. * - * Due to the way that FX work they can be stacked-up. For example, you can - * apply a blur to a Game Object, then apply a bloom effect to the same Game - * Object. The bloom effect will be applied to the blurred texture, not the - * original. Keep the order in mind when stacking effects. + * Due to the way that FX work they can be stacked-up. For example, you can apply a blur to a Game Object, then apply + * a bloom effect to the same Game Object. The bloom effect will be applied to the blurred texture, not the original. + * Keep the order in mind when stacking effects. * * All effects are WebGL only and do not have canvas counterparts. * - * As you can appreciate, some effects are more expensive than others. For - * example, a bloom effect is going to be more expensive than a simple color - * matrix effect, so please consider using them wisely and performance test your - * target platforms early on in production. + * As you can appreciate, some effects are more expensive than others. For example, a bloom effect is going to be more + * expensive than a simple color matrix effect, so please consider using them wisely and performance test your target + * platforms early on in production. * - * This component is created automatically by the `PostPipeline` class and does - * not need to be instantiated directly. + * This component is created automatically by the `PostPipeline` class and does not need to be instantiated directly. * * @class FX * @memberof Phaser.GameObjects.Components @@ -76,15 +68,15 @@ var SpliceOne = require('../../utils/array/SpliceOne'); * @since 3.60.0 * @webglOnly * - * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game - * Object that owns this FX Component. + * @param {Phaser.GameObjects.GameObject} gameObject - A reference to the Game Object that owns this FX Component. * @param {boolean} isPost - Is this a Pre or Post FX Component? */ var FX = new Class({ - initialize: + initialize: - function FX(gameObject, isPost) { + function FX (gameObject, isPost) + { /** * A reference to the Game Object that owns this FX Component. * @@ -147,749 +139,701 @@ var FX = new Class({ * @since 3.60.0 */ this.padding = 0; - }, + }, - /** - * Sets the amount of extra padding to be applied to this Game Object - * when it is being rendered by a PreFX Pipeline. - * - * Lots of FX require additional spacing added to the texture the - * Game Object uses, for example a glow or shadow effect, and this - * method allows you to control how much extra padding is included - * in addition to the texture size. - * - * You do not need to set this if you're only using Post FX. - * - * @method Phaser.GameObjects.Components.FX#setPadding - * @webglOnly - * @since 3.60.0 - * - * @param {number} [padding=0] - The amount of padding to add to this Game - * Object. - * - * @return {this} This Game Object instance. - */ - setPadding: function(padding) { - if (padding === undefined) { - padding = 0; - } + /** + * Sets the amount of extra padding to be applied to this Game Object + * when it is being rendered by a PreFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * + * You do not need to set this if you're only using Post FX. + * + * @method Phaser.GameObjects.Components.FX#setPadding + * @webglOnly + * @since 3.60.0 + * + * @param {number} [padding=0] - The amount of padding to add to this Game Object. + * + * @return {this} This Game Object instance. + */ + setPadding: function (padding) + { + if (padding === undefined) { padding = 0; } - this.padding = padding; - - return this.gameObject; - }, - - /** - * This callback is invoked when this Game Object is copied by a PreFX - * Pipeline. - * - * This happens when the pipeline uses its `copySprite` method. - * - * It's invoked prior to the copy, allowing you to set shader uniforms, etc on - * the pipeline. - * - * @method Phaser.GameObjects.Components.FX#onFXCopy - * @since 3.60.0 - * - * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX - * Pipeline that invoked this callback. - */ - onFXCopy: function() {}, - - /** - * This callback is invoked when this Game Object is rendered by a PreFX - * Pipeline. - * - * This happens when the pipeline uses its `drawSprite` method. - * - * It's invoked prior to the draw, allowing you to set shader uniforms, etc on - * the pipeline. - * - * @method Phaser.GameObjects.Components.FX#onFX - * @since 3.60.0 - * - * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX - * Pipeline that invoked this callback. - */ - onFX: function() {}, - - /** - * Enables this FX Component and applies the FXPipeline to the parent Game - * Object. - * - * This is called automatically whenever you call a method such as `addBloom`, - * etc. - * - * You can check the `enabled` property to see if the Game Object is already - * enabled, or not. - * - * This only applies to Pre FX. Post FX are always enabled. - * - * @method Phaser.GameObjects.Components.FX#enable - * @since 3.60.0 - * - * @param {number} [padding=0] - The amount of padding to add to this Game - * Object. - */ - enable: function(padding) { - if (this.isPost) { - return; - } - - var renderer = this.gameObject.scene.sys.renderer; - - if (renderer && renderer.pipelines) { - this.gameObject.pipeline = renderer.pipelines.FX_PIPELINE; - - if (padding !== undefined) { this.padding = padding; - } - this.enabled = true; - } else { - this.enabled = false; - } - }, + return this.gameObject; + }, - /** - * Destroys and removes all FX Controllers that are part of this FX Component, - * then disables it. - * - * If this is a Pre FX Component it will only remove Pre FX. - * If this is a Post FX Component it will only remove Post FX. - * - * To remove both at once use the `GameObject.clearFX` method instead. - * - * @method Phaser.GameObjects.Components.FX#clear - * @since 3.60.0 - * - * @return {this} This Game Object instance. - */ - clear: function() { - if (this.isPost) { - this.gameObject.resetPostPipeline(true); - } else { - var list = this.list; + /** + * This callback is invoked when this Game Object is copied by a PreFX Pipeline. + * + * This happens when the pipeline uses its `copySprite` method. + * + * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFXCopy + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback. + */ + onFXCopy: function () + { + }, - for (var i = 0; i < list.length; i++) { - list[i].destroy(); - } + /** + * This callback is invoked when this Game Object is rendered by a PreFX Pipeline. + * + * This happens when the pipeline uses its `drawSprite` method. + * + * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline. + * + * @method Phaser.GameObjects.Components.FX#onFX + * @since 3.60.0 + * + * @param {Phaser.Renderer.WebGL.Pipelines.PreFXPipeline} pipeline - The PreFX Pipeline that invoked this callback. + */ + onFX: function () + { + }, - this.list = []; - } - - this.enabled = false; - - return this.gameObject; - }, - - /** - * Searches for the given FX Controller within this FX Component. - * - * If found, the controller is removed from this component and then destroyed. - * - * @method Phaser.GameObjects.Components.FX#remove - * @since 3.60.0 - * - * @generic {Phaser.FX.Controller} T - * @genericUse {T} - [fx] - * - * @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX - * Component. - * - * @return {this} This Game Object instance. - */ - remove: function(fx) { - var i; - - if (this.isPost) { - var pipelines = this.gameObject.getPostPipeline(String(fx.type)); - - if (!Array.isArray(pipelines)) { - pipelines = [pipelines]; - } - - for (i = 0; i < pipelines.length; i++) { - var pipeline = pipelines[i]; - - if (pipeline.controller === fx) { - this.gameObject.removePostPipeline(pipeline); - - fx.destroy(); - - break; - } - } - } else { - var list = this.list; - - for (i = 0; i < list.length; i++) { - if (list[i] === fx) { - SpliceOne(list, i); - - fx.destroy(); - } - } - } - - return this.gameObject; - }, - - /** - * Disables this FX Component. - * - * This will reset the pipeline on the Game Object that owns this component - * back to its default and flag this component as disabled. - * - * You can re-enable it again by calling `enable` for Pre FX or by adding an - * FX for Post FX. - * - * Optionally, set `clear` to destroy all current FX Controllers. - * - * @method Phaser.GameObjects.Components.FX#disable - * @since 3.60.0 - * - * @param {boolean} [clear=false] - Destroy and remove all FX Controllers that - * are part of this component. - * - * @return {this} This Game Object instance. - */ - disable: function(clear) { - if (clear === undefined) { - clear = false; - } - - if (!this.isPost) { - this.gameObject.resetPipeline(); - } - - this.enabled = false; - - if (clear) { - this.clear(); - } - - return this.gameObject; - }, - - /** - * Adds the given FX Controler to this FX Component. - * - * Note that adding an FX Controller does not remove any existing FX. They all - * stack-up on-top of each other. If you don't want this, make sure to call - * either `remove` or `clear` first. - * - * @method Phaser.GameObjects.Components.FX#add - * @since 3.60.0 - * - * @generic {Phaser.FX.Controller} T - * @genericUse {T} - [fx] - * - * @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX - * Component. - * @param {object} [config] - Optional configuration object that is passed to - * the pipeline during instantiation. - * - * @return {Phaser.FX.Controller} The FX Controller. - */ - add: function(fx, config) { - if (this.isPost) { - var type = String(fx.type); - - this.gameObject.setPostPipeline(type, config); - - var pipeline = this.gameObject.getPostPipeline(type); - - if (pipeline) { - if (Array.isArray(pipeline)) { - pipeline = pipeline.pop(); + /** + * Enables this FX Component and applies the FXPipeline to the parent Game Object. + * + * This is called automatically whenever you call a method such as `addBloom`, etc. + * + * You can check the `enabled` property to see if the Game Object is already enabled, or not. + * + * This only applies to Pre FX. Post FX are always enabled. + * + * @method Phaser.GameObjects.Components.FX#enable + * @since 3.60.0 + * + * @param {number} [padding=0] - The amount of padding to add to this Game Object. + */ + enable: function (padding) + { + if (this.isPost) + { + return; } - if (pipeline) pipeline.controller = fx; + var renderer = this.gameObject.scene.sys.renderer; - return fx; - } - } else { - if (!this.enabled) { - this.enable(); - } + if (renderer && renderer.pipelines) + { + this.gameObject.pipeline = renderer.pipelines.FX_PIPELINE; - this.list.push(fx); + if (padding !== undefined) + { + this.padding = padding; + } - return fx; + this.enabled = true; + } + else + { + this.enabled = false; + } + }, + + /** + * Destroys and removes all FX Controllers that are part of this FX Component, + * then disables it. + * + * If this is a Pre FX Component it will only remove Pre FX. + * If this is a Post FX Component it will only remove Post FX. + * + * To remove both at once use the `GameObject.clearFX` method instead. + * + * @method Phaser.GameObjects.Components.FX#clear + * @since 3.60.0 + * + * @return {this} This Game Object instance. + */ + clear: function () + { + if (this.isPost) + { + this.gameObject.resetPostPipeline(true); + } + else + { + var list = this.list; + + for (var i = 0; i < list.length; i++) + { + list[i].destroy(); + } + + this.list = []; + } + + this.enabled = false; + + return this.gameObject; + }, + + /** + * Searches for the given FX Controller within this FX Component. + * + * If found, the controller is removed from this component and then destroyed. + * + * @method Phaser.GameObjects.Components.FX#remove + * @since 3.60.0 + * + * @generic {Phaser.FX.Controller} T + * @genericUse {T} - [fx] + * + * @param {Phaser.FX.Controller} fx - The FX Controller to remove from this FX Component. + * + * @return {this} This Game Object instance. + */ + remove: function (fx) + { + var i; + + if (this.isPost) + { + var pipelines = this.gameObject.getPostPipeline(String(fx.type)); + + if (!Array.isArray(pipelines)) + { + pipelines = [ pipelines ]; + } + + for (i = 0; i < pipelines.length; i++) + { + var pipeline = pipelines[i]; + + if (pipeline.controller === fx) + { + this.gameObject.removePostPipeline(pipeline); + + fx.destroy(); + + break; + } + } + } + else + { + var list = this.list; + + for (i = 0; i < list.length; i++) + { + if (list[i] === fx) + { + SpliceOne(list, i); + + fx.destroy(); + } + } + } + + return this.gameObject; + }, + + /** + * Disables this FX Component. + * + * This will reset the pipeline on the Game Object that owns this component back to its + * default and flag this component as disabled. + * + * You can re-enable it again by calling `enable` for Pre FX or by adding an FX for Post FX. + * + * Optionally, set `clear` to destroy all current FX Controllers. + * + * @method Phaser.GameObjects.Components.FX#disable + * @since 3.60.0 + * + * @param {boolean} [clear=false] - Destroy and remove all FX Controllers that are part of this component. + * + * @return {this} This Game Object instance. + */ + disable: function (clear) + { + if (clear === undefined) { clear = false; } + + if (!this.isPost) + { + this.gameObject.resetPipeline(); + } + + this.enabled = false; + + if (clear) + { + this.clear(); + } + + return this.gameObject; + }, + + /** + * Adds the given FX Controler to this FX Component. + * + * Note that adding an FX Controller does not remove any existing FX. They all stack-up + * on-top of each other. If you don't want this, make sure to call either `remove` or + * `clear` first. + * + * @method Phaser.GameObjects.Components.FX#add + * @since 3.60.0 + * + * @generic {Phaser.FX.Controller} T + * @genericUse {T} - [fx] + * + * @param {Phaser.FX.Controller} fx - The FX Controller to add to this FX Component. + * @param {object} [config] - Optional configuration object that is passed to the pipeline during instantiation. + * + * @return {Phaser.FX.Controller} The FX Controller. + */ + add: function (fx, config) + { + if (this.isPost) + { + var type = String(fx.type); + + this.gameObject.setPostPipeline(type, config); + + var pipeline = this.gameObject.getPostPipeline(type); + + if (pipeline) + { + if (Array.isArray(pipeline)) + { + pipeline = pipeline.pop(); + } + + if (pipeline) { + pipeline.controller = fx; + } + + return fx; + } + } + else + { + if (!this.enabled) + { + this.enable(); + } + + this.list.push(fx); + + return fx; + } + }, + + /** + * Adds a Glow effect. + * + * The glow effect is a visual technique that creates a soft, luminous halo around game objects, + * characters, or UI elements. This effect is used to emphasize importance, enhance visual appeal, + * or convey a sense of energy, magic, or otherworldly presence. The effect can also be set on + * the inside of the Game Object. The color and strength of the glow can be modified. + * + * @method Phaser.GameObjects.Components.FX#addGlow + * @since 3.60.0 + * + * @param {number} [color=0xffffff] - The color of the glow effect as a number value. + * @param {number} [outerStrength=4] - The strength of the glow outward from the edge of the Sprite. + * @param {number} [innerStrength=0] - The strength of the glow inward from the edge of the Sprite. + * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not the texture itself. + * @param {number} [quality=0.1] - Only available for PostFX. Sets the quality of this Glow effect. Default is 0.1. Cannot be changed post-creation. + * @param {number} [distance=10] - Only available for PostFX. Sets the distance of this Glow effect. Default is 10. Cannot be changed post-creation. + * + * @return {Phaser.FX.Glow} The Glow FX Controller. + */ + addGlow: function (color, outerStrength, innerStrength, knockout, quality, distance) + { + return this.add(new Effects.Glow(this.gameObject, color, outerStrength, innerStrength, knockout), { quality: quality, distance: distance }); + }, + + /** + * Adds a Shadow effect. + * + * The shadow effect is a visual technique used to create the illusion of depth and realism by adding darker, + * offset silhouettes or shapes beneath game objects, characters, or environments. These simulated shadows + * help to enhance the visual appeal and immersion, making the 2D game world appear more dynamic and three-dimensional. + * + * @method Phaser.GameObjects.Components.FX#addShadow + * @since 3.60.0 + * + * @param {number} [x=0] - The horizontal offset of the shadow effect. + * @param {number} [y=0] - The vertical offset of the shadow effect. + * @param {number} [decay=0.1] - The amount of decay for shadow effect. + * @param {number} [power=1] - The power of the shadow effect. + * @param {number} [color=0x000000] - The color of the shadow. + * @param {number} [samples=6] - The number of samples that the shadow effect will run for. An integer between 1 and 12. + * @param {number} [intensity=1] - The intensity of the shadow effect. + * + * @return {Phaser.FX.Shadow} The Shadow FX Controller. + */ + addShadow: function (x, y, decay, power, color, samples, intensity) + { + return this.add(new Effects.Shadow(this.gameObject, x, y, decay, power, color, samples, intensity)); + }, + + /** + * Adds a Pixelate effect. + * + * The pixelate effect is a visual technique that deliberately reduces the resolution or detail of an image, + * creating a blocky or mosaic appearance composed of large, visible pixels. This effect can be used for stylistic + * purposes, as a homage to retro gaming, or as a means to obscure certain elements within the game, such as + * during a transition or to censor specific content. + * + * @method Phaser.GameObjects.Components.FX#addPixelate + * @since 3.60.0 + * + * @param {number} [amount=1] - The amount of pixelation to apply. + * + * @return {Phaser.FX.Pixelate} The Pixelate FX Controller. + */ + addPixelate: function (amount) + { + return this.add(new Effects.Pixelate(this.gameObject, amount)); + }, + + /** + * Adds a Vignette effect. + * + * The vignette effect is a visual technique where the edges of the screen, or a Game Object, gradually darken or blur, + * creating a frame-like appearance. This effect is used to draw the player's focus towards the central action or subject, + * enhance immersion, and provide a cinematic or artistic quality to the game's visuals. + * + * @method Phaser.GameObjects.Components.FX#addVignette + * @since 3.60.0 + * + * @param {number} [x=0.5] - The horizontal offset of the vignette effect. This value is normalized to the range 0 to 1. + * @param {number} [y=0.5] - The vertical offset of the vignette effect. This value is normalized to the range 0 to 1. + * @param {number} [radius=0.5] - The radius of the vignette effect. This value is normalized to the range 0 to 1. + * @param {number} [strength=0.5] - The strength of the vignette effect. + * + * @return {Phaser.FX.Vignette} The Vignette FX Controller. + */ + addVignette: function (x, y, radius, strength) + { + return this.add(new Effects.Vignette(this.gameObject, x, y, radius, strength)); + }, + + /** + * Adds a Shine effect. + * + * The shine effect is a visual technique that simulates the appearance of reflective + * or glossy surfaces by passing a light beam across a Game Object. This effect is used to + * enhance visual appeal, emphasize certain features, and create a sense of depth or + * material properties. + * + * @method Phaser.GameObjects.Components.FX#addShine + * @since 3.60.0 + * + * @param {number} [speed=0.5] - The speed of the Shine effect. + * @param {number} [lineWidth=0.5] - The line width of the Shine effect. + * @param {number} [gradient=3] - The gradient of the Shine effect. + * @param {boolean} [reveal=false] - Does this Shine effect reveal or get added to its target? + * + * @return {Phaser.FX.Shine} The Shine FX Controller. + */ + addShine: function (speed, lineWidth, gradient, reveal) + { + return this.add(new Effects.Shine(this.gameObject, speed, lineWidth, gradient, reveal)); + }, + + /** + * Adds a Blur effect. + * + * A Gaussian blur is the result of blurring an image by a Gaussian function. It is a widely used effect, + * typically to reduce image noise and reduce detail. The visual effect of this blurring technique is a + * smooth blur resembling that of viewing the image through a translucent screen, distinctly different + * from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination. + * + * @method Phaser.GameObjects.Components.FX#addBlur + * @since 3.60.0 + * + * @param {number} [quality=0] - The quality of the blur effect. Can be either 0 for Low Quality, 1 for Medium Quality or 2 for High Quality. + * @param {number} [x=2] - The horizontal offset of the blur effect. + * @param {number} [y=2] - The vertical offset of the blur effect. + * @param {number} [strength=1] - The strength of the blur effect. + * @param {number} [color=0xffffff] - The color of the blur, as a hex value. + * @param {number} [steps=4] - The number of steps to run the blur effect for. This value should always be an integer. + * + * @return {Phaser.FX.Blur} The Blur FX Controller. + */ + addBlur: function (quality, x, y, strength, color, steps) + { + return this.add(new Effects.Blur(this.gameObject, quality, x, y, strength, color, steps)); + }, + + /** + * Adds a Gradient effect. + * + * The gradient overlay effect is a visual technique where a smooth color transition is applied over Game Objects, + * such as sprites or UI components. This effect is used to enhance visual appeal, emphasize depth, or create + * stylistic and atmospheric variations. It can also be utilized to convey information, such as representing + * progress or health status through color changes. + * + * @method Phaser.GameObjects.Components.FX#addGradient + * @since 3.60.0 + * + * @param {number} [color1=0xff0000] - The first gradient color, given as a number value. + * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value. + * @param {number} [alpha=0.2] - The alpha value of the gradient effect. + * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toY=1] - The vertical position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect. + * + * @return {Phaser.FX.Gradient} The Gradient FX Controller. + */ + addGradient: function (color1, color2, alpha, fromX, fromY, toX, toY, size) + { + return this.add(new Effects.Gradient(this.gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size)); + }, + + /** + * Adds a Bloom effect. + * + * Bloom is an effect used to reproduce an imaging artifact of real-world cameras. + * The effect produces fringes of light extending from the borders of bright areas in an image, + * contributing to the illusion of an extremely bright light overwhelming the + * camera or eye capturing the scene. + * + * @method Phaser.GameObjects.Components.FX#addBloom + * @since 3.60.0 + * + * @param {number} [color] - The color of the Bloom, as a hex value. + * @param {number} [offsetX=1] - The horizontal offset of the bloom effect. + * @param {number} [offsetY=1] - The vertical offset of the bloom effect. + * @param {number} [blurStrength=1] - The strength of the blur process of the bloom effect. + * @param {number} [strength=1] - The strength of the blend process of the bloom effect. + * @param {number} [steps=4] - The number of steps to run the Bloom effect for. This value should always be an integer. + * + * @return {Phaser.FX.Bloom} The Bloom FX Controller. + */ + addBloom: function (color, offsetX, offsetY, blurStrength, strength, steps) + { + return this.add(new Effects.Bloom(this.gameObject, color, offsetX, offsetY, blurStrength, strength, steps)); + }, + + /** + * Adds a ColorMatrix effect. + * + * The color matrix effect is a visual technique that involves manipulating the colors of an image + * or scene using a mathematical matrix. This process can adjust hue, saturation, brightness, and contrast, + * allowing developers to create various stylistic appearances or mood settings within the game. + * Common applications include simulating different lighting conditions, applying color filters, + * or achieving a specific visual style. + * + * @method Phaser.GameObjects.Components.FX#addColorMatrix + * @since 3.60.0 + * + * @return {Phaser.FX.ColorMatrix} The ColorMatrix FX Controller. + */ + addColorMatrix: function () + { + return this.add(new Effects.ColorMatrix(this.gameObject)); + }, + + /** + * Adds a Circle effect. + * + * This effect will draw a circle around the texture of the Game Object, effectively masking off + * any area outside of the circle without the need for an actual mask. You can control the thickness + * of the circle, the color of the circle and the color of the background, should the texture be + * transparent. You can also control the feathering applied to the circle, allowing for a harsh or soft edge. + * + * Please note that adding this effect to a Game Object will not change the input area or physics body of + * the Game Object, should it have one. + * + * @method Phaser.GameObjects.Components.FX#addCircle + * @since 3.60.0 + * + * @param {number} [thickness=8] - The width of the circle around the texture, in pixels. + * @param {number} [color=0xfeedb6] - The color of the circular ring, given as a number value. + * @param {number} [backgroundColor=0xff0000] - The color of the background, behind the texture, given as a number value. + * @param {number} [scale=1] - The scale of the circle. The default scale is 1, which is a circle the full size of the underlying texture. + * @param {number} [feather=0.005] - The amount of feathering to apply to the circle from the ring. + * + * @return {Phaser.FX.Circle} The Circle FX Controller. + */ + addCircle: function (thickness, color, backgroundColor, scale, feather) + { + return this.add(new Effects.Circle(this.gameObject, thickness, color, backgroundColor, scale, feather)); + }, + + /** + * Adds a Barrel effect. + * + * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to + * a Game Object. The amount of the effect can be modified in real-time. + * + * @method Phaser.GameObjects.Components.FX#addBarrel + * @since 3.60.0 + * + * @param {number} [amount=1] - The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1. + * + * @return {Phaser.FX.Barrel} The Barrel FX Controller. + */ + addBarrel: function (amount) + { + return this.add(new Effects.Barrel(this.gameObject, amount)); + }, + + /** + * Adds a Displacement effect. + * + * The displacement effect is a visual technique that alters the position of pixels in an image + * or texture based on the values of a displacement map. This effect is used to create the illusion + * of depth, surface irregularities, or distortion in otherwise flat elements. It can be applied to + * characters, objects, or backgrounds to enhance realism, convey movement, or achieve various + * stylistic appearances. + * + * @method Phaser.GameObjects.Components.FX#addDisplacement + * @since 3.60.0 + * + * @param {string} [texture='__WHITE'] - The unique string-based key of the texture to use for displacement, which must exist in the Texture Manager. + * @param {number} [x=0.005] - The amount of horizontal displacement to apply. A very small float number, such as 0.005. + * @param {number} [y=0.005] - The amount of vertical displacement to apply. A very small float number, such as 0.005. + * + * @return {Phaser.FX.Displacement} The Displacement FX Controller. + */ + addDisplacement: function (texture, x, y) + { + return this.add(new Effects.Displacement(this.gameObject, texture, x, y)); + }, + + /** + * Adds a Wipe effect. + * + * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements + * in the game, such as images, text, or scene transitions. This effect is often used to create + * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition + * between game states. + * + * You can set both the direction and the axis of the wipe effect. The following combinations are possible: + * + * * left to right: direction 0, axis 0 + * * right to left: direction 1, axis 0 + * * top to bottom: direction 1, axis 1 + * * bottom to top: direction 1, axis 0 + * + * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect. + * + * @method Phaser.GameObjects.Components.FX#addWipe + * @since 3.60.0 + * + * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1. + * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property. + * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property. + * + * @return {Phaser.FX.Wipe} The Wipe FX Controller. + */ + addWipe: function (wipeWidth, direction, axis) + { + return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis)); + }, + + /** + * Adds a Reveal Wipe effect. + * + * The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements + * in the game, such as images, text, or scene transitions. This effect is often used to create + * a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition + * between game states. + * + * You can set both the direction and the axis of the wipe effect. The following combinations are possible: + * + * * left to right: direction 0, axis 0 + * * right to left: direction 1, axis 0 + * * top to bottom: direction 1, axis 1 + * * bottom to top: direction 1, axis 0 + * + * It is up to you to set the `progress` value yourself, i.e. via a Tween, in order to transition the effect. + * + * @method Phaser.GameObjects.Components.FX#addReveal + * @since 3.60.0 + * + * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value is normalized in the range 0 to 1. + * @param {number} [direction=0] - The direction of the wipe effect. Either 0 or 1. Set in conjunction with the axis property. + * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set in conjunction with the direction property. + * + * @return {Phaser.FX.Wipe} The Wipe FX Controller. + */ + addReveal: function (wipeWidth, direction, axis) + { + return this.add(new Effects.Wipe(this.gameObject, wipeWidth, direction, axis, true)); + }, + + /** + * Adds a Bokeh effect. + * + * Bokeh refers to a visual effect that mimics the photographic technique of creating a shallow depth of field. + * This effect is used to emphasize the game's main subject or action, by blurring the background or foreground + * elements, resulting in a more immersive and visually appealing experience. It is achieved through rendering + * techniques that simulate the out-of-focus areas, giving a sense of depth and realism to the game's graphics. + * + * See also Tilt Shift. + * + * @method Phaser.GameObjects.Components.FX#addBokeh + * @since 3.60.0 + * + * @param {number} [radius=0.5] - The radius of the bokeh effect. + * @param {number} [amount=1] - The amount of the bokeh effect. + * @param {number} [contrast=0.2] - The color contrast of the bokeh effect. + * + * @return {Phaser.FX.Bokeh} The Bokeh FX Controller. + */ + addBokeh: function (radius, amount, contrast) + { + return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast)); + }, + + /** + * Adds a Tilt Shift effect. + * + * This Bokeh effect can also be used to generate a Tilt Shift effect, which is a technique used to create a miniature + * effect by blurring everything except a small area of the image. This effect is achieved by blurring the + * top and bottom elements, while keeping the center area in focus. + * + * See also Bokeh. + * + * @method Phaser.GameObjects.Components.FX#addTiltShift + * @since 3.60.0 + * + * @param {number} [radius=0.5] - The radius of the bokeh effect. + * @param {number} [amount=1] - The amount of the bokeh effect. + * @param {number} [contrast=0.2] - The color contrast of the bokeh effect. + * @param {number} [blurX=1] - The amount of horizontal blur. + * @param {number} [blurY=1] - The amount of vertical blur. + * @param {number} [strength=1] - The strength of the blur. + * + * @return {Phaser.FX.Bokeh} The Bokeh TiltShift FX Controller. + */ + addTiltShift: function (radius, amount, contrast, blurX, blurY, strength) + { + return this.add(new Effects.Bokeh(this.gameObject, radius, amount, contrast, true, blurX, blurY, strength)); + }, + + /** + * Destroys this FX Component. + * + * Called automatically when Game Objects are destroyed. + * + * @method Phaser.GameObjects.Components.FX#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.clear(); + + this.gameObject = null; } - }, - - /** - * Adds a Glow effect. - * - * The glow effect is a visual technique that creates a soft, luminous halo - * around game objects, characters, or UI elements. This effect is used to - * emphasize importance, enhance visual appeal, or convey a sense of energy, - * magic, or otherworldly presence. The effect can also be set on the inside - * of the Game Object. The color and strength of the glow can be modified. - * - * @method Phaser.GameObjects.Components.FX#addGlow - * @since 3.60.0 - * - * @param {number} [color=0xffffff] - The color of the glow effect as a number - * value. - * @param {number} [outerStrength=4] - The strength of the glow outward from - * the edge of the Sprite. - * @param {number} [innerStrength=0] - The strength of the glow inward from - * the edge of the Sprite. - * @param {boolean} [knockout=false] - If `true` only the glow is drawn, not - * the texture itself. - * @param {number} [quality=0.1] - Only available for PostFX. Sets the quality - * of this Glow effect. Default is 0.1. Cannot be changed post-creation. - * @param {number} [distance=10] - Only available for PostFX. Sets the - * distance of this Glow effect. Default is 10. Cannot be changed - * post-creation. - * - * @return {Phaser.FX.Glow} The Glow FX Controller. - */ - addGlow: function( - color, outerStrength, innerStrength, knockout, quality, distance) { - return this.add( - new Effects.Glow( - this.gameObject, color, outerStrength, innerStrength, knockout), - {quality: quality, distance: distance}); - }, - - /** - * Adds a Shadow effect. - * - * The shadow effect is a visual technique used to create the illusion of - * depth and realism by adding darker, offset silhouettes or shapes beneath - * game objects, characters, or environments. These simulated shadows help to - * enhance the visual appeal and immersion, making the 2D game world appear - * more dynamic and three-dimensional. - * - * @method Phaser.GameObjects.Components.FX#addShadow - * @since 3.60.0 - * - * @param {number} [x=0] - The horizontal offset of the shadow effect. - * @param {number} [y=0] - The vertical offset of the shadow effect. - * @param {number} [decay=0.1] - The amount of decay for shadow effect. - * @param {number} [power=1] - The power of the shadow effect. - * @param {number} [color=0x000000] - The color of the shadow. - * @param {number} [samples=6] - The number of samples that the shadow effect - * will run for. An integer between 1 and 12. - * @param {number} [intensity=1] - The intensity of the shadow effect. - * - * @return {Phaser.FX.Shadow} The Shadow FX Controller. - */ - addShadow: function(x, y, decay, power, color, samples, intensity) { - return this.add(new Effects.Shadow( - this.gameObject, x, y, decay, power, color, samples, intensity)); - }, - - /** - * Adds a Pixelate effect. - * - * The pixelate effect is a visual technique that deliberately reduces the - * resolution or detail of an image, creating a blocky or mosaic appearance - * composed of large, visible pixels. This effect can be used for stylistic - * purposes, as a homage to retro gaming, or as a means to obscure certain - * elements within the game, such as during a transition or to censor specific - * content. - * - * @method Phaser.GameObjects.Components.FX#addPixelate - * @since 3.60.0 - * - * @param {number} [amount=1] - The amount of pixelation to apply. - * - * @return {Phaser.FX.Pixelate} The Pixelate FX Controller. - */ - addPixelate: function(amount) { - return this.add(new Effects.Pixelate(this.gameObject, amount)); - }, - - /** - * Adds a Vignette effect. - * - * The vignette effect is a visual technique where the edges of the screen, or - * a Game Object, gradually darken or blur, creating a frame-like appearance. - * This effect is used to draw the player's focus towards the central action - * or subject, enhance immersion, and provide a cinematic or artistic quality - * to the game's visuals. - * - * @method Phaser.GameObjects.Components.FX#addVignette - * @since 3.60.0 - * - * @param {number} [x=0.5] - The horizontal offset of the vignette effect. - * This value is normalized to the range 0 to 1. - * @param {number} [y=0.5] - The vertical offset of the vignette effect. This - * value is normalized to the range 0 to 1. - * @param {number} [radius=0.5] - The radius of the vignette effect. This - * value is normalized to the range 0 to 1. - * @param {number} [strength=0.5] - The strength of the vignette effect. - * - * @return {Phaser.FX.Vignette} The Vignette FX Controller. - */ - addVignette: function(x, y, radius, strength) { - return this.add( - new Effects.Vignette(this.gameObject, x, y, radius, strength)); - }, - - /** - * Adds a Shine effect. - * - * The shine effect is a visual technique that simulates the appearance of - * reflective or glossy surfaces by passing a light beam across a Game Object. - * This effect is used to enhance visual appeal, emphasize certain features, - * and create a sense of depth or material properties. - * - * @method Phaser.GameObjects.Components.FX#addShine - * @since 3.60.0 - * - * @param {number} [speed=0.5] - The speed of the Shine effect. - * @param {number} [lineWidth=0.5] - The line width of the Shine effect. - * @param {number} [gradient=3] - The gradient of the Shine effect. - * @param {boolean} [reveal=false] - Does this Shine effect reveal or get - * added to its target? - * - * @return {Phaser.FX.Shine} The Shine FX Controller. - */ - addShine: function(speed, lineWidth, gradient, reveal) { - return this.add( - new Effects.Shine(this.gameObject, speed, lineWidth, gradient, reveal)); - }, - - /** - * Adds a Blur effect. - * - * A Gaussian blur is the result of blurring an image by a Gaussian function. - * It is a widely used effect, typically to reduce image noise and reduce - * detail. The visual effect of this blurring technique is a smooth blur - * resembling that of viewing the image through a translucent screen, - * distinctly different from the bokeh effect produced by an out-of-focus lens - * or the shadow of an object under usual illumination. - * - * @method Phaser.GameObjects.Components.FX#addBlur - * @since 3.60.0 - * - * @param {number} [quality=0] - The quality of the blur effect. Can be either - * 0 for Low Quality, 1 for Medium Quality or 2 for High Quality. - * @param {number} [x=2] - The horizontal offset of the blur effect. - * @param {number} [y=2] - The vertical offset of the blur effect. - * @param {number} [strength=1] - The strength of the blur effect. - * @param {number} [color=0xffffff] - The color of the blur, as a hex value. - * @param {number} [steps=4] - The number of steps to run the blur effect for. - * This value should always be an integer. - * - * @return {Phaser.FX.Blur} The Blur FX Controller. - */ - addBlur: function(quality, x, y, strength, color, steps) { - return this.add(new Effects.Blur( - this.gameObject, quality, x, y, strength, color, steps)); - }, - - /** - * Adds a Gradient effect. - * - * The gradient overlay effect is a visual technique where a smooth color - * transition is applied over Game Objects, such as sprites or UI components. - * This effect is used to enhance visual appeal, emphasize depth, or create - * stylistic and atmospheric variations. It can also be utilized to convey - * information, such as representing progress or health status through color - * changes. - * - * @method Phaser.GameObjects.Components.FX#addGradient - * @since 3.60.0 - * - * @param {number} [color1=0xff0000] - The first gradient color, given as a - * number value. - * @param {number} [color2=0x00ff00] - The second gradient color, given as a - * number value. - * @param {number} [alpha=0.2] - The alpha value of the gradient effect. - * @param {number} [fromX=0] - The horizontal position the gradient will start - * from. This value is normalized, between 0 and 1, and is not in pixels. - * @param {number} [fromY=0] - The vertical position the gradient will start - * from. This value is normalized, between 0 and 1, and is not in pixels. - * @param {number} [toX=0] - The horizontal position the gradient will end at. - * This value is normalized, between 0 and 1, and is not in pixels. - * @param {number} [toY=1] - The vertical position the gradient will end at. - * This value is normalized, between 0 and 1, and is not in pixels. - * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, - * as spread over the entire height of the texture. Leave this at zero for - * a smooth gradient, or set higher for a more retro chunky effect. - * - * @return {Phaser.FX.Gradient} The Gradient FX Controller. - */ - addGradient: function(color1, color2, alpha, fromX, fromY, toX, toY, size) { - return this.add(new Effects.Gradient( - this.gameObject, color1, color2, alpha, fromX, fromY, toX, toY, size)); - }, - - /** - * Adds a Bloom effect. - * - * Bloom is an effect used to reproduce an imaging artifact of real-world - * cameras. The effect produces fringes of light extending from the borders of - * bright areas in an image, contributing to the illusion of an extremely - * bright light overwhelming the camera or eye capturing the scene. - * - * @method Phaser.GameObjects.Components.FX#addBloom - * @since 3.60.0 - * - * @param {number} [color] - The color of the Bloom, as a hex value. - * @param {number} [offsetX=1] - The horizontal offset of the bloom effect. - * @param {number} [offsetY=1] - The vertical offset of the bloom effect. - * @param {number} [blurStrength=1] - The strength of the blur process of the - * bloom effect. - * @param {number} [strength=1] - The strength of the blend process of the - * bloom effect. - * @param {number} [steps=4] - The number of steps to run the Bloom effect - * for. This value should always be an integer. - * - * @return {Phaser.FX.Bloom} The Bloom FX Controller. - */ - addBloom: function(color, offsetX, offsetY, blurStrength, strength, steps) { - return this.add(new Effects.Bloom( - this.gameObject, color, offsetX, offsetY, blurStrength, strength, - steps)); - }, - - /** - * Adds a ColorMatrix effect. - * - * The color matrix effect is a visual technique that involves manipulating - * the colors of an image or scene using a mathematical matrix. This process - * can adjust hue, saturation, brightness, and contrast, allowing developers - * to create various stylistic appearances or mood settings within the game. - * Common applications include simulating different lighting conditions, - * applying color filters, or achieving a specific visual style. - * - * @method Phaser.GameObjects.Components.FX#addColorMatrix - * @since 3.60.0 - * - * @return {Phaser.FX.ColorMatrix} The ColorMatrix FX Controller. - */ - addColorMatrix: function() { - return this.add(new Effects.ColorMatrix(this.gameObject)); - }, - - /** - * Adds a Circle effect. - * - * This effect will draw a circle around the texture of the Game Object, - * effectively masking off any area outside of the circle without the need for - * an actual mask. You can control the thickness of the circle, the color of - * the circle and the color of the background, should the texture be - * transparent. You can also control the feathering applied to the circle, - * allowing for a harsh or soft edge. - * - * Please note that adding this effect to a Game Object will not change the - * input area or physics body of the Game Object, should it have one. - * - * @method Phaser.GameObjects.Components.FX#addCircle - * @since 3.60.0 - * - * @param {number} [thickness=8] - The width of the circle around the texture, - * in pixels. - * @param {number} [color=0xfeedb6] - The color of the circular ring, given as - * a number value. - * @param {number} [backgroundColor=0xff0000] - The color of the background, - * behind the texture, given as a number value. - * @param {number} [scale=1] - The scale of the circle. The default scale is - * 1, which is a circle the full size of the underlying texture. - * @param {number} [feather=0.005] - The amount of feathering to apply to the - * circle from the ring. - * - * @return {Phaser.FX.Circle} The Circle FX Controller. - */ - addCircle: function(thickness, color, backgroundColor, scale, feather) { - return this.add(new Effects.Circle( - this.gameObject, thickness, color, backgroundColor, scale, feather)); - }, - - /** - * Adds a Barrel effect. - * - * A barrel effect allows you to apply either a 'pinch' or 'expand' distortion - * to a Game Object. The amount of the effect can be modified in real-time. - * - * @method Phaser.GameObjects.Components.FX#addBarrel - * @since 3.60.0 - * - * @param {number} [amount=1] - The amount of distortion applied to the barrel - * effect. A value of 1 is no distortion. Typically keep this within +- 1. - * - * @return {Phaser.FX.Barrel} The Barrel FX Controller. - */ - addBarrel: function(amount) { - return this.add(new Effects.Barrel(this.gameObject, amount)); - }, - - /** - * Adds a Displacement effect. - * - * The displacement effect is a visual technique that alters the position of - * pixels in an image or texture based on the values of a displacement map. - * This effect is used to create the illusion of depth, surface - * irregularities, or distortion in otherwise flat elements. It can be applied - * to characters, objects, or backgrounds to enhance realism, convey movement, - * or achieve various stylistic appearances. - * - * @method Phaser.GameObjects.Components.FX#addDisplacement - * @since 3.60.0 - * - * @param {string} [texture='__WHITE'] - The unique string-based key of the - * texture to use for displacement, which must exist in the Texture - * Manager. - * @param {number} [x=0.005] - The amount of horizontal displacement to apply. - * A very small float number, such as 0.005. - * @param {number} [y=0.005] - The amount of vertical displacement to apply. A - * very small float number, such as 0.005. - * - * @return {Phaser.FX.Displacement} The Displacement FX Controller. - */ - addDisplacement: function(texture, x, y) { - return this.add(new Effects.Displacement(this.gameObject, texture, x, y)); - }, - - /** - * Adds a Wipe effect. - * - * The wipe or reveal effect is a visual technique that gradually uncovers or - * conceals elements in the game, such as images, text, or scene transitions. - * This effect is often used to create a sense of progression, reveal hidden - * content, or provide a smooth and visually appealing transition between game - * states. - * - * You can set both the direction and the axis of the wipe effect. The - * following combinations are possible: - * - * * left to right: direction 0, axis 0 - * * right to left: direction 1, axis 0 - * * top to bottom: direction 1, axis 1 - * * bottom to top: direction 1, axis 0 - * - * It is up to you to set the `progress` value yourself, i.e. via a Tween, in - * order to transition the effect. - * - * @method Phaser.GameObjects.Components.FX#addWipe - * @since 3.60.0 - * - * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value - * is normalized in the range 0 to 1. - * @param {number} [direction=0] - The direction of the wipe effect. Either 0 - * or 1. Set in conjunction with the axis property. - * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set - * in conjunction with the direction property. - * - * @return {Phaser.FX.Wipe} The Wipe FX Controller. - */ - addWipe: function(wipeWidth, direction, axis) { - return this.add( - new Effects.Wipe(this.gameObject, wipeWidth, direction, axis)); - }, - - /** - * Adds a Reveal Wipe effect. - * - * The wipe or reveal effect is a visual technique that gradually uncovers or - * conceals elements in the game, such as images, text, or scene transitions. - * This effect is often used to create a sense of progression, reveal hidden - * content, or provide a smooth and visually appealing transition between game - * states. - * - * You can set both the direction and the axis of the wipe effect. The - * following combinations are possible: - * - * * left to right: direction 0, axis 0 - * * right to left: direction 1, axis 0 - * * top to bottom: direction 1, axis 1 - * * bottom to top: direction 1, axis 0 - * - * It is up to you to set the `progress` value yourself, i.e. via a Tween, in - * order to transition the effect. - * - * @method Phaser.GameObjects.Components.FX#addReveal - * @since 3.60.0 - * - * @param {number} [wipeWidth=0.1] - The width of the wipe effect. This value - * is normalized in the range 0 to 1. - * @param {number} [direction=0] - The direction of the wipe effect. Either 0 - * or 1. Set in conjunction with the axis property. - * @param {number} [axis=0] - The axis of the wipe effect. Either 0 or 1. Set - * in conjunction with the direction property. - * - * @return {Phaser.FX.Wipe} The Wipe FX Controller. - */ - addReveal: function(wipeWidth, direction, axis) { - return this.add( - new Effects.Wipe(this.gameObject, wipeWidth, direction, axis, true)); - }, - - /** - * Adds a Bokeh effect. - * - * Bokeh refers to a visual effect that mimics the photographic technique of - * creating a shallow depth of field. This effect is used to emphasize the - * game's main subject or action, by blurring the background or foreground - * elements, resulting in a more immersive and visually appealing experience. - * It is achieved through rendering techniques that simulate the out-of-focus - * areas, giving a sense of depth and realism to the game's graphics. - * - * See also Tilt Shift. - * - * @method Phaser.GameObjects.Components.FX#addBokeh - * @since 3.60.0 - * - * @param {number} [radius=0.5] - The radius of the bokeh effect. - * @param {number} [amount=1] - The amount of the bokeh effect. - * @param {number} [contrast=0.2] - The color contrast of the bokeh effect. - * - * @return {Phaser.FX.Bokeh} The Bokeh FX Controller. - */ - addBokeh: function(radius, amount, contrast) { - return this.add( - new Effects.Bokeh(this.gameObject, radius, amount, contrast)); - }, - - /** - * Adds a Tilt Shift effect. - * - * This Bokeh effect can also be used to generate a Tilt Shift effect, which - * is a technique used to create a miniature effect by blurring everything - * except a small area of the image. This effect is achieved by blurring the - * top and bottom elements, while keeping the center area in focus. - * - * See also Bokeh. - * - * @method Phaser.GameObjects.Components.FX#addTiltShift - * @since 3.60.0 - * - * @param {number} [radius=0.5] - The radius of the bokeh effect. - * @param {number} [amount=1] - The amount of the bokeh effect. - * @param {number} [contrast=0.2] - The color contrast of the bokeh effect. - * @param {number} [blurX=1] - The amount of horizontal blur. - * @param {number} [blurY=1] - The amount of vertical blur. - * @param {number} [strength=1] - The strength of the blur. - * - * @return {Phaser.FX.Bokeh} The Bokeh TiltShift FX Controller. - */ - addTiltShift: function(radius, amount, contrast, blurX, blurY, strength) { - return this.add(new Effects.Bokeh( - this.gameObject, radius, amount, contrast, true, blurX, blurY, - strength)); - }, - - /** - * Destroys this FX Component. - * - * Called automatically when Game Objects are destroyed. - * - * @method Phaser.GameObjects.Components.FX#destroy - * @since 3.60.0 - */ - destroy: function() { - this.clear(); - - this.gameObject = null; - } });